/* ========================================
   CandleCraft Academy - Airy Redesign
   Theme: Warm Alabaster & Brushed Gold
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Airy Color Palette */
    --rd-bg: #fdfaf7;               /* Light, warm beige background */
    --rd-card: rgba(255, 255, 255, 0.7); /* Translucent White (Glass) */
    --rd-sidebar: #1A120C;          /* Kept dark for contrast vs airy content */
    
    /* Brand Colors */
    --rd-primary: #d29a58;          /* Brushed Gold */
    --rd-primary-hover: #b88244;
    --rd-primary-light: #f9f1e8;
    
    /* Typography */
    --rd-text-title: #2f2219;       /* Deep Espresso Brown */
    --rd-text-body: #6e5e52;        /* Soft Earthy Taupe */
    --rd-text-caption: #a69182;
    
    /* Borders & Depths */
    --rd-border: rgba(210, 154, 88, 0.15);
    --rd-shadow-airy: 0 20px 40px rgba(47, 34, 25, 0.05);
    --rd-glass-border: rgba(255, 255, 255, 0.4);

    /* Spacing & Radius */
    --rd-radius-xl: 20px;
    --rd-sidebar-width: 260px;
}

/* ---- Base Styles ---- */
body.redesign {
    font-family: 'Inter', sans-serif;
    background-color: var(--rd-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(210, 154, 88, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(210, 154, 88, 0.03) 0px, transparent 50%);
    color: var(--rd-text-body);
}

/* ========================================
   1. REDESIGNED SIDEBAR (Dark & Elegant)
   ======================================== */

body.redesign #portalSidebar .nav-link {
    color: rgba(245, 236, 223, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.redesign #portalSidebar .nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

body.redesign #portalSidebar .nav-link.active {
    background: rgba(210, 154, 88, 0.15) !important;
    color: #d29a58 !important;
}

body.redesign #portalSidebar .nav-link.active i {
    color: #d29a58 !important;
}

body.redesign #portalSidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

body.redesign .rd-sidebar-brand,
body.redesign .admin-brand {
    padding: 32px 24px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(210, 154, 88, 0.15);
    margin-bottom: 24px;
}

/* ========================================
   2. KEY STATS (Airy Single-Pane Glass)
   ======================================== */
.stats-container-airy {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--rd-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--rd-glass-border);
    border-radius: var(--rd-radius-xl);
    box-shadow: var(--rd-shadow-airy);
    margin-bottom: 32px;
}

.stat-item-airy {
    padding: 24px;
    text-align: center;
    border-right: 1px solid var(--rd-border);
}

.stat-item-airy:last-child { border-right: none; }

.stat-item-airy .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--rd-text-caption);
    margin-bottom: 8px;
    display: block;
}

.stat-item-airy .value {
    font-family: 'Grown', serif; /* Using your luxury font for numbers */
    font-size: 2.5rem;
    color: var(--rd-text-title);
    line-height: 1;
}

/* ========================================
   3. CHILD PROFILE (Floating ID Card)
   ======================================== */
.child-card-airy {
    background: white;
    border-radius: var(--rd-radius-xl);
    padding: 32px;
    box-shadow: var(--rd-shadow-airy);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--rd-glass-border);
}

.child-avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--rd-primary-light);
    border: 2px solid var(--rd-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Grown', serif;
    font-size: 24px;
    color: var(--rd-primary);
    margin-bottom: 16px;
}

.child-status-badge {
    background: #f0f9f4; /* Airy sage green */
    color: #2d7a4d;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   4. RECENT BOOKINGS (Clean Minimal Table)
   ======================================== */
.table-airy-wrapper {
    background: var(--rd-card);
    backdrop-filter: blur(10px);
    border-radius: var(--rd-radius-xl);
    padding: 24px;
    border: 1px solid var(--rd-glass-border);
}

body.redesign .table-airy {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

body.redesign .table-airy th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--rd-text-caption);
    padding: 0 16px;
    border: none;
    font-weight: 600;
}

body.redesign .table-airy td {
    padding: 16px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--rd-glass-border);
    border-bottom: 1px solid var(--rd-glass-border);
    color: var(--rd-text-body);
}

