:root {
    color-scheme: dark;
    --bg: #090b10;
    --sidebar: rgba(13, 16, 23, 0.85);
    --panel: rgba(16, 19, 27, 0.65);
    --panel-soft: rgba(26, 30, 40, 0.65);
    --line: rgba(255, 255, 255, 0.08);
    --ink: #f8fafc;
    --muted: #8792ad;
    --lime: #c7ff22;
    --lime-dark: #9fd21c;
    --teal: #42dba5;
    --orange: #ff9548;
    --danger: #ff4d5d;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f1f5f9;
    --sidebar: #ffffff;
    --panel: #ffffff;
    --panel-soft: #e2e8f0;
    --line: #cbd5e1;
    --ink: #1e293b;
    --muted: #475569;
    --lime: #65a30d;
    --lime-dark: #4d7c0f;
    --teal: #059669;
    --orange: #d97706;
    --danger: #dc2626;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Plan Card Glow */
.plan-card-glow {
    border: 1px solid color-mix(in srgb, var(--lime) 15%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--lime) 5%, transparent);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.plan-card-glow:hover {
    box-shadow: 0 0 30px color-mix(in srgb, var(--lime) 25%, transparent);
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--lime) 40%, transparent);
}

/* Hover Lift Animation for static cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Theme toggle button */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover {
    color: var(--lime);
    border-color: var(--lime);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

body.app-body {
    background: url('images/dashboard.jp') no-repeat center center fixed;
    background-size: cover;
}

body.app-body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    z-index: -1;
    pointer-events: none;
}

.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
}

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

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }


a {
    color: inherit;
}

.app-frame {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}
@media (min-width: 981px) {
    .app-frame {
        grid-template-columns: 225px minmax(0, 1fr);
    }
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-right: 1px solid var(--line);
    background: var(--sidebar);
    padding: 22px 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .02em;
    text-decoration: none;
}

.brand-mark {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--lime);
    color: #11140b;
    font-size: 18px;
}

.role-switch,
input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
}

.role-switch {
    color: var(--muted);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    accent-color: var(--lime);
    cursor: pointer;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.side-nav::-webkit-scrollbar {
    width: 4px;
}

.side-nav::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 4px;
}

.side-nav a,
.sidebar-bottom a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    border-radius: 8px;
    color: var(--muted);
    padding: 9px 10px;
    text-decoration: none;
}

.side-nav a span.nav-icon,
.sidebar-bottom a span.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.side-nav a span.nav-icon svg,
.sidebar-bottom a span.nav-icon svg {
    display: block;
    flex-shrink: 0;
}

.side-nav a.active,
.side-nav a:hover,
.sidebar-bottom a:hover {
    background: var(--lime);
    color: #080b0d;
    font-weight: 800;
}

.sidebar-bottom {
    display: grid;
    gap: 4px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.main-area {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    padding: 14px 24px;
    backdrop-filter: blur(12px);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar h1 {
    margin: 0;
    font-size: 21px;
}

.topbar p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.menu-button,
.notif {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip strong,
.user-chip small {
    display: block;
}

.user-chip small {
    color: var(--muted);
}

.avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(199, 255, 34, .35);
    border-radius: 50%;
    background: rgba(199, 255, 34, .18);
    color: var(--lime);
    font-size: 12px;
    font-weight: 900;
}

.avatar.small {
    width: 32px;
    height: 32px;
}

.shell {
    width: min(1308px, calc(100% - 48px));
    margin: 24px auto 56px;
}

.auth-body {
    background:
        linear-gradient(90deg, rgba(9, 11, 16, .92), rgba(9, 11, 16, .55)),
        url("https://images.unsplash.com/photo-1534438327276-14e5300c3a48?auto=format&fit=crop&w=1400&q=80") center/cover fixed;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    align-items: center;
}

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 28px;
}

.auth > div:first-child {
    padding: 32px;
}

.auth h1 {
    max-width: 750px;
    margin: 0;
    font-size: clamp(40px, 7vw, 78px);
    line-height: .95;
}

.auth p {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.panel,
.metric,
.mini-card,
.review-card,
.dash-stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.panel {
    margin-top: 18px;
    padding: 22px;
}

.panel h1,
.panel h2,
.panel h3 {
    margin-top: 0;
}

.dash-grid {
    display: grid;
    gap: 16px;
}

.stats-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chart-row {
    grid-template-columns: minmax(0, 1.55fr) minmax(min(100%, 320px), 1fr);
    margin-top: 24px;
}

.lower-row {
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
}

.dash-stat {
    min-height: 164px;
    padding: 20px;
}

.dash-stat.featured {
    background: var(--lime);
    color: #080b0d;
    border-color: var(--lime);
}

.stat-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.featured .stat-head {
    color: rgba(8, 11, 13, .68);
}

.stat-head i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--lime) 15%, transparent);
    color: var(--lime);
    font-style: normal;
    letter-spacing: 0;
}

