/* ==========================================================================
   SMART LOCATOR - PREMIUM DASHBOARD THEME (Stripe/Google Inspired)
   ========================================================================== */

:root {
    /* --- Palette --- */
    --primary: #635bff;
    /* Stripe Blurple */
    --primary-dark: #4b45c2;
    --primary-light: #e0e7ff;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --premium-gradient: linear-gradient(135deg, #635bff 0%, #a259ff 100%);

    --secondary: #00d4ff;
    /* Accent specific to brand if needed */
    --success: #0570de;
    /* Deep Checkmark Blue */
    --warning: #f5a623;
    --danger: #e22525;

    /* --- Neutrals --- */
    --bg-page: #f7fafe;
    /* Very subtle blue-grey tint */
    --bg-surface: #ffffff;
    --text-main: #0a2540;
    /* Deep Navy Tint */
    --text-muted: #425466;
    --border-light: #e6ebf1;

    /* --- Typography --- */
    --font-heading: 'Inter', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;

    /* --- Spacing & Radius --- */
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* --- Shadows --- */
    --shadow-sm: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 12px rgba(50, 50, 93, 0.05), 0 2px 7px rgba(0, 0, 0, 0.06);
    --shadow-premium: 0 10px 30px -5px rgba(50, 50, 93, 0.1), 0 6px 20px -8px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 13px 27px -5px rgba(50, 50, 93, 0.25), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);

    /* --- Extra Colors --- */
    --info: #0ea5e9;
    --success-soft: #ecfdf5;
    --warning-soft: #fffbeb;
    --danger-soft: #fef2f2;
    --info-soft: #f0f9ff;

    /* --- Transitions --- */
    --ease-out: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--ease-out);
}

button,
input,
select {
    font-family: inherit;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    /* Fixed Sidebar + Fluid Content */
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    background: #f7f9fc;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.brand-section {
    margin-bottom: var(--spacing-xl);
    padding: 0 var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 32px;
    width: auto;
}

.brand-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.tab-content {
    display: none;
    animation: fadeIn var(--ease-out);
}

.tab-content.active-tab {
    display: block !important;
    opacity: 1 !important;
}

.flex-equal {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #8898aa;
    margin: 20px 0 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease-out);
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-item i {
    width: 18px;
    text-align: center;
}

/* --- Main Content --- */
.main-content {
    padding: var(--spacing-xl);
    max-width: 1400px;
    width: 100%;
}

/* --- Header --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding-bottom: 24px;
    position: relative;
    z-index: 100;
}

.left-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.presence-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    animation: pulse-presence 2s infinite;
}

@keyframes pulse-presence {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

.page-title h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

.page-title p {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    margin: 4px 0 0 0;
}

.header-utility-pill.text-danger {
    color: var(--danger);
    background: rgba(226, 37, 37, 0.08);
    border-color: rgba(226, 37, 37, 0.25);
}

.header-utility-pill.text-warning {
    color: var(--warning);
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.3);
}

.header-utility-pill.text-success {
    color: var(--success);
    background: rgba(5, 112, 222, 0.1);
    border-color: rgba(5, 112, 222, 0.25);
}

.header-utility-pill i {
    font-size: 14px;
    opacity: 0.8;
}

.header-utility-pill:hover {
    background: rgba(99, 91, 255, 0.12);
    transform: translateY(-1px);
}
.text-warning {
    color: var(--warning);
}
.premium-progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.btn-logout-premium {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(248, 113, 113, 0.1));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.28);
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.12);
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-logout-premium:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
    transform: translateY(-2px);
}

.btn-logout-premium i {
    font-size: 11px;
}


.nav-logout-mobile {
    display: none;
}

.premium-glow-btn {
    background: linear-gradient(135deg, #635bff 0%, #a259ff 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(99, 91, 255, 0.4);
    z-index: 1;
}

.premium-glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 91, 255, 0.6);
}

.premium-glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.5s;
    z-index: -1;
}

.premium-glow-btn:hover::before {
    left: 100%;
    transition: 0.6s;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* --- Cards --- */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--ease-smooth), box-shadow var(--ease-smooth);
}