body.redesign .table-airy td:first-child {
    border-left: 1px solid var(--rd-glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

body.redesign .table-airy td:last-child {
    border-right: 1px solid var(--rd-glass-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

body.redesign.site-home .table td,
body.redesign .parent-bookings-table td {
    padding: 14px 20px !important;
}

body.redesign.site-home .table th,
body.redesign .parent-bookings-table th {
    padding: 12px 20px !important;
}

/* Ghost Status Tags */
.status-ghost {
    background: transparent;
    border: 1px solid var(--rd-primary);
    color: var(--rd-primary);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* ========================================
   5. TOP NAVBAR (Invisible/Airy)
   ======================================== */
body.redesign .sidebar-navbar {
    background: transparent !important;
    border-bottom: none;
    padding: 32px 40px;
}

body.redesign .sidebar-navbar .page-title {
    font-family: 'Grown', serif;
    font-size: 32px;
    color: var(--rd-text-title);
    letter-spacing: 0.02em;
}

body.redesign .admin-notification-dropdown {
    position: relative;
}

body.redesign .admin-notification-button {
    align-items: center;
    background: rgba(210, 154, 88, 0.1);
    border: 1px solid rgba(210, 154, 88, 0.24);
    border-radius: 999px;
    color: #8a5a16;
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    width: 40px;
}

body.redesign .admin-notification-button:hover,
body.redesign .admin-notification-button:focus-visible,
body.redesign .admin-notification-button.show {
    background: rgba(210, 154, 88, 0.18);
    border-color: rgba(210, 154, 88, 0.48);
    outline: none;
    transform: translateY(-1px);
}

body.redesign .admin-notification-button i {
    font-size: 18px;
}

body.redesign .admin-notification-badge {
    align-items: center;
    background: #d29a58;
    border: 2px solid #fdfaf7;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -6px;
    top: -6px;
}

/* User profile avatar in admin/portal navigation.
   Default style applies globally so the bubble is always visible.
   Inline width/height (e.g. attendance roster) still override here. */
.admin-avatar {
    align-items: center;
    background: linear-gradient(135deg, #d29a58, #a86a1f);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(154, 100, 31, 0.22);
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    justify-content: center;
    letter-spacing: 0.4px;
    line-height: 1;
    overflow: hidden;
    text-transform: uppercase;
    width: 40px;
}

[data-theme="dark"] .admin-avatar {
    background: linear-gradient(135deg, #f0cf9c, #c69648);
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    color: #2a1a08;
}

body.redesign .admin-notification-menu {
    background: #ffffff;
    border: 1.5px solid rgba(210, 154, 88, 0.28);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(47, 34, 25, 0.16);
    min-width: 320px;
    padding: 18px;
}

body.redesign .admin-notification-menu__eyebrow {
    color: #8a5a16;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

body.redesign .admin-notification-menu__title {
    color: #2f2219;
    font-family: 'Grown', serif;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

body.redesign .admin-notification-menu__list {
    border-bottom: 1px solid rgba(210, 154, 88, 0.16);
    border-top: 1px solid rgba(210, 154, 88, 0.16);
    margin-bottom: 14px;
    padding: 8px 0;
}

body.redesign .admin-notification-item {
    align-items: center;
    border-radius: 10px;
    color: #2f2219;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px;
    text-decoration: none;
}

body.redesign .admin-notification-item:hover {
    background: rgba(210, 154, 88, 0.08);
    color: #2f2219;
    text-decoration: none;
}

body.redesign .admin-notification-item__name {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

body.redesign .admin-notification-item__meta {
    color: #b8844a;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

body.redesign .admin-notification-menu__actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

body.redesign .admin-notification-menu__primary {
    justify-content: center;
    padding: 10px 16px;
}

body.redesign .admin-notification-menu__link {
    color: #8a5a16;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

body.redesign .admin-notification-menu__empty {
    color: #8f8076;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 8px 0 2px;
}

/* ========================================
   6. PRIMARY BUTTON (Gold Shadow)
   ======================================== */
.btn-gold-airy {
    background: var(--rd-primary);
    color: white !important;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none;
    box-shadow: 0 10px 20px rgba(210, 154, 88, 0.2);
    transition: all 0.3s ease;
}

.btn-gold-airy:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(210, 154, 88, 0.3);
    background: var(--rd-primary-hover);
}

/* ------------------------------------------------------------
   CANDLECRAFT LUXURY THEME REFINEMENTS (REWRITTEN)
   ------------------------------------------------------------ */

/* 1. Substantial Glass Cards */
body.redesign .card {
    border: 1px solid rgba(210, 154, 88, 0.25) !important; /* Increased border visibility */
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 20px !important;
    /* Double Shadow: One for depth, one for soft glow */
    box-shadow: 
        0 10px 30px rgba(47, 34, 25, 0.08), 
        0 4px 6px rgba(210, 154, 88, 0.04) !important;
    transition: transform 0.3s ease, border-color 0.3s ease !important;
}

body.redesign .card:hover {
    border-color: rgba(210, 154, 88, 0.45) !important;
    transform: translateY(-2px);
}

/* 2. Stat card gold/bronze header bars */
body.redesign .stat-card {
    border-top: 4px solid transparent !important; /* Base for accents */
}

body.redesign .stat-card.stat-primary { border-top-color: #d29a58 !important; }
body.redesign .stat-card.stat-success { border-top-color: #f0cf9c !important; }
body.redesign .stat-card.stat-info    { border-top-color: #b8844a !important; }
body.redesign .stat-card.stat-warning { border-top-color: #8a5a16 !important; }

/* 3. Defined Section Headers */
body.redesign .card-header {
    border-bottom: 1.5px solid rgba(210, 154, 88, 0.2) !important; /* Thicker header line */
    background: rgba(210, 154, 88, 0.03) !important;
    padding: 1.25rem 1.5rem !important;
}

body.redesign .card-header h3, 
body.redesign .card-header h4 {
    font-family: 'Grown', serif !important;
    color: #2f2219 !important;
    letter-spacing: 0.04em;
    margin: 0;
}

/* 4. Luxury Typography refinements */
body.redesign .sidebar-navbar .page-title {
    font-family: 'Grown', serif !important;
    font-size: 32px !important;
    letter-spacing: 0.04em !important;
    color: #2f2219 !important;
    font-weight: 400 !important;
}

body.redesign .stat-card .stat-label {
    font-size: 11px !important;
    letter-spacing: 0.25em !important; /* Extra spacing for luxury feel */
    text-transform: uppercase !important;
    color: #a69182 !important;
    font-weight: 700 !important;
}

body.redesign .stat-card .stat-value {
    font-family: 'Grown', serif !important;
    font-size: 2.4rem !important;
    color: #2f2219 !important;
    line-height: 1;
    margin-top: 5px;
}

/* 5. Table Polish (High contrast borders) */
body.redesign .parent-bookings-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.redesign .parent-bookings-table th {
    font-size: 11px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    color: #8a5a16 !important; /* Darker gold for headers */
    border-bottom: 2px solid rgba(210, 154, 88, 0.3) !important;
    padding: 15px 20px !important;
    background: transparent !important;
}

body.redesign .parent-bookings-table td {
    border-bottom: 1px solid rgba(210, 154, 88, 0.15) !important;
    padding: 18px 20px !important;
    color: #594a3e !important;
}

body.redesign .parent-bookings-table tbody tr:hover td {
    background: rgba(210, 154, 88, 0.05) !important;
    color: #2f2219 !important;
}

/* 6. Sidebar & Layout Spacing */
body.redesign .admin-brand {
    justify-content: center !important;
    padding: 40px 24px 32px !important;
    border-bottom: 1px solid rgba(210, 154, 88, 0.25) !important;
    margin-bottom: 24px !important;
}

/* Button & Action Refinement */
body.redesign .btn-primary {
    background: #d29a58 !important;
    border: 1px solid #b8844a !important;
    box-shadow: 0 4px 12px rgba(210, 154, 88, 0.2) !important;
    font-weight: 600 !important;
}

body.redesign .parent-quick-actions a:hover {
    background: rgba(210, 154, 88, 0.08) !important;
    border-radius: 12px;
}
/* REFINED ADMIN DASHBOARD */
body.redesign .sidebar-navbar {
    padding: 24px 40px 10px !important; /* Tighter header spacing */
}

/* Stat Cards */
.admin-stat-value {
    font-family: 'Grown', serif !important;
    font-size: 32px !important;
    color: #2f2219 !important;
}

.admin-stat-title {
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Links */
a {
    color: #d29a58 !important;
    text-decoration: none !important;
    font-weight: 600;
}

a:hover {
    color: #8a5a16 !important;
    text-decoration: underline !important;
}

/* Status Badges */
.admin-badge {
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: rgba(210, 154, 88, 0.1) !important;
    color: #d29a58 !important;
    white-space: nowrap !important;
}
/* ========================================
   ADMIN DASHBOARD: DEFINITION & CONTRAST
   ======================================== */

/* 1. Defined Stat Boxes */
body.redesign .admin-stat-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(210, 154, 88, 0.3) !important; /* Definitive Gold Border */
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 12px rgba(47, 34, 25, 0.05) !important;
}

/* ========================================
   ADMIN DASHBOARD: ZEBRA STRIPE ENQUIRIES
   ======================================== */

/* 1. The Container Box */
.admin-enquiry-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(210, 154, 88, 0.25) !important;
    border-radius: 16px !important;
    overflow: hidden; /* Clips stripes to the border radius */
    box-shadow: 0 4px 15px rgba(47, 34, 25, 0.04) !important;
}

/* 2. Striping the Rows */
.admin-enquiry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(210, 154, 88, 0.08);
}

/* Every second row gets a soft beige tint */
.admin-enquiry-row:nth-child(even) {
    background-color: #fdfaf7 !important; /* Tonal Beige */
}

/* Every first row stays white */
.admin-enquiry-row:nth-child(odd) {
    background-color: #ffffff !important;
}

/* Hover state for interaction */
.admin-enquiry-row:hover {
    background-color: rgba(210, 154, 88, 0.08) !important;
    cursor: pointer;
}

/* 3. Typography & Micro-Details */
.enquiry-sender {
    font-weight: 700;
    color: #2f2219; /* Espresso */
    font-size: 14px;
}

.enquiry-meta {
    font-size: 12px;
    color: #a69182; /* Taupe */
    letter-spacing: 0.02em;
}

.enquiry-status-dot {
    height: 8px;
    width: 8px;
    background-color: #d29a58; /* Gold dot for "Unread" */
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* 3. Defined Booking Rows */
.admin-booking-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(210, 154, 88, 0.25) !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.booking-item-row {
    border-bottom: 1px solid rgba(210, 154, 88, 0.12) !important;
    padding: 14px 0;
}

.booking-item-row:last-child {
    border-bottom: none !important;
}

/* 4. Action Required Strip (Stronger Definition) */
.admin-request-summary {
    background: #fffcf0 !important; /* Soft Cream */
    border: 2px solid #d29a58 !important; /* Stronger Gold Outline */
    border-radius: 14px !important;
    box-shadow: 0 8px 20px rgba(210, 154, 88, 0.1) !important;
}

/* 5. Typography Weight for Contrast */
.admin-stat-title, .section-label-micro {
    color: #8a5a16 !important; /* Deep Bronze */
    font-weight: 700 !important;
    letter-spacing: 0.15em !important;
}

.admin-stat-value {
    color: #2f2219 !important; /* Espresso */
    margin-top: 4px;
}

/* 6. Link Decoration for Clarity */
a.view-link {
    color: #d29a58 !important;
    font-weight: 600;
    text-decoration: underline rgba(210, 154, 88, 0.3) !important;
}

a.view-link:hover {
    color: #2f2219 !important;
    text-decoration-color: #2f2219 !important;
}

/* ========================================
   ADMIN DESIGN SYSTEM - CSS VARIABLES
   ======================================== */

:root {
    --admin-card-bg: #ffffff;
    --admin-card-border: rgba(210, 154, 88, 0.25);
    --admin-card-border-strong: rgba(210, 154, 88, 0.4);
    --admin-text-primary: #2f2219;
    --admin-text-secondary: #a69182;
    --admin-brand-icon: #d29a58;
    --admin-search-bg: #fdfaf7;
    --admin-gold: #d29a58;
    --admin-gold-hover: #b88244;
    --admin-gold-light: rgba(210, 154, 88, 0.1);
    --admin-table-header-border: rgba(210, 154, 88, 0.3);
    --admin-table-row-border: rgba(210, 154, 88, 0.1);
    --admin-page-bg: #fdfaf7;
}

[data-theme="dark"] {
    --admin-card-bg: #1e160e;
    --admin-card-border: rgba(210, 154, 88, 0.2);
    --admin-card-border-strong: rgba(210, 154, 88, 0.35);
    --admin-text-primary: #f5ece0;
    --admin-text-secondary: #d8c4b2;
    --admin-brand-icon: #d29a58;
    --admin-search-bg: #160f08;
    --admin-table-header-border: rgba(210, 154, 88, 0.25);
    --admin-table-row-border: rgba(210, 154, 88, 0.08);
    --admin-page-bg: #130d07;
}

/* ========================================
   ADMIN DESIGN SYSTEM - COMPONENTS
   ======================================== */

/* --- Form Card --- */
body.redesign .admin-form-card {
    background: var(--admin-card-bg);
    border: 1.5px solid var(--admin-card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(47, 34, 25, 0.05);
    padding: 32px;
}

body.redesign .admin-form-title {
    font-family: 'Grown', serif;
    font-size: 1.4rem;
    color: var(--admin-text-primary);
    margin: 0 0 16px;
}

/* --- Form Controls --- */
body.redesign .admin-form-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--admin-text-secondary);
    margin-bottom: 6px;
    display: block;
}

body.redesign .admin-form-input,
body.redesign .admin-form-select,
body.redesign .admin-form-textarea {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--admin-text-primary);
    background: var(--admin-search-bg);
    border: 1.5px solid var(--admin-card-border);
    border-radius: 10px;
    padding: 10px 14px;
    width: 100%;
    transition: border-color 0.2s;
}

body.redesign .admin-form-input:focus,
body.redesign .admin-form-select:focus,
body.redesign .admin-form-textarea:focus {
    border-color: var(--admin-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(210, 154, 88, 0.12);
}

body.redesign .admin-form-input.is-invalid,
body.redesign .admin-form-select.is-invalid,
body.redesign .admin-form-textarea.is-invalid,
body.redesign form.was-validated .admin-form-input:invalid,
body.redesign form.was-validated .admin-form-select:invalid,
body.redesign form.was-validated .admin-form-textarea:invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.14);
}

body.redesign .invalid-feedback {
    color: #dc3545;
}

body.redesign .admin-form-group {
    margin-bottom: 20px;
}

body.redesign .admin-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

/* --- Buttons --- */

body.redesign .admin-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d29a58;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(210, 154, 88, 0.25);
}

body.redesign .admin-btn-primary:hover {
    background: #b88244 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(210, 154, 88, 0.3);
    text-decoration: none !important;
}

body.redesign .admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--admin-gold) !important;
    border: 1.5px solid var(--admin-card-border);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

body.redesign .admin-btn-secondary:hover {
    border-color: var(--admin-gold);
    background: var(--admin-gold-light);
    text-decoration: none !important;
}

/* --- Back Link --- */
body.redesign .admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-secondary) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

body.redesign .admin-back-link:hover {
    color: var(--admin-text-primary) !important;
    text-decoration: none !important;
}

/* --- Page Header --- */
body.redesign .admin-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* Row gap keeps stacked items (tabs / search / action button) from
       touching when the header wraps onto multiple lines; column gap keeps
       them comfortably spaced when they share a single row. */
    gap: 14px 16px;
    margin-bottom: 28px;
}

body.redesign .admin-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

body.redesign .admin-list-toolbar__leading,
body.redesign .admin-list-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

body.redesign .admin-list-toolbar__actions {
    margin-left: auto;
}

body.redesign .admin-list-toolbar__search {
    width: min(400px, 36vw);
    max-width: 400px;
    margin: 0;
}

body.redesign .admin-list-toolbar .admin-tabs,
body.redesign .admin-list-toolbar .admin-pill-tabs {
    margin-bottom: 0;
}

@media (max-width: 992px) {
    body.redesign .admin-list-toolbar,
    body.redesign .admin-list-toolbar__leading,
    body.redesign .admin-list-toolbar__actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    body.redesign .admin-list-toolbar__actions {
        margin-left: 0;
    }

    body.redesign .admin-list-toolbar__search {
        width: 100%;
        max-width: none;
    }
}

/* --- Table Card --- */
body.redesign .admin-table-card {
    background: var(--admin-card-bg);
    border: 1.5px solid var(--admin-card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(47, 34, 25, 0.05);
    margin-bottom: 24px;
}

body.redesign .admin-table {
    width: 100%;
    border-collapse: collapse;
}

body.redesign .admin-table thead th {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--admin-text-secondary);
    padding: 14px 20px;
    border-bottom: 1.5px solid var(--admin-table-header-border);
    background: transparent;
    white-space: nowrap;
}

body.redesign .admin-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--admin-table-row-border);
    vertical-align: middle;
}

body.redesign .admin-table tbody tr:last-child td {
    border-bottom: none;
}

body.redesign .admin-table tbody tr:hover td {
    background: rgba(210, 154, 88, 0.03);
}

body.redesign .admin-table-primary-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin: 0;
}

body.redesign .admin-table-secondary-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--admin-text-secondary);
    margin: 0;
}

/* --- Action Links (in tables) --- */
body.redesign .admin-action-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

body.redesign .admin-action-link {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

body.redesign .admin-action-link--view {
    color: #d29a58 !important;
    background: rgba(210, 154, 88, 0.1);
}

body.redesign .admin-action-link--view:hover {
    background: rgba(210, 154, 88, 0.2) !important;
    color: #b88244 !important;
    text-decoration: none !important;
}

body.redesign .admin-action-link--edit {
    color: #D97706 !important;
    background: rgba(217, 119, 6, 0.08);
}

body.redesign .admin-action-link--edit:hover {
    background: rgba(217, 119, 6, 0.16) !important;
    color: #B45309 !important;
    text-decoration: none !important;
}

body.redesign .admin-action-link--delete {
    color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.08);
}

body.redesign .admin-action-link--delete:hover {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #DC2626 !important;
    text-decoration: none !important;
}

/* --- Tabs --- */
body.redesign .admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--admin-card-border);
    margin-bottom: 24px;
}