.stat-head i svg {
    width: 18px;
    height: 18px;
}

.featured .stat-head i {
    background: rgba(8, 11, 13, .12);
    color: #080b0d;
}

.dash-stat strong {
    display: block;
    margin-top: 18px;
    font-size: 32px;
    line-height: 1;
}

.dash-stat p {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.dash-stat.featured p,
.dash-stat.featured em {
    color: rgba(8, 11, 13, .72);
}

.dash-stat em {
    color: #2df0a5;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.dash-stat em.trend-down {
    color: var(--danger);
}

.dash-stat.featured em.trend-down {
    color: #b91c1c; /* darker red for better contrast on the lime background */
}

.chart-panel {
    min-height: 308px;
    overflow: hidden;
}

.chart-canvas {
    position: relative;
    height: 250px;
    margin-top: 18px;
}

.chart-canvas.compact {
    height: 250px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.panel-title h2 {
    margin: 0;
    font-size: 20px;
}

.panel-title p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.panel-title span {
    align-self: start;
    border-radius: 999px;
    background: rgba(45, 240, 165, .11);
    color: #2df0a5;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.panel-title span.trend-down-bg {
    background: rgba(239, 68, 68, 0.11);
    color: var(--danger);
}

.list-stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.class-row,
.checkin-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 13px 12px;
}

.class-row {
    grid-template-columns: 10px 1fr auto 52px;
}

.checkin-row {
    grid-template-columns: 36px 1fr auto;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
}

.class-row:nth-child(2) .dot {
    background: var(--teal);
}

.class-row:nth-child(3) .dot {
    background: var(--orange);
}

.class-row small,
.checkin-row small,
.checkin-row time,
.class-row b small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.class-row b {
    text-align: right;
    font-size: 12px;
}

.class-row i {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(135, 146, 173, .22);
}

.class-row i span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--lime);
}

.class-row:nth-child(2) i span {
    background: var(--teal);
}

.class-row:nth-child(3) i span {
    background: var(--orange);
}

.form {
    display: grid;
    gap: 14px;
}

.grid-form,
.inline-form {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    align-items: end;
}

.full-width {
    grid-column: 1 / -1;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 12px;
    margin-top: 8px;
}

label,
fieldset {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
}

textarea {
    min-height: 74px;
    resize: vertical;
}

button,
.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    background: var(--lime);
    color: #080b0d;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 9px 14px;
    text-decoration: none;
}

