/**
 * Customers Page Styles - CRM Management
 * Version: 20251226d - Table-based layout matching Figma design
 */

/* ==================
   Page Layout
   ================== */

.customers-page {
    padding: 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================
   Page Header
   ================== */

.customers-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.customers-header-content {
    flex: 1;
}

.customers-title {
    font-size: 30px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 8px 0;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.customers-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #4A5565;
    margin: 0;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.customers-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #155DFC;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.customers-add-btn:hover {
    background: #1249D8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 93, 252, 0.3);
}

.customers-add-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================
   Summary Cards
   ================== */

.customers-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.customers-summary-card {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1.5px solid #E5E7EB;
}

.customers-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.customers-summary-icon svg {
    width: 20px;
    height: 20px;
}

.customers-summary-icon--blue {
    background: #DBEAFE;
    color: #155DFC;
}

.customers-summary-icon--blue svg {
    stroke: #155DFC;
}

.customers-summary-icon--green {
    background: #DCFCE7;
    color: #00A63E;
}

.customers-summary-icon--green svg {
    stroke: #00A63E;
}

.customers-summary-icon--purple {
    background: #F3E8FF;
    color: #9810FA;
}

.customers-summary-icon--purple svg {
    stroke: #9810FA;
}

.customers-summary-icon--orange {
    background: #FEF3C7;
    color: #D97706;
}

.customers-summary-icon--orange svg {
    stroke: #D97706;
}

.customers-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 4px 0;
    line-height: 1.33;
    letter-spacing: 0.003em;
}

.customers-summary-label {
    font-size: 14px;
    font-weight: 400;
    color: #4A5565;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ==================
   Status Filters
   ================== */

.customers-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.customers-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: -0.01em;
    font-family: inherit;
}

.customers-filter-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.customers-filter-btn.active {
    background: #101828;
    color: #FFFFFF;
    border-color: #101828;
}

.customers-filter-label {
    font-weight: 500;
}

.customers-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 14px;
    font-weight: 500;
    color: #6A7282;
}

.customers-filter-btn.active .customers-filter-count {
    color: #D1D5DC;
}

/* Status-specific colors when active */
.customers-filter-btn[data-status="active"].active {
    background: #00A63E;
    border-color: #00A63E;
    color: #FFFFFF;
}

.customers-filter-btn[data-status="inactive"].active {
    background: #6A7282;
    border-color: #6A7282;
    color: #FFFFFF;
}

.customers-filter-btn[data-status="vip"].active {
    background: #9810FA;
    border-color: #9810FA;
    color: #FFFFFF;
}

/* ==================
   Search Section
   ================== */

.customers-search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.customers-search-bar {
    flex: 1;
    position: relative;
}

.customers-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #99A1AF;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.customers-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    font-size: 16px;
    font-weight: 400;
    color: #101828;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease;
    font-family: inherit;
    line-height: 1.21;
    box-sizing: border-box;
}

.customers-search-input:focus {
    border-color: #155DFC;
    box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.1);
}

.customers-search-input::placeholder {
    color: rgba(10, 10, 10, 0.5);
    font-weight: 400;
}

.customers-more-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.customers-more-filters-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.customers-more-filters-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================
   Customers Table
   ================== */

.customers-table-container {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    overflow: hidden;
    margin-bottom: 24px;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6A7282;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F9FAFB;
    border-bottom: 1.5px solid #E5E7EB;
    white-space: nowrap;
}

.customers-table th:first-child {
    padding-left: 24px;
}

.customers-table th:last-child {
    padding-right: 24px;
    text-align: right;
}

.customers-table td {
    padding: 16px;
    font-size: 14px;
    color: #364153;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.customers-table td:first-child {
    padding-left: 24px;
}

.customers-table td:last-child {
    padding-right: 24px;
}

.customers-table tbody tr:hover {
    background: #F9FAFB;
}

.customers-table tbody tr:last-child td {
    border-bottom: none;
}

/* Customer Cell */
.customers-customer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.customers-customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9810FA 0%, #2B7FFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.customers-customer-initials {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    text-transform: uppercase;
}

.customers-customer-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.customers-customer-name {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customers-customer-email {
    font-size: 13px;
    color: #6A7282;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Badge */
.customers-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: capitalize;
    white-space: nowrap;
}

.customers-status-badge--active {
    background: #DCFCE7;
    color: #166534;
}

.customers-status-badge--vip {
    background: #F3E8FF;
    color: #7C3AED;
}

.customers-status-badge--inactive {
    background: #F3F4F6;
    color: #6B7280;
}

/* Value Cell */
.customers-value-cell {
    font-weight: 600;
    color: #101828;
    white-space: nowrap;
}

/* Orders Cell */
.customers-orders-cell {
    font-weight: 500;
    color: #364153;
}

/* Date Cell */
.customers-date-cell {
    color: #6A7282;
    white-space: nowrap;
}

/* Booking Cell */
.customers-booking-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customers-booking-date {
    font-weight: 500;
    color: #101828;
    white-space: nowrap;
}

.customers-booking-service {
    font-size: 12px;
    color: #6A7282;
}

.customers-no-booking {
    color: #99A1AF;
    font-style: italic;
}

/* Actions Cell */
.customers-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.customers-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #6A7282;
}