body.redesign .admin-tab {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    color: var(--admin-text-secondary) !important;
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 6px 6px 0 0;
}

/* `.admin-tab` was originally an <a> tag, but several templates render it
   as a <button> for a11y (e.g. consumer/bookings Upcoming/Completed tabs,
   teacher/availability General/BlockOut tabs). Strip the user-agent
   button chrome so the two element types look identical. */
body.redesign button.admin-tab {
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font: inherit;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

body.redesign .admin-tab:hover {
    color: var(--admin-text-primary) !important;
    text-decoration: none !important;
}

body.redesign .admin-tab.active {
    color: var(--admin-gold) !important;
    border-bottom-color: var(--admin-gold);
}

/* --- Pill Toggle (view switches, inline filters) --- */
body.redesign .admin-pill-tabs {
    display: flex;
    gap: 3px;
    background: var(--admin-search-bg);
    border: 1.5px solid var(--admin-card-border);
    border-radius: 10px;
    padding: 3px;
}

body.redesign .admin-pill-tab {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    color: var(--admin-text-secondary);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1;
}

body.redesign .admin-pill-tab:hover {
    color: var(--admin-text-primary);
    background: var(--admin-card-bg);
    text-decoration: none;
}

body.redesign .admin-pill-tab.active {
    background: var(--admin-gold);
    color: #fff;
}

[data-theme="dark"] body.redesign .admin-pill-tab.active {
    color: #1a0f00;
}

/* --- Search / Filter Bar --- */
body.redesign .admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--admin-search-bg);
    border: 1.5px solid var(--admin-card-border);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--admin-text-primary);
    width: 100%;
    max-width: 360px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.redesign .admin-search:focus-within {
    border-color: var(--admin-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(210, 154, 88, 0.12);
}

body.redesign .admin-search i {
    flex-shrink: 0;
    color: var(--admin-text-secondary);
    font-size: 14px;
}

body.redesign .admin-search input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: inherit;
    color: var(--admin-text-primary);
    height: auto !important;
    line-height: 1.4;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

body.redesign .admin-search input::placeholder {
    color: var(--admin-text-secondary);
    opacity: 0.7;
}

body.redesign .admin-search select {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: inherit;
    color: var(--admin-text-primary);
    height: auto !important;
    line-height: 1.4;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* --- Badge Variants --- */
body.redesign .admin-badge-success {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #15803D !important;
}

body.redesign .admin-badge-warning {
    background: rgba(234, 179, 8, 0.12) !important;
    color: #A16207 !important;
}

body.redesign .admin-badge-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #B91C1C !important;
}

body.redesign .admin-badge-info {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #1D4ED8 !important;
}

body.redesign .admin-badge-neutral {
    background: rgba(166, 145, 130, 0.12) !important;
    color: #78716C !important;
}

[data-theme="dark"] body.redesign .admin-badge-success,
[data-theme="dark"] .admin-badge-success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ADE80 !important;
}