button:hover,
.button-link:hover {
    background: var(--lime-dark);
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

/* Button Variants */
button.btn-sm,
.button-link.btn-sm,
a.btn-sm {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

button.btn-primary,
.button-link.btn-primary,
a.btn-primary {
    background: var(--lime);
    color: #080b0d;
    border: 1px solid transparent;
}

button.btn-secondary,
.button-link.btn-secondary,
a.btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

button.btn-secondary:hover,
.button-link.btn-secondary:hover,
a.btn-secondary:hover {
    background: var(--panel-soft);
    color: var(--ink);
}

button.btn-ghost,
.button-link.btn-ghost,
a.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

button.btn-ghost:hover,
.button-link.btn-ghost:hover,
a.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 14px;
    margin-top: 16px;
}

.metric {
    padding: 18px;
}

.metric span,
.muted {
    color: var(--muted);
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 14px;
}

.mini-card,
.review-card {
    padding: 16px;
}

.review-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.review-card h3 {
    grid-column: 1 / -1;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
}

.table-wrap, .table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 10;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

tr:hover td {
    background: rgba(255, 255, 255, .015);
}

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

.flash {
    border: 1px solid rgba(199, 255, 34, .28);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(199, 255, 34, .12);
    color: var(--lime);
}

.flash.danger {
    border-color: rgba(255, 77, 93, .32);
    background: rgba(255, 77, 93, .1);
    color: var(--danger);
}

code {
    background: #1c202a;
    border-radius: 4px;
    color: var(--lime);
    padding: 2px 5px;
}

@media (max-width: 980px) {
    .app-frame,
    .auth,
    .stats-row,
    .chart-row,
    .lower-row,
    .dash-grid,
    .split {
        grid-template-columns: 1fr !important;
    }

    /* Mobile slide-in drawer */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        width: 240px;
        z-index: 300;
        transition: left 0.25s ease;
        overflow-y: auto;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.4);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 299;
    }
    .sidebar-overlay.open {
        display: block;
    }
    .main-area {
        width: 100%;
    }

    .side-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 24px, 1308px);
        margin-top: 14px;
    }

    .topbar {
        gap: 12px;
        padding: 10px 16px;
    }
    
    .topbar-title {
        gap: 12px;
    }
    
    .user-chip .user-details {
        display: none;
    }

    .class-row {
        grid-template-columns: 10px 1fr;
    }

    .class-row b,
    .class-row i {
        grid-column: 2;
    }
}

/* =====================================================
   UX UTILITIES
   ===================================================== */

/* ---- Status / role badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-active,
.badge-paid,
.badge-finalized,
.badge-booked {
    background: rgba(45, 240, 165, .1);
    color: #2df0a5;
}

.badge-pending,
.badge-system_generated,
.badge-lightly_active,
.badge-moderately_active {
    background: rgba(255, 149, 72, .1);
    color: var(--orange);
}

.badge-expired,
.badge-ended,
.badge-cancelled,
.badge-overdue,
.badge-refunded,
.badge-inactive,
.badge-suspended {
    background: rgba(255, 77, 93, .1);
    color: var(--danger);
}

/* Role badges */
.badge-admin    { background: rgba(199,255,34,.1);  color: var(--lime); }
.badge-staff    { background: rgba(66,219,165,.1);  color: var(--teal); }
.badge-coach    { background: rgba(255,149,72,.1);  color: var(--orange); }
.badge-customer { background: rgba(135,146,173,.1); color: var(--muted); }

/* ---- Page header (title + description) ---- */
.page-header {
    margin-bottom: 20px;
}

.page-header h1,
.page-header h2 {
    margin: 0 0 4px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

/* ---- Form card (tinted form area inside a panel) ---- */
.form-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px 20px;
    margin-bottom: 24px;
}

.form-card h2,
.form-card h3 {
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---- Section divider label ---- */
.section-label {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* ---- User cell (avatar + name in table) ---- */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell .avatar {
    flex-shrink: 0;
}

.user-cell-info small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

/* ---- Capacity bar ---- */
.cap-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cap-track {
    flex: 1;
    min-width: 60px;
    height: 5px;
    border-radius: 999px;
    background: rgba(135, 146, 173, .18);
    overflow: hidden;
}

.cap-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--lime);
    transition: width .4s;
}

.cap-fill.warn { background: var(--orange); }
.cap-fill.full { background: var(--danger); }

