.customers-rates {
    width: 100%;
    max-width: 100%;
    padding: 32px 40px;
    background-color: #f8fafc;
    box-sizing: border-box;
}

.customers-rates-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.customers-rates-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
}

.customers-rates-subtitle {
    font-size: 14px;
    color: #64748b;
}

.customers-rates-filters label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.customers-rates-filters .Select {
    margin-top: 6px;
}

.customers-rates-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    color: #475569;
    background-color: #f8fafc;
    border: 1px dashed #cbd5f5;
    border-radius: 12px;
    margin-top: 12px;
    letter-spacing: 0.2px;
}

.customers-rates-table-container {
    margin-top: 4px;
    width: 100%;
    min-height: 450px;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.ag-theme-alpine {
    --ag-font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ag-font-size: 13px;
    --ag-background-color: #ffffff;
    --ag-header-background-color: #f1f5f9;
    --ag-odd-row-background-color: #f8fafc;
    --ag-border-color: #e2e8f0;
    --ag-row-border-color: #e2e8f0;
    --ag-header-foreground-color: #0f172a;
    --ag-foreground-color: #0f172a;
    --ag-selected-row-background-color: #dbeafe;
    --ag-row-hover-color: #f1f5f9;
}

.ag-header-cell-label {
    font-weight: 600;
    color: #334155;
}

.ag-row-hover {
    background-color: #f1f5f9 !important;
}

.ag-row {
    border-bottom: 1px solid #f1f5f9;
}

.ag-header {
    border-bottom: 1px solid #e2e8f0;
}

.ag-paging-panel {
    border-top: 1px solid #e2e8f0;
    padding-top: 6px;
    font-size: 12px;
    color: #475569;
}

.ag-root-wrapper {
    border-radius: 10px;
    overflow: hidden;
}

.VirtualizedSelectMenu,
.Select-menu-outer {
    z-index: 2000 !important;
}

.Select,
.Select-control,
.Select-menu-outer,
.Select-option,
.Select-placeholder,
.Select-value,
.Select-input input {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.Select-menu-outer {
    border-radius: 12px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}

.Select-option {
    padding: 7px 10px;
    font-size: 13px;
    color: #0f172a;
}

.Select-option.is-focused {
    background-color: #f1f5f9;
}

.Select-option.is-selected {
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}

.customers-rates-filters .Select-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    min-height: 42px;
    padding: 2px 8px;
    transition: all 0.2s ease;
}

.customers-rates-filters .Select-control:hover {
    border-color: #94a3b8;
}

.customers-rates-filters
.is-focused:not(.is-open)
> .Select-control {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.customers-rates-filters .Select-placeholder {
    color: #94a3b8;
    font-size: 14px;
}

.customers-rates-filters .Select-value {
    background-color: #e0e7ff;
    border-radius: 8px;
    padding: 2px 8px;
    margin: 3px 4px 3px 0;
    font-size: 13px;
    color: #1e3a8a;
}

.customers-rates-filters .Select-value-icon {
    color: #475569;
}

.customers-rates-filters .Select-value-icon:hover {
    color: #1e293b;
}

.customers-rates:has(.Select-menu-outer)
.customers-rates-table-container {
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
}

.customers-rates-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.export-btn-rates {
    background-color: #0f172a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.export-btn-rates:hover {
    background-color: #0a288b;
}

.reset-btn {
    background-color: #0f172a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.reset-btn:hover {
    background-color: #0a288b;
}

.customers-rates-filters .Select,
.customers-rates-filters .Select * {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.customers-rates-filters .Select-control {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

.customers-rates-filters .Select-control {
    min-height: 44px;
}

.cell-edited,
.row-edited {
    background-color: #ffedd5 !important;
    color: #9a3412;
}

.cell-saved,
.row-saved {
    background-color: #dcfce7 !important;
    color: #14532d;
}

/* Truncate dropdown option text */
.customers-rates-filters .Select-option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 12px;
    height: auto;
    line-height: 1.4;
}

/* Handle multi-select tags */
.customers-rates-filters .Select-value {
    max-width: 100%;
    display: flex;
    align-items: center;
    background-color: #dbeafe;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
}

.customers-rates-filters .Select-value-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Dropdown container with flex wrap for multiple selections */
.customers-rates-filters .Select-input {
    max-width: 100%;
}

/* Multi-select wrapper */
.customers-rates-filters .Select--multi {
    flex-wrap: wrap;
}

.customers-rates-filters .Select-multi-value-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Horizontal layout for filter dropdowns */
.customers-rates-filters-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.customers-rates-filters {
    flex: 1;
    width: 100%;
    max-width: none;
    margin-bottom: 15px;
}

@media (max-width: 1200px) {
    .customers-rates-filters-row {
        flex-wrap: wrap;
    }
}