.customers-action-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DC;
    color: #364153;
}

.customers-action-btn--primary:hover {
    background: #EFF6FF;
    border-color: #155DFC;
    color: #155DFC;
}

.customers-action-btn--phone:hover {
    background: #DCFCE7;
    border-color: #00A63E;
    color: #00A63E;
}

.customers-action-btn--email:hover {
    background: #FEF3C7;
    border-color: #D97706;
    color: #D97706;
}

.customers-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================
   Pagination
   ================== */

.customers-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.customers-pagination-info {
    font-size: 14px;
    color: #6A7282;
}

.customers-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customers-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.customers-pagination-btn:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.customers-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.customers-pagination-btn.active {
    background: #155DFC;
    color: #FFFFFF;
    border-color: #155DFC;
}

.customers-pagination-btn svg {
    width: 18px;
    height: 18px;
}

.customers-pagination-ellipsis {
    font-size: 14px;
    color: #6A7282;
    padding: 0 4px;
}

/* ==================
   Empty State
   ================== */

.customers-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
}

.customers-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: #D1D5DC;
}

.customers-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.customers-empty-text {
    font-size: 16px;
    color: #4A5565;
    margin: 0 0 24px 0;
    max-width: 400px;
    line-height: 1.5;
}

.customers-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #155DFC;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.customers-empty-btn:hover {
    background: #1249D8;
}

/* ==================
   Loading State
   ================== */

.customers-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: #6A7282;
}

.customers-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #155DFC;
    border-radius: 50%;
    animation: customers-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes customers-spin {
    to {
        transform: rotate(360deg);
    }
}

.customers-loading p {
    font-size: 16px;
    margin: 0;
    color: #4A5565;
}

/* ==================
   Error State
   ================== */

.customers-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    background: #FEF2F2;
    border-radius: 12px;
    border: 1.5px solid #FFC9C9;
}

.customers-error p {
    font-size: 16px;
    font-weight: 400;
    color: #E7000B;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.customers-error button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    background: #E7000B;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.customers-error button:hover {
    background: #c5000a;
}

/* ==================
   Add Customer Modal
   ================== */

.customers-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.customers-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.customers-modal {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.customers-modal-overlay.active .customers-modal {
    transform: translateY(0);
}

.customers-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1.5px solid #E5E7EB;
}

.customers-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.customers-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #6A7282;
    transition: all 0.15s ease;
}

.customers-modal-close:hover {
    background: #F3F4F6;
    color: #101828;
}

.customers-modal-close svg {
    width: 20px;
    height: 20px;
}

.customers-modal-body {
    padding: 24px;
}

.customers-form-group {
    margin-bottom: 20px;
}

.customers-form-group:last-child {
    margin-bottom: 0;
}

.customers-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    margin-bottom: 8px;
}

.customers-form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: #101828;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.customers-form-input:focus {
    border-color: #155DFC;
    box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.1);
}

.customers-form-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: #101828;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236A7282' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.customers-form-select:focus {
    border-color: #155DFC;
    box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.1);
}

.customers-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1.5px solid #E5E7EB;
}

.customers-btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.customers-btn-secondary:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.customers-btn-primary {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #155DFC;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.customers-btn-primary:hover {
    background: #1249D8;
}

/* ==================
   Responsive Design
   ================== */

@media (max-width: 1024px) {
    .customers-page {
        padding: 24px 24px;
    }

    .customers-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .customers-table-container {
        overflow-x: auto;
    }

    .customers-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .customers-page {
        padding: 20px 16px;
    }

    .customers-header {
        flex-direction: column;
        gap: 16px;
    }

    .customers-add-btn {
        width: 100%;
        justify-content: center;
    }

    .customers-title {
        font-size: 24px;
    }

    .customers-subtitle {
        font-size: 14px;
    }

    .customers-summary-grid {
        grid-template-columns: 1fr;
    }

    .customers-summary-value {
        font-size: 20px;
    }

    .customers-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .customers-filter-btn {
        flex-shrink: 0;
    }

    .customers-search-section {
        flex-direction: column;
    }

    .customers-more-filters-btn {
        width: 100%;
        justify-content: center;
    }

    .customers-pagination {
        flex-direction: column;
        gap: 16px;
    }

    .customers-modal {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
}

/* ==================
   Customer Detail Modal
   ================== */

.customers-modal--detail {
    max-width: 560px;
}

.customers-modal--detail .customers-modal-body {
    padding: 0;
}

.customer-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-bottom: 1px solid #E5E7EB;
}