.card:hover {
    box-shadow: var(--shadow-premium);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- KPI Value Styles --- */
.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.kpi-loading {
    color: #bdc5d6;
    font-style: italic;
    font-size: 24px;
}

/* --- Grid System --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: #f6f9fc;
    color: var(--text-main);
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-success {
    background: #dcfce7;
    color: #166534;
}

.btn-warning {
    background: #fef3c7;
    color: #92400e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* --- Badges & Pills --- */
.pill {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.pill-light {
    background: var(--bg-page);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.pill-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.pill-primary-soft {
    background: #e0e7ff;
    color: #4338ca;
    padding: 6px 14px;
    font-size: 13px;
}

.pill-blue-soft {
    background: #dbeafe;
    color: #1e40af;
    padding: 6px 14px;
    font-size: 13px;
}

.pill-purple-soft {
    background: #f3e8ff;
    color: #7e22ce;
    padding: 6px 14px;
    font-size: 13px;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: #f6f9fc;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
}

td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
}

tr:last-child td {
    border-bottom: none;
}

/* --- Progress Bar --- */
.progress-bar-bg {
    background: #e6ebf1;
    border-radius: 99px;
    height: 8px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary) 0%, #a259ff 50%, var(--primary) 100%);
    background-size: 200% 100%;
    height: 100%;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(99, 91, 255, 0.3);
    animation: running-bar 2s linear infinite;
}

@keyframes running-bar {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

/* Premium Continuous Progress Bar */
.premium-progress-container {
    background: #f1f5f9;
    border-radius: 99px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.premium-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #635bff, #a259ff, #635bff);
    background-size: 200% 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
    animation: premium-running 2s linear infinite;
    box-shadow: 0 0 15px rgba(99, 91, 255, 0.4);
}

@keyframes premium-running {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.premium-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

/* ==========================================================================
   SPECIFIC SECTIONS
   ========================================================================== */

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    box-shadow: var(--shadow-float);
}

.welcome-banner h2 {
    color: white;
    margin-bottom: 8px;
    font-size: 28px;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    max-width: 600px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    background: #fdfdfd;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.upload-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 16px;
    display: block;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    /* Flex when active */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-float);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-main);
}

/* Loaders */
.home-fetching-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Shimmer Progress Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer-progress {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

/* Pulse Animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 91, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 91, 255, 0);
    }
}

.pulse-primary {
    animation: pulse-glow 2s infinite;
}

/* Wizard Steps */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    background: var(--bg-page);
    padding: 0 10px;
    text-align: center;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin: 0 auto 8px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-item.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 91, 255, 0.4);
}

.step-item.active .step-label {
    color: var(--primary);
}

.step-item.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 999;
        transition: left 0.3s ease;
        width: 260px;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
        margin-right: 16px;
    }

    .main-content {
        padding: 16px;
    }

    .top-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .user-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }

    .card {
        padding: 16px;
    }

    .kpi-value {
        font-size: 24px;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-wrap: wrap;
        width: 100%;
        margin-top: 10px;
    }

    .filter-group input {
        width: 100%;
    }
}

/* --- Filter & Inputs --- */
.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-sm {
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    outline: none;
    color: var(--text-main);
    transition: border-color 0.2s;
}

.input-sm:focus {
    border-color: var(--primary);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-muted);
}

/* --- Professional Support Buttons --- */
.btn-full-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px;
    height: 100%;
    text-align: center;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-full-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-full-lg i {
    font-size: 28px;
    margin-bottom: 12px;
}

/* --- Ledger & List Styles --- */
.ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    background: white;
    transition: background 0.2s;
}

.ledger-row:last-child {
    border-bottom: none;
}

.ledger-row:hover {
    background: #f8fbff;
}

.ledger-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ledger-desc {
    font-weight: 600;
    color: var(--text-main);
}

.ledger-date {
    font-size: 12px;
    color: var(--text-muted);
}