[data-theme="dark"] body.redesign .admin-badge-warning,
[data-theme="dark"] .admin-badge-warning {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #FCD34D !important;
}

[data-theme="dark"] body.redesign .admin-badge-danger,
[data-theme="dark"] .admin-badge-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #F87171 !important;
}

[data-theme="dark"] body.redesign .admin-badge-info,
[data-theme="dark"] .admin-badge-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
}

[data-theme="dark"] body.redesign .admin-badge-neutral,
[data-theme="dark"] .admin-badge-neutral {
    background: rgba(166, 145, 130, 0.15) !important;
    color: #A8A29E !important;
}

/* --- Pagination --- */
body.redesign .pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 24px;
    border-top: 1px solid var(--admin-card-border);
}

.admin-pagination .page-item {
    display: inline-flex;
    list-style: none;
}

.admin-pagination {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.redesign .page-item .page-link {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--admin-card-border);
    background: var(--admin-card-bg);
    color: var(--admin-text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s;
}

body.redesign .page-item .page-link:hover {
    border-color: var(--admin-gold);
    color: var(--admin-gold) !important;
    background: var(--admin-gold-light);
}

body.redesign .page-item.active .page-link {
    background: var(--admin-gold) !important;
    border-color: var(--admin-gold) !important;
    color: #ffffff !important;
}

body.redesign .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* ========================================
   CONSUMER PAYMENT PORTAL
   ======================================== */

body.redesign .z-billing-page {
    display: grid;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
}

body.redesign .z-billing-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 0 2px;
    flex-wrap: wrap;
}

