        :root {
            /* MyoMesh Warm Brand Colors */
            --forest: #1E3A34;
            --sage: #3D8B7A;
            --coral: #FF6B4A;
            --coral-light: #FF8F75;
            --amber: #FFB347;
            --peach: #FFAD85;
            
            /* Surfaces */
            --cream: #F5F5F3;
            --warm-light: #EDEDE9;
            --coral-tint: #FFEBE3;
            --sage-tint: #E8F3F0;
            
            /* Legacy variable mappings */
            --primary: #1E3A34;
            --primary-light: #3D8B7A;
            --accent: #FF6B4A;
            --accent-light: #FF8F75;
            --bg: #F5F5F3;
            --card: #FFFFFF;
            --text: #2D2926;
            --text-light: #6B635B;
            --border: #E0DDD9;
            --success: #3D8B7A;
            --warning: #FFB347;
            --error: #DC4F41;
            --shadow: rgba(45, 41, 38, 0.08);
        }

        /* Dark Mode */
        body.dark-mode {
            --cream: #1a1a2e;
            --warm-light: #16213e;
            --coral-tint: #2a1a1a;
            --sage-tint: #1a2a25;
            --primary: #e0d8cf;
            --primary-light: #5EADA0;
            --bg: #1e1e30;
            --card: #252540;
            --text: #e0d8cf;
            --text-light: #9990a0;
            --border: #3a3a52;
            --shadow: rgba(0, 0, 0, 0.3);
        }
        body.dark-mode { background: #1a1a2e; color: var(--text); }
        body.dark-mode .card, body.dark-mode .settings-section { background: var(--card); border-color: var(--border); }
        body.dark-mode .settings-sidebar { background: var(--card); border-color: var(--border); }
        body.dark-mode .settings-content { background: var(--card); }
        body.dark-mode .settings-cat-item { color: var(--text); }
        body.dark-mode .settings-cat-item:hover { background: rgba(61,139,122,0.1); }
        body.dark-mode .settings-cat-item.active { background: rgba(61,139,122,0.15); }
        body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
            background: var(--bg); color: var(--text); border-color: var(--border);
        }
        body.dark-mode .income-dash-card { background: var(--card); border-color: var(--border); border-left-width: 4px; }
        body.dark-mode .nav-card { background: var(--card); border-color: var(--border); }
        body.dark-mode .nav-tabs { background: rgba(30, 30, 30, 0.72); border-color: rgba(255,255,255,0.08); }
        body.dark-mode .nav-card-label { color: var(--text); }
        body.dark-mode .nav-card-desc { color: var(--text-light); }
        body.dark-mode .nav-card-icon { background: rgba(255,255,255,0.08); }
        body.dark-mode .nav-card-icon svg { color: var(--text); }
        body.dark-mode .calendar-event { background: var(--card) !important; }
        body.dark-mode .type-breakdown-card { background: var(--card); border-color: var(--border); }
        body.dark-mode .btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
        body.dark-mode .modal-content, body.dark-mode .session-detail-modal .modal-content { background: var(--card); color: var(--text); }
        body.dark-mode .session-info-row { border-color: var(--border); }
        body.dark-mode .teacher-filter-item { background: var(--card); }
        body.dark-mode .teacher-filter-item.selected { background: var(--bg); }
        body.dark-mode .search-box input { background: var(--bg); color: var(--text); border-color: var(--border); }
        body.dark-mode .client-card { background: var(--card); border-color: var(--border); }
        body.dark-mode .session-item { background: var(--card); border-color: var(--border); }
        body.dark-mode .invoice-modal .modal-content { background: var(--card); }
        body.dark-mode .quick-book-modal .modal-content { background: var(--card); }
        body.dark-mode .client-profile-modal .modal-content { background: var(--card); }
        body.dark-mode #clientLookupDropdown { background: var(--card); border-color: var(--border); }
        /* Session notes client search dropdown */
        .client-search-dropdown {
            position: absolute; top: 100%; left: 0; right: 0;
            background: var(--card); border: 1.5px solid var(--border);
            border-radius: 12px; box-shadow: 0 8px 30px var(--shadow);
            z-index: 100; max-height: 320px; overflow-y: auto; margin-top: 6px;
        }
        .client-search-dropdown .client-search-item {
            padding: 12px 16px; cursor: pointer; transition: all 0.15s;
            border-bottom: 1px solid var(--border);
            display: flex; align-items: center; gap: 12px;
        }
        .client-search-dropdown .client-search-item:last-child { border-bottom: none; }
        .client-search-dropdown .client-search-item:hover {
            background: var(--sage-tint);
        }
        .client-search-dropdown .client-search-item .csi-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: linear-gradient(135deg, var(--sage), #4FA08D);
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; color: white; font-size: 13px; flex-shrink: 0;
        }
        .client-search-dropdown .client-search-item .csi-info { flex: 1; min-width: 0; }
        .client-search-dropdown .client-search-item .csi-name {
            font-weight: 600; font-size: 14px; color: var(--primary);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .client-search-dropdown .client-search-item .csi-email {
            font-size: 12px; color: var(--text-light); margin-top: 1px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .client-search-dropdown .client-search-item .csi-action {
            font-size: 11px; font-weight: 600; color: var(--sage);
            flex-shrink: 0; opacity: 0; transition: opacity 0.15s;
        }
        .client-search-dropdown .client-search-item:hover .csi-action { opacity: 1; }
        body.dark-mode #profileEditMode input, body.dark-mode #profileEditMode textarea { background: var(--bg); color: var(--text); border-color: var(--border); }

        /* Toggle switch active state */
        input[type="checkbox"]:checked + span { background: var(--sage) !important; color: #fff !important; }
        input[type="checkbox"]:checked + span + span,
        input[type="checkbox"]:checked + span + .toggle-knob { left: 25px !important; }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--cream);
            color: var(--text);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        /* Display font for headings — Fraunces with consistent weights */
        h1, h2, h3, .modal-title {
            font-family: 'Fraunces', serif;
        }
        h1 { font-weight: 600; }
        h2 { font-weight: 500; }
        h3 { font-weight: 500; }

        body::before {
            content: '';
            position: fixed;
            top: -50%;
            right: -20%;
            width: 800px;
            height: 800px;
            background: radial-gradient(circle, rgba(255, 107, 74, 0.06) 0%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            bottom: -30%;
            left: -10%;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(255, 179, 71, 0.05) 0%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }

        .page-header {
            background: linear-gradient(160deg, var(--forest) 0%, var(--sage) 65%, rgba(255,107,74,0.6) 100%);
            padding: 0;
            position: relative;
            overflow: hidden;
            margin-bottom: 0;
        }

        .page-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 400px;
            height: 400px;
            background: rgba(255, 107, 74, 0.08);
            border-radius: 50%;
            pointer-events: none;
        }

        .page-header::after {
            content: '';
            position: absolute;
            bottom: -60%;
            left: 5%;
            width: 250px;
            height: 250px;
            background: rgba(255, 173, 133, 0.12);
            border-radius: 50%;
            pointer-events: none;
        }

        .header-content {
            max-width: 1600px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            position: relative;
            z-index: 1;
            height: 104px;
            padding: 0 40px;
        }

        /* Business name pill */
        .biz-pill {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255,255,255,0.13);
            border: 1px solid rgba(255,255,255,0.22);
            border-radius: 20px;
            padding: 5px 16px;
            backdrop-filter: blur(10px);
            white-space: nowrap;
            pointer-events: none;
        }
        .biz-pill-text {
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 700;
            color: rgba(255,255,255,0.95);
            letter-spacing: 0.01em;
        }

        /* Right cluster */
        .header-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }
        /* Vertical divider between user info and logout */
        .header-v-divider {
            width: 1px;
            height: 24px;
            background: rgba(255,255,255,0.22);
            flex-shrink: 0;
        }
        #userInfo { text-align: right; flex-shrink: 0; }
        #userName { font-size: 0.875rem; font-weight: 600; color: white; font-family: 'Inter', sans-serif; line-height: 1.2; }
        #userRole  { font-size: 0.5625rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; font-family: 'Inter', sans-serif; }

        /* Logout button with icon + text */
        .logout-btn {
            height: 36px;
            background: rgba(255,255,255,0.12);
            border: 1.5px solid rgba(255,255,255,0.25);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 0 14px;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        .logout-btn:hover { background: rgba(255,255,255,0.2); }
        .logout-btn svg { display: block; }
        .logout-btn-label {
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 500;
            color: rgba(255,255,255,0.85);
            line-height: 1;
        }

        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 30px 20px;
            position: relative;
            z-index: 1;
            animation: fadeInUp 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        header {
            background: transparent;
            padding: 0;
            border-radius: 0;
            box-shadow: none;
            margin-bottom: 0;
            border: none;
        }

        .logo-section {
            display: flex;
            align-items: center;
            flex-shrink: 0;
            cursor: pointer;
        }

        .logo-icon {
            background: transparent;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: none;
            overflow: visible;
            flex-shrink: 0;
        }

        .logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .logo-icon span {
            display: block;
        }

        h1 {
            font-family: 'Fraunces', serif;
            font-size: 2rem;
            font-weight: 600;
            color: white;
            letter-spacing: -0.02em;
        }

        .tagline {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.85);
            font-weight: 400;
        }

        .nav-tabs {
            display: none;
            gap: 6px;
            background: rgba(255, 255, 255, 0.72);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            padding: 8px;
            border-radius: 14px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
            border: 1px solid rgba(255, 255, 255, 0.6);
            margin-bottom: 30px;
        }

        .nav-tabs.visible {
            display: flex;
            animation: tabSlideIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .nav-tabs.visible::-webkit-scrollbar { display: none; }

        @keyframes tabSlideIn {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .tab {
            flex: 1;
            padding: 14px 20px;
            background: transparent;
            border: none;
            border-radius: 10px;
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            color: var(--text-light);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .tab svg {
            width: 18px;
            height: 18px;
            stroke-width: 2;
            flex-shrink: 0;
        }

        .tab.active {
            background: var(--coral);
            color: white;
            box-shadow: 0 4px 12px rgba(255, 107, 74, 0.25);
        }

        .tab:hover:not(.active) {
            background: var(--coral-tint);
            color: var(--coral);
            transform: translateY(-1px);
        }

        .tab:active {
            transform: translateY(0px);
            transition-duration: 0.08s;
        }

        /* ── Landing Page ── */
        .landing-page {
            background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 50%, var(--coral) 100%);
            position: relative;
            overflow: hidden;
            min-height: calc(100vh - 110px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px 40px;
        }
        .landing-page::before {
            content: '';
            position: absolute;
            top: -30%; right: -5%;
            width: 600px; height: 600px;
            background: rgba(255, 107, 74, 0.12);
            border-radius: 50%;
            pointer-events: none;
        }
        .landing-page::after {
            content: '';
            position: absolute;
            bottom: -40%; left: 5%;
            width: 450px; height: 450px;
            background: rgba(255, 173, 133, 0.1);
            border-radius: 50%;
            pointer-events: none;
        }
        .landing-page.hidden { display: none; }
        .container.hidden { display: none; }

        .landing-inner {
            position: relative;
            z-index: 1;
            text-align: center;
            max-width: 1120px;
            width: 100%;
        }
        .landing-welcome {
            font-family: 'Fraunces', serif;
            font-size: 1.75rem;
            font-weight: 300;
            color: rgba(255,255,255,0.9);
            margin-bottom: 6px;
            letter-spacing: -0.01em;
        }
        .landing-name {
            font-family: 'Fraunces', serif;
            font-size: 2.375rem;
            font-weight: 600;
            color: white;
            letter-spacing: -0.02em;
            margin-bottom: 8px;
        }
        .landing-subtitle {
            font-size: 0.9375rem;
            color: rgba(255,255,255,0.65);
            margin-bottom: 50px;
        }

        .nav-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            max-width: 1120px;
            margin: 0 auto;
        }

        .nav-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(12px);
            border: 1.5px solid rgba(0, 0, 0, 0.08);
            border-radius: 16px;
            padding: 28px 20px 24px;
            cursor: pointer;
            transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .nav-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--coral);
            opacity: 0;
            transition: opacity 0.35s ease;
            border-radius: 16px;
        }
        .nav-card:hover {
            border-color: var(--coral);
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(255, 107, 74, 0.3);
        }
        .nav-card:hover::before { opacity: 1; }
        .nav-card:active { transform: translateY(-2px) scale(0.98); }

        .nav-card-icon {
            position: relative; z-index: 1;
            width: 48px; height: 48px;
            margin: 0 auto 16px;
            background: rgba(0,0,0,0.06);
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.35s ease;
        }
        .nav-card:hover .nav-card-icon { background: rgba(255,255,255,0.25); }
        .nav-card-icon svg { width: 24px; height: 24px; color: #1E3A34; stroke-width: 2; }
        .nav-card:hover .nav-card-icon svg { color: white; }
        .nav-card-label {
            position: relative; z-index: 1;
            font-weight: 600; font-size: 1.0625rem; color: #1E3A34;
            margin-bottom: 6px; letter-spacing: -0.01em;
            transition: color 0.35s ease;
        }
        .nav-card:hover .nav-card-label { color: white; }
        .nav-card-desc {
            position: relative; z-index: 1;
            font-size: 0.875rem; color: rgba(0,0,0,0.5);
            line-height: 1.5; transition: color 0.35s ease;
        }
        .nav-card:hover .nav-card-desc { color: rgba(255,255,255,0.85); }


        .tab-content {
            display: none;
            max-width: 960px;
            margin-left: auto;
            margin-right: auto;
            animation: fadeInUp 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

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

        #calendar-tab {
            max-width: none;
        }

        .card {
            background: var(--card);
            border-radius: 16px;
            padding: 28px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
            border: 1px solid var(--border);
        }

        /* Skeleton loading animations */
        @keyframes skeletonPulse {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 0.8; }
        }
        @keyframes skeletonShimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        .skeleton {
            background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.5) 50%, var(--border) 75%);
            background-size: 200% 100%;
            animation: skeletonShimmer 1.8s ease-in-out infinite;
            border-radius: 8px;
        }
        .skeleton-row {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 18px;
            background: var(--bg);
            border-radius: 12px;
            margin-bottom: 10px;
        }
        .skeleton-line {
            height: 14px;
            border-radius: 6px;
            background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.5) 50%, var(--border) 75%);
            background-size: 200% 100%;
            animation: skeletonShimmer 1.8s ease-in-out infinite;
        }
        .skeleton-line.short { width: 40%; }
        .skeleton-line.medium { width: 65%; }
        .skeleton-line.long { width: 85%; }
        .skeleton-line.full { width: 100%; }
        .skeleton-circle {
            width: 40px; height: 40px;
            border-radius: 50%;
            background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.5) 50%, var(--border) 75%);
            background-size: 200% 100%;
            animation: skeletonShimmer 1.8s ease-in-out infinite;
            flex-shrink: 0;
        }
        .skeleton-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .skeleton-row-inline {
            display: flex;
            align-items: center;
            gap: 12px;
        }