.ledger-amount {
    font-weight: 700;
    font-size: 15px;
}

/* Premium Ledger Row */
.ledger-row {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all var(--ease-smooth);
}

.ledger-row:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.ledger-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ledger-flex {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ledger-status-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}

.ledger-status-plus {
    background: var(--success-soft);
    color: var(--success);
}

.ledger-status-minus {
    background: var(--danger-soft);
    color: var(--danger);
}

/* --- Chart Container --- */
.chart-container-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
}

.tab-content {
    display: none;
}

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

/* ===============================
   PREMIUM JOB CARDS (In Progress)
   =============================== */

.job-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    transition: transform .2s ease, box-shadow .2s ease;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.job-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.job-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.job-status {
    font-weight: 700;
    font-size: 13px;
}

.job-status.in-progress {
    color: var(--primary);
}

.job-status.completed {
    color: var(--success);
}

.job-status.failed {
    color: var(--danger);
}

.job-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.job-actions button {
    font-size: 12px;
    padding: 6px 12px;
}

/* Premium Job Card Enhancements */
.premium-job-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--ease-smooth);
}

.premium-job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.job-icon-container {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.job-info-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-stats-pills {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.job-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-pill.success {
    background: #ecfdf5;
    color: #059669;
}

.job-pill.warning {
    background: #fffbeb;
    color: #d97706;
}

.job-pill.primary {
    background: #eff6ff;
    color: #2563eb;
}

/* Job list containers */
#in-progress-list,
#completed-list {
    display: grid;
    gap: 16px;
}

/* Completed Job Card tweaks */
.job-card.completed {
    background: #f8fbff;
    border-color: #dbeafe;
}

.job-card.completed h4 {
    color: #1e3a8a;
}

.job-card.completed .job-status {
    color: var(--success);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-light);
}

.job-progress {
    margin: 12px 0;
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Toast Types */
.toast-info {
    background: #2563eb;
    /* blue */
}

.toast-success {
    background: #16a34a;
    /* green */
}

.toast-error {
    background: #dc2626;
    /* red */
}

.toast-warning {
    background: #f59e0b;
    /* amber / warning */
    color: #ffffff;
}

/* Visible state */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   PREMIUM PROFILE & SUPPORT STYLES
   ========================================================================== */

/* --- Profile Section --- */
.profile-header-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-xl);
    text-align: center;
    transition: transform var(--ease-out), box-shadow var(--ease-out);
}

.profile-header-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--premium-gradient);
    color: white;
    font-size: 40px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 8px 16px rgba(100, 91, 255, 0.3);
    border: 4px solid white;
}

.plan-status-card {
    background: var(--text-main);
    color: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

.plan-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 70%);
}

.plan-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.credit-progress-track {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 99px;
    width: 100%;
    margin-top: var(--spacing-lg);
    overflow: hidden;
}

.credit-progress-bar {
    background: #00d4ff;
    height: 100%;
    width: 75%;
    /* dynamic */
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* --- Phase 3: Alignment & Home Polish --- */
.flex-equal {
    display: flex;
    align-items: stretch;
    /* Ensures equal height */
}

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.home-glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: all 0.3s ease;
}

.home-glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
}

.welcome-banner-premium {
    background: linear-gradient(135deg, #635bff 0%, #a259ff 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(99, 91, 255, 0.4);
}

.welcome-banner-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate-banner 20s linear infinite;
}