body.redesign .z-billing-title {
    margin: 0;
    font-family: 'Grown', serif;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
    color: var(--admin-text-primary);
}

body.redesign .z-billing-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1.5px solid var(--admin-card-border);
    border-radius: 14px;
    background: var(--admin-card-bg);
    box-shadow: 0 10px 28px rgba(47, 34, 25, 0.04);
}

body.redesign .z-billing-tab {
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--admin-text-secondary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 10px 16px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

body.redesign .z-billing-tab:hover,
body.redesign .z-billing-tab:focus-visible {
    color: var(--admin-text-primary);
    background: var(--admin-gold-light);
}

body.redesign .z-billing-tab.active {
    color: #ffffff;
    background: var(--admin-gold);
    box-shadow: 0 8px 18px rgba(210, 154, 88, 0.28);
}

body.redesign .z-billing-section {
    animation: adminFadeIn 0.18s ease-out;
}

body.redesign .z-billing-section-title {
    margin: 0 0 16px;
    font-family: 'Grown', serif;
    font-size: 2rem;
    color: var(--admin-text-primary);
}

body.redesign .z-billing-balance-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 32px;
    border: 1.5px solid var(--admin-card-border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(210, 154, 88, 0.13), transparent 34%),
        var(--admin-card-bg);
    box-shadow: 0 18px 45px rgba(47, 34, 25, 0.07);
}

body.redesign .z-billing-balance-card::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(210, 154, 88, 0.12);
    pointer-events: none;
}

body.redesign .z-billing-balance-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 28px;
}

body.redesign .z-billing-amount {
    min-width: 190px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    color: var(--admin-text-primary);
}

body.redesign .z-billing-balance-divider {
    width: 1px;
    min-height: 82px;
    background: var(--admin-card-border);
}

body.redesign .z-billing-balance-details {
    display: grid;
    gap: 14px;
}

body.redesign .z-billing-balance-item {
    display: grid;
    gap: 3px;
}

body.redesign .z-billing-balance-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--admin-text-secondary);
}

body.redesign .z-billing-balance-value {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--admin-text-primary);
}

body.redesign .z-billing-balance-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.redesign .z-billing-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1.5px solid var(--admin-gold);
    border-radius: 12px;
    background: var(--admin-gold);
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(210, 154, 88, 0.24);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

body.redesign .z-billing-btn-primary:hover,
body.redesign .z-billing-btn-primary:focus-visible {
    background: var(--admin-gold-hover);
    border-color: var(--admin-gold-hover);
    box-shadow: 0 14px 26px rgba(210, 154, 88, 0.3);
    color: #ffffff !important;
    transform: translateY(-1px);
}