.cap-label {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---- Empty state ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 52px 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state svg {
    opacity: .25;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* ---- Button variants ---- */
.btn-danger {
    background: rgba(255, 77, 93, .1);
    color: var(--danger);
    border: 1px solid rgba(255, 77, 93, .25);
}

.btn-danger:hover {
    background: rgba(255, 77, 93, .22);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    background: var(--panel-soft);
    color: var(--ink);
}

.btn-sm {
    min-height: 30px;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* ---- Class booking cards ---- */
.class-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    margin-top: 4px;
}

.class-book-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color .2s;
}

.class-book-card:hover {
    border-color: rgba(199, 255, 34, .3);
}

.class-book-card h3 {
    margin: 0;
    font-size: 16px;
}

.class-book-card .class-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.class-book-card .class-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.class-book-card .class-meta-row svg {
    flex-shrink: 0;
    opacity: .6;
}

.class-book-card footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* ---- Info grid (key/value pairs) ---- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-item span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.info-item strong {
    font-size: 14px;
}

/* ---- Modal (Dialog) ---- */
dialog.modal {
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

dialog.modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

dialog.modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
}

dialog.modal .modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

dialog.modal .modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--ink);
}

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

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

@media (min-width: 981px) {
    .app-frame {
        transition: grid-template-columns 0.3s ease;
    }
    .app-frame.collapsed {
        grid-template-columns: 80px minmax(0, 1fr);
    }
    .app-frame.collapsed .nav-label,
    .app-frame.collapsed .brand > span:not(.brand-mark),
    .app-frame.collapsed .role-switch,
    .app-frame.collapsed .role-badge {
        display: none;
    }
    .app-frame.collapsed .brand {
        justify-content: center;
        padding: 0;
    }
    .app-frame.collapsed .side-nav a,
    .app-frame.collapsed .sidebar-bottom a {
        justify-content: center;
        padding: 9px 0;
    }
}

/* ---- Class booking cards (member view) ---- */
.class-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 16px;
}

.cc-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-category {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 1px solid;
    border-radius: 4px;
    padding: 2px 8px;
}

.cc-full {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255,77,93,.12);
    color: var(--danger);
    border-radius: 4px;
    padding: 2px 8px;
}

.cc-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.cc-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.cc-capacity {
    margin-top: auto;
    padding-top: 8px;
}

.cc-cap-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}

.cc-cap-nums {
    font-weight: 800;
    color: var(--ink);
}

.cc-bar-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(135,146,173,.18);
    overflow: hidden;
}

.cc-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width .4s ease;
}

.cc-book-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.cc-book-btn:hover:not(:disabled) {
    background: var(--lime);
    border-color: var(--lime);
    color: #080b0d;
}

.cc-book-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* =====================================================
   AUTH FORM (PREMIUM MODERN AESTHETIC)
   ===================================================== */
.auth-body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(39, 242, 70, 0.05), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(39, 152, 47, 0.05), transparent 40%);
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 48px;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-title {
    font-family: 'Bricolage Grotesque', Inter, sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--ink), var(--lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.auth-subtitle {
    color: var(--muted);
    font-style: italic;
    font-size: 14px;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-group svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.auth-input-group input,
.auth-input-group select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 12px 12px 40px;
    color: var(--ink);
    font-size: 14px;
}
.auth-input-group input:focus,
.auth-input-group select:focus {
    border-color: var(--lime);
    outline: none;
}
.auth-input-group select {
    appearance: none;
}

.auth-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr));
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
}
.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--lime) 0%, #7da615 100%);
    color: #080b0d;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.auth-submit-btn svg {
    width: 18px;
    height: 18px;
}
.auth-submit-btn:hover {
    filter: brightness(1.1);
}

.auth-form-footer {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}
.auth-form-footer a {
    color: var(--lime);
    text-decoration: none;
    font-weight: 700;
}
.auth-form-footer a:hover {
    text-decoration: underline;
}

/* Role badge (replaces non-functional role-switch dropdown) */
.role-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 8px;
    margin: 4px 0 8px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.page-link, .page-current, .page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: var(--ink);
    border: 0.5px solid var(--line);
    background: var(--panel-soft);
}
.page-current {
    background: var(--lime);
    color: #000;
    border-color: var(--lime);
    font-weight: 700;
}
.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.page-ellipsis {
    border: none;
    background: transparent;
    color: var(--muted);
    min-width: 20px;
}
.page-link:hover:not(.disabled) {
    background: var(--panel);
    border-color: var(--lime);
    color: var(--lime);
}