@keyframes rotate-banner {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.performance-summary-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Tooltip Styles */
.status-reason-tooltip {
    position: relative;
    cursor: help;
}

.status-reason-tooltip::after {
    content: attr(data-reason);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.status-reason-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* --- Support Section --- */
.support-hero {
    text-align: center;
    padding: 48px 40px;
    background: white;
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    background-image: radial-gradient(var(--border-light) 1px, transparent 1px);
    background-size: 32px 32px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.support-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--premium-gradient);
    filter: blur(80px);
    opacity: 0.1;
    border-radius: 50%;
}

.support-hero h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: var(--spacing-sm);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.contact-card {
    background: white;
    border-radius: 20px;
    padding: 32px 24px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.contact-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-card:hover .contact-icon-wrapper {
    transform: scale(1.1);
}

.bg-whatsapp {
    background: #dcfce7;
    color: #166534;
}

.bg-email {
    background: #e0e7ff;
    color: #4338ca;
}

.bg-phone {
    background: #fef3c7;
    color: #92400e;
}

/* --- Resource Center Removed --- */

.faq-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 24px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-header {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-header:hover {
    background: #f9fafb;
}

.faq-header::after {
    content: '\f078';
    /* FontAwesome chevron down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.faq-item.active .faq-header::after {
    transform: rotate(180deg);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.faq-active .faq-body {
    padding-bottom: 20px;
}


/* ==========================================================================
   ENTERPRISE UI ENHANCEMENTS (Profile, Plan & Billing)
   ========================================================================== */

.enterprise-profile-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .enterprise-profile-container {
        grid-template-columns: 1fr;
    }
}

.enterprise-card {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.enterprise-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

.card-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title-premium {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 800;
    margin: 0;
}

.btn-text-action {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-text-action:hover {
    background: var(--primary-light);
}

.profile-identity-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
}

.profile-avatar-premium {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: var(--premium-gradient);
    color: white;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(99, 91, 255, 0.2);
}

.profile-main-meta h2 {
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.profile-main-meta p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 12px;
}

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #16a34a;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.profile-data-grid {
    display: grid;
    gap: 20px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.data-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.data-value {
    color: var(--text-main);
    font-weight: 700;
    font-size: 14px;
}

.data-value.mono {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
    color: var(--primary);
}

/* Subscription Specifics */
.status-indicator {
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-indicator.active {
    background: #dcfce7;
    color: #166534;
}

.subscription-hero {
    background: var(--text-main);
    color: white;
    padding: 32px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.subscription-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.plan-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    font-weight: 700;
}

.plan-title {
    color: white;
    font-size: 32px;
    margin: 4px 0 8px;
}

.validity-meta {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

.plan-icon-wrapper {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.2);
}

.usage-meter-section {
    margin-bottom: 32px;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.usage-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.usage-count {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-main);
}

.premium-progress-container {
    height: 12px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 12px;
}

.premium-progress-bar {
    height: 100%;
    background: var(--premium-gradient);
    border-radius: 99px;
    box-shadow: 0 0 12px rgba(99, 91, 255, 0.3);
}

.usage-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.subscription-actions {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
}

/* Ledger Improvements */
.ledger-header-premium {
    background: #f8fafc;
    border-bottom: 2px solid #f1f5f9;
}

.ledger-row-premium {
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.ledger-row-premium:hover {
    background: #fdfdfd;
    transform: scale(1.002);
}

.font-bold {
    font-weight: 700;
}

/* ============================================================================
   VERIFICATION HISTORY (PREMIUM)
   ============================================================================ */

.premium-billing-container {
    padding: 24px;
    background: #f8fafc;
    min-height: 100%;
}

.billing-header-section {
    margin-bottom: 32px;
}

.billing-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.billing-main-icon {
    font-size: 32px;
    color: var(--text-main);
}

.vh-main-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.vh-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.vh-filters-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
}

.vh-filters-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 24px;
}

.vh-filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vh-filter-item label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.vh-date-input {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.vh-date-input:focus {
    border-color: var(--primary);
}

.vh-actions-group {
    display: flex;
    gap: 12px;
}

.vh-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.vh-btn-primary {
    background: #6366f1;
    color: white;
}

.vh-btn-primary:hover {
    background: #4f46e5;
}

.vh-btn-success {
    background: #10b981;
    color: white;
}

.vh-btn-success:hover {
    background: #059669;
}

.vh-btn-light {
    background: #f1f5f9;
    color: #475569;
}

.vh-btn-light:hover {
    background: #e2e8f0;
}

/* History Card */
.verification-history-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.verification-history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.vh-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.vh-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 12px 0;
}

.vh-date {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.vh-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.vh-deduction-badge {
    padding: 6px 16px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 14px;
}

.vh-deduction-badge.deduction {
    background: #fff1f2;
    color: #e11d48;
}

.vh-deduction-badge.credit {
    background: #f0fdf4;
    color: #16a34a;
}

.vh-balance {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.vh-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .vh-filters-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .vh-actions-group {
        flex-direction: column;
    }

    .verification-history-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .vh-right {
        align-items: flex-start;
        text-align: left;
    }
}

/* ===============================
   Indeterminate Progress (Download Style)
================================ */

.progress-indeterminate {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(99, 91, 255, 0.9),
            transparent);
    animation: indeterminate-slide 1.2s infinite ease-in-out;
}

@keyframes indeterminate-slide {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}
.premium-progress-bar.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
.status-expired {
    color: var(--danger);
    font-weight: 800;
    letter-spacing: 0.3px;
}
/* ===============================
   CREDIT COLOR OVERRIDES (KPI)
   =============================== */

.kpi-value.text-danger,
#credit-pill-text.text-danger,
.usage-count.text-danger {
    color: var(--danger) !important;
}

.kpi-value.text-warning,
#credit-pill-text.text-warning,
.usage-count.text-warning {
    color: var(--warning) !important;
}

.kpi-value.text-success,
#credit-pill-text.text-success,
.usage-count.text-success {
    color: var(--success) !important;
}


/* --- Premium Pricing UI --- */
.pricing-container-premium {
    padding: 20px 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
}

.pricing-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.pricing-card-item {
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    border-radius: 24px;
    background: white;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.pricing-card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 80px rgba(99, 91, 255, 0.1);
    border-color: var(--primary-light);
}

.pricing-card-item.popular {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(99, 91, 255, 0.1);
}

.popular-tag {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--primary);
    color: white;
    padding: 5px 40px;
    font-size: 11px;
    font-weight: 800;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.card-plan-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.card-plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-plan-price {
    margin-bottom: 15px;
}

.card-plan-price .currency {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-muted);
}

.card-plan-price .amount {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-main);
}

.card-plan-price .period {
    color: var(--text-muted);
    font-size: 16px;
}

.card-plan-credits {
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 25px;
    align-self: flex-start;
}

.card-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
}

.card-plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.card-plan-features li i {
    color: #10b981;
    font-size: 16px;
}

.card-plan-features li i.inactive {
    color: #cbd5e1;
}

.btn-upgrade-action {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: #f1f5f9;
    color: var(--text-main);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.pricing-card-item.popular .btn-upgrade-action {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 91, 255, 0.2);
}

/* Explicit Action Colors */
.btn-upgrade-action.btn-renew-action {
    background: #10b981;
    color: white;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.btn-upgrade-action.btn-change-action {
    background: #f8fafc;
    color: #94a3b8;
    box-shadow: none;
    border: 1px solid #f1f5f9;
}

.btn-upgrade-action:hover {
    background: var(--text-main);
    color: white;
    transform: scale(1.02);
}

.btn-upgrade-action.btn-change-action:hover {
    background: #f1f5f9;
    color: #64748b;
    transform: scale(1.01);
}

.btn-upgrade-action.btn-renew-action:hover {
    background: #059669; /* Darker green */
}

.current-plan-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #10b981;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.pricing-card-item.active-plan .current-plan-badge {
    transform: translateY(0);
}

/* ✅ BUTTON ALWAYS VISIBLE - Shows "Renew Plan" for current plan */
.pricing-card-item.active-plan .btn-upgrade-action {
    background: #10b981;
    color: white;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}
/* --- Duration Switcher --- */
.duration-switcher-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.duration-switcher {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-light);
}