/* Settings specific styles */
.settings-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 0;
    min-height: 60vh;
}

.settings-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1.5px solid var(--border);
    background: var(--card);
    border-radius: 16px 0 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    align-self: start;
}
.settings-sidebar::-webkit-scrollbar { width: 4px; }
.settings-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.settings-sidebar-inner {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-cat-item {
    display: block;
    padding: 10px 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    letter-spacing: 0.02em;
}

.settings-cat-item:hover {
    background: var(--sage-tint);
    color: var(--primary);
}

.settings-cat-item.active {
    background: var(--sage-tint);
    color: var(--sage);
    border-left-color: var(--sage);
}

.settings-content {
    background: var(--card);
    border-radius: 0 16px 16px 0;
    padding: 30px 36px;
    min-width: 0;          /* prevent grid bleed into sidebar */
    overflow-x: hidden;    /* safety net for any fixed-width children */
}

.settings-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
    max-width: 100%;       /* ensure sections never exceed their column */
}

/* ── Settings mobile: Concept B dropdown nav ── */

/* Hide the desktop sidebar on mobile; the dropdown nav replaces it */
@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    .settings-sidebar {
        display: none;
    }
    .settings-content {
        border-radius: 12px;
        padding: 16px 12px;
        max-height: none;
        overflow-y: visible;
        overflow-x: hidden;
        min-width: 0;
    }
}

/* ── Payment section inline 2-col grids: collapse on narrow screens ── */
@media (max-width: 600px) {
    .settings-content [style*="grid-template-columns:1fr 1fr"],
    .settings-content [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── Settings mobile dropdown nav bar ── */
#settingsMobileNav {
    display: none; /* hidden on desktop */
}
#settingsMobileNavWrap {
    display: none; /* hidden on desktop — prevents it from taking a grid column */
}

@media (max-width: 900px) {
    #settingsMobileNav {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 0 12px;
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bg);
    }

    /* Section selector button — fills available width */
    #settingsDropdownBtn {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--forest);
        color: white;
        border: none;
        border-radius: 10px;
        padding: 11px 14px;
        font-family: 'Inter', sans-serif;
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s;
    }
    #settingsDropdownBtn:hover { background: #2a5248; }
    #settingsDropdownBtn:active { background: var(--sage); }

    /* Chevron inside the dropdown button */
    #settingsDropdownChevron {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.2s;
    }
    #settingsMobileNav.open #settingsDropdownChevron {
        transform: rotate(180deg);
    }

    /* Label text inside the button */
    #settingsDropdownLabel {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Save indicator badge — right side */
    #settingsMobileSaveState {
        flex-shrink: 0;
        font-family: 'Inter', sans-serif;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: rgba(255,255,255,0.7);
        background: var(--sage);
        padding: 4px 10px;
        border-radius: 6px;
        white-space: nowrap;
        border: none;
        cursor: default;
    }

    /* Dropdown sheet — full width, appears below the nav bar */
    #settingsDropdownSheet {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1.5px solid var(--border);
        border-radius: 0 0 14px 14px;
        box-shadow: 0 12px 36px rgba(0,0,0,0.13);
        z-index: 100;
        overflow: hidden;
    }
    #settingsMobileNav.open #settingsDropdownSheet {
        display: block;
    }
    /* Wrapper needs relative positioning for the absolute sheet */
    #settingsMobileNavWrap {
        display: block;
        position: relative;
    }

    .settings-dropdown-item {
        display: flex;
        align-items: center;
        padding: 13px 16px;
        gap: 12px;
        border-bottom: 1px solid var(--border);
        font-family: 'Inter', sans-serif;
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
        transition: background 0.12s;
    }
    .settings-dropdown-item:last-child {
        border-bottom: none;
    }
    .settings-dropdown-item:hover {
        background: var(--bg);
    }
    .settings-dropdown-item.active {
        background: rgba(61,139,122,0.06);
        color: var(--sage);
    }
    .settings-dropdown-item svg {
        flex-shrink: 0;
        opacity: 0.55;
    }
    .settings-dropdown-item.active svg {
        opacity: 1;
        stroke: var(--sage);
    }
    .settings-dropdown-checkmark {
        margin-left: auto;
        flex-shrink: 0;
        display: none;
    }
    .settings-dropdown-item.active .settings-dropdown-checkmark {
        display: block;
    }
}

/* ── Mobile overflow fixes (settings content) ── */
@media (max-width: 900px) {
    /* Fix: fixed-width selects in Online Booking overflow mobile */
    #obBufferTime,
    #obMaxAdvanceDays {
        width: 100% !important;
        max-width: 200px !important;
    }

    /* Fix: JS-generated time selects use inline width:105px */
    .settings-content select[style*="width:105px"],
    .settings-content select[style*="width: 105px"] {
        width: 100% !important;
        max-width: 120px !important;
    }

    /* Fix: label wrapper min-width:105px in schedule rows */
    .settings-content label[style*="min-width:105px"],
    .settings-content label[style*="min-width: 105px"] {
        min-width: 0 !important;
    }

    /* Fix: Payment section 2-col grid → single column */
    #set-payment [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Fix: User management invite form flex items overflow */
    #set-staff-management [style*="min-width: 200px"],
    #set-subscription [style*="min-width: 200px"] {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* ── Scroll-to-top FAB (bottom-left; AODA button is bottom-right) ── */
#scrollToTopFab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9998;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    color: #1a1a1a;
    border: 1px solid rgba(0,0,0,0.10);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.14), 0 1px 3px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease;
}
#scrollToTopFab.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#scrollToTopFab:hover { background: rgba(255,255,255,1); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
#scrollToTopFab:active { transform: scale(0.93); }
#scrollToTopFab svg {
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Desktop sidebar: policy quick links ── */
.settings-policy-divider {
    height: 1.5px;
    background: var(--border);
    margin: 8px 0 4px;
}
.settings-policy-label {
    padding: 6px 20px 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
}
.settings-policy-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-left-color 0.15s;
}
.settings-policy-link:hover {
    background: var(--sage-tint);
    color: var(--sage);
    border-left-color: var(--sage);
}
.settings-policy-link svg { flex-shrink: 0; opacity: 0.55; }
.settings-policy-link:hover svg { opacity: 1; }
.settings-policy-link .policy-ext-icon {
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.3;
}
.settings-policy-link:hover .policy-ext-icon { opacity: 0.6; }
/* Hide on mobile — mobile has its own section inside the dropdown */
@media (max-width: 900px) {
    .settings-policy-divider,
    .settings-policy-label,
    .settings-policy-link { display: none; }
}

/* ── Mobile dropdown: policy quick links ── */
@media (max-width: 900px) {
    .dropdown-policy-divider {
        padding: 9px 16px 3px;
        border-top: 1.5px solid var(--border);
        margin-top: 2px;
        font-family: 'Inter', sans-serif;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-light);
    }
    .settings-dropdown-policy-item {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        gap: 12px;
        border-bottom: 1px solid var(--border);
        font-family: 'Inter', sans-serif;
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--text-light);
        text-decoration: none;
        transition: background 0.12s, color 0.12s;
    }
    .settings-dropdown-policy-item:last-child { border-bottom: none; }
    .settings-dropdown-policy-item:hover {
        background: var(--bg);
        color: var(--sage);
    }
    .settings-dropdown-policy-item svg { flex-shrink: 0; opacity: 0.5; }
    .settings-dropdown-policy-item:hover svg { opacity: 0.85; stroke: var(--sage); }
    .settings-dropdown-policy-item .policy-ext-icon {
        margin-left: auto;
        flex-shrink: 0;
        opacity: 0.3;
    }
    .settings-dropdown-policy-item:hover .policy-ext-icon { opacity: 0.6; }
}

/* ── Desktop sidebar back-to-top button ── */
.settings-sidebar-top-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-top: 1.5px solid var(--border);
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.02em;
    transition: color 0.15s, background 0.15s;
    margin-top: 8px;
}
.settings-sidebar-top-btn:hover {
    color: var(--forest);
    background: var(--sage-tint);
}
.settings-sidebar-top-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Hide the desktop sidebar back-to-top on mobile */
@media (max-width: 900px) {
    .settings-sidebar-top-btn { display: none; }
}

.settings-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--coral);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.teacher-list {
    display: grid;
    gap: 12px;
}

.teacher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg);
    border-radius: 10px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.teacher-item.inactive {
    opacity: 0.5;
    background: #f5f5f5;
}

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

.teacher-name {
    font-weight: 600;
    color: var(--primary);
}

.teacher-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-active {
    background: #E8F5E9;
    color: #1E3A34;
}

.status-inactive {
    background: #FFE5E5;
    color: #C86B5D;
}

.teacher-actions {
    display: flex;
    gap: 8px;
}


.price-input-group {
    position: relative;
}

.price-input-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-input-group input {
    width: 100%;
    padding: 10px 10px 10px 25px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.price-input-group::before {
    content: '$';
    position: absolute;
    left: 10px;
    bottom: 11px;
    font-weight: 600;
    color: var(--text-light);
}

.owner-management-list {
    display: grid;
    gap: 12px;
}

.owner-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8F4 100%);
    border-radius: 10px;
    border: 2px solid #5F8575;
}

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

.owner-badge {
    padding: 4px 12px;
    background: #1E3A34;
    color: white;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--coral);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary:hover {
    background: var(--coral-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.25), 0 8px 24px rgba(255, 107, 74, 0.15);
}

.btn-primary:active {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(255, 107, 74, 0.2);
    transition-duration: 0.08s;
}

/* ── MyoMind Button ── */
/* ── MyoMind logo link (replaces old gradient button) ── */
.myomind-logo-link {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 0 10px;
    height: 36px;
    cursor: pointer;
    opacity: 0.9;
    flex-shrink: 0;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.2s;
    position: relative;
}
.myomind-logo-link:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}
.myomind-logo-link:active {
    transform: translateY(0);
    opacity: 0.85;
}
/* Subscribed state: soft teal glow ring so the activated state remains visible */
.myomind-logo-link.subscribed::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 10px;
    box-shadow: 0 0 0 2px rgba(61,139,122,0.55), 0 0 12px rgba(61,139,122,0.3);
    pointer-events: none;
}