/* Ensure tables scroll horizontally on mobile */
.table-wrap, .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap table, .table-container table {
    min-width: 540px;
}

/* Small-phone breakpoint */
@media (max-width: 400px) {
    .shell {
        width: 100%;
        padding: 0 10px;
    }
    .topbar {
        padding: 10px 12px;
    }
    .panel {
        padding: 1rem;
    }
    .class-card-grid {
        grid-template-columns: 1fr;
    }
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

/* Notifications */
.notif-wrap {
    position: relative;
}

.notif-bell {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    color: var(--ink);
    cursor: pointer;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--lime);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0d1017;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

[data-theme="light"] .notif-dropdown {
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
    .notif-dropdown {
        position: fixed;
        top: 74px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 90px);
        border-radius: 14px;
    }
}

.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #0d1017;
    position: sticky;
    top: 0;
    z-index: 2;
}

[data-theme="light"] .notif-dropdown-head {
    background: #ffffff;
}

.notif-mark-all {
    margin: 0;
}

.notif-mark-all button {
    border: 0;
    background: transparent;
    color: var(--lime);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.notif-mark-all button:hover:not(:disabled):not(.is-disabled) {
    background: rgba(199, 255, 34, 0.12);
}

.notif-mark-all button:disabled,
.notif-mark-all button.is-disabled {
    color: var(--muted);
    opacity: 0.55;
    cursor: default;
}

.notif-item-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px;
}

.notif-single-action {
    margin: 0;
}

.notif-mark-read-btn {
    border: 1px solid rgba(199, 255, 34, 0.3);
    background: rgba(199, 255, 34, 0.12);
    color: var(--lime);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notif-mark-read-btn:hover {
    background: var(--lime);
    color: #000;
    border-color: var(--lime);
}

.notif-read-status {
    font-size: 11px;
    color: var(--muted);
    opacity: 0.6;
    font-weight: 500;
}

.notif-empty {
    padding: 18px 14px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.notif-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notif-menu li {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.notif-menu li.unread {
    background: rgba(199, 255, 34, .06);
}

.notif-menu-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--muted);
}

.notif-menu strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.notif-menu p {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}

.notif-menu-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    padding: 4px 6px;
    margin: -4px -6px 2px;
    transition: background 0.2s;
    cursor: pointer;
}

.notif-menu-link:hover {
    background: rgba(199, 255, 34, .1);
}

.notif-view-all {
    display: block;
    padding: 12px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid var(--line);
}

.notif-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.notif-type-system { background: rgba(56, 189, 248, .15); color: #38bdf8; }
.notif-type-coach_message { background: rgba(167, 139, 250, .15); color: #a78bfa; }
.notif-type-class_reminder { background: rgba(255, 149, 72, .15); color: #ff9548; }
.notif-type-renewal_reminder { background: rgba(255, 77, 93, .15); color: #ff4d5d; }
.notif-type-milestone { background: rgba(199, 255, 34, .15); color: var(--lime); }

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

.notif-item {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.notif-item.unread {
    border-color: rgba(199, 255, 34, .35);
}

.notif-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--muted);
}

.notif-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.notif-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.notif-item-action {
    margin: 10px 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON LOADING SYSTEM
   ═══════════════════════════════════════════════════════════════ */

@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* Base skeleton bone */
.sk {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.04) 80%
    );
    background-size: 400px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
    pointer-events: none;
}

[data-theme="light"] .sk {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.10) 40%,
        rgba(0, 0, 0, 0.06) 80%
    );
    background-size: 400px 100%;
}

/* Shape variants */
.sk-text {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.sk-text.short { width: 45%; }
.sk-text.medium { width: 65%; }
.sk-text.full { width: 100%; }

.sk-title {
    height: 22px;
    width: 50%;
    margin-bottom: 12px;
}

.sk-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sk-circle.lg {
    width: 64px;
    height: 64px;
}

.sk-rect {
    height: 100px;
    width: 100%;
}

.sk-rect.stat {
    height: 164px;
    border-radius: 10px;
}

.sk-rect.chart {
    height: 250px;
    border-radius: 10px;
}

.sk-rect.banner {
    height: 110px;
    border-radius: 12px;
}

/* Skeleton card */
.sk-card {
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 22px;
    overflow: hidden;
}

/* Skeleton table row */
.sk-table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}