.customers-customer-avatar--large {
    width: 64px;
    height: 64px;
}

.customers-customer-avatar--large .customers-customer-initials {
    font-size: 22px;
}

.customer-detail-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-detail-name {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.customer-detail-section {
    padding: 20px 24px;
    border-bottom: 1px solid #F3F4F6;
}

.customer-detail-section:last-child {
    border-bottom: none;
}

.customer-detail-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #6A7282;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0;
}

.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.customer-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-detail-item label {
    font-size: 12px;
    font-weight: 500;
    color: #99A1AF;
}

.customer-detail-item span {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
}

.customer-detail-item a {
    color: #155DFC;
    text-decoration: none;
}

.customer-detail-item a:hover {
    text-decoration: underline;
}

/* Analytics Cards */
.customer-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.customer-analytics-card {
    background: #F9FAFB;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.analytics-value {
    font-size: 20px;
    font-weight: 700;
    color: #101828;
    margin-bottom: 4px;
}

.analytics-label {
    font-size: 12px;
    font-weight: 500;
    color: #6A7282;
}

/* Purchase List */
.customer-purchases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.purchase-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.purchase-desc {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
}

.purchase-date {
    font-size: 12px;
    color: #6A7282;
}

.purchase-amount {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
}

.purchase-amount.completed {
    color: #00A63E;
}

.purchase-amount.pending {
    color: #D97706;
}

.no-purchases {
    font-size: 14px;
    color: #99A1AF;
    font-style: italic;
    margin: 0;
    padding: 12px 0;
}

/* Customer Notes */
.customer-notes {
    font-size: 14px;
    color: #364153;
    line-height: 1.6;
    white-space: pre-wrap;
    background: #F9FAFB;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Booking Count */
.customers-booking-count {
    font-size: 13px;
    font-weight: 500;
    color: #155DFC;
    background: #EFF6FF;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ==================
   Toast Notifications
   ================== */

.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #101828;
    color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: toast-slide-in 0.3s ease;
}

@keyframes toast-slide-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-notification button {
    background: transparent;
    border: none;
    color: #99A1AF;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.toast-notification button:hover {
    color: #FFFFFF;
}

.toast-success {
    background: #00A63E;
}

.toast-error {
    background: #E7000B;
}

.toast-info {
    background: #155DFC;
}

.toast-warning {
    background: #D97706;
}

/* ==================
   Responsive Detail Modal
   ================== */

@media (max-width: 600px) {
    .customers-modal--detail {
        max-width: calc(100% - 32px);
        margin: 16px;
    }

    .customer-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .customer-detail-info {
        align-items: center;
    }

    .customer-analytics-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-grid {
        grid-template-columns: 1fr;
    }

    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* ==================
   Header Actions
   ================== */

.customers-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.customers-import-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.customers-import-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.customers-import-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================
   Import Modal
   ================== */

.customers-modal--large {
    max-width: 640px;
}

.customers-modal--large .customers-modal-body {
    padding: 0;
}

/* Import Tabs */
.import-tabs {
    display: flex;
    border-bottom: 1.5px solid #E5E7EB;
    padding: 0 24px;
}

.import-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6A7282;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.import-tab:hover {
    color: #364153;
}

.import-tab.active {
    color: #155DFC;
    border-bottom-color: #155DFC;
}

.import-tab svg {
    width: 18px;
    height: 18px;
}

/* Tab Content */
.import-tab-content {
    display: none;
    padding: 24px;
}

.import-tab-content.active {
    display: block;
}

/* Import Step */
.import-step {
    min-height: 200px;
}

.import-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.import-step-desc {
    font-size: 14px;
    color: #6A7282;
    margin: 0 0 20px 0;
}

/* Dropzone */
.import-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    border: 2px dashed #D1D5DC;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #F9FAFB;
}

.import-dropzone:hover,
.import-dropzone.dragover {
    border-color: #155DFC;
    background: #EFF6FF;
}

.import-dropzone svg {
    color: #99A1AF;
    margin-bottom: 16px;
}

.import-dropzone h3 {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.import-dropzone p {
    font-size: 14px;
    color: #6A7282;
    margin: 0;
}

.import-browse-link {
    color: #155DFC;
    cursor: pointer;
    text-decoration: underline;
}

.import-browse-link:hover {
    color: #1249D8;
}

.import-file-types {
    font-size: 12px !important;
    color: #99A1AF !important;
    margin-top: 8px !important;
}

/* File Selected */
.import-file-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
}

.import-file-selected svg {
    color: #155DFC;
    flex-shrink: 0;
}

.import-file-info {
    flex: 1;
    min-width: 0;
}

.import-file-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #101828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.import-file-size {
    font-size: 12px;
    color: #6A7282;
}