/* ── MyoMind Subscribe Modal ── */
.mm-subscribe-overlay {
    position: fixed; inset: 0;
    background: rgba(30,58,52,.55);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.mm-subscribe-overlay.open { opacity: 1; pointer-events: all; }
.mm-subscribe-modal {
    background: white;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    transform: translateY(20px) scale(.97);
    transition: transform .35s cubic-bezier(.32,.72,0,1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.mm-subscribe-overlay.open .mm-subscribe-modal {
    transform: translateY(0) scale(1);
}
.mm-sub-header {
    background: linear-gradient(135deg, #1E3A34, #2E4A8F);
    padding: 28px 32px 24px;
    text-align: center;
    position: relative;
}
.mm-sub-header-icon {
    width: 52px; height: 52px;
    background: rgba(255,255,255,.15);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.5rem;
}
.mm-sub-title {
    font-family: 'Fraunces', serif;
    font-size: 1.625rem; font-weight: 700;
    color: white; letter-spacing: -.02em;
    margin-bottom: 6px;
}
.mm-sub-subtitle { font-size: 0.875rem; color: rgba(255,255,255,.7); line-height: 1.5; }
.mm-sub-body { padding: 28px 32px; }
.mm-feature-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.mm-feature-item {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 0.875rem; color: #2D2926; line-height: 1.5;
}
.mm-feature-icon {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; flex-shrink: 0;
}
.mm-pricing-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: #EEF2FF;
    border: 1.5px solid rgba(74,111,212,.25);
    border-radius: 12px;
    margin-bottom: 16px;
}
.mm-price-label { font-size: 0.8125rem; color: #6B635B; }
.mm-price-val { font-family: 'Fraunces', serif; font-size: 1.625rem; font-weight: 700; color: #2E4A8F; }
.mm-price-period { font-size: 0.75rem; color: #9990a0; }
.mm-sub-actions { display: flex; gap: 10px; }
.mm-sub-btn-primary {
    flex: 1; padding: 14px;
    background: var(--forest);
    color: white; border: none; border-radius: 12px;
    font-family: 'Inter', sans-serif; font-size: 0.875rem; font-weight: 700;
    cursor: pointer; transition: all .2s;
}
.mm-sub-btn-primary:hover { background: #162c27; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.mm-sub-btn-secondary {
    padding: 14px 20px;
    background: none; color: #6B635B;
    border: 1.5px solid #E0DDD9; border-radius: 12px;
    font-family: 'Inter', sans-serif; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.mm-sub-btn-secondary:hover { background: #F5F5F3; }

/* ── MyoMind Slide Panel (embedded in index) ── */
.mm-overlay {
    position: fixed; inset: 0;
    background: rgba(30,58,52,.4);
    backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0; pointer-events: none;
    transition: opacity .35s ease;
}
.mm-overlay.open { opacity: 1; pointer-events: all; }
.mm-panel {
    position: fixed; top: 0; right: 0;
    width: min(600px,100vw); height: 100vh;
    background: #FFFBF7; z-index: 9991;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.32,.72,0,1);
    display: flex; flex-direction: column; overflow: hidden;
}
.mm-panel.open { transform: translateX(0); }

.btn-secondary {
    padding: 10px 20px;
    background: var(--warm-light);
    color: var(--forest);
    border: 2px solid var(--forest);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-secondary:hover {
    background: var(--forest);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 52, 0.2), 0 8px 24px rgba(30, 58, 52, 0.1);
}

.btn-secondary:active {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(30, 58, 52, 0.15);
    transition-duration: 0.08s;
}


.btn-small {
    padding: 6px 12px;
    font-size: 0.6875rem;
}


.permission-notice {
    background: #FFF9E6;
    border-left: 4px solid var(--warning);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.8125rem;
    color: var(--text);
}

        .income-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .income-card {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 4px 16px var(--shadow);
        }

        .income-card.secondary {
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
        }

        .income-card.quickbooks {
            background: linear-gradient(135deg, #2CA01C 0%, #46B536 100%);
        }

        .income-label {
            font-size: 0.6875rem;
            font-weight: 600;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            opacity: 0.9;
            margin-bottom: 8px;
        }

        .income-amount {
            font-family: 'Fraunces', serif;
            font-size: 2.25rem;
            font-weight: 600;
            letter-spacing: -1px;
        }

        .income-subtitle {
            font-size: 0.75rem;
            opacity: 0.8;
            margin-top: 4px;
        }

        .main-grid {
            display: grid;
            grid-template-columns: 400px 1fr;
            gap: 20px;
        }

        .main-grid.notes-layout {
            grid-template-columns: 1fr;
        }

        /* ── ADD CLIENT ACCORDION ────────────────────────── */
        .add-client-trigger {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
            gap: 16px;
        }
        .add-client-trigger:hover .add-client-chevron { background: var(--warm-light); }
        .add-client-trigger-text { flex: 1; min-width: 0; }
        .add-client-trigger-text p {
            font-size: 13px;
            color: var(--text-light);
            margin-top: 3px;
            font-weight: 400;
        }
        .add-client-chevron {
            width: 34px; height: 34px;
            border-radius: 9px;
            background: rgba(61,139,122,0.14);
            border: 1.5px solid rgba(61,139,122,0.25);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-top: 4px;
            transition: background 0.15s ease, transform 0.26s cubic-bezier(0.4,0,0.2,1);
            color: var(--sage);
            padding: 0;
            -webkit-appearance: none;
            appearance: none;
            outline: none;
        }
        .add-client-chevron svg { stroke: var(--sage); display: block; flex-shrink: 0; }
        .add-client-chevron:hover { background: rgba(61,139,122,0.18); }
        .add-client-chevron.open { transform: rotate(180deg); }
        .add-client-accordion-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .add-client-accordion-body.open { max-height: 8000px; }
        .add-client-divider { height: 1px; background: var(--border); margin: 20px 0 26px; }

        /* ── FOLLOW-UPS PANEL ────────────────────────────── */
        .fu-panel-hd {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .fu-panel-hd-left h2 { margin-bottom: 4px; }
        .fu-panel-hd-left p { font-size: 13px; color: var(--text-light); line-height: 1.5; }
        .fu-stats-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }
        .fu-stat-box {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 16px;
            text-align: center;
        }
        .fu-stat-num {
            font-family: 'Fraunces', serif;
            font-size: 30px;
            font-weight: 600;
            line-height: 1;
            margin-bottom: 5px;
        }
        .fu-stat-num.fu-red   { color: var(--error); }
        .fu-stat-num.fu-amber { color: #B8860B; }
        .fu-stat-num.fu-green { color: var(--sage); }
        .fu-stat-lbl {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            color: var(--text-light);
        }
        .fu-filters {
            display: flex;
            gap: 8px;
            margin-bottom: 22px;
            flex-wrap: wrap;
        }
        .fu-chip {
            padding: 6px 14px;
            border-radius: 20px;
            font-family: 'Inter', sans-serif;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            border: 1.5px solid var(--border);
            background: transparent;
            color: var(--text-light);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.14s ease;
        }
        .fu-chip.active {
            background: var(--forest);
            color: #fff;
            border-color: var(--forest);
        }
        .fu-chip:hover:not(.active) { border-color: var(--sage); color: var(--sage); }
        .fu-chip-count {
            font-family: 'Inter', sans-serif;
            font-size: 10px;
            font-weight: 700;
            border-radius: 10px;
            padding: 1px 7px;
            background: rgba(255,255,255,0.18);
            color: inherit;
        }
        .fu-chip:not(.active) .fu-chip-count { background: var(--warm-light); color: var(--text-light); }
        .fu-group-lbl {
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.7px;
            color: var(--text-light);
            margin: 20px 0 10px;
        }
        .fu-group-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); }
        .fu-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
        .fu-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            border-radius: 12px;
            border: 1.5px solid var(--border);
            background: var(--card);
            margin-bottom: 10px;
            transition: border-color 0.16s ease, box-shadow 0.16s ease;
            flex-wrap: wrap;
        }
        .fu-item:hover { border-color: var(--sage); box-shadow: 0 2px 12px rgba(61,139,122,0.1); }
        .fu-item.fu-overdue  { border-left: 3px solid var(--error); }
        .fu-item.fu-attention { border-left: 3px solid var(--amber); }
        .fu-item.fu-soon     { border-left: 3px solid var(--sage); }
        .fu-avatar {
            width: 42px; height: 42px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Fraunces', serif;
            font-size: 14px; font-weight: 600;
            color: #fff; flex-shrink: 0;
        }
        .fu-avatar.av-red   { background: linear-gradient(135deg, var(--error), #f07060); }
        .fu-avatar.av-amber { background: linear-gradient(135deg, #c97c00, var(--amber)); }
        .fu-avatar.av-green { background: linear-gradient(135deg, #2D6B5E, var(--sage)); }
        .fu-avatar.av-blue  { background: linear-gradient(135deg, #3A6B8C, #5B9CBF); }
        .fu-info { flex: 1; min-width: 0; }
        .fu-name {
            font-family: 'Inter', sans-serif;
            font-size: 14px; font-weight: 600;
            color: var(--text);
            margin-bottom: 4px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .fu-meta {
            font-family: 'Inter', sans-serif;
            font-size: 12px; font-weight: 400;
            color: var(--text-light);
            display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
        }
        .fu-goal-tag {
            font-family: 'Inter', sans-serif;
            font-size: 10px; font-weight: 600; letter-spacing: 0.3px;
            padding: 2px 8px; border-radius: 6px; white-space: nowrap;
        }
        .fu-goal-tag.tg-green { background: var(--sage-tint);  color: var(--sage); }
        .fu-goal-tag.tg-amber { background: #FFF3D4; color: #8B6400; }
        .fu-goal-tag.tg-red   { background: var(--coral-tint); color: #C03A2B; }
        .fu-plan-note { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--text-light); }
        .fu-days-block { text-align: center; flex-shrink: 0; min-width: 68px; }
        .fu-days-num {
            font-family: 'Fraunces', serif;
            font-size: 24px; font-weight: 600; line-height: 1;
        }
        .fu-days-num.fu-red   { color: var(--error); }
        .fu-days-num.fu-amber { color: #B8860B; }
        .fu-days-num.fu-green { color: var(--sage); }
        .fu-days-lbl {
            font-family: 'Inter', sans-serif;
            font-size: 10px; font-weight: 500; color: var(--text-light);
            margin-top: 2px; letter-spacing: 0.3px;
        }
        .fu-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
        .fu-empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-light);
            font-family: 'Inter', sans-serif;
            font-size: 13px;
        }
        .fu-empty strong { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
        .fu-view-more {
            text-align: center;
            margin-top: 18px;
            padding-top: 18px;
            border-top: 1px solid var(--border);
        }
        /* btn-outline: sage outline, used for panel actions */
        .btn-outline-sage {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 14px;
            background: transparent; color: var(--sage);
            font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
            letter-spacing: 0.3px;
            border: 1.5px solid var(--sage);
            border-radius: 8px; cursor: pointer;
            transition: background 0.15s ease;
            white-space: nowrap;
        }
        .btn-outline-sage:hover { background: var(--sage-tint); }
        .btn-outline-coral {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 14px;
            background: transparent; color: var(--coral);
            font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
            letter-spacing: 0.3px;
            border: 1.5px solid rgba(255,107,74,0.35);
            border-radius: 8px; cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease;
            white-space: nowrap;
        }
        .btn-outline-coral:hover { background: var(--coral-tint); border-color: var(--coral); }

        @media (max-width: 600px) {
            .fu-stats-row { gap: 8px; }
            .fu-stat-box { padding: 12px 8px; }
            .fu-stat-num { font-size: 24px; }
            .fu-row-actions { flex-wrap: wrap; gap: 6px; }
            .fu-days-block { min-width: 52px; }
            .fu-item { gap: 10px; }
        }

        /* ── ADD CLIENT FORM — compact grid layout ────────── */
        .cf-section-hd {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.7px;
            color: var(--text-light);
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 22px 0 14px;
        }
        .cf-section-hd:first-child { margin-top: 0; }
        .cf-section-hd::after { content: ''; flex: 1; height: 1px; background: var(--border); }
        .cf-section-hd .cf-optional {
            font-weight: 400;
            text-transform: none;
            letter-spacing: 0;
            font-size: 10px;
            margin-left: 2px;
        }

        /* 3-column row — First / Last / Phone */
        .cf-row-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 14px;
            margin-bottom: 16px;
        }
        /* 2-column row — Email / Notification */
        .cf-row-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-bottom: 16px;
        }
        /* Address row — Street wider, City, Province equal */
        .cf-row-addr {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 14px;
            margin-bottom: 12px;
        }
        /* Practice row — Rates | Notes */
        .cf-row-practice {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-bottom: 0;
        }
        .cf-row-3 .form-group,
        .cf-row-2 .form-group,
        .cf-row-addr .form-group,
        .cf-row-practice .form-group { margin-bottom: 0; }

        /* Postal code capped width */
        .cf-postal { max-width: 180px; margin-bottom: 16px; }

        /* Address section toggle on mobile */
        .cf-addr-toggle {
            display: none; /* hidden on desktop — shown on mobile */
        }

        /* Inline hint text under select */
        .cf-hint {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            color: var(--text-light);
            margin-top: 4px;
            line-height: 1.4;
        }

        /* Required asterisk */
        .cf-req { color: var(--coral); margin-left: 2px; font-weight: 700; }

        /* Rate fields placeholder styling */

        /* Mobile overrides for compact form */
        @media (max-width: 700px) {
            .cf-row-3  { grid-template-columns: 1fr 1fr; }
            .cf-row-3 .form-group:last-child { grid-column: 1 / -1; }
            .cf-row-2  { grid-template-columns: 1fr; }
            .cf-row-addr { grid-template-columns: 1fr 1fr; }
            .cf-row-addr .form-group:first-child { grid-column: 1 / -1; }
            .cf-row-practice { grid-template-columns: 1fr; }
            .cf-addr-toggle {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 10px 14px;
                background: var(--warm-light);
                border: 1.5px solid var(--border);
                border-radius: 9px;
                cursor: pointer;
                user-select: none;
                margin-bottom: 12px;
                font-family: 'Inter', sans-serif;
                font-size: 12.5px;
                font-weight: 600;
                color: var(--text-light);
            }
            .cf-addr-body { display: none; }
            .cf-addr-body.open { display: block; }
            .cf-postal { max-width: 100%; }
        }

        .form-card h2 {
            font-family: 'Fraunces', serif;
            font-size: 1.625rem;
            font-weight: 500;
            color: var(--primary);
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-icon {
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 12px;
            margin-bottom: 18px;
        }


        .price-input-wrapper {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-width: 0;
        }

        .price-input-wrapper input {
            width: 100%;
            box-sizing: border-box;
        }

        .price-label {
            font-size: 0.625rem;
            font-weight: 600;
            color: var(--text-light);
            margin-bottom: 6px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        label {
            display: block;
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 8px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="number"],
        input[type="date"],
        input[type="time"],
        select,
        textarea {
            width: 100%;
            padding: 12px 16px;
            border: 1.5px solid var(--border);
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.875rem;
            color: var(--text);
            background: var(--bg);
            transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
        }

        input:focus,
        select:focus,
        textarea:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.06);
        }

        select {
            cursor: pointer;
        }

        textarea {
            resize: vertical;
            min-height: 70px;
            font-size: 0.8125rem;
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px;
            background: linear-gradient(135deg, rgba(212, 165, 116, 0.05) 0%, rgba(212, 165, 116, 0.02) 100%);
            border-radius: 8px;
            border: 1.5px solid var(--accent-light);
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 18px;
        }

        .checkbox-group:hover {
            background: linear-gradient(135deg, rgba(212, 165, 116, 0.08) 0%, rgba(212, 165, 116, 0.04) 100%);
            border-color: var(--accent);
        }

        input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .checkbox-label {
            font-size: 0.8125rem;
            font-weight: 500;
            color: var(--primary);
            cursor: pointer;
            letter-spacing: 0.3px;
            text-transform: none;
            margin: 0;
        }

        .btn-group {
            display: flex;
            gap: 12px;
            margin-top: 20px;
            flex-wrap: wrap;  /* prevents overflow if labels ever grow */
        }

        button {
            padding: 14px 24px;
            border: none;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(255, 107, 74, 0.2);
            flex: 1;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 107, 74, 0.25), 0 8px 24px rgba(255, 107, 74, 0.15);
        }

        .btn-secondary {
            background: var(--bg);
            color: var(--text);
            border: 1.5px solid var(--border);
        }

        .btn-secondary:hover {
            background: white;
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(30, 58, 52, 0.1);
        }

        .btn-google {
            background: white;
            color: var(--primary);
            border: 1.5px solid var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-google:hover {
            background: var(--primary);
            color: white;
        }


        .btn-outlook {
            background: white;
            color: #0078D4;
            border: 1.5px solid #0078D4;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-outlook:hover {
            background: #0078D4;
            color: white;
        }



        .client-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            background: var(--primary);
            color: white;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .client-chip:hover {
            background: var(--primary-light);
            transform: scale(1.05);
        }

        .client-chip .remove {
            width: 16px;
            height: 16px;
            background: rgba(255,255,255,0.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.625rem;
        }

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

        .session-item {
            padding: 20px;
            background: var(--bg);
            border-radius: 12px;
            border: 1.5px solid transparent;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .session-item:hover {
            background: white;
            border-color: var(--primary);
            transform: translateX(4px);
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px rgba(0,0,0,0.08);
        }

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

        .session-type {
            font-weight: 600;
            font-size: 1rem;
            color: var(--primary);
            margin-bottom: 4px;
        }

        .session-datetime {
            font-size: 0.8125rem;
            color: var(--text-light);
            margin-bottom: 8px;
        }

        .session-clients {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 10px;
        }

        .session-client-badge {
            padding: 4px 10px;
            background: linear-gradient(135deg, rgba(255, 107, 74, 0.1) 0%, rgba(255, 107, 74, 0.05) 100%);
            color: var(--primary);
            border-radius: 12px;
            font-size: 0.6875rem;
            font-weight: 600;
        }

        .session-price {
            font-family: 'Inter', sans-serif;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--accent);
            letter-spacing: -0.5px;
        }

        .session-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        .btn-small {
            padding: 8px 14px;
            font-size: 0.6875rem;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.625rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            margin-top: 8px;
            margin-right: 6px;
        }

        .status-repeating {
            background: rgba(95, 133, 117, 0.15);
            color: var(--success);
        }

        .status-vacation {
            background: rgba(212, 165, 116, 0.15);
            color: var(--warning);
        }

        .status-invoiced {
            background: rgba(44, 160, 28, 0.15);
            color: #2CA01C;
        }

        .status-paid {
            background: rgba(44, 160, 28, 0.25);
            color: #2CA01C;
            font-weight: 700;
        }

        .status-unpaid {
            background: rgba(200, 107, 93, 0.15);
            color: var(--error);
        }

        .status-pending {
            background: rgba(255, 179, 71, 0.2);
            color: #B8860B;
        }

        .payment-panel {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid var(--border);
        }

        .payment-panel h4 {
            font-size: 0.9375rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 12px;
        }

        .payment-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.8125rem;
            font-weight: 600;
        }

        .payment-method-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 12px;
        }

        .payment-method-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 14px 10px;
            border: 2px solid var(--border);
            border-radius: 12px;
            background: white;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text);
        }

        .payment-method-btn:hover {
            border-color: var(--sage);
            background: var(--sage-tint);
        }

        .payment-method-btn .pm-icon {
            font-size: 1.375rem;
        }

        .payment-method-btn.stripe { border-color: #635BFF; }
        .payment-method-btn.stripe:hover { background: #F0EFFF; }
        .payment-method-btn.square { border-color: #1a1a1a; }
        .payment-method-btn.square:hover { background: #F5F5F5; }
        .payment-method-btn.square { border-color: #1a1a1a; }
        .payment-method-btn.square:hover { background: #f5f5f5; }
        .payment-method-btn.cash { border-color: var(--sage); }
        .payment-method-btn.cash:hover { background: var(--sage-tint); }
        .payment-method-btn.invoice { border-color: var(--amber); }
        .payment-method-btn.invoice:hover { background: #FFF8EC; }

        .payment-receipt-info {
            margin-top: 12px;
            padding: 12px 16px;
            background: var(--sage-tint);
            border-radius: 10px;
            font-size: 0.8125rem;
            color: var(--primary);
            line-height: 1.6;
        }

        .search-box {
            position: relative;
            margin-bottom: 20px;
        }

        .search-box input {
            padding-left: 40px;
        }

        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            font-size: 1rem;
        }

        .integration-setup {
            background: linear-gradient(135deg, rgba(44, 160, 28, 0.05) 0%, rgba(44, 160, 28, 0.02) 100%);
            padding: 20px;
            border-radius: 12px;
            border: 1.5px solid rgba(44, 160, 28, 0.2);
            margin-bottom: 25px;
        }

        .integration-setup.google {
            background: linear-gradient(135deg, rgba(66, 133, 244, 0.05) 0%, rgba(66, 133, 244, 0.02) 100%);
            border: 1.5px solid rgba(66, 133, 244, 0.2);
        }

        .integration-setup.outlook {
            background: linear-gradient(135deg, rgba(0, 120, 212, 0.03) 0%, rgba(0, 120, 212, 0.01) 100%);
            border: 1.5px solid rgba(0, 120, 212, 0.2);
        }

        .integration-setup h3 {
            font-family: 'Fraunces', serif;
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--primary);
            margin-bottom: 12px;
        }

        .integration-setup p {
            font-size: 0.8125rem;
            color: var(--text-light);
            line-height: 1.6;
            margin-bottom: 14px;
        }

        .integration-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            background: white;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--success);
        }

        .setup-steps {
            background: white;
            padding: 20px;
            border-radius: 10px;
            margin-top: 16px;
            border: 1.5px solid var(--border);
        }

        .setup-steps ol {
            margin-left: 20px;
            line-height: 1.8;
        }

        .setup-steps li {
            font-size: 0.8125rem;
            color: var(--text);
            margin-bottom: 8px;
        }

        .setup-steps code {
            background: var(--bg);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
            font-size: 0.75rem;
            color: var(--primary);
        }

        .setup-steps a {
            color: #2CA01C;
            text-decoration: none;
            font-weight: 600;
        }

        .setup-steps a:hover {
            text-decoration: underline;
        }

        .empty-state {
            text-align: center;
            padding: 48px 24px;
            color: var(--text-light);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .empty-icon {
            width: 80px;
            height: 80px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .empty-icon svg {
            width: 100%;
            height: 100%;
        }

        .empty-title {
            font-family: 'Fraunces', serif;
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--text);
        }

        .empty-text {
            font-family: 'Inter', sans-serif;
            font-size: 0.875rem;
            color: var(--text-light);
            max-width: 280px;
            line-height: 1.5;
        }

        .empty-cta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            padding: 8px 18px;
            background: var(--sage-tint);
            color: var(--sage);
            border: none;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .empty-cta:hover {
            background: var(--sage);
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(61,139,122,0.15);
        }

        .multi-select {
            border: 1.5px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            background: var(--bg);
            max-height: 200px;
            overflow-y: auto;
        }

        .multi-select-option {
            padding: 10px;
            cursor: pointer;
            border-radius: 6px;
            margin-bottom: 4px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .multi-select-option:hover {
            background: white;
        }

        .multi-select-option.selected {
            background: linear-gradient(135deg, rgba(255, 107, 74, 0.1) 0%, rgba(255, 107, 74, 0.05) 100%);
        }

        .multi-select-option.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .teacher-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 20px;
        }

        .teacher-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px;
            background: var(--bg);
            border-radius: 10px;
            border: 1.5px solid var(--border);
        }

        .teacher-item.default-teacher {
            background: linear-gradient(135deg, rgba(255, 107, 74, 0.06) 0%, rgba(255, 107, 74, 0.02) 100%);
            border-color: var(--primary);
        }

        .teacher-name {
            font-weight: 600;
            color: var(--primary);
            font-size: 0.9375rem;
        }

        .teacher-actions {
            display: flex;
            gap: 8px;
        }


        .warning-message {
            background: rgba(212, 165, 116, 0.1);
            border: 1.5px solid var(--accent-light);
            padding: 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            color: var(--text);
            margin-bottom: 18px;
        }

        .rate-display {
            display: flex;
            gap: 12px;
            margin-top: 8px;
            flex-wrap: wrap;
        }

        .rate-pill {
            padding: 6px 12px;
            background: linear-gradient(135deg, rgba(255, 107, 74, 0.08) 0%, rgba(255, 107, 74, 0.04) 100%);
            border-radius: 16px;
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--primary);
        }

        /* Prepaid Packages & Promo Discount Styles */

        /* SMS Plan Cards */
        .sms-plan-card:hover, .sub-plan-card:hover { border-color: var(--sage); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(61,139,122,0.12); }
        .sms-plan-card.selected, .sub-plan-card.selected { border-color: var(--sage); background: var(--sage-tint); box-shadow: 0 0 0 3px rgba(61,139,122,0.15); }
        .sub-plan-card.current-plan { border-color: var(--sage); background: var(--sage-tint); box-shadow: 0 0 0 3px rgba(61,139,122,0.15); }
        .sub-plan-card.current-plan::after { content: '✓ Current Plan'; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 0.625rem; font-weight: 700; color: white; background: var(--sage); padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
        body.dark-mode .sms-plan-card, body.dark-mode .sub-plan-card { background: var(--card); border-color: var(--border); }
        body.dark-mode .sms-plan-card:hover, body.dark-mode .sub-plan-card:hover { border-color: var(--sage); }
        body.dark-mode .sms-plan-card.selected, body.dark-mode .sub-plan-card.selected { border-color: var(--sage); background: rgba(61,139,122,0.1); }
        .pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; width: 100%; box-sizing: border-box; }
        @media (max-width: 540px) { .pkg-grid { grid-template-columns: 1fr; } }
        .pkg-card {
            background: var(--warm-light); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
            position: relative; transition: box-shadow 0.2s, border-color 0.2s;
            min-width: 0; box-sizing: border-box;
        }
        .pkg-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
        .pkg-card.active { border-color: var(--sage); box-shadow: 0 0 0 2px rgba(61,139,122,0.15); }
        .pkg-card .pkg-badge {
            position: absolute; top: 12px; right: 12px; font-size: 0.625rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 6px;
        }
        .pkg-card .pkg-badge.sessions { background: var(--sage-tint); color: var(--sage); }
        .pkg-card .pkg-badge.time { background: rgba(212,165,116,0.2); color: #B8860B; }
        .pkg-card .pkg-badge.inactive { background: var(--bg); color: var(--text-light); }
        .pkg-card .pkg-name { font-weight: 700; font-size: 0.9375rem; color: var(--primary); margin-bottom: 4px; }
        .pkg-card .pkg-detail { font-size: 0.75rem; color: var(--text-light); line-height: 1.6; }
        .pkg-card .pkg-price { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 700; color: var(--sage); margin-top: 8px; }
        .pkg-card .pkg-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
        .promo-card {
            background: linear-gradient(135deg, #FFF8EC, #FFF3E0); border: 1px solid #E8D5B5;
            border-radius: 14px; padding: 20px; margin-bottom: 20px;
            min-width: 0; box-sizing: border-box; width: 100%;
        }
        .promo-card.active-promo { border-color: var(--sage); background: linear-gradient(135deg, var(--sage-tint), #E8F5E8); }
        .promo-code-display {
            display: inline-block; background: white; border: 2px dashed var(--sage); border-radius: 8px;
            padding: 8px 16px; font-family: monospace; font-size: 1.125rem; font-weight: 700;
            letter-spacing: 2px; color: var(--primary); margin: 8px 0;
        }
        .client-pkg-tracker {
            background: var(--sage-tint); border: 1px solid var(--sage); border-radius: 12px;
            padding: 14px; margin-top: 12px;
        }
        .client-pkg-tracker .pkg-remaining {
            font-family: 'Fraunces', serif;
            font-size: 1.75rem; font-weight: 700; color: var(--sage); line-height: 1;
        }
        .client-pkg-tracker .pkg-remaining.low { color: #B8860B; }
        .client-pkg-tracker .pkg-remaining.depleted { color: var(--error); }
        .client-pkg-tracker .pkg-bar {
            height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; margin-top: 8px;
        }
        .client-pkg-tracker .pkg-bar-fill {
            height: 100%; background: var(--sage); border-radius: 6px; transition: width 0.4s ease;
        }
        .client-pkg-tracker .pkg-bar-fill.low { background: #DAA520; }
        .client-pkg-tracker .pkg-bar-fill.depleted { background: var(--error); }

        .invoice-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .invoice-modal.active {
            display: flex;
            animation: fadeIn 0.15s ease-out;
        }

        .modal-content {
            background: white;
            border-radius: 16px;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            animation: modalIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        @keyframes modalIn {
            from {
                opacity: 0;
                transform: scale(0.96) translateY(8px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

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

        .modal-title {
            font-family: 'Fraunces', serif;
            font-size: 1.75rem;
            font-weight: 500;
            color: var(--primary);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.75rem;
            color: var(--text-light);
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

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

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

        @media (max-width: 1200px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }
        .btn-primary {
            padding: 12px 24px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            font-size: 0.875rem;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 107, 74, 0.25), 0 8px 24px rgba(255, 107, 74, 0.15);
        }

        .btn-secondary {
            padding: 12px 24px;
            background: var(--bg);
            color: var(--text);
            border: 2px solid var(--border);
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            font-size: 0.875rem;
        }

        .btn-secondary:hover {
            background: white;
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(30, 58, 52, 0.1);
        }


        /* ========================================
           VISUAL CALENDAR STYLES
           ======================================== */
        
        .calendar-container {
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 24px var(--shadow);
            border: 1px solid var(--border);
            overflow: hidden;
        }

        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px 30px;
            background: linear-gradient(135deg, var(--bg) 0%, #fff 100%);
            border-bottom: 1px solid var(--border);
        }

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

        .calendar-nav-btn {
            width: 40px;
            height: 40px;
            border: 2px solid var(--border);
            background: white;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.125rem;
            color: var(--text);
            transition: all 0.2s ease;
        }

        .calendar-nav-btn:hover {
            border-color: var(--primary);
            background: var(--primary);
            color: white;
        }

        .calendar-title {
            font-family: 'Fraunces', serif;
            font-size: 2rem;
            font-weight: 500;
            color: var(--primary);
            letter-spacing: -0.5px;
        }

        .calendar-controls {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .calendar-view-toggle {
            display: flex;
            background: var(--bg);
            border-radius: 8px;
            padding: 4px;
            gap: 4px;
        }

        .view-toggle-btn {
            padding: 8px 16px;
            border: none;
            background: transparent;
            border-radius: 6px;
            font-size: 0.8125rem;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .view-toggle-btn.active {
            background: white;
            color: var(--primary);
            box-shadow: 0 2px 8px var(--shadow);
        }

        .today-btn {
            padding: 10px 20px;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.8125rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .today-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
        }

        .calendar-body {
            display: flex;
            min-height: 700px;
        }

        .teacher-sidebar {
            width: 220px;
            background: var(--bg);
            border-right: 1px solid var(--border);
            padding: 20px 0;
            flex-shrink: 0;
        }

        .teacher-sidebar-header {
            padding: 0 20px 16px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 12px;
        }

        .teacher-sidebar-title {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--text-light);
        }

        .teacher-filter-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            border-left: 3px solid transparent;
        }

        .teacher-filter-item:hover {
            background: white;
        }

        .teacher-filter-item.selected {
            background: white;
            border-left-color: var(--primary);
        }

        .teacher-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.875rem;
            color: white;
        }

        .teacher-filter-name {
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text);
        }

        .teacher-filter-sessions {
            font-size: 0.6875rem;
            color: var(--text-light);
        }

        .calendar-grid-wrapper {
            flex: 1;
            overflow-x: auto;
        }

        .calendar-grid {
            display: grid;
            min-width: 100%;
        }

        .calendar-grid.week-view {
            grid-template-columns: 70px repeat(7, 1fr);
        }

        .calendar-grid.day-view {
            grid-template-columns: 70px 1fr;
        }

        .calendar-day-header {
            text-align: center;
            padding: 16px 8px;
            background: var(--bg);
            border-bottom: 1px solid var(--border);
            border-right: 1px solid var(--border);
        }

        .calendar-day-header.today {
            background: linear-gradient(135deg, rgba(255, 107, 74, 0.18) 0%, rgba(255, 107, 74, 0.10) 100%);
            border-bottom: 2px solid rgba(255, 107, 74, 0.35);
        }

        .day-column.today {
            background: rgba(255, 107, 74, 0.025);
        }

        /* ── Current time indicator ── */
        .now-line {
            position: absolute;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--coral, #FF6B4A);
            z-index: 15;
            pointer-events: none;
        }
        .now-line::before {
            content: '';
            position: absolute;
            left: -1px;
            top: 50%;
            transform: translateY(-50%);
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--coral, #FF6B4A);
        }

        .day-name {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-light);
            margin-bottom: 4px;
        }

        .day-number {
            font-family: 'Inter', sans-serif;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text);
        }

        .calendar-day-header.today .day-number {
            color: var(--primary);
        }

        .time-column {
            background: var(--bg);
            border-right: 1px solid var(--border);
        }

        .time-slot-label {
            height: 60px;
            padding: 8px 12px;
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--text-light);
            text-align: right;
            border-bottom: 1px solid var(--border);
        }

        .day-column {
            border-right: 1px solid var(--border);
            position: relative;
        }

        .time-slot {
            height: 60px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: background 0.15s ease;
            position: relative;
        }

        .time-slot:hover {
            background: rgba(255, 107, 74, 0.04);
        }

        .time-slot:hover::after {
            content: '+ Add';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--primary);
            opacity: 0.6;
        }

        .calendar-event {
            position: absolute;
            left: 4px;
            right: 4px;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 0.75rem;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 10;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .calendar-event:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 16px rgba(0,0,0,0.12);
            z-index: 20;
        }

        .calendar-event.private {
            background: linear-gradient(135deg, #E8D5F0 0%, #F5EDF9 100%);
            border-left: 3px solid #9B6BB3;
        }

        .calendar-event.duet {
            background: linear-gradient(135deg, #FFF3CD 0%, #FFFAEB 100%);
            border-left: 3px solid #D4A574;
        }

        .calendar-event.trio {
            background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 100%);
            border-left: 3px solid #4F46E5;
        }

        /* ── Staff schedule shading ──────────────────── */
        .time-slot.outside-hours {
            background: repeating-linear-gradient(
                45deg,
                rgba(232, 221, 212, 0.4) 0,
                rgba(232, 221, 212, 0.4) 4px,
                transparent 4px,
                transparent 10px
            );
            cursor: default;
        }
        .time-slot.outside-hours:hover {
            background: repeating-linear-gradient(
                45deg,
                rgba(232, 221, 212, 0.55) 0,
                rgba(232, 221, 212, 0.55) 4px,
                transparent 4px,
                transparent 10px
            );
        }
        .time-slot.outside-hours:hover::after { content: none; }
        .time-slot.break-slot {
            background: rgba(255, 107, 74, 0.06);
        }
        .time-slot.break-slot:hover {
            background: rgba(255, 107, 74, 0.1);
        }
        .time-slot.break-slot:hover::after { content: none; }
        .break-slot-label {
            position: absolute;
            left: 4px;
            right: 4px;
            background: rgba(255, 107, 74, 0.08);
            border: 1px dashed var(--coral);
            border-radius: 5px;
            padding: 2px 6px;
            font-size: 0.625rem;
            color: var(--coral);
            font-weight: 500;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 1;
        }

        .calendar-event.schedule-override {
            border: 1.5px dashed #7C5CBF !important;
            border-left: 1.5px dashed #7C5CBF !important;
            box-shadow: 0 2px 8px rgba(124,92,191,0.15);
        }

        /* ── Waiver missing indicator — subtle purple right border ── */
        .calendar-event.waiver-missing {
            border-right: 3px solid #9B6BB3;
        }
        .calendar-event.waiver-missing::after {
            content: '';
            position: absolute;
            top: 4px;
            right: 4px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #9B6BB3;
            opacity: 0.85;
        }

        /* ── Payment state overlays ─────────────────── */
        /* Completed + fully paid — green left bar + faint green wash */
        .calendar-event.paid-complete {
            border-left: 4px solid #2CA01C !important;
            box-shadow: inset 0 0 0 999px rgba(44,160,28,0.07), 0 2px 8px rgba(0,0,0,0.08);
        }
        /* Pending payment (e-transfer sent, not yet confirmed) — amber left bar */
        .calendar-event.payment-pending {
            border-left: 4px solid #D97706 !important;
            box-shadow: inset 0 0 0 999px rgba(217,119,6,0.05), 0 2px 8px rgba(0,0,0,0.08);
        }
        .override-badge-cal {
            display: inline-block;
            background: #7C5CBF;
            color: white;
            font-size: 0.5rem;
            font-weight: 700;
            padding: 1px 4px;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-left: 3px;
            vertical-align: middle;
        }

        .event-time {
            font-weight: 600;
            font-size: 0.6875rem;
            color: rgba(0,0,0,0.6);
            margin-bottom: 2px;
        }

        .event-title {
            font-weight: 600;
            color: var(--text);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .event-client {
            font-size: 0.6875rem;
            color: var(--text-light);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }


        /* Teacher columns in calendar */

        .teacher-calendar-column {
            flex: 1;
            min-width: 200px;
            border-right: 1px solid var(--border);
        }

        .teacher-column-header {
            padding: 16px;
            text-align: center;
            background: var(--bg);
            border-bottom: 1px solid var(--border);
        }

        .teacher-column-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            margin: 0 auto 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 1rem;
            color: white;
        }

        .teacher-column-name {
            font-weight: 600;
            font-size: 0.875rem;
            color: var(--text);
        }

        /* Calendar Quick Book Modal */
        .quick-book-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: flex-start;
            justify-content: center;
            backdrop-filter: blur(4px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 24px 16px;
        }

        .quick-book-modal.active {
            display: flex;
            animation: fadeIn 0.15s ease-out;
        }

        .quick-book-content {
            background: white;
            border-radius: 16px;
            width: 100%;
            max-width: 480px;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
            animation: slideUp 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            margin: auto;
            flex-shrink: 0;
        }

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

        .quick-book-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 24px;
        }

        .quick-book-title {
            font-family: 'Fraunces', serif;
            font-size: 1.75rem;
            font-weight: 500;
            color: var(--primary);
        }

        .quick-book-subtitle {
            font-size: 0.8125rem;
            color: var(--text-light);
            margin-top: 4px;
        }

        .quick-book-close {
            width: 36px;
            height: 36px;
            border: none;
            background: var(--bg);
            border-radius: 8px;
            font-size: 1.25rem;
            cursor: pointer;
            color: var(--text-light);
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            padding: 0;
        }

        /* ── Help Video Button ── */
        .help-video-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 11px;
            background: rgba(61,139,122,0.09);
            border: 1px solid rgba(61,139,122,0.28);
            border-radius: 20px;
            color: var(--sage);
            font-size: 0.6875rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s ease;
            letter-spacing: 0.2px;
            white-space: nowrap;
            vertical-align: middle;
            flex-shrink: 0;
            font-family: 'DM Sans', sans-serif;
        }
        .help-video-btn:hover {
            background: var(--sage);
            color: white;
            border-color: var(--sage);
            box-shadow: 0 3px 10px rgba(61,139,122,0.25);
            transform: translateY(-1px);
        }
        .help-video-btn svg {
            width: 10px; height: 10px; flex-shrink: 0;
        }
        /* h3 row wrapper so icon sits inline */
        .settings-section h3 {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        body.dark-mode .help-video-btn {
            background: rgba(61,139,122,0.15);
            border-color: rgba(61,139,122,0.35);
        }

        .quick-book-close:hover {
            background: var(--error);
            color: white;
        }

        /* ── Calendar Action Bar ── */
        .cal-action-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }
        .cal-action-bar button {
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            padding: 10px 20px;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            white-space: nowrap;
            letter-spacing: 0.01em;
            transition: filter 0.15s, transform 0.15s;
        }
        /* Neutralised — per-variant hover rules in Unified Button System block handle this */
        .cal-action-bar button:hover { filter: none; }
        .cal-btn-primary  { background: var(--forest); color: #fff; box-shadow: 0 2px 8px rgba(30,58,52,0.20); }
        .cal-btn-outline  { background: var(--card); color: var(--sage); border: 2px solid var(--sage) !important; }
        .cal-btn-coral    { background: var(--coral); color: #fff; box-shadow: 0 2px 8px rgba(255,107,74,0.22); }
        .cal-btn-muted    { background: var(--warm-light); color: var(--text-light); border: 1.5px solid var(--border) !important; }
        .cal-btn-sage     { background: var(--sage); color: #fff; box-shadow: 0 2px 8px rgba(61,139,122,0.22); }

        /* ── Payment status indicators on calendar events ── */
        .calendar-event .pay-status-dot {
            display: inline-block;
            width: 7px; height: 7px;
            border-radius: 50%;
            margin-right: 4px;
            vertical-align: middle;
            flex-shrink: 0;
        }
        .calendar-event .pay-status-row {
            display: flex;
            align-items: center;
            gap: 3px;
            margin-top: 2px;
            font-size: 9px;
            font-weight: 600;
        }
        .pay-dot-paid     { background: #2CA01C; }
        .pay-dot-package  { background: var(--sage); }
        .pay-dot-pending  { background: #B8860B; }
        .pay-dot-unpaid   { background: #C86B5D; }
        .pay-dot-credit   { background: #B8860B; }

        /* ── Checkout Modal ── */
        .process-payment-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(30,30,30,0.5);
            backdrop-filter: blur(4px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .process-payment-modal.active { display: flex; }
        .process-payment-content {
            background: var(--card);
            border-radius: 20px;
            width: 100%;
            max-width: 500px;
            max-height: 88vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.20);
            animation: ppSlideIn 0.25s cubic-bezier(0.34,1.4,0.64,1) forwards;
        }
        @keyframes ppSlideIn {
            from { transform: translateY(18px) scale(0.97); opacity: 0; }
            to   { transform: translateY(0)    scale(1);    opacity: 1; }
        }
        .process-payment-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 22px 24px 18px;
            border-bottom: 1px solid var(--border);
        }
        .process-payment-title {
            font-family: 'Fraunces', serif;
            font-size: 1.375rem;
            font-weight: 500;
            color: var(--primary);
        }
        .process-payment-subtitle { font-size: 0.8125rem; color: var(--text-light); margin-top: 3px; }
        .process-payment-close {
            width: 32px; height: 32px;
            border-radius: 50%; border: none;
            background: var(--warm-light);
            font-size: 1.125rem; cursor: pointer;
            color: var(--text-light);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; margin-left: 10px;
            transition: background 0.15s;
        }
        .process-payment-close:hover { background: var(--border); }
        .process-payment-body { padding: 20px 24px 24px; }
        .pp-session-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
            gap: 12px;
        }
        .pp-session-row:last-child { border-bottom: none; }
        .pp-session-info { flex: 1; min-width: 0; }
        .pp-session-type { font-size: 0.875rem; font-weight: 600; color: var(--text); }
        .pp-session-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
        .pp-session-actions { display: flex; gap: 6px; flex-shrink: 0; }
        .pp-pay-btn {
            padding: 6px 14px;
            border-radius: 8px;
            border: none;
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            background: var(--coral);
            color: white;
            transition: filter 0.15s;
        }
        .pp-pay-btn:hover { filter: brightness(0.9); }
        .pp-paid-badge {
            padding: 5px 12px;
            border-radius: 8px;
            font-size: 0.6875rem;
            font-weight: 700;
            background: rgba(44,160,28,0.12);
            color: #2CA01C;
        }

        .today-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 1000;
            align-items: flex-start;
            justify-content: center;
            backdrop-filter: blur(4px);
            padding-top: clamp(40px, 8vh, 100px);
        }
        .today-modal.active {
            display: flex;
            animation: fadeIn 0.15s ease-out;
        }
        .today-modal-content {
            background: white;
            border-radius: 20px;
            width: 100%;
            max-width: 520px;
            max-height: calc(100vh - 120px);
            display: flex;
            flex-direction: column;
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
            animation: slideUp 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow: hidden;
            margin: 0 16px;
        }
        .today-modal-header {
            padding: 24px 24px 18px;
            border-bottom: 1.5px solid var(--border);
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            flex-shrink: 0;
            background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 100%);
            border-radius: 20px 20px 0 0;
        }
        .today-modal-title {
            font-family: 'Fraunces', serif;
            font-size: 1.375rem;
            font-weight: 600;
            color: white;
            line-height: 1.1;
        }
        .today-modal-date {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.7);
            margin-top: 3px;
            font-weight: 500;
        }
        .today-modal-close {
            width: 34px; height: 34px;
            border: none;
            background: rgba(255,255,255,0.15);
            border-radius: 8px;
            font-size: 1.25rem;
            cursor: pointer;
            color: rgba(255,255,255,0.9);
            transition: all 0.2s ease;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
            line-height: 1; padding: 0;
        }
        .today-modal-close:hover { background: rgba(255,255,255,0.3); }
        .today-modal-body {
            padding: 18px 20px;
            overflow-y: auto;
            flex: 1;
        }
        .today-session-card {
            display: flex;
            gap: 14px;
            align-items: flex-start;
            padding: 13px 14px;
            border-radius: 12px;
            border: 1.5px solid var(--border);
            margin-bottom: 10px;
            background: white;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
            position: relative;
        }
        .today-session-card:hover {
            border-color: var(--sage);
            box-shadow: 0 4px 16px rgba(61,139,122,0.12);
        }
        .today-session-card:last-child { margin-bottom: 0; }
        .today-session-card.status-completed { opacity: 0.6; }
        .today-session-card.status-no-show   { opacity: 0.5; }
        .today-time-col {
            min-width: 68px;
            text-align: center;
            padding-top: 2px;
        }
        .today-time-start {
            font-size: 0.875rem;
            font-weight: 700;
            color: var(--text);
            line-height: 1.1;
        }
        .today-time-end {
            font-size: 0.6875rem;
            color: var(--text-light);
            margin-top: 2px;
        }
        .today-type-dot {
            width: 10px; height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
            margin-top: 5px;
        }
        .today-session-info { flex: 1; min-width: 0; }
        .today-session-type {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .today-session-client {
            font-size: 0.7812rem;
            color: var(--text-light);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .today-session-staff {
            font-size: 0.6875rem;
            color: var(--text-light);
            margin-top: 3px;
        }
        .today-status-badge {
            font-size: 0.625rem;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
            flex-shrink: 0;
            align-self: center;
        }
        .today-status-badge.completed { background: rgba(44,160,28,0.1); color: #2CA01C; }
        .today-status-badge.no-show   { background: rgba(220,53,69,0.1); color: var(--error); }
        .today-status-badge.late-cancel { background: rgba(184,134,11,0.1); color: #B8860B; }
        .today-empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-light);
        }
        .today-empty-icon {
            font-size: 2.5rem;
            margin-bottom: 12px;
        }
        .today-empty-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 6px;
        }
        .today-empty-sub {
            font-size: 0.8125rem;
            line-height: 1.5;
        }
        .today-modal-footer {
            padding: 14px 20px;
            border-top: 1.5px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            gap: 10px;
            background: var(--bg);
        }
        .today-footer-stat {
            text-align: center;
        }
        .today-footer-stat-val {
            font-family: 'Fraunces', serif;
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--forest);
            line-height: 1;
        }
        .today-footer-stat-lbl {
            font-size: 0.6875rem;
            color: var(--text-light);
            margin-top: 2px;
        }
        .today-footer-divider {
            width: 1px;
            height: 32px;
            background: var(--border);
        }
        .today-open-cal-btn {
            padding: 9px 18px;
            background: var(--forest);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease;
            font-family: 'DM Sans', sans-serif;
        }
        .today-open-cal-btn:hover { background: var(--sage); }
        @media (max-width: 480px) {
            .today-modal-content { margin: 0 8px; border-radius: 16px; }
            .today-modal { padding-top: 20px; }
        }

        /* Session Details / Edit Modal */
        .session-detail-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
        }
        .session-detail-modal.active { display: flex; animation: fadeIn 0.15s ease-out; }
        .session-detail-content {
            background: white;
            border-radius: 16px;
            width: 100%;
            max-width: 520px;
            max-height: 90vh;
            overflow-y: auto;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
            animation: slideUp 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .session-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 24px;
        }
        .session-detail-title {
            font-family: 'Inter', sans-serif;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary);
        }
        .session-detail-subtitle {
            font-size: 0.8125rem;
            color: var(--text-light);
            margin-top: 4px;
        }
        .session-detail-close {
            width: 36px; height: 36px;
            border: none; background: var(--bg);
            border-radius: 8px; font-size: 1.25rem;
            cursor: pointer; color: var(--text-light);
            transition: all 0.2s ease; flex-shrink: 0;
            display: flex; align-items: center;
            justify-content: center; line-height: 1; padding: 0;
        }
        .session-detail-close:hover { background: var(--error); color: white; }
        .session-info-grid { display: grid; gap: 12px; margin-bottom: 24px; }
        .session-info-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 16px; background: var(--bg);
            border-radius: 10px; border: 1px solid var(--border);
        }
        .session-info-label {
            font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.5px; color: var(--text-light);
        }
        .session-info-value {
            font-size: 0.875rem; font-weight: 500; color: var(--text); text-align: right;
        }
        .session-detail-actions {
            display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px;
            border-top: 1px solid var(--border);
        }
        .session-detail-actions .btn-primary,
        .session-detail-actions .btn-secondary,
        .btn-cancel-session { flex: 1 1 auto; min-width: calc(33% - 10px); text-align: center; }
        .btn-cancel-session {
            padding: 12px 24px; background: white; color: var(--error);
            border: 2px solid var(--error); border-radius: 10px;
            font-family: 'Inter', sans-serif; font-size: 0.8125rem; font-weight: 600;
            cursor: pointer; transition: all 0.3s ease;
        }
        .btn-cancel-session:hover { background: var(--error); color: white; }
        .session-edit-form { display: none; }
        .session-edit-form.active { display: block; }
        .session-view-content.hidden { display: none; }
        .session-edit-form .form-group { margin-bottom: 16px; }
        .session-edit-form select,
        .session-edit-form input[type="date"],
        .session-edit-form input[type="text"],
        .session-edit-form textarea {
            width: 100%; padding: 12px; border: 2px solid var(--border);
            border-radius: 10px; font-family: 'Inter', sans-serif; font-size: 0.875rem;
        }
        .session-edit-form select:focus,
        .session-edit-form input:focus,
        .session-edit-form textarea:focus {
            outline: none; border-color: var(--coral);
            box-shadow: 0 0 0 3px rgba(255,107,74,0.1);
        }
        .session-edit-form textarea { min-height: 60px; resize: vertical; }
        .edit-time-row { display: flex; gap: 8px; }
        .edit-time-row select { flex: 1; }

        /* Income Dashboard Cards - Full Width */
        .income-dashboard {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }
        @media (max-width: 1100px) {
            .income-dashboard { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 600px) {
            .income-dashboard { grid-template-columns: 1fr; }
        }
        .income-dash-card {
            background: var(--card);
            color: var(--text);
            border-radius: 16px;
            padding: 28px;
            border: 1px solid var(--border);
            border-left: 4px solid var(--primary);
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
            display: flex;
            flex-direction: column;
            gap: 16px;
            transition: all 0.2s ease;
        }
        .income-dash-card:hover {
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }
        .income-dash-card:nth-child(2) {
            border-left-color: var(--primary-light);
        }
        .income-dash-card:nth-child(3) {
            border-left-color: var(--accent);
        }
        .income-dash-card:nth-child(4) {
            border-left-color: #2CA01C;
        }
        .income-dash-card .dash-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }
        .income-dash-card .dash-label {
            font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
            letter-spacing: 1.5px; color: var(--text-light);
        }
        .income-dash-card .dash-icon {
            width: 40px; height: 40px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
            background: var(--sage-tint); color: var(--primary);
        }
        .income-dash-card:nth-child(3) .dash-icon {
            background: rgba(255,107,74,0.1); color: var(--accent);
        }
        .income-dash-card:nth-child(4) .dash-icon {
            background: rgba(44,160,28,0.1); color: #2CA01C;
        }
        .income-dash-card .dash-amount {
            font-family: 'Inter', sans-serif;
            font-size: 2rem; font-weight: 700; color: var(--text);
            letter-spacing: -1px;
        }
        .income-dash-card .dash-meta {
            font-size: 0.8125rem; color: var(--text-light); line-height: 1.6;
        }
        .income-dash-card .dash-meta strong { color: var(--text); }
        .income-type-breakdown {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 30px;
        }
        @media (max-width: 700px) {
            .income-type-breakdown { grid-template-columns: 1fr; }
        }
        .type-breakdown-card {
            background: white;
            border-radius: 16px;
            padding: 24px;
            border: 1px solid var(--border);
            box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
            text-align: center;
        }
        .type-breakdown-card .type-icon {
            width: 48px; height: 48px; border-radius: 50%;
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 1.375rem; margin-bottom: 12px;
        }
        .type-breakdown-card .type-name {
            font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 12px;
        }
        .type-breakdown-card .type-stats {
            display: flex; justify-content: space-around; gap: 8px;
        }
        .type-stat-item {
            text-align: center;
        }
        .type-stat-item .stat-number {
            font-size: 1.375rem; font-weight: 700; color: var(--text);
        }
        .type-stat-item .stat-label {
            font-size: 0.625rem; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.5px; color: var(--text-light); margin-top: 2px;
        }

        /* Empty state for calendar */


        /* Legend */
        .calendar-legend {
            display: flex;
            gap: 20px;
            padding: 16px 24px;
            background: var(--bg);
            border-top: 1px solid var(--border);
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.75rem;
            color: var(--text-light);
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 4px;
        }

        .legend-color.private {
            background: #9B6BB3;
        }

        .legend-color.duet {
            background: #D4A574;
        }

        .legend-color.trio {
            background: #5F8575;
        }

        /* Client Profile Modal */
        .client-profile-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }

        .client-profile-modal.active {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            animation: fadeIn 0.15s ease-out;
        }

        .client-profile-content {
            background: white;
            border-radius: 16px;
            width: 100%;
            max-width: 1200px;
            margin: 20px auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            animation: modalIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .client-profile-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            padding: 24px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .client-profile-header h2 {
            font-family: 'Inter', sans-serif;
            font-size: 1.75rem;
            font-weight: 400;
            margin: 0;
        }

        .client-profile-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            transition: background 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            padding: 0;
        }

        .client-profile-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .client-profile-body {
            padding: 30px;
        }

        .profile-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }

        /* Expandable appointments section */
        .appointments-expandable-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            padding: 14px 0 10px;
            border-bottom: 2px solid var(--border);
            margin-bottom: 15px;
            user-select: none;
        }
        .appointments-expandable-header:hover { opacity: 0.8; }
        .appointments-expand-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--bg);
            border: 1px solid var(--border);
            transition: transform 0.25s ease;
            font-size: 12px;
            color: var(--text-light);
        }
        .appointments-expand-icon.open { transform: rotate(180deg); }
        .appointments-expandable-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease;
        }
        .appointments-expandable-body.open {
            max-height: 2000px;
        }

        /* Validation styles */
        .field-valid { border-color: var(--sage) !important; background: rgba(61,139,122,0.04) !important; }
        .field-error { border-color: #d44 !important; background: rgba(220,68,68,0.04) !important; }
        .validation-msg { font-size: 11px; margin-top: 3px; display: none; }
        .validation-msg.error { color: #c33; display: block; }
        .validation-msg.valid { color: var(--sage); display: block; }

        .profile-section {
            background: var(--bg);
            border-radius: 12px;
            padding: 20px;
        }

        .profile-section h3 {
            font-family: 'Inter', sans-serif;
            font-size: 1.25rem;
            color: var(--primary);
            margin: 0 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--border);
        }

        .profile-info-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--border);
        }

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

        .profile-info-label {
            color: var(--text-light);
            font-size: 0.8125rem;
        }

        .profile-info-value {
            font-weight: 500;
            color: var(--text);
        }

        /* Body Chart Styles */


        .body-chart-views {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            background: #f8f8f8;
            border-radius: 12px;
            padding: 15px;
        }

        @media (max-width: 768px) {
            .body-chart-views {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .body-view {
            position: relative;
            background: white;
            border-radius: 8px;
            padding: 10px;
            text-align: center;
            border: 2px solid var(--border);
        }

        .body-view-label {
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--text-light);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        .body-svg-container {
            position: relative;
            width: 100%;
            aspect-ratio: 1/2;
            cursor: crosshair;
        }

        .body-svg-container svg {
            width: 100%;
            height: 100%;
        }

        .pain-marker {
            position: absolute;
            width: 24px;
            height: 24px;
            background: #e74c3c;
            border: 3px solid #c0392b;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.75rem;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
            transition: transform 0.2s;
            z-index: 10;
        }

        .pain-marker:hover {
            transform: translate(-50%, -50%) scale(1.2);
        }

        .pain-marker.severity-low {
            background: #f1c40f;
            border-color: #d4ac0d;
            box-shadow: 0 2px 8px rgba(241, 196, 15, 0.5);
        }

        .pain-marker.severity-medium {
            background: #e67e22;
            border-color: #ca6f1e;
            box-shadow: 0 2px 8px rgba(230, 126, 34, 0.5);
        }

        .pain-marker.severity-high {
            background: #e74c3c;
            border-color: #c0392b;
            box-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
        }

        .body-chart-legend {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 15px;
            flex-wrap: wrap;
        }

        .legend-item-body {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: var(--text-light);
        }

        .legend-dot {
            width: 14px;
            height: 14px;
            border-radius: 50%;
        }

        .legend-dot.low { background: #f1c40f; }
        .legend-dot.medium { background: #e67e22; }
        .legend-dot.high { background: #e74c3c; }

        /* Notes Section */

        .notes-list {
            /* No scroll — limited to last 5 notes */
        }

        .note-item {
            background: white;
            border-radius: 10px;
            padding: 18px;
            margin-bottom: 10px;
            border-left: 4px solid var(--primary);
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }

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

        .note-date {
            font-size: 0.75rem;
            color: var(--text-light);
        }

        .note-delete {
            background: none;
            border: none;
            color: var(--error);
            cursor: pointer;
            font-size: 0.875rem;
        }

        .note-content {
            font-size: 0.875rem;
            line-height: 1.6;
            color: var(--text);
        }


        /* Appointments List */
        .appointments-list {
            max-height: 250px;
            overflow-y: auto;
        }

        .appointment-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: white;
            border-radius: 8px;
            margin-bottom: 8px;
        }

        .appointment-info {
            flex: 1;
        }

        .appointment-type {
            font-weight: 600;
            color: var(--primary);
        }

        .appointment-datetime {
            font-size: 0.8125rem;
            color: var(--text-light);
        }

        .appointment-status {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.6875rem;
            font-weight: 600;
        }

        .appointment-status.upcoming {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .appointment-status.past {
            background: #f5f5f5;
            color: #757575;
        }

        /* Severity Selector */
        .severity-selector {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            justify-content: center;
        }

        .severity-btn {
            padding: 8px 16px;
            border: 2px solid var(--border);
            background: white;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.75rem;
            font-weight: 600;
            transition: all 0.2s;
        }

        .severity-btn:hover {
            transform: scale(1.05);
        }

        .severity-btn.low { border-color: #f1c40f; color: #d4ac0d; }
        .severity-btn.low.active { background: #f1c40f; color: #333; }
        
        .severity-btn.medium { border-color: #e67e22; color: #e67e22; }
        .severity-btn.medium.active { background: #e67e22; color: white; }
        
        .severity-btn.high { border-color: #e74c3c; color: #e74c3c; }
        .severity-btn.high.active { background: #e74c3c; color: white; }

        /* Note with Body Chart */
        .note-body-chart {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-top: 12px;
            padding: 12px;
            background: #f8f8f8;
            border-radius: 8px;
        }

        .note-body-view {
            position: relative;
            background: white;
            border-radius: 6px;
            padding: 5px;
            text-align: center;
        }

        .note-body-view-label {
            font-size: 0.5625rem;
            color: var(--text-light);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .note-body-svg {
            position: relative;
            width: 100%;
            aspect-ratio: 1/2;
        }

        .note-body-svg svg {
            width: 100%;
            height: 100%;
        }

        .note-pain-marker {
            position: absolute;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.5625rem;
            font-weight: bold;
            z-index: 10;
        }

        .note-pain-marker.severity-low {
            background: #f1c40f;
            border: 2px solid #d4ac0d;
        }

        .note-pain-marker.severity-medium {
            background: #e67e22;
            border: 2px solid #ca6f1e;
        }

        .note-pain-marker.severity-high {
            background: #e74c3c;
            border: 2px solid #c0392b;
        }

        .note-markers-summary {
            display: flex;
            gap: 15px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
            flex-wrap: wrap;
        }

        .marker-count {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.75rem;
            color: var(--text-light);
        }

        .marker-count-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        /* ══════════════════════════════════════════
           ACCESSIBILITY (WCAG 2.2 AA / AODA / EAA)
           ══════════════════════════════════════════ */

        /* Skip-to-content link */
        .skip-link {
            position: absolute;
            top: -100%;
            left: 16px;
            z-index: 10000;
            padding: 12px 24px;
            background: var(--forest);
            color: white;
            font-weight: 600;
            font-size: 0.875rem;
            border-radius: 0 0 8px 8px;
            text-decoration: none;
            transition: top 0.2s ease;
        }
        .skip-link:focus {
            top: 0;
            outline: 3px solid var(--coral);
            outline-offset: 2px;
        }

        /* Global focus-visible styles (keyboard users) */
        *:focus-visible {
            outline: 3px solid var(--coral);
            outline-offset: 2px;
        }
        /* Remove outline for mouse users */
        *:focus:not(:focus-visible) {
            outline: none;
        }

        /* High-contrast focus mode (toggled via a11y widget) */
        body.a11y-focus-highlight *:focus-visible {
            outline: 3px solid #FFD700 !important;
            outline-offset: 3px !important;
            box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.35) !important;
        }

        /* Reduced motion */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }
        body.a11y-reduced-motion *, 
        body.a11y-reduced-motion *::before, 
        body.a11y-reduced-motion *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }

        /* Font scaling */
        html.a11y-font-large { font-size: 118%; }
        html.a11y-font-xlarge { font-size: 136%; }

        /* High contrast mode */
        body.a11y-high-contrast {
            --cream: #FFFFFF;
            --warm-light: #FFFFFF;
            --bg: #FFFFFF;
            --card: #FFFFFF;
            --text: #000000;
            --text-light: #1A1A1A;
            --border: #000000;
            --shadow: rgba(0,0,0,0.2);
        }
        body.a11y-high-contrast .page-header {
            background: #000000 !important;
        }
        body.a11y-high-contrast .landing-page {
            background: #1a1a1a !important;
        }
        body.a11y-high-contrast .nav-card {
            background: rgba(255,255,255,0.2) !important;
            border-color: white !important;
        }
        body.a11y-high-contrast .nav-tabs {
            background: white !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border-color: #000 !important;
        }
        body.a11y-high-contrast .tab.active {
            background: #000 !important;
            color: #fff !important;
            border: 2px solid #fff;
        }
        body.a11y-high-contrast .btn-primary {
            background: #000 !important;
            color: #fff !important;
            border: 2px solid #000 !important;
        }
        body.a11y-high-contrast a,
        body.a11y-high-contrast .btn-secondary {
            text-decoration: underline;
        }

        /* Dyslexia-friendly font */
        body.a11y-dyslexia-font,
        body.a11y-dyslexia-font * {
            font-family: 'OpenDyslexic', 'Comic Sans MS', 'Verdana', sans-serif !important;
            letter-spacing: 0.05em !important;
            word-spacing: 0.15em !important;
            line-height: 1.8 !important;
        }
        /* ── Brand-locked elements: exempt from dyslexia font swap ──
           Covers: header SVG wordmark, MyoMind header btn, MyoMind panel wordmark */

        /* Main header SVG — MYOMESH text */
        body.a11y-dyslexia-font #logoSvg text:first-of-type {
            font-family: 'Gill Sans', 'Century Gothic', 'Trebuchet MS', sans-serif !important;
            letter-spacing: initial !important;
            word-spacing: initial !important;
            line-height: initial !important;
        }
        /* Main header SVG — "Practical Practice Management" tagline */
        body.a11y-dyslexia-font #logoSvg text:last-of-type {
            font-family: 'Inter', sans-serif !important;
            letter-spacing: initial !important;
            word-spacing: initial !important;
            line-height: initial !important;
        }
        /* MyoMind header is now an SVG logo link — no text spans to override */
        /* body.a11y-dyslexia-font #myomindHeaderBtn span rules removed (v1.1) */
        /* MyoMind panel wordmark */
        body.a11y-dyslexia-font .mm-ph-wordmark-main {
            font-family: 'Gill Sans', 'Century Gothic', 'Trebuchet MS', sans-serif !important;
            letter-spacing: 0.06em !important;
            word-spacing: normal !important;
            line-height: normal !important;
        }
        body.a11y-dyslexia-font .mm-ph-wordmark-sub {
            font-family: 'Inter', sans-serif !important;
            letter-spacing: 0.18em !important;
            word-spacing: normal !important;
            line-height: normal !important;
        }

        /* ── Accessibility Widget ── */
        .a11y-widget-toggle {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 9999;
            width: 39px;
            height: 39px;
            border-radius: 50%;
            background: rgba(255,255,255,0.72);
            backdrop-filter: blur(12px) saturate(160%);
            -webkit-backdrop-filter: blur(12px) saturate(160%);
            color: #1a1a1a;
            border: 1px solid rgba(255,255,255,0.5);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 12px rgba(0,0,0,0.14), 0 1px 3px rgba(0,0,0,0.1);
            transition: transform 0.2s ease, background 0.2s ease;
            padding: 0;
        }
        .a11y-widget-toggle:hover,
        .a11y-widget-toggle:focus-visible {
            transform: scale(1.08);
            background: rgba(255,255,255,0.92);
        }
        .a11y-widget-toggle svg {
            width: 22px;
            height: 22px;
            fill: none;
            stroke: #1a1a1a;
        }

        .a11y-panel {
            position: fixed;
            bottom: 88px;
            right: 24px;
            z-index: 9998;
            width: 320px;
            max-height: 80vh;
            overflow-y: auto;
            background: white;
            border-radius: 16px;
            box-shadow: 0 12px 48px rgba(0,0,0,0.18);
            border: 1px solid var(--border);
            padding: 24px;
            display: none;
            animation: a11ySlideUp 0.25s ease;
        }
        .a11y-panel.open { display: block; }
        .a11y-panel[aria-hidden="true"] { display: none; }
        .a11y-panel[aria-hidden="false"] { display: block; }

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

        .a11y-panel-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--forest);
            margin-bottom: 4px;
        }
        .a11y-panel-subtitle {
            font-size: 0.75rem;
            color: var(--text-light);
            margin-bottom: 20px;
        }

        .a11y-option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
        }
        .a11y-option:last-child { border-bottom: none; }

        .a11y-option-label {
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text);
        }
        .a11y-option-desc {
            font-size: 0.6875rem;
            color: var(--text-light);
            margin-top: 2px;
        }

        /* Toggle switch */
        .a11y-toggle {
            position: relative;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }
        .a11y-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }
        .a11y-toggle-track {
            position: absolute;
            inset: 0;
            background: #ccc;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        .a11y-toggle-track::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: transform 0.2s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        .a11y-toggle input:checked + .a11y-toggle-track {
            background: var(--sage);
        }
        .a11y-toggle input:checked + .a11y-toggle-track::after {
            transform: translateX(20px);
        }
        .a11y-toggle input:focus-visible + .a11y-toggle-track {
            outline: 3px solid var(--coral);
            outline-offset: 2px;
        }

        /* Font size selector */
        .a11y-font-btns {
            display: flex;
            gap: 6px;
        }
        .a11y-font-btn {
            padding: 6px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: white;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            color: var(--text);
            transition: all 0.15s ease;
            font-family: 'Inter', sans-serif;
        }
        .a11y-font-btn:hover { background: var(--sage-tint); }
        .a11y-font-btn.active {
            background: var(--sage);
            color: white;
            border-color: var(--sage);
        }

        .a11y-reset-btn {
            width: 100%;
            margin-top: 16px;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: white;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            color: var(--text-light);
            transition: all 0.15s ease;
            font-family: 'Inter', sans-serif;
        }
        .a11y-reset-btn:hover {
            background: var(--coral-tint);
            color: var(--coral);
            border-color: var(--coral);
        }

        .a11y-statement-link {
            display: block;
            text-align: center;
            margin-top: 12px;
            font-size: 0.6875rem;
            color: var(--sage);
            text-decoration: underline;
        }
        .a11y-statement-link:hover { color: var(--forest); }

        /* Visually hidden (for screen readers) */
        .sr-only {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        /* Ensure colour contrast on severity badges */
        body.a11y-high-contrast .note-pain-marker {
            border-width: 3px !important;
            font-weight: bold;
        }

        /* a11y panel responsive */
        @media (max-width: 400px) {
            .a11y-panel {
                right: 8px;
                left: 8px;
                width: auto;
                bottom: 84px;
            }
        }

        /* ══════════════════════════════════════════════════════════════
           UNIFIED BUTTON SYSTEM  —  Option A: Clean Lift
           Overrides all previous scattered btn-* definitions.
           Explicit color: on EVERY hover to prevent white-on-white bug.
           ══════════════════════════════════════════════════════════════ */

        /* ── Shared base ── */
        .btn-primary, .btn-secondary, .btn-danger, .btn-cancel-session,
        .cal-btn-primary, .cal-btn-outline, .cal-btn-coral, .cal-btn-muted, .cal-btn-sage {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 20px;   /* inline style="padding:..." overrides this for compact variants */
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            border-radius: 8px;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease,
                        border-color 0.18s ease;
        }
        .btn-primary:active, .btn-secondary:active, .btn-danger:active,
        .btn-cancel-session:active,
        .cal-btn-primary:active, .cal-btn-outline:active,
        .cal-btn-coral:active, .cal-btn-muted:active, .cal-btn-sage:active {
            transform: translateY(0) !important;
            transition-duration: 0.08s;
        }

        /* ── btn-primary  (teal gradient → solid teal on hover) ── */
        .btn-primary {
            background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 100%);
            color: #ffffff;
            border: none;
            box-shadow: 0 2px 8px rgba(30,58,52,0.22);
        }
        .btn-primary:hover {
            background: var(--sage);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(61,139,122,0.35);
        }

        /* ── btn-secondary  (ghost outlined teal) ── */
        .btn-secondary {
            background: var(--card);
            color: var(--sage);
            border: 2px solid var(--sage);
        }
        .btn-secondary:hover {
            background: rgba(61,139,122,0.07);
            color: var(--sage);
            border-color: var(--sage);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(61,139,122,0.14);
        }
        /* Dark mode */
        body.dark-mode .btn-secondary {
            background: var(--bg);
            color: var(--primary-light);
            border-color: var(--primary-light);
        }
        body.dark-mode .btn-secondary:hover {
            background: rgba(94,173,160,0.12);
            color: var(--primary-light);
        }

        /* ── btn-danger + btn-cancel-session  (error red) ── */

        /* ── Size modifier ── */
        .btn-small {
            height: 32px;
            padding: 0 12px;
            font-size: 0.6875rem;
        }

        /* ── Calendar action bar ──────────────────────────────────
           Two-zone layout: primary actions LEFT, utility RIGHT.
           ──────────────────────────────────────────────────────── */
        .cal-action-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }
        /* Left-zone spacer: pushes anything after .cal-spacer to the right */

        .cal-action-bar button {
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease,
                        border-color 0.18s ease;
        }
        .cal-action-bar button:active { transform: translateY(0) !important; }

        /* Book New Session — primary teal */
        .cal-btn-primary {
            padding: 10px 20px;
            background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 100%);
            color: #ffffff;
            border: none;
            box-shadow: 0 2px 8px rgba(30,58,52,0.22);
        }
        .cal-btn-primary:hover {
            background: var(--sage);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(61,139,122,0.35);
        }

        /* Today's Schedule — outlined teal */
        .cal-btn-outline {
            padding: 10px 20px;
            background: var(--card);
            color: var(--sage);
            border: 2px solid var(--sage);
        }
        .cal-btn-outline:hover {
            background: rgba(61,139,122,0.07);
            color: var(--sage);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(61,139,122,0.14);
        }

        /* Checkout — coral action */
        .cal-btn-coral {
            padding: 10px 20px;
            background: var(--coral);
            color: #ffffff;
            border: none;
            box-shadow: 0 2px 8px rgba(255,107,74,0.22);
        }
        .cal-btn-coral:hover {
            background: #E8552E;
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(255,107,74,0.35);
        }

        /* Waitlist — muted ghost */
        .cal-btn-muted {
            padding: 10px 20px;
            background: transparent;
            color: var(--text-light);
            border: 1.5px solid var(--border);
        }
        .cal-btn-muted:hover {
            background: var(--warm-light);
            color: var(--text);
            border-color: var(--text-light);
            transform: translateY(-1px);
        }

        /* Sell Package — sage action */
        .cal-btn-sage {
            padding: 10px 20px;
            background: var(--sage);
            color: #ffffff;
            border: none;
            box-shadow: 0 2px 8px rgba(61,139,122,0.22);
        }
        .cal-btn-sage:hover {
            background: #2E7566;
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(61,139,122,0.35);
        }

        /* ── Income toolbar  (utility/export zone, right-aligned) ── */
        .income-action-bar {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 8px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }
        /* Utility buttons inside income bar share btn-secondary base styles */
        .income-action-bar .btn-utility {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            height: 36px;
            padding: 0 14px;
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            border-radius: 8px;
            cursor: pointer;
            white-space: nowrap;
            background: var(--card);
            color: var(--text-light);
            border: 1.5px solid var(--border);
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease;
        }
        .income-action-bar .btn-utility:hover {
            background: var(--warm-light);
            color: var(--text);
            border-color: var(--text-light);
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        }
        .income-action-bar .btn-utility:active {
            transform: translateY(0);
            transition-duration: 0.08s;
        }

        /* ── Calendar header Today button ── */
        .today-btn {
            padding: 8px 18px;
            background: var(--coral);
            color: #ffffff;
            border: none;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            font-size: 0.8125rem;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease;
        }
        .today-btn:hover {
            background: #E8552E;
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255,107,74,0.3);
        }
        .today-btn:active { transform: translateY(0); transition-duration: 0.08s; }

        /* ── Calendar nav prev/next ── */
        .calendar-nav-btn {
            width: 40px;
            height: 40px;
            border: 1.5px solid var(--border);
            background: var(--card);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.125rem;
            color: var(--text);
            transition: background 0.18s ease, color 0.18s ease,
                        border-color 0.18s ease, box-shadow 0.18s ease;
        }
        .calendar-nav-btn:hover {
            background: var(--sage);
            border-color: var(--sage);
            color: #ffffff;
            box-shadow: 0 3px 10px rgba(61,139,122,0.25);
        }

        /* ── Calendar view toggle (Day / Week) ── */
        .view-toggle-btn {
            padding: 6px 14px;
            border: none;
            background: transparent;
            border-radius: 6px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease;
        }
        .view-toggle-btn:hover {
            background: rgba(61,139,122,0.08);
            color: var(--sage);
        }
        .view-toggle-btn.active {
            background: var(--card);
            color: var(--forest);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        /* ── Today modal "Open Calendar" button ── */
        .today-open-cal-btn {
            padding: 9px 18px;
            background: var(--forest);
            color: #ffffff;
            border: none;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease;
        }
        .today-open-cal-btn:hover {
            background: var(--sage);
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(61,139,122,0.28);
        }

        /* ── Empty-state CTA ── */
        .empty-cta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 18px;
            background: var(--sage-tint);
            color: var(--sage);
            border: none;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease;
        }
        .empty-cta:hover {
            background: var(--sage);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(61,139,122,0.22);
        }

        /* ── Back-home button ── */

        /* ── Checkout inline pay button ── */
        .pp-pay-btn {
            padding: 6px 14px;
            border-radius: 8px;
            border: none;
            font-family: 'Inter', sans-serif;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            background: var(--coral);
            color: #ffffff;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease;
        }
        .pp-pay-btn:hover {
            background: #E8552E;
            color: #ffffff;
            box-shadow: 0 3px 10px rgba(255,107,74,0.3);
        }

        /* ── MyoMind panel action buttons ── */
        .mm-action-btn {
            padding: 8px 16px;
            border-radius: 8px;
            border: 1.5px solid var(--border);
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            background: var(--card);
            color: var(--text);
            transition: background 0.18s ease, color 0.18s ease,
                        border-color 0.18s ease;
        }
        .mm-action-btn:hover {
            background: var(--warm-light);
            color: var(--text);
            border-color: var(--text-light);
        }
        .mm-action-btn.primary {
            background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 100%);
            color: #ffffff;
            border-color: transparent;
            box-shadow: 0 2px 8px rgba(30,58,52,0.18);
        }
        .mm-action-btn.primary:hover {
            background: var(--sage);
            color: #ffffff;
            border-color: transparent;
            box-shadow: 0 4px 14px rgba(61,139,122,0.3);
        }

        /* ── MyoMind subscribe modal buttons ── */
        .mm-sub-btn-primary {
            flex: 1;
            padding: 14px 20px;
            background: var(--forest);
            color: #ffffff;
            border: none;
            border-radius: 12px;
            font-family: 'Inter', sans-serif;
            font-size: 0.875rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease, transform 0.18s ease;
        }
        .mm-sub-btn-primary:hover {
            background: var(--sage);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(30,58,52,0.25);
        }
        .mm-sub-btn-secondary {
            padding: 14px 20px;
            background: transparent;
            color: var(--text-light);
            border: 1.5px solid var(--border);
            border-radius: 12px;
            font-family: 'Inter', sans-serif;
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease;
        }
        .mm-sub-btn-secondary:hover {
            background: var(--warm-light);
            color: var(--text);
        }

        /* ── Integration buttons (Google / Outlook / QuickBooks) ── */
        .btn-google, .btn-outlook, .btn-quickbooks {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            height: 40px;
            padding: 0 20px;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 0.8125rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            cursor: pointer;
            transition: background 0.18s ease, color 0.18s ease,
                        box-shadow 0.18s ease;
        }
        .btn-google  { background: #ffffff; color: var(--forest); border: 1.5px solid var(--forest); }
        .btn-google:hover  { background: var(--forest); color: #ffffff; box-shadow: 0 4px 12px rgba(30,58,52,0.2); }
        .btn-outlook { background: #ffffff; color: #0078D4; border: 1.5px solid #0078D4; }
        .btn-outlook:hover { background: #0078D4; color: #ffffff; box-shadow: 0 4px 12px rgba(0,120,212,0.2); }

        /* ── Mobile: keep action bars usable ── */

        /* ─ Tablet (≤900px): shrink calendar controls, fix view-toggle touch target ─ */
        @media (max-width: 900px) {
            /* view-toggle-btn: increase padding so touch target ≥ 40px tall */
            .view-toggle-btn {
                padding: 9px 12px;
                font-size: 0.75rem;
                min-height: 40px;
            }
            /* today-btn already has 8px v-padding — fine at tablet */
        }

        /* ─ Mobile (≤600px): compact action bars ─ */
        @media (max-width: 600px) {
            /* Cal bar: shrink but keep side-by-side while there's room */
            .cal-action-bar { gap: 6px; }
            .cal-btn-primary, .cal-btn-outline,
            .cal-btn-coral, .cal-btn-muted, .cal-btn-sage {
                padding: 9px 12px;   /* padding-based, not height */
                font-size: 0.75rem;
            }

            /* Income bar: left-align when it wraps */
            .income-action-bar { justify-content: flex-start; flex-wrap: wrap; }
            .income-action-bar .btn-utility { padding: 7px 12px; font-size: 0.6875rem; }
        }

        /* ─ Small mobile (≤480px): stack action bars to 2-column grid ─ */
        @media (max-width: 480px) {
            /* Cal action bar: 2 × 2 grid — no awkward partial rows */
            .cal-action-bar {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }
            .cal-btn-primary, .cal-btn-outline,
            .cal-btn-coral, .cal-btn-muted, .cal-btn-sage {
                padding: 11px 8px;
                font-size: 0.75rem;
                width: 100%;
                justify-content: center;
                white-space: normal;   /* allow wrap inside cell if label is very long */
                text-align: center;
                line-height: 1.2;
            }

            /* Income toolbar: each export button full-width */
            .income-action-bar {
                flex-direction: column;
                align-items: stretch;
            }
            .income-action-bar .btn-utility {
                width: 100%;
                justify-content: center;
                padding: 10px 12px;
            }

            /* btn-group (modals): stack confirm + cancel vertically */
            .btn-group {
                flex-direction: column;
                gap: 8px;
            }
            .btn-group .btn-primary,
            .btn-group .btn-secondary {
                width: 100%;
                justify-content: center;
            }

            /* Session-detail-actions: fix 2+2+1 layout — use 3+2 instead */
            .session-detail-actions .btn-primary,
            .session-detail-actions .btn-secondary,
            .session-detail-actions .btn-cancel-session {
                flex: 0 0 calc(50% - 4px);
            }
            /* Force "Edit Session" alone on first row (it's the primary create action) */
            .session-detail-actions .btn-primary:first-child {
                flex: 0 0 100%;
            }
        }

        /* ─ Touch devices: suppress hover lift — it fires on tap and gets stuck ─ */
        @media (hover: none) {
            .btn-primary:hover,
            .btn-secondary:hover,
        .tp-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 12px; }
        .tp-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
        .tp-card-title { font-size: 0.875rem; font-weight: 700; color: var(--primary); }
        .tp-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
        .tp-badge.active { background: var(--sage-tint); color: var(--sage); }
        .tp-badge.completed { background: rgba(61,139,122,0.2); color: #2a7a5f; }
        .tp-badge.on-hold { background: rgba(255,179,71,0.2); color: #b8860b; }
        .tp-badge.discharged { background: rgba(200,107,93,0.15); color: var(--error); }
        .tp-diagnosis { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 12px; line-height: 1.5; }
        .tp-goal { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 10px; transition: all 0.2s; }
        body.dark-mode .tp-goal { background: var(--bg); }
        .tp-goal:hover { border-color: var(--sage); }
        .tp-goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
        .tp-goal-title { font-size: 0.8125rem; font-weight: 600; color: var(--primary); flex: 1; }
        .tp-goal-type { font-size: 0.625rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
        .tp-goal-type.long { background: rgba(155,107,179,0.15); color: #7a4f9b; }
        .tp-goal-type.short { background: rgba(74,144,226,0.15); color: #3a7bd5; }
        .tp-progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 8px 0; }
        .tp-progress-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
        .tp-progress-fill.low { background: linear-gradient(90deg, #e74c3c, #e67e22); }
        .tp-progress-fill.mid { background: linear-gradient(90deg, #e67e22, #f1c40f); }
        .tp-progress-fill.good { background: linear-gradient(90deg, #f1c40f, var(--sage)); }
        .tp-progress-fill.done { background: var(--sage); }
        .tp-progress-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.6875rem; color: var(--text-light); }
        .tp-progress-pct { font-weight: 700; font-size: 0.8125rem; }
        .tp-milestone { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
        .tp-milestone:last-child { border-bottom: none; }
        .tp-milestone-check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; margin-top: 1px; }
        .tp-milestone-check.checked { background: var(--sage); border-color: var(--sage); color: white; }
        .tp-milestone-text { font-size: 0.75rem; color: var(--text); flex: 1; line-height: 1.4; }
        .tp-milestone-text.checked { text-decoration: line-through; color: var(--text-light); }
        .tp-milestone-date { font-size: 0.625rem; color: var(--text-light); flex-shrink: 0; white-space: nowrap; }
        .tp-interventions { font-size: 0.75rem; color: var(--text-light); line-height: 1.6; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
        .tp-empty { text-align: center; padding: 30px 20px; color: var(--text-light); display: flex; flex-direction: column; align-items: center; gap: 6px; }
        .tp-empty-icon { width: 56px; height: 56px; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; }
        .tp-empty-icon svg { width: 100%; height: 100%; }
        .tp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        @media (max-width: 600px) { .tp-form-grid { grid-template-columns: 1fr; } }

        /* ═══════════════════════════════════════════
           MOBILE RESPONSIVE FIXES
           ═══════════════════════════════════════════ */

        /* — Tablet breakpoint — */
        @media (max-width: 900px) {
            .header-content { padding: 0 20px; }
            #logoSvg { width: 160px; height: 41px; }
            .mm-logo-text { display: none; }
        }

        /* — Mobile: single-row compact layout — */
        @media (max-width: 600px) {
            .page-header { padding: 0; }
            .header-content {
                height: 56px;
                flex-direction: row;
                gap: 0;
                padding: 0 14px;
            }

            /* Row wrappers collapse to contents on mobile */
            .header-row1 { display: contents !important; }
            .header-row2 { display: contents !important; }

            #logoSvg { width: 160px; height: 41px; }

            /* Hide business name pill on mobile */
            .biz-pill { display: none !important; }

            /* Hide user name / role on mobile */
            #userInfo { display: none !important; }
            .header-v-divider { display: none !important; }

            /* Hide "Logout" text on mobile — icon only */
            .logout-btn-label { display: none; }
            .logout-btn {
                width: 34px;
                height: 34px;
                padding: 0;
            }

            /* MyoMind — icon only, matching height */
            .myomind-logo-link {
                height: 34px;
                padding: 0 8px;
                opacity: 0.88;
            }
            .mm-logo-text { display: none; }

            .header-right { gap: 8px; }

            /* Tab bar: scrollable, compact */
            .nav-tabs {
                margin-bottom: 16px;
                padding: 6px;
                gap: 4px;
                border-radius: 12px;
            }
            .tab {
                flex: 0 0 auto;
                padding: 10px 14px;
                font-size: 0.6875rem;
                gap: 5px;
                white-space: nowrap;
                min-width: 0;
            }
            .tab svg {
                width: 15px;
                height: 15px;
            }
            /* Hide tab label text on very small screens, show icon only */
            .tab span {
                display: inline;
            }

        @media (max-width: 900px) and (min-width: 601px) {
            .nav-grid { grid-template-columns: repeat(2, 1fr); }
        }

            /* Landing page */
            .landing-page {
                padding: 30px 16px;
                min-height: calc(100vh - 140px);
                overflow-y: auto;
                align-items: flex-start;
                padding-top: 40px;
            }
            .landing-welcome {
                font-size: 1.25rem;
            }
            .landing-name {
                font-size: 1.625rem;
            }
            .landing-subtitle {
                font-size: 0.8125rem;
                margin-bottom: 30px;
            }
            .nav-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }
            .nav-card { padding: 22px 14px 18px; }
            .nav-card {
                padding: 20px 14px 18px;
                border-radius: 12px;
            }
            .nav-card-icon {
                width: 40px;
                height: 40px;
                margin-bottom: 10px;
            }
            .nav-card-icon svg {
                width: 20px;
                height: 20px;
            }
            .nav-card-label {
                font-size: 0.875rem;
                margin-bottom: 4px;
            }
            .nav-card-desc {
                font-size: 0.75rem;
                line-height: 1.4;
            }

            /* Container */
            .container {
                padding: 16px 12px;
            }

            /* Cards */
            .card {
                padding: 20px;
                border-radius: 12px;
            }

            /* Main grid (clients form + list) */
            .main-grid {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
            }

            /* Form grids — handled per-component via cf-row-* mobile breakpoints */

            /* Session items */
            .session-item {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 8px;
            }

            /* Back home button */

            /* Settings */
            .settings-section h3 {
                font-size: 1.0625rem;
            }
        }

        /* — Larger phones (421px–600px): show full MyoMind logo in row 2 — */
        @media (min-width: 421px) and (max-width: 600px) {
            .mm-logo-text { display: block; }   /* restore text on phones ≥421px */
        }

        /* — Extra small (< 400px) — */
        @media (max-width: 400px) {
            .nav-grid {
                grid-template-columns: 1fr;
            }
            .tab span {
                display: none;
            }
            .tab {
                padding: 10px 12px;
            }
            .landing-name {
                font-size: 1.375rem;
            }
            .landing-welcome {
                font-size: 1.125rem;
            }
        }

        /* ── MOBILE SPACING & OVERFLOW FIXES ── */
        @media (max-width: 900px) {
            body, html { overflow-x: hidden; }
            .container, .tab-content { max-width: 100%; overflow-x: hidden; }
            .calendar-header { padding: 14px 12px; flex-wrap: wrap; gap: 10px; }
            .calendar-title { font-size: 1.125rem; letter-spacing: 0; white-space: nowrap; }
            .calendar-nav-btn { width: 32px; height: 32px; font-size: 1rem; border-radius: 8px; }
            .calendar-controls { gap: 6px; flex-wrap: wrap; }
            .view-toggle-btn { padding: 6px 10px; font-size: 0.6875rem; }
            .today-btn { padding: 6px 12px; font-size: 0.6875rem; }
            .calendar-body { flex-direction: column; min-height: auto; }
            .teacher-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 10px 0; }
            .teacher-filter-item { padding: 8px 12px; gap: 8px; display: inline-flex; border-left: none; }
            .teacher-avatar { width: 28px; height: 28px; font-size: 0.6875rem; }
            .calendar-grid-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
            .calendar-grid.week-view { min-width: 600px; }
            .calendar-legend { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
            .calendar-event { padding: 3px 5px; font-size: 0.625rem; }
            .session-detail-content { padding: 16px; max-width: 100%; margin: 10px; border-radius: 12px; }
            .session-detail-actions { flex-wrap: wrap; gap: 8px; }
            .session-detail-actions .btn-primary,
            .session-detail-actions .btn-secondary,
            .session-detail-actions .btn-cancel-session { flex: 0 0 calc(50% - 4px); padding: 10px 8px; font-size: 0.6875rem; text-align: center; min-width: 0; white-space: nowrap; }
            .severity-selector { flex-wrap: wrap; gap: 6px; }
            .severity-btn { padding: 6px 12px; font-size: 0.6875rem; }
            .body-chart-views { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; padding: 10px; }
            .note-body-chart { grid-template-columns: repeat(2, 1fr) !important; }
            .notes-layout { grid-template-columns: 1fr !important; }
            /* Stack notes history search + date fields on mobile */
            .notes-filter-row { grid-template-columns: 1fr !important; }
            .notes-client-date-row { grid-template-columns: 1fr !important; }
            .quick-book-modal .modal-content,
            .invoice-modal .modal-content { max-width: 100% !important; margin: 10px; padding: 16px; }
        }
        @media (max-width: 480px) {
            .calendar-title { font-size: 1rem; }
            .calendar-header { padding: 10px 8px; }
            .session-detail-actions .btn-primary,
            .session-detail-actions .btn-secondary,
            .session-detail-actions .btn-cancel-session { flex: 0 0 100%; font-size: 0.75rem; }
            .session-detail-content { padding: 12px; margin: 6px; }
            .body-chart-views { grid-template-columns: 1fr !important; }
            .note-body-chart { grid-template-columns: 1fr !important; }
            .severity-btn { flex: 1 1 auto; text-align: center; }
        }

        /* ===== Toast Notifications ===== */
        .toast-container {
            position: fixed; bottom: 24px; right: 24px; z-index: 99999;
            display: flex; flex-direction: column-reverse; gap: 8px;
            pointer-events: none; max-width: 420px;
        }
        .toast {
            pointer-events: auto;
            display: flex; align-items: flex-start; gap: 10px;
            padding: 14px 18px; border-radius: 12px;
            background: var(--card); color: var(--text);
            border: 1px solid var(--border);
            box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
            font-size: 0.8125rem; line-height: 1.5;
            transform: translateX(120%); opacity: 0;
            animation: toastIn 0.35s cubic-bezier(0.21,1.02,0.73,1) forwards;
            max-width: 420px; word-break: break-word;
        }
        .toast.removing {
            animation: toastOut 0.25s ease forwards;
        }
        .toast-icon {
            flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
            display: flex; align-items: center; justify-content: center; margin-top: 1px;
        }
        .toast.success .toast-icon { background: #E8F3F0; color: #2D6B5E; }
        .toast.error .toast-icon { background: #FFEBE3; color: #DC4F41; }
        .toast.warning .toast-icon { background: #FFF3E0; color: #B8860B; }
        .toast.info .toast-icon { background: #E8EEF3; color: #3A6B8C; }
        .toast-body { flex: 1; }
        .toast-close {
            flex-shrink: 0; background: none; border: none; cursor: pointer;
            color: var(--text-light); padding: 2px; border-radius: 4px; margin: -2px -4px 0 0;
            opacity: 0.5; transition: opacity 0.15s;
        }
        .toast-close:hover { opacity: 1; }
        .toast-progress {
            position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 0 0 12px 12px;
            background: var(--sage); animation: toastProgress linear forwards;
        }
        .toast.error .toast-progress { background: var(--error); }
        .toast.warning .toast-progress { background: var(--warning); }
        @keyframes toastIn { to { transform: translateX(0); opacity: 1; } }
        @keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
        @keyframes toastProgress { from { width: 100%; } to { width: 0%; } }
        @media (max-width: 600px) {
            .toast-container { left: 12px; right: 12px; bottom: 80px; max-width: none; }
        }