.sk-table-row .sk-cell {
    height: 14px;
    border-radius: 4px;
    flex: 1;
}

.sk-table-row .sk-cell.narrow { flex: 0.5; }
.sk-table-row .sk-cell.wide   { flex: 1.5; }

/* Skeleton list item (avatar + text) */
.sk-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 12px;
    border-radius: 8px;
    background: var(--panel-soft);
}

.sk-list-item-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Chat-specific skeletons */
.sk-chat-bubble {
    padding: 14px 18px;
    border-radius: 14px;
    max-width: 65%;
}

.sk-chat-bubble.left {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.sk-chat-bubble.right {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Card grid skeleton */
.sk-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}

/* Notification skeleton item */
.sk-notif-item {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

/* ── Visibility Toggle ─────────────────────────────────────── */

.skeleton-wrapper {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Fitness Loader Animation */
.fitness-loader {
    animation: dumbbellLift 1.5s ease-in-out infinite;
}
.fitness-loader.mini {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}
@keyframes dumbbellLift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(15deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-15deg); }
}

.skeleton-content {
    display: none;
    opacity: 0;
}

body.loaded .skeleton-wrapper {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

body.loaded .skeleton-content {
    display: block;
    opacity: 1;
    animation: skeletonFadeIn 0.3s ease forwards;
}

/* Grid/flex containers need display restoration */
body.loaded .skeleton-content.sk-display-grid {
    display: grid;
}

body.loaded .skeleton-content.sk-display-flex {
    display: flex;
}

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

/* Stagger animation delays for multiple skeleton-content blocks */
.skeleton-content.sk-delay-1 { animation-delay: 0.05s; }
.skeleton-content.sk-delay-2 { animation-delay: 0.10s; }
.skeleton-content.sk-delay-3 { animation-delay: 0.15s; }
.skeleton-content.sk-delay-4 { animation-delay: 0.20s; }

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sticky Table Headers */
.table-wrap th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

/* UI/UX Utility Additions */

/* 1. Macro Ring & Bar Visualizers */
.macro-visualizer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.macro-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .2s ease, border-color .2s ease;
}
.macro-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.macro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}
.macro-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.macro-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Interactive Goal Selection Cards */
.goal-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 16px;
    margin: 20px 0;
}
.goal-card-option {
    position: relative;
    background: var(--panel-bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}
.goal-card-option:hover {
    border-color: var(--lime);
    background: rgba(199, 255, 34, 0.03);
    transform: translateY(-3px);
}
.goal-card-option.selected {
    border-color: var(--lime);
    background: rgba(199, 255, 34, 0.08);
    box-shadow: 0 0 20px rgba(199, 255, 34, 0.15);
}
.goal-card-option input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
    accent-color: var(--lime);
}
.goal-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(199, 255, 34, 0.1);
    color: var(--lime);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Password Toggle Wrapper */
.pwd-toggle-wrap {
    position: relative;
    width: 100%;
}
.pwd-toggle-wrap input {
    width: 100%;
    padding-right: 42px !important;
}
.pwd-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s;
}
.pwd-toggle-btn:hover {
    color: var(--ink);
}

/* 4. KPI Trend Badges */
.kpi-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.kpi-trend-up {
    background: rgba(66, 219, 165, 0.15);
    color: #42dba5;
    border: 1px solid rgba(66, 219, 165, 0.3);
}
.kpi-trend-down {
    background: rgba(255, 77, 93, 0.15);
    color: #ff4d5d;
    border: 1px solid rgba(255, 77, 93, 0.3);
}