.duration-btn {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.duration-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.1);
}

.duration-savings {
    font-size: 10px;
    color: #10b981;
    font-weight: 800;
    margin-top: 2px;
}

.plan-savings-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 15px;
    display: inline-block;
}
/* ===============================
   HOME ACCOUNT STATUS BANNER
   =============================== */

.account-banner {
    border-radius: 20px;
    padding: 22px 28px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid transparent;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.account-banner h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.account-banner p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.account-banner .banner-left {
    display: flex;
    flex-direction: column;
}

.account-banner .banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ---- STATES ---- */

.account-banner.danger {
    background: var(--danger-soft);
    border-color: rgba(226, 37, 37, 0.25);
}

.account-banner.danger h4 {
    color: var(--danger);
}

.account-banner.warning {
    background: var(--warning-soft);
    border-color: rgba(245, 166, 35, 0.35);
}

.account-banner.warning h4 {
    color: var(--warning);
}

.account-banner.success {
    background: var(--success-soft);
    border-color: rgba(5, 112, 222, 0.25);
}

.account-banner.success h4 {
    color: var(--success);
}

.account-banner.info {
    background: var(--info-soft);
    border-color: rgba(14, 165, 233, 0.3);
}

.account-banner.info h4 {
    color: var(--info);
}

/* Mobile */
@media (max-width: 768px) {
    .account-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-banner .banner-actions {
        width: 100%;
    }

    .account-banner .banner-actions .btn {
        width: 100%;
    }
}

/* ======================================================================
   MOBILE PREMIUM POLISH (SAFE: MOBILE ONLY, NO DESKTOP FLOW IMPACT)
   ====================================================================== */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 95%;
        text-size-adjust: 95%;
    }

    body {
        font-size: 15px;
        background:
            radial-gradient(circle at top right, rgba(99, 91, 255, 0.08), transparent 45%),
            var(--bg-page);
    }

    .main-content {
        padding: 12px;
    }

    .top-bar {
        position: sticky;
        top: 8px;
        z-index: 120;
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid rgba(226, 235, 241, 0.85);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        margin-right: 6px;
        border-radius: 12px;
        border: 1px solid rgba(99, 91, 255, 0.16);
        background: #fff;
        font-size: 18px;
        box-shadow: 0 4px 14px rgba(99, 91, 255, 0.08);
    }

    .page-title h1 {
        font-size: 21px;
        letter-spacing: -0.3px;
    }

    .page-title p {
        font-size: 12px;
    }

    .user-actions {
        margin-top: 6px;
    }

    .btn-logout-premium {
        width: 100%;
        justify-content: center;
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(220, 38, 38, 0.15);
    }


    .nav-logout-mobile {
        display: flex;
        width: 100%;
        margin-top: 6px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .nav-logout-mobile .logout-mobile-content {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 9px 16px;
        border-radius: var(--radius-md);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.1px;
        color: #dc2626;
        background: rgba(239, 68, 68, 0.08);
        border: 1px solid rgba(239, 68, 68, 0.16);
        box-shadow: none;
        transition: all var(--ease-out);
    }

    .nav-logout-mobile .logout-mobile-content:hover {
        background: rgba(239, 68, 68, 0.14);
        border-color: rgba(239, 68, 68, 0.24);
    }

    .top-bar .btn-logout-premium {
        display: none;
    }

    .card,
    .welcome-banner-premium,
    .stats-card,
    .premium-kpi,
    .enterprise-card,
    .verification-history-card,
    .pricing-card-item {
        border-radius: 18px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .card,
    .enterprise-card,
    .verification-history-card {
        padding: 14px;
    }

    .welcome-banner-premium {
        margin-top: 0 !important;
        padding: 22px 16px !important;
    }

    .stats-grid,
    .premium-kpi-grid,
    .metrics-grid {
        gap: 12px;
    }

    .btn,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
    }

    .sidebar {
        border-right: none;
        box-shadow: 16px 0 34px rgba(15, 23, 42, 0.18);
    }

    .sidebar-overlay {
        backdrop-filter: blur(2px);
        background: rgba(2, 6, 23, 0.45);
    }
}
/* 🔴 FORCE ALL ACCOUNT BANNER TEXT TO RED */
.account-banner h4,
.account-banner p {
    color: var(--danger) !important;
    font-weight: 700;
}