body.redesign .z-billing-balance-actions [data-tab-trigger="history"] {
    min-height: 42px;
    padding: 10px 14px !important;
    border: 1.5px solid var(--admin-card-border) !important;
    border-radius: 12px;
    color: var(--admin-text-primary) !important;
    font-weight: 700;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

body.redesign .z-billing-balance-actions [data-tab-trigger="history"]:hover,
body.redesign .z-billing-balance-actions [data-tab-trigger="history"]:focus-visible {
    border-color: var(--admin-gold) !important;
    background: var(--admin-gold-light) !important;
    color: var(--admin-gold-hover) !important;
}

body.redesign .admin-table.no-headers tbody tr {
    transition: background 0.2s;
}

body.redesign .admin-table.no-headers tbody td:last-child {
    width: 180px;
}

body.redesign .admin-action-link.view,
body.redesign .admin-action-link.edit,
body.redesign .admin-action-link.delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 6px 12px;
}

body.redesign .admin-action-link.view {
    color: #d29a58 !important;
    background: rgba(210, 154, 88, 0.1);
}

body.redesign .admin-action-link.edit {
    color: #d97706 !important;
    background: rgba(217, 119, 6, 0.08);
}

body.redesign .admin-action-link.delete {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08);
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    body.redesign .z-billing-header,
    body.redesign .z-billing-balance-card,
    body.redesign .z-billing-balance-main {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.redesign .z-billing-balance-divider {
        width: 100%;
        min-height: 1px;
        height: 1px;
    }

    body.redesign .z-billing-balance-actions {
        justify-content: flex-start;
    }
}

/* The default `.z-billing-tabs { display: inline-flex }` lays the three
   billing tabs (Overview / Payment History / Billing Details) horizontally,
   which overflows the viewport on phones AND most narrow tablets/portrait
   iPad widths. Stack the tabs vertically as soon as we hit a tablet
   breakpoint (≤ 820px) instead of waiting for ≤ 640px. */
@media (max-width: 820px) {
    body.redesign .z-billing-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    body.redesign .z-billing-tab {
        width: 100%;
        text-align: center;
    }

    body.redesign .z-billing-balance-card {
        padding: 22px;
        border-radius: 18px;
    }

    body.redesign .z-billing-balance-actions,
    body.redesign .z-billing-btn-primary,
    body.redesign .z-billing-balance-actions [data-tab-trigger="history"] {
        width: 100%;
    }
}

/* --- Dark Mode Card / Table overrides --- */
[data-theme="dark"] body.redesign .admin-form-card,
[data-theme="dark"] body.redesign .admin-table-card {
    background: var(--admin-card-bg);
    border-color: var(--admin-card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] body.redesign .admin-table thead th {
    border-bottom-color: var(--admin-table-header-border);
}

[data-theme="dark"] body.redesign .admin-table tbody td {
    border-bottom-color: var(--admin-table-row-border);
}

/* ========================================
   ACCESSIBILITY CONTRAST OVERRIDES
   Keep portal text readable in both themes.
   ======================================== */

body.redesign {
    color: #3b2a20 !important;
    background-color: #fdfaf7 !important;
}

body.redesign .sidebar-main,
body.redesign main#main-content {
    background: transparent !important;
}

body.redesign .admin-brand-text,
body.redesign #portalSidebar .admin-brand-text {
    color: #f8efe4 !important;
    opacity: 1 !important;
}

body.redesign #portalSidebar .nav-link {
    color: #d8c4b2 !important;
}

body.redesign #portalSidebar .nav-link:hover,
body.redesign #portalSidebar .nav-link:focus-visible {
    color: #ffffff !important;
    background: rgba(210, 154, 88, 0.16) !important;
}

body.redesign #portalSidebar .nav-link.active {
    color: #ffd89f !important;
    background: rgba(210, 154, 88, 0.22) !important;
}

body.redesign .admin-nav-bottom .nav-link,
body.redesign .admin-nav-bottom .nav-link span,
body.redesign .admin-nav-bottom .nav-link i {
    color: #e7d7c4 !important;
    opacity: 1 !important;
}

body.redesign .admin-nav-bottom .nav-link:hover,
body.redesign .admin-nav-bottom .nav-link:focus-visible {
    color: #ffffff !important;
    background: rgba(210, 154, 88, 0.16) !important;
}

body.redesign .sidebar-navbar .page-title,
body.redesign .admin-user-label,
body.redesign .admin-header-actions,
body.redesign .admin-header-actions i {
    color: #2f2219 !important;
}

body.redesign .z-billing-title {
    color: #2f2219 !important;
    opacity: 1 !important;
}

body.redesign .z-billing-tabs {
    background: #ffffff !important;
    border-color: #ead7c0 !important;
}

body.redesign .z-billing-tab {
    color: #7b604b !important;
}

body.redesign .z-billing-tab.active {
    color: #ffffff !important;
    background: #d29a58 !important;
}

body.redesign .z-billing-balance-card {
    background:
        linear-gradient(135deg, rgba(210, 154, 88, 0.12), rgba(255, 255, 255, 0) 36%),
        #ffffff !important;
    border-color: #ead7c0 !important;
}

body.redesign .z-billing-amount,
body.redesign .z-billing-balance-value,
body.redesign .z-billing-balance-actions [data-tab-trigger="history"] {
    color: #1f130c !important;
}

body.redesign .z-billing-balance-label {
    color: #80654f !important;
}

[data-theme="dark"] body.redesign {
    color: #f5ece0 !important;
    background-color: #130d07 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(210, 154, 88, 0.08) 0px, transparent 46%),
        radial-gradient(at 100% 100%, rgba(210, 154, 88, 0.06) 0px, transparent 48%) !important;
}

[data-theme="dark"] body.redesign .sidebar-navbar .page-title,
[data-theme="dark"] body.redesign .admin-user-label,
[data-theme="dark"] body.redesign .admin-header-actions,
[data-theme="dark"] body.redesign .admin-header-actions i {
    color: #f8efe4 !important;
}

[data-theme="dark"] body.redesign .z-billing-title {
    color: #f8efe4 !important;
    opacity: 1 !important;
}

[data-theme="dark"] body.redesign .z-billing-tabs {
    background: #21150d !important;
    border-color: rgba(240, 207, 156, 0.42) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] body.redesign .z-billing-tab {
    color: #d8c4b2 !important;
}