.import-file-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #6A7282;
    transition: all 0.15s ease;
}

.import-file-remove:hover {
    background: #FEE2E2;
    color: #E7000B;
}

/* Column Mapping */
.import-mapping-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 240px;
    overflow-y: auto;
}

.import-mapping-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F9FAFB;
    border-radius: 10px;
}

.import-mapping-source {
    flex: 1;
    min-width: 0;
}

.import-mapping-label {
    font-size: 10px;
    font-weight: 500;
    color: #99A1AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.import-mapping-value {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.import-mapping-arrow {
    color: #D1D5DC;
    flex-shrink: 0;
}

.import-mapping-target {
    flex: 1;
}

.import-mapping-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    color: #101828;
    background: #FFFFFF;
    border: 1.5px solid #D1D5DC;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.import-mapping-select:focus {
    border-color: #155DFC;
}

/* Preview Table */
.import-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #364153;
    margin: 0 0 12px 0;
}

.import-preview-table-wrapper {
    overflow-x: auto;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
}

.import-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.import-preview-table th {
    padding: 10px 12px;
    font-weight: 600;
    color: #6A7282;
    text-align: left;
    background: #F9FAFB;
    border-bottom: 1.5px solid #E5E7EB;
    white-space: nowrap;
}

.import-preview-table td {
    padding: 10px 12px;
    color: #364153;
    border-bottom: 1px solid #F3F4F6;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.import-preview-table tbody tr:last-child td {
    border-bottom: none;
}

/* Progress & Results */
.import-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.import-progress-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E5E7EB;
    border-top-color: #155DFC;
    border-radius: 50%;
    animation: customers-spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.import-progress h3 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.import-progress p {
    font-size: 14px;
    color: #6A7282;
    margin: 0;
}

.import-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    text-align: center;
}

.import-results-icon {
    margin-bottom: 16px;
}

.import-results-icon--success {
    color: #00A63E;
}

.import-results-title {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 24px 0;
}

.import-results-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
}

.import-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.import-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #101828;
}

.import-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #6A7282;
}

.import-errors {
    width: 100%;
    text-align: left;
    background: #FEF2F2;
    border-radius: 10px;
    padding: 16px;
}

.import-errors h4 {
    font-size: 14px;
    font-weight: 600;
    color: #E7000B;
    margin: 0 0 12px 0;
}

.import-errors-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #B91C1C;
    max-height: 120px;
    overflow-y: auto;
}

.import-errors-list li {
    margin-bottom: 4px;
}

/* Connections Tab */
.import-connections-desc {
    font-size: 14px;
    color: #6A7282;
    margin: 0 0 20px 0;
}

.import-connections-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.import-connections-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    color: #6A7282;
}

.import-connections-loading p {
    margin: 16px 0 0 0;
    font-size: 14px;
}

.import-connections-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    text-align: center;
}

.import-connections-empty svg {
    color: #D1D5DC;
    margin-bottom: 16px;
}

.import-connections-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px 0;
}

.import-connections-empty p {
    font-size: 14px;
    color: #6A7282;
    margin: 0 0 20px 0;
}

.import-connection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #FFFFFF;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.import-connection-card:hover {
    border-color: #D1D5DC;
    background: #F9FAFB;
}

.import-connection-card.disconnected {
    opacity: 0.7;
}

.import-connection-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.import-connection-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.import-connection-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9810FA 0%, #2B7FFF 100%);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
}

.import-connection-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.import-connection-name {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.import-connection-meta {
    font-size: 12px;
    color: #6A7282;
    margin: 0;
}

.import-connection-action {
    flex-shrink: 0;
}

.customers-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.customers-loading-spinner--sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
    margin: 0;
    display: inline-block;
}

/* Button with icon */
.customers-btn-primary svg,
.customers-btn-secondary svg {
    vertical-align: middle;
    margin-right: 4px;
}

/* Responsive Import Modal */
@media (max-width: 600px) {
    .customers-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .customers-import-btn {
        width: 100%;
        justify-content: center;
    }

    .import-tabs {
        padding: 0 16px;
    }

    .import-tab {
        flex: 1;
        justify-content: center;
        padding: 14px 12px;
    }

    .import-tab-content {
        padding: 20px 16px;
    }

    .import-mapping-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .import-mapping-arrow {
        display: none;
    }

    .import-results-stats {
        flex-direction: column;
        gap: 16px;
    }
}