/* 5. Chart Time Range Filter Buttons */
.time-range-group {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.time-range-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.time-range-btn:hover {
    color: var(--ink);
}
.time-range-btn.active {
    background: var(--lime);
    color: #000;
}

/* 6. Dropdown Action Menu in Tables */
.action-dropdown-wrap {
    position: relative;
    display: inline-block;
}
.action-dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--ink);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
}
.action-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}
.action-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    min-width: 150px;
    z-index: 100;
    display: none;
    flex-direction: column;
    padding: 4px 0;
}
.action-dropdown-wrap:focus-within .action-dropdown-menu,
.action-dropdown-menu.show {
    display: flex;
}
.action-dropdown-menu a, .action-dropdown-menu button {
    padding: 8px 14px;
    text-align: left;
    color: var(--ink);
    font-size: 13px;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.action-dropdown-menu a:hover, .action-dropdown-menu button:hover {
    background: rgba(199, 255, 34, 0.1);
    color: var(--lime);
}

/* Announcement Carousel */
.announcement-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 24px;
}
.announcement-slides {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}
.announcement-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 20px 24px 35px 24px;
    box-sizing: border-box;
}
.announcement-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.announcement-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    transition: background 0.3s;
}
.announcement-dot.active {
    background: var(--lime);
}

/* Messages Layout */
.msg-container {
    display: flex;
    padding: 0;
    height: calc(100vh - 120px);
    min-height: 500px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
}
.msg-sidebar {
    width: 300px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    background: var(--surface);
}
.msg-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    min-width: 0;
}
.mobile-back-btn {
    display: none;
    color: var(--muted);
    text-decoration: none;
    padding-right: 8px;
}
.mobile-back-btn:hover {
    color: var(--ink);
}

@media (max-width: 768px) {
    .msg-container {
        height: calc(100vh - 90px);
    }
    .msg-sidebar {
        width: 100%;
        border-right: none;
    }
    
    /* When a chat is active, hide sidebar */
    .msg-container.has-active-chat .msg-sidebar {
        display: none !important;
    }
    
    /* When NO chat is active, hide main chat */
    .msg-container:not(.has-active-chat) .msg-main {
        display: none !important;
    }
    
    /* Show back button in chat header */
    .mobile-back-btn {
        display: flex;
        align-items: center;
    }
    
    /* Responsive headers */
    .page-header,
    .panel-title {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }
    
    .page-header h1,
    .page-header h2,
    .panel-title h1,
    .panel-title h2 {
        line-height: 1.2;
    }
    
    /* Prevent button groups from overflowing */
    .page-header > div:last-child,
    .panel-title > div:last-child {
        flex-wrap: wrap;
        width: 100%;
        margin-top: 4px;
    }
}

/* Workout Player Modal */
.workout-player-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.player-container {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 24px;
    width: 100%; max-width: 500px;
    height: 80vh; max-height: 700px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.player-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,0.1); border: none;
    color: var(--ink); font-size: 24px;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.player-close:hover { background: rgba(255,255,255,0.2); }
.player-progress-bar {
    height: 6px; width: 100%;
    background: rgba(255,255,255,0.1);
}
.progress-fill {
    height: 100%; background: var(--lime);
    transition: width 0.3s ease;
}
.player-content {
    padding: 40px 30px;
    flex: 1; display: flex; flex-direction: column;
    overflow-y: auto;
}
.player-pill {
    background: rgba(199,255,34,0.15); color: var(--lime);
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold;
    text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; margin-bottom: 16px;
}
.timer-ring {
    width: 150px; height: 150px; border-radius: 50%;
    border: 8px solid rgba(199,255,34,0.2);
    border-top-color: var(--lime);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    font-size: 48px; font-weight: bold; color: var(--ink);
    animation: spin 2s linear infinite;
}
.timer-ring span { animation: spin-reverse 2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }
.player-btn-primary {
    background: var(--lime); color: var(--bg);
    border: none; padding: 16px 0; width: 100%;
    border-radius: 12px; font-size: 18px; font-weight: bold; cursor: pointer;
    box-shadow: 0 4px 16px rgba(199,255,34,0.3); transition: transform 0.2s;
}
.player-btn-primary:active { transform: scale(0.98); }
.player-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.player-btn-secondary {
    background: transparent; color: var(--muted);
    border: 1px solid var(--line); padding: 12px 24px;
    border-radius: 12px; font-size: 16px; font-weight: bold; cursor: pointer;
}