[data-theme="dark"] body.redesign .z-billing-tab:hover,
[data-theme="dark"] body.redesign .z-billing-tab:focus-visible {
    color: #ffffff !important;
    background: rgba(210, 154, 88, 0.18) !important;
}

[data-theme="dark"] body.redesign .z-billing-tab.active {
    color: #1a120c !important;
    background: #f0cf9c !important;
}

[data-theme="dark"] body.redesign .z-billing-balance-card {
    background:
        linear-gradient(135deg, rgba(240, 207, 156, 0.14), rgba(0, 0, 0, 0) 36%),
        #1a120c !important;
    border-color: rgba(240, 207, 156, 0.32) !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38) !important;
}

[data-theme="dark"] body.redesign .z-billing-amount,
[data-theme="dark"] body.redesign .z-billing-balance-value {
    color: #fff8ef !important;
}

[data-theme="dark"] body.redesign .z-billing-balance-label {
    color: #d8c4b2 !important;
}

[data-theme="dark"] body.redesign .z-billing-balance-divider {
    background: rgba(240, 207, 156, 0.28) !important;
}

[data-theme="dark"] body.redesign .z-billing-balance-actions [data-tab-trigger="history"] {
    color: #fff8ef !important;
    border-color: rgba(240, 207, 156, 0.36) !important;
}

[data-theme="dark"] body.redesign .z-billing-balance-actions [data-tab-trigger="history"]:hover,
[data-theme="dark"] body.redesign .z-billing-balance-actions [data-tab-trigger="history"]:focus-visible {
    color: #1a120c !important;
    background: #f0cf9c !important;
    border-color: #f0cf9c !important;
}

/* ========================================
   PORTAL CONTENT SPACING
   Give every customer page a clear gap from the sidebar.
   ======================================== */

body.redesign .sidebar-main {
    min-width: 0;
}

body.redesign main#main-content.container-fluid {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 22px 56px 72px !important;
}

body.redesign .admin-page-header,
body.redesign .z-billing-page {
    width: 100%;
}

body.redesign .admin-page-header {
    padding: 12px 0 22px;
    border-bottom: 1px solid rgba(210, 154, 88, 0.18);
}

body.redesign .admin-page-header .admin-form-title {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

body.redesign .admin-page-header p {
    color: #6f5a49 !important;
    font-size: 15px !important;
    line-height: 1.65;
}

body.redesign .z-billing-page {
    max-width: 1280px;
}

body.redesign .z-billing-header {
    padding-top: 10px;
}

[data-theme="dark"] body.redesign .admin-page-header {
    border-bottom-color: rgba(240, 207, 156, 0.22);
}

[data-theme="dark"] body.redesign .admin-page-header p {
    color: #d8c4b2 !important;
}

@media (max-width: 1180px) {
    body.redesign main#main-content.container-fluid {
        padding: 20px 36px 60px !important;
    }
}

@media (max-width: 768px) {
    body.redesign main#main-content.container-fluid {
        padding: 18px 20px 48px !important;
    }

    body.redesign .admin-page-header {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 16px;
    }
}

/* ========================================
   ADMIN PORTAL THEME CONTRAST
   Dashboard and tables contain inline colors, so admin needs scoped overrides.
   ======================================== */

body.admin-portal {
    color: #2f2219 !important;
}

body.admin-portal main#main-content.container-fluid {
    width: 100%;
    padding: 24px 56px 72px !important;
}

body.admin-portal .sidebar-navbar .page-title,
body.admin-portal .admin-user-label,
body.admin-portal .admin-header-actions,
body.admin-portal .admin-header-actions i {
    color: #2f2219 !important;
}

body.admin-portal .admin-stat-card {
    background: #ffffff !important;
    border-color: #ead7c0 !important;
}

body.admin-portal .admin-stat-title {
    color: #7c5f49 !important;
}

body.admin-portal .admin-stat-value {
    color: #1f130c !important;
}

body.admin-portal .admin-stat-trend,
body.admin-portal .admin-stat-trend.neutral,
body.admin-portal .admin-stat-trend.up,
body.admin-portal .admin-stat-trend.down {
    color: #9a641f !important;
    opacity: 1 !important;
}

body.admin-portal .admin-table-card,
body.admin-portal .admin-form-card,
body.admin-portal .admin-dashboard-wrapper [style*="background: #fff"],
body.admin-portal .admin-dashboard-wrapper [style*="background: #ffffff"] {
    background-color: #ffffff !important;
    color: #2f2219 !important;
    border-color: #ead7c0 !important;
}

body.admin-portal .admin-table thead th,
body.admin-portal .admin-table-primary-text,
body.admin-portal .admin-dashboard-wrapper h3,
body.admin-portal .admin-dashboard-wrapper p[style*="color: #2f2219"] {
    color: #2f2219 !important;
}

body.admin-portal .admin-table-secondary-text,
body.admin-portal .admin-dashboard-wrapper p[style*="color: #a69182"],
body.admin-portal .admin-dashboard-wrapper div[style*="color: #a69182"] {
    color: #6f5a49 !important;
}

body.admin-portal .admin-tabs {
    border-bottom-color: rgba(154, 100, 31, 0.34) !important;
}

body.admin-portal .admin-tab {
    color: #705642 !important;
}

body.admin-portal .admin-tab.active {
    color: #b4762d !important;
}

[data-theme="dark"] body.admin-portal {
    color: #f8efe4 !important;
    background-color: #130d07 !important;
}

[data-theme="dark"] body.admin-portal main#main-content.container-fluid {
    background: transparent !important;
}

[data-theme="dark"] body.admin-portal .sidebar-navbar .page-title,
[data-theme="dark"] body.admin-portal .admin-user-label,
[data-theme="dark"] body.admin-portal .admin-header-actions,
[data-theme="dark"] body.admin-portal .admin-header-actions i {
    color: #fff8ef !important;
}

[data-theme="dark"] body.admin-portal .admin-stat-card,
[data-theme="dark"] body.admin-portal .admin-table-card,
[data-theme="dark"] body.admin-portal .admin-form-card,
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper [style*="background: #fff"],
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper [style*="background: #ffffff"] {
    background: #1a120c !important;
    color: #f8efe4 !important;
    border-color: rgba(240, 207, 156, 0.34) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36) !important;
}

