.company-colors-page {
    color: #263238;
}

.company-colors-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.company-colors-header h2 {
    margin: 0 0 6px;
}

.company-color-modal-header p,
.company-color-modal-help {
    margin: 0;
    color: #5f6b73;
    font-size: 14px;
}

.color-primary-button,
.color-secondary-button,
.company-color-action {
    border: 0;
    border-radius: 7px;
    padding: 9px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.color-primary-button {
    background: #333333;
    color: #ffffff;
}

.color-primary-button:hover,
.company-color-action.primary:hover {
    background: #4b4b4b;
}

.color-secondary-button,
.company-color-action {
    background: #edf1f3;
    color: #263238;
}

.color-secondary-button:hover,
.company-color-action:hover {
    background: #dde4e8;
}

.company-color-action.danger {
    background: #fff0ee;
    color: #b23a2f;
}

.company-color-action.danger:hover {
    background: #fbded9;
}

.color-primary-button:disabled,
.color-secondary-button:disabled,
.company-color-action:disabled,
.company-color-palette-option:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.color-service-status {
    border: 1px solid #dce3e7;
    border-left: 4px solid #6c7a83;
    border-radius: 7px;
    background: #f7f9fa;
    padding: 11px 13px;
    margin-bottom: 16px;
    font-size: 14px;
}

.color-service-status.success {
    border-left-color: #229954;
    background: #f0faf4;
}

.color-service-status.warning {
    border-left-color: #d68910;
    background: #fff9eb;
}

.color-service-status.error {
    border-left-color: #c0392b;
    background: #fff2f0;
}

.company-color-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.company-color-stat {
    border: 1px solid #e1e6e9;
    border-radius: 9px;
    background: #ffffff;
    padding: 13px;
    box-shadow: 0 2px 8px rgba(24, 39, 47, 0.05);
}

.company-color-stat span {
    display: block;
    color: #65727a;
    font-size: 12px;
    margin-bottom: 7px;
}

.company-color-stat strong {
    display: block;
    font-size: 22px;
    line-height: 1.15;
}

#colorStatLastSync {
    font-size: 14px;
    line-height: 1.35;
}

.company-color-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.company-color-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #536169;
    font-size: 13px;
    font-weight: 600;
}

.company-color-search {
    flex: 1;
    min-width: 240px;
}

.company-color-toolbar input,
.company-color-toolbar select {
    border: 1px solid #cfd8dc;
    border-radius: 7px;
    background: #ffffff;
    color: #263238;
    min-height: 40px;
    padding: 8px 11px;
    font: inherit;
}

.company-color-toolbar input:focus,
.company-color-toolbar select:focus,
.company-color-action:focus-visible,
.company-color-palette-option:focus-visible,
.color-primary-button:focus-visible,
.color-secondary-button:focus-visible,
.color-icon-button:focus-visible {
    outline: 3px solid rgba(0, 130, 200, 0.25);
    outline-offset: 2px;
}

.company-color-table-wrap {
    border: 1px solid #dde4e7;
    border-radius: 9px;
    overflow: auto;
}

.company-color-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.company-color-table th,
.company-color-table td {
    border-bottom: 1px solid #e6ebed;
    padding: 12px 13px;
    text-align: left;
    vertical-align: middle;
}

.company-color-table th {
    position: sticky;
    top: 0;
    background: #f3f6f7;
    color: #4d5b63;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 1;
}

.company-color-table tbody tr:last-child td {
    border-bottom: 0;
}

.company-color-table tbody tr:hover {
    background: #fafcfc;
}

.company-color-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.company-color-swatch.pending {
    background: repeating-linear-gradient(135deg, #d3d3d3 0, #d3d3d3 7px, #f1f1f1 7px, #f1f1f1 14px);
}

.company-color-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-color-value small,
.company-color-company small {
    display: block;
    color: #718087;
    font-size: 12px;
    margin-top: 3px;
}

.company-color-company strong {
    display: block;
    max-width: 460px;
}

.company-color-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.company-color-badge.active {
    background: #e8f7ee;
    color: #18723d;
}

.company-color-badge.inactive_reserved {
    background: #fff4d8;
    color: #8a5b00;
}

.company-color-badge.pending {
    background: #fce8e6;
    color: #a43128;
}

.company-color-badge.released {
    background: #edf0f2;
    color: #59666d;
}

.company-color-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.company-color-actions-heading {
    text-align: right !important;
}

.company-color-empty {
    padding: 30px;
    color: #68767d;
    text-align: center;
}

.company-color-empty[hidden],
.company-color-toast[hidden] {
    display: none;
}

.company-color-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 30, 36, 0.58);
}

.company-color-modal-backdrop[hidden] {
    display: none;
}

.company-color-modal {
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    padding: 20px;
}

.company-color-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.company-color-modal-header h3 {
    margin: 0 0 5px;
}

.color-icon-button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #edf1f3;
    color: #35434a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.company-color-modal-help {
    margin-bottom: 16px;
}

.company-color-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
}

.company-color-palette-option {
    min-height: 92px;
    border: 2px solid transparent;
    border-radius: 9px;
    padding: 9px;
    background: #f6f8f9;
    color: #263238;
    cursor: pointer;
    text-align: left;
}

.company-color-palette-option:hover {
    border-color: #8fa4ae;
}

.company-color-palette-option.current {
    border-color: #333333;
}

.company-color-palette-option .company-color-swatch {
    width: 100%;
    height: 34px;
    margin-bottom: 7px;
}

.company-color-palette-option strong,
.company-color-palette-option small {
    display: block;
}

.company-color-palette-option small {
    overflow: hidden;
    color: #68767d;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-color-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
}

.company-color-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10040;
    max-width: 420px;
    border-radius: 8px;
    background: #263238;
    color: #ffffff;
    padding: 12px 15px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.company-color-toast.error {
    background: #a93226;
}

#camara3 td.company-color-pending-cell,
#camara4 td.company-color-pending-cell,
#camara5 td.company-color-pending-cell,
#camara6 td.company-color-pending-cell {
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.28) 0,
        rgba(255, 255, 255, 0.28) 7px,
        rgba(0, 0, 0, 0.08) 7px,
        rgba(0, 0, 0, 0.08) 14px
    ) !important;
}

@media (max-width: 1100px) {
    .company-color-stats {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    .company-color-palette-grid {
        grid-template-columns: repeat(4, minmax(105px, 1fr));
    }
}

@media (max-width: 700px) {
    .company-colors-header {
        flex-direction: column;
    }

    .company-color-stats {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .company-color-palette-grid {
        grid-template-columns: repeat(2, minmax(105px, 1fr));
    }

    .company-color-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