[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper [style*="background: #fdfaf7"],
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper a[style*="background: #fdfaf7"] {
    background: #21150d !important;
}

[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper [style*="background: rgba(210, 154, 88, 0.03)"] {
    background: rgba(240, 207, 156, 0.08) !important;
}

[data-theme="dark"] body.admin-portal .admin-stat-title,
[data-theme="dark"] body.admin-portal .admin-table thead th {
    color: #d8c4b2 !important;
}

[data-theme="dark"] body.admin-portal .admin-stat-value,
[data-theme="dark"] body.admin-portal .admin-table-primary-text,
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper h3,
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper p[style*="color: #2f2219"],
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper div[style*="color: #2f2219"] {
    color: #fff8ef !important;
}

[data-theme="dark"] body.admin-portal .admin-stat-trend,
[data-theme="dark"] body.admin-portal .admin-stat-trend.neutral,
[data-theme="dark"] body.admin-portal .admin-stat-trend.up,
[data-theme="dark"] body.admin-portal .admin-stat-trend.down,
[data-theme="dark"] body.admin-portal .admin-table-secondary-text,
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper p[style*="color: #a69182"],
[data-theme="dark"] body.admin-portal .admin-dashboard-wrapper div[style*="color: #a69182"] {
    color: #d8c4b2 !important;
    opacity: 1 !important;
}

[data-theme="dark"] body.admin-portal .admin-table tbody td {
    color: #f8efe4 !important;
    border-bottom-color: rgba(240, 207, 156, 0.16) !important;
}

[data-theme="dark"] body.admin-portal .admin-table tbody tr:hover td {
    background: rgba(240, 207, 156, 0.07) !important;
}

[data-theme="dark"] body.admin-portal .admin-tabs {
    border-bottom-color: rgba(240, 207, 156, 0.28) !important;
}

[data-theme="dark"] body.admin-portal .admin-tab {
    color: #c7ae9b !important;
}

[data-theme="dark"] body.admin-portal .admin-tab:hover,
[data-theme="dark"] body.admin-portal .admin-tab:focus-visible {
    color: #fff8ef !important;
}

[data-theme="dark"] body.admin-portal .admin-tab.active {
    color: #f0cf9c !important;
}

[data-theme="dark"] body.admin-portal .admin-action-link.view,
[data-theme="dark"] body.admin-portal .admin-action-link.edit,
[data-theme="dark"] body.admin-portal .admin-action-link.delete {
    background: rgba(210, 154, 88, 0.15) !important;
}

.login-toast-region {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 2200;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.login-toast-region .alert {
    pointer-events: auto;
    margin: 0;
    padding: 14px 44px 14px 18px;
    border: 1px solid rgba(210, 154, 88, 0.44);
    border-radius: 12px;
    background: #fff8ef;
    color: #2f2219;
    box-shadow: 0 18px 40px rgba(47, 34, 25, 0.18);
    font-family: "Inter", Arial, sans-serif;
    font-weight: 700;
    animation: loginToastFade 5.5s ease forwards;
}

.login-toast-region .alert-success {
    border-left: 5px solid #d29a58;
}

.sp-date-nav[hidden],
#listNav[hidden] {
    display: none !important;
}

.sp-date-nav--calendar {
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(210, 154, 88, 0.16);
}

body.redesign .sp-list-date {
    border-bottom-color: var(--admin-card-border);
}

body.redesign .sp-list-date__label {
    background: var(--admin-search-bg);
    border: 1px solid var(--admin-card-border);
    border-radius: 0;
    color: var(--admin-text-primary);
}

body.redesign .sp-list-date__label h5,
body.redesign .sp-list-date__label strong {
    color: var(--admin-text-primary) !important;
}

body.redesign .sp-list-card {
    background: var(--admin-card-bg) !important;
    border-color: var(--admin-card-border) !important;
    color: var(--admin-text-primary);
}

body.redesign .sp-list-card:hover {
    background: var(--admin-search-bg) !important;
}

body.redesign .sp-list-card h4,
body.redesign .sp-list-card h5,
body.redesign .sp-list-card h6 {
    color: var(--admin-text-primary) !important;
}

body.redesign .sp-list-card .text-muted,
body.redesign .sp-list-card small,
body.redesign .sp-list-card .small {
    color: var(--admin-text-secondary) !important;
}

.login-toast-region .btn-close {
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.55;
}

[data-theme="dark"] .login-toast-region .alert {
    background: #1a120c;
    color: #fff8ef;
    border-color: rgba(240, 207, 156, 0.4);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

@keyframes loginToastFade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10%,
    78% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (max-width: 1180px) {
    body.admin-portal main#main-content.container-fluid {
        padding: 22px 36px 60px !important;
    }
}

@media (max-width: 768px) {
    body.admin-portal main#main-content.container-fluid {
        padding: 18px 20px 48px !important;
    }
}

/* ---- Clickable class card (Consumer portal) ---- */
.cc-class-card-bookable:hover {
    border-color: var(--admin-brand-icon) !important;
    box-shadow: 0 2px 10px rgba(192, 135, 58, 0.14);
}

/* ---- Profile dropdown (admin + portal navbars) ---- */
.admin-header-actions .dropdown > button {
    cursor: pointer;
    color: inherit;
    line-height: 1;
}
.admin-header-actions .dropdown > button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}
.admin-header-actions .dropdown-menu {
    min-width: 180px;
    padding: 6px 0;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.admin-header-actions .dropdown-item-text {
    font-size: 0.82rem;
    padding: 6px 16px;
    color: inherit;
    opacity: 0.7;
}
.admin-header-actions .dropdown-item.text-danger {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    padding: 7px 16px;
}
.admin-header-actions .dropdown-item.text-danger:hover,
.admin-header-actions .dropdown-item.text-danger:focus {
    background-color: rgba(220, 53, 69, 0.08);
    color: #c0392b !important;
}
