/* ========================================
   COLOR PALETTE & CSS VARIABLES
   ======================================== */

:root {
    --sidebar-width: 13.25rem;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --sidebar-active-bg: #eef4ff;
    --sidebar-active-text: #2563eb;
    --sidebar-hover-bg: #f8fafc;
    --sidebar-muted-text: #374151;
    
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --card-shadow: rgba(15, 23, 42, 0.04);
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;
    
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    
    --brand-gradient-start: #ffffff;
    --brand-gradient-end: #f8fafc;
}

:root.dark {
    --sidebar-bg: #1f2937;
    --sidebar-border: #374151;
    --sidebar-active-bg: #1e3a8a;
    --sidebar-active-text: #93c5fd;
    --sidebar-hover-bg: #2d3748;
    --sidebar-muted-text: #d1d5db;
    
    --card-bg: #1f2937;
    --card-border: #374151;
    --card-shadow: rgba(0, 0, 0, 0.3);
    
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #10b981;
    --accent-red: #f87171;
    
    --brand-gradient-start: #1e293b;
    --brand-gradient-end: #0f172a;
}

.fi-theme-switcher .fi-theme-switcher-btn:nth-child(3) {
    display: none;
}

/* ========================================
   SIDEBAR
   ======================================== */

.fi-sidebar {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    background-color: var(--sidebar-bg) !important;
    border-inline-end: 2px solid var(--sidebar-border);
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    overflow: hidden !important;
    z-index: 60;
}

.fi-sidebar-nav {
    box-shadow: -1px 1px 10px 0 rgba(15, 23, 42, 0.16);
    background: linear-gradient(180deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
    margin-top: 0 !important;
    padding-top: 4.25rem !important;
    height: 100%;
    overflow: hidden !important;
    position: relative;
    transition: background 0.3s ease;
}

.fi-sidebar-nav::before {
    content: 'FutureFit';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.fi-sidebar-nav::after {
    content: 'Super Admin';
    position: absolute;
    top: 2.7rem;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.fi-topbar {
    z-index: 30;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
}

.fi-topbar .fi-logo,
.fi-topbar .fi-brand {
    display: none !important;
}

.fi-sidebar-item-button {
    border-radius: 0.7rem;
    color: var(--sidebar-muted-text) !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-weight: 500;
}

.fi-sidebar-item-button:hover {
    background-color: var(--sidebar-hover-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--sidebar-border);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-button,
.fi-sidebar-item-button.fi-active {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    border-color: #dbeafe;
    box-shadow: 0 6px 14px -12px rgba(37, 99, 235, 0.7);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-sidebar-item-button.fi-active .fi-sidebar-item-icon {
    color: var(--accent-blue) !important;
}

.fi-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    background-color: var(--brand-gradient-end);
}

@media (max-width: 1024px) {
    .fi-main,
    .fi-topbar {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
}

/* Let nested Filament / Livewire page roots shrink inside flex layouts (prevents horizontal clip) */
.fi-main > * {
    min-width: 0;
    box-sizing: border-box;
}

/* ========================================
   CARDS & COMPONENTS
   ======================================== */

.futurefit-card,
.fi-wi-chart .fi-section,
.fi-wi-stats-overview-stat {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.futurefit-stat-card {
    border: 1px solid var(--card-border) !important;
    border-radius: 14px !important;
    background: var(--card-bg) !important;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.futurefit-stat-card .fi-wi-stats-overview-stat-description {
    color: var(--accent-green) !important;
}

.futurefit-stat-card--green .fi-wi-stats-overview-stat-description {
    color: var(--accent-green) !important;
}

.futurefit-stat-card--red .fi-wi-stats-overview-stat-description {
    color: var(--accent-red) !important;
}

.fi-page-header-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.fi-page-header-subheading {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* ========================================
   TABLE & LIST STYLES
   ======================================== */

.fi-ta-ctn {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.fi-ta-table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
}

.fi-btn-color-primary {
    background: var(--accent-blue) !important;
}

.fi-btn-color-primary:hover {
    background: var(--accent-blue-hover) !important;
}

/* ========================================
   ANALYTICS MODULE
   ======================================== */

.analytics-layout {
    display: grid;
    gap: 1.5rem;
}

.analytics-card {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.analytics-section-title {
    font-size: 2.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.analytics-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.analytics-filter-card {
    padding: 0.7rem 1rem;
}

.analytics-filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.analytics-select {
    height: 2.4rem;
    border: 1px solid var(--card-border);
    border-radius: 0.625rem;
    background: var(--card-bg);
    padding: 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.analytics-select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.analytics-grid-two {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-comparison-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    align-items: center;
    gap: 1rem;
}

.analytics-comparison-list {
    padding-top: 1rem;
    display: grid;
    gap: 1rem;
}

.analytics-school-name {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.analytics-bar-track {
    height: 2.5rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--accent-blue) 10%, transparent);
    transition: background 0.3s ease;
}

.analytics-svg {
    width: 100%;
    height: 260px;
    display: block;
}

.futurefit-inline-icon {
    display: block;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.futurefit-inline-icon-sm {
    width: 1.25rem;
    height: 1.25rem;
}

.analytics-trend-wrap {
    padding-top: 1rem;
}

.analytics-month-labels {
    margin-top: 0.5rem;
    display: grid;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 0.6rem;
    background: var(--accent-blue);
    transition: background 0.3s ease;
}

.analytics-heat-grid {
    padding-top: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analytics-heat {
    border-radius: 0.7rem;
    padding: 1.1rem 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    transition: background 0.3s ease;
}

.analytics-heat--green {
    background: var(--accent-green);
}

.analytics-heat--amber {
    background: #eab308;
}

.analytics-heat--red {
    background: var(--accent-red);
}

.analytics-heat-label {
    margin-top: 0.45rem;
    margin-bottom: 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.analytics-top-list {
    padding-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.analytics-top-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.7rem;
    transition: border-color 0.3s ease;
}

.analytics-top-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.analytics-rank-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    transition: background 0.3s ease;
}

.analytics-top-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.analytics-top-metrics {
    text-align: right;
}

.analytics-top-score {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.analytics-top-delta {
    margin: 0;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.analytics-top-delta.is-positive {
    color: var(--accent-green);
}

.analytics-top-delta.is-negative {
    color: var(--accent-red);
}

@media (max-width: 1280px) {
    .analytics-grid-two {
        grid-template-columns: 1fr;
    }

    .analytics-heat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .analytics-comparison-row {
        grid-template-columns: 1fr;
    }

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

/* ========================================
   REPORTS MODULE
   ======================================== */

.reports-layout {
    display: grid;
    gap: 1.25rem;
}

.reports-filter-card {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.reports-filters {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.reports-filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.reports-select {
    height: 2.25rem;
    border: 1px solid var(--card-border);
    border-radius: 0.55rem;
    background: var(--card-bg);
    padding: 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.reports-select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

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

.reports-card {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.reports-card-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
}

.reports-card-icon {
    font-size: 1.55rem;
    line-height: 1;
}

.reports-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.reports-card-desc {
    margin: 0.25rem 0 0;
    font-size: 0.92rem;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.reports-card-count {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    transition: color 0.3s ease;
}

.reports-card-actions {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.reports-btn {
    height: 2.1rem;
    border-radius: 0.55rem;
    border: 1px solid var(--card-border);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reports-btn-preview {
    background: var(--card-bg);
    color: var(--text-primary);
}

.reports-btn-preview:hover {
    background: var(--sidebar-hover-bg);
}

.reports-btn-download {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.reports-btn-download:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
}

.reports-recent-card {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.reports-recent-title {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.reports-recent-list {
    display: grid;
    gap: 0.85rem;
}

.reports-recent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.65rem;
    transition: border-color 0.3s ease;
}

.reports-recent-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.reports-recent-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.reports-recent-date {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.reports-recent-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.reports-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 1.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-blue) 15%, transparent);
    color: var(--accent-blue);
    font-size: 0.72rem;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease;
}

.reports-download-icon {
    border: 0;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.reports-download-icon:hover {
    color: var(--accent-blue);
}

@media (max-width: 1280px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SETTINGS MODULE
   ======================================== */

.settings-layout {
    display: grid;
    gap: 1rem;
}

.settings-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-blue) 10%, var(--card-bg)) 0%, var(--card-bg) 72%);
    box-shadow: 0 3px 12px var(--card-shadow);
}

.settings-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

.settings-hero-title {
    margin: 0.25rem 0 0;
    font-size: 1.7rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.settings-hero-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.settings-hero-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.3rem;
    padding: 0 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.settings-btn-primary {
    color: #fff;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.settings-btn-primary:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
}

.settings-btn-secondary {
    color: var(--text-primary);
    background: var(--card-bg);
    border-color: var(--card-border);
}

.settings-btn-secondary:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 30%, var(--card-border));
    background: color-mix(in srgb, var(--accent-blue) 8%, var(--card-bg));
}

.settings-stats-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-stat-card {
    border: 1px solid var(--card-border);
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--card-shadow);
}

.settings-stat-card.is-warning {
    border-color: color-mix(in srgb, var(--accent-red) 55%, var(--card-border));
}

.settings-stat-label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.settings-stat-value {
    margin: 0.35rem 0 0;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-grid-two {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-panel {
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 2px 8px var(--card-shadow);
}

.settings-panel-info {
    background: color-mix(in srgb, var(--accent-blue) 5%, var(--card-bg));
}

.settings-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-action-list {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.55rem;
}

.settings-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--card-border);
    border-radius: 0.7rem;
    padding: 0.7rem 0.8rem;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-action-item:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 35%, var(--card-border));
    background: color-mix(in srgb, var(--accent-blue) 7%, var(--card-bg));
}

.settings-action-arrow {
    color: var(--text-tertiary);
}

.settings-guide-list {
    margin: 0.8rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.settings-note {
    margin: 0.9rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.86rem;
    color: var(--text-tertiary);
}

@media (max-width: 1100px) {
    .settings-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .settings-hero {
        grid-template-columns: 1fr;
    }

    .settings-hero-actions {
        justify-content: flex-start;
    }

    .settings-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DASHBOARD RECENT CHILDREN MODULE
   ======================================== */

.dashboard-recent-children {
    display: grid;
    gap: 0.8rem;
}

.dashboard-recent-children-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid var(--card-border);
    border-radius: 0.85rem;
    background: var(--card-bg);
    padding: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-recent-children-row:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 45%, var(--card-border));
    box-shadow: 0 6px 18px -14px rgba(37, 99, 235, 0.65);
}

.dashboard-recent-children-main {
    min-width: 0;
}

.dashboard-recent-children-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.dashboard-recent-children-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-recent-children-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.14rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
}

.dashboard-recent-children-meta {
    margin: 0.1rem 0 0;
    font-size: 0.79rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-recent-children-footer {
    margin-top: 0.48rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.dashboard-recent-children-batch {
    display: inline-flex;
    align-items: center;
    border-radius: 0.45rem;
    padding: 0.14rem 0.45rem;
    background: color-mix(in srgb, var(--accent-green) 16%, transparent);
    color: var(--accent-green);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-recent-children-time {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-recent-children-view {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    color: var(--text-tertiary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dashboard-recent-children-view:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

@media (max-width: 768px) {
    .dashboard-recent-children-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-recent-children-time {
        white-space: normal;
    }
}
}

.analytics-top-list {
    padding-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.analytics-top-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f0f3f8;
    padding-bottom: 0.7rem;
}

.analytics-top-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.analytics-rank-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.analytics-top-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.analytics-top-metrics {
    text-align: right;
}

.analytics-top-score {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.analytics-top-delta {
    margin: 0;
    font-size: 0.85rem;
}

.analytics-top-delta.is-positive {
    color: #16a34a;
}

.analytics-top-delta.is-negative {
    color: #dc2626;
}

@media (max-width: 1280px) {
    .analytics-grid-two {
        grid-template-columns: 1fr;
    }

    .analytics-heat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .analytics-comparison-row {
        grid-template-columns: 1fr;
    }

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

/* Reports module */
.reports-layout {
    display: grid;
    gap: 1.25rem;
}

.reports-filter-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.reports-filters {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.reports-filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.reports-select {
    height: 2.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.55rem;
    background: #fff;
    padding: 0 0.75rem;
    font-size: 0.9rem;
    color: #111827;
}

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

.reports-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.reports-card-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
}

.reports-card-icon {
    font-size: 1.55rem;
    line-height: 1;
}

.reports-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.reports-card-desc {
    margin: 0.25rem 0 0;
    font-size: 0.92rem;
    color: #6b7280;
}

.reports-card-count {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    color: #2563eb;
    font-weight: 600;
}

.reports-card-actions {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.reports-btn {
    height: 2.1rem;
    border-radius: 0.55rem;
    border: 1px solid #e5e7eb;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.reports-btn-preview {
    background: #fff;
    color: #111827;
}

.reports-btn-download {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.reports-recent-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.reports-recent-title {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
}

.reports-recent-list {
    display: grid;
    gap: 0.85rem;
}

.reports-recent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.65rem;
}

.reports-recent-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.reports-recent-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.reports-recent-date {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    color: #6b7280;
}

.reports-recent-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.reports-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #e8f0ff;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 700;
}

.reports-download-icon {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 1280px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

/* Staff assessment Livewire page: stay within main column (pairs with .fi-main width fix) */
.futurefit-staff-assessment,
.futurefit-staff-assessment section {
    max-width: 100%;
}

.futurefit-staff-assessment .grid {
    min-width: 0;
}

/* ========================================
   TIMETABLE & CALENDAR MANAGEMENT
   ======================================== */

[x-cloak] {
    display: none !important;
}

.ff-timetable {
    color: #111827;
}

.ff-timetable-toolbar {
    position: sticky;
    top: 0.75rem;
    z-index: 25;
    display: grid;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem;
    box-shadow: 0 12px 30px -26px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
}

.ff-toolbar-title p {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 750;
    color: #0f172a;
}

.ff-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.ff-input,
.ff-select {
    min-height: 2.65rem;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    padding: 0 0.85rem;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ff-input:focus,
.ff-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.ff-search {
    width: min(18rem, 100%);
}

.ff-search-wrap {
    flex: 1 1 14rem;
}

.ff-view-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.25rem;
}

.ff-toolbar-btn {
    min-height: 2.15rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    padding: 0 0.7rem;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ff-toolbar-btn:hover,
.ff-toolbar-btn.is-active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 8px 18px -16px rgba(15, 23, 42, 0.65);
}

.ff-add-session,
.ff-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.65rem;
    border: 1px solid #2563eb;
    border-radius: 13px;
    background: #2563eb;
    color: #ffffff;
    padding: 0 1rem;
    font-size: 0.92rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 20px -18px rgba(37, 99, 235, 0.75);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ff-add-session:hover,
.ff-primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 18px 28px -22px rgba(37, 99, 235, 0.8);
}

.ff-timetable-shell {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(18rem, 1fr);
    gap: 1.1rem;
    margin-top: 1.1rem;
}

.ff-calendar-card,
.ff-side-card,
.ff-session-drawer {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px -26px rgba(15, 23, 42, 0.45);
}

.ff-calendar-card {
    min-width: 0;
    overflow: hidden;
    padding: 1rem;
}

.ff-calendar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.ff-kicker {
    margin: 0;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ff-calendar-head h2,
.ff-drawer-header h2 {
    margin: 0.15rem 0 0;
    color: #0f172a;
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: 800;
}

.ff-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: 34rem;
}

.ff-legend-item {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    border-radius: 999px;
    padding: 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.ff-legend-coach { background: #dbeafe; color: #1d4ed8; }
.ff-legend-physio { background: #dcfce7; color: #15803d; }
.ff-legend-nutrition { background: #ffedd5; color: #c2410c; }
.ff-legend-psychologist { background: #f3e8ff; color: #7e22ce; }
.ff-legend-yoga { background: #cffafe; color: #0e7490; }
.ff-legend-assessment { background: #fee2e2; color: #b91c1c; }
.ff-legend-attendance { background: #fef9c3; color: #a16207; }

.ff-fullcalendar {
    min-height: 43rem;
}

.ff-mini-calendar {
    min-height: 26rem;
}

.ff-fullcalendar .fc,
.ff-mini-calendar .fc {
    color: #0f172a;
}

.ff-fullcalendar .fc-theme-standard td,
.ff-fullcalendar .fc-theme-standard th,
.ff-mini-calendar .fc-theme-standard td,
.ff-mini-calendar .fc-theme-standard th {
    border-color: #edf1f7;
}

.ff-fullcalendar .fc-scrollgrid,
.ff-mini-calendar .fc-scrollgrid {
    border: 1px solid #edf1f7;
    border-radius: 16px;
    overflow: hidden;
}

.ff-fullcalendar .fc-col-header-cell,
.ff-mini-calendar .fc-col-header-cell {
    background: #f8fafc;
    height: 3rem;
    vertical-align: middle;
}

.ff-fullcalendar .fc-col-header-cell-cushion,
.ff-mini-calendar .fc-col-header-cell-cushion {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.ff-fullcalendar .fc-timegrid-slot,
.ff-mini-calendar .fc-timegrid-slot {
    height: 4.1rem;
}

.ff-mini-calendar .fc-timegrid-slot {
    height: 2.9rem;
}

.ff-fullcalendar .fc-timegrid-slot-label,
.ff-mini-calendar .fc-timegrid-slot-label {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
}

.ff-fullcalendar .fc-event,
.ff-mini-calendar .fc-event {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.ff-session-card {
    display: grid;
    gap: 0.2rem;
    height: 100%;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    padding: 0.65rem;
    color: #0f172a;
    box-shadow: 0 10px 18px -18px rgba(15, 23, 42, 0.55);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ff-mini-calendar .ff-session-card {
    border-radius: 10px;
    padding: 0.45rem;
}

.ff-session-card:hover {
    transform: scale(1.015);
    box-shadow: 0 18px 34px -24px rgba(15, 23, 42, 0.7);
}

.ff-session-title {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 850;
}

.ff-session-meta,
.ff-session-time,
.ff-session-room {
    margin: 0;
    color: #334155;
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 650;
}

.ff-session-coach { background: #dbeafe; }
.ff-session-physio { background: #dcfce7; }
.ff-session-nutrition { background: #ffedd5; }
.ff-session-psychologist { background: #f3e8ff; }
.ff-session-yoga { background: #cffafe; }
.ff-session-assessment { background: #fee2e2; }
.ff-session-attendance { background: #fef9c3; }

.ff-timetable-sidebar {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.ff-side-card {
    padding: 1rem;
}

.ff-side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.ff-side-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 800;
}

.ff-batch-name {
    margin: 0 0 0.8rem;
    font-size: 1.15rem;
    font-weight: 850;
    color: #111827;
}

.ff-batch-summary dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
}

.ff-batch-summary dl div {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.65rem;
}

.ff-batch-summary dt {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.ff-batch-summary dd {
    margin: 0.2rem 0 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 850;
}

.ff-staff-list,
.ff-today-list,
.ff-conflict-list {
    display: grid;
    gap: 0.55rem;
}

.ff-staff-list div,
.ff-today-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.55rem;
}

.ff-sidebar-button {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.ff-sidebar-button:hover strong {
    color: #1d4ed8;
}

.ff-staff-list div:last-child,
.ff-today-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ff-staff-list span,
.ff-today-row span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 750;
}

.ff-staff-list strong,
.ff-today-row strong {
    color: #111827;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: right;
}

.ff-danger-badge,
.ff-conflict-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.74rem;
    font-weight: 850;
}

.ff-danger-badge {
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
}

.ff-conflict-pill {
    min-height: 1.8rem;
    padding: 0 0.65rem;
}

.ff-empty-note {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
}

.ff-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15, 23, 42, 0.28);
}

.ff-session-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(480px, 100vw);
    height: 100vh;
    border-radius: 18px 0 0 18px;
    overflow: auto;
}

.ff-drawer-form {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.ff-drawer-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    padding: 1.25rem;
}

.ff-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 1.25rem;
    cursor: pointer;
}

.ff-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1.25rem;
}

.ff-form-grid label {
    display: grid;
    gap: 0.4rem;
}

.ff-form-grid label > span {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 800;
}

.ff-form-grid small {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 700;
}

.ff-readonly-grid {
    align-content: start;
}

.ff-readonly-field {
    display: grid;
    gap: 0.4rem;
    border: 1px solid #eef2f7;
    border-radius: 13px;
    background: #f8fafc;
    padding: 0.85rem;
}

.ff-readonly-field span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.ff-readonly-field strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.35;
    font-weight: 850;
}

.ff-readonly-field p {
    margin: 0;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 600;
}

.ff-form-grid textarea.ff-input {
    min-height: 7rem;
    padding-top: 0.75rem;
    resize: vertical;
}

.ff-form-full,
.ff-toggle-row {
    grid-column: 1 / -1;
}

.ff-toggle-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 0.75rem 0.85rem;
}

.ff-toggle-row input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #2563eb;
}

.ff-drawer-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    border-top: 1px solid #eef2f7;
    background: #ffffff;
    padding: 1rem 1.25rem;
}

.ff-secondary-btn {
    min-height: 2.55rem;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.ff-drawer-enter,
.ff-drawer-leave {
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.ff-drawer-enter-start,
.ff-drawer-leave-end {
    transform: translateX(100%);
    opacity: 0;
}

.ff-drawer-enter-end,
.ff-drawer-leave-start {
    transform: translateX(0);
    opacity: 1;
}

.ff-module-overview {
    display: grid;
    gap: 1rem;
}

.ff-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.ff-module-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 10px 30px -26px rgba(15, 23, 42, 0.45);
}

.ff-module-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

.ff-module-card p {
    margin: 0.45rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.ff-batch-tabs {
    display: grid;
    gap: 1rem;
}

.ff-batch-tab-panel {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 10px 30px -26px rgba(15, 23, 42, 0.45);
}

.ff-batch-tab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.ff-batch-tab-stat {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.85rem;
}

.ff-batch-tab-stat span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
}

.ff-batch-tab-stat strong {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 850;
}

@media (max-width: 1280px) {
    .ff-timetable-shell {
        grid-template-columns: 1fr;
    }

    .ff-timetable-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ff-calendar-head {
        grid-template-columns: 1fr;
    }

    .ff-calendar-legend {
        justify-content: flex-start;
    }
}

@media (max-width: 820px) {
    .ff-timetable-toolbar {
        top: 0.25rem;
    }

    .ff-toolbar-controls,
    .ff-view-actions {
        width: 100%;
    }

    .ff-select,
    .ff-search,
    .ff-add-session {
        width: 100%;
    }

    .ff-view-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ff-timetable-sidebar,
    .ff-module-grid,
    .ff-batch-tab-grid {
        grid-template-columns: 1fr;
    }

    .ff-form-grid {
        grid-template-columns: 1fr;
    }

    .ff-fullcalendar {
        min-height: 36rem;
    }
}

/* ========================================
   STAFF PANEL PREMIUM SHELL
   ======================================== */

body.fi-panel-staff {
    --sidebar-width: 17rem;
    --staff-ink: #111827;
    --staff-muted: #64748b;
    --staff-line: #e5e7eb;
    --staff-blue: #2563eb;
    --staff-violet: #7c3aed;
    --staff-teal: #0f766e;
    --staff-amber: #d97706;
    background: #f7f9fc;
}

body.fi-panel-staff .fi-topbar {
    position: sticky;
    top: 0;
    z-index: 55;
    height: 72px;
    min-height: 72px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 42px -34px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.fi-panel-staff .fi-topbar > .fi-topbar-start,
body.fi-panel-staff .fi-topbar > .fi-topbar-end,
body.fi-panel-staff .fi-topbar > .fi-topbar-open-sidebar-btn,
body.fi-panel-staff .fi-topbar > .fi-topbar-close-sidebar-btn {
    display: none !important;
}

body.fi-panel-admin .fi-topbar > .fi-topbar-start,
body.fi-panel-admin .fi-topbar > .fi-topbar-end,
body.fi-panel-admin .fi-topbar > .fi-topbar-open-sidebar-btn,
body.fi-panel-admin .fi-topbar > .fi-topbar-close-sidebar-btn {
    display: none !important;
}

body.fi-panel-staff .ff-staff-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    height: 72px;
    padding: 0 1.2rem;
}

body.fi-panel-admin .ff-staff-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    height: 72px;
    padding: 0 1.2rem;
}

.ff-staff-mobile-menu {
    border: 0;
    cursor: pointer;
}

.ff-staff-mobile-menu {
    display: none;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    align-items: center;
    justify-content: center;
}

.ff-staff-mobile-menu svg,
.ff-staff-sidebar-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ff-staff-crumbs {
    min-width: 0;
}

.ff-staff-crumb-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-staff-crumb-line a,
.ff-staff-crumb-line strong {
    color: var(--staff-ink);
    font-weight: 800;
    text-decoration: none;
}

.ff-staff-crumb-line strong:nth-of-type(1) {
    position: relative;
    color: var(--staff-blue);
    padding-left: 0.65rem;
}

.ff-staff-crumb-line strong:nth-of-type(1)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 999px;
    background: #cbd5e1;
    transform: translateY(-50%);
}

.ff-staff-crumbs p {
    margin: 0.28rem 0 0;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 700;
}

.ff-staff-profile,
.ff-staff-sidebar-footer-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ff-staff-profile {
    height: 2.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    padding: 0.24rem 0.7rem 0.24rem 0.24rem;
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.7);
}

.ff-staff-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 52%, #7c3aed 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.ff-staff-profile-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.ff-staff-profile-copy strong {
    max-width: 9rem;
    color: var(--staff-ink);
    font-size: 0.82rem;
    line-height: 1.05;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-role-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 1.15rem;
    border-radius: 999px;
    padding: 0 0.45rem;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.58rem;
    line-height: 1;
    font-style: normal;
    font-weight: 950;
}

.ff-role-physiotherapist {
    background: #dcfce7;
    color: #15803d;
}

.ff-role-coach,
.ff-role-head-coach {
    background: #dbeafe;
    color: #1d4ed8;
}

body.fi-panel-staff .fi-sidebar,
body.fi-panel-admin .fi-sidebar {
    display: flex !important;
    flex-direction: column;
    border-inline-end: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff !important;
    box-shadow: 18px 0 45px -40px rgba(15, 23, 42, 0.55);
}

body.fi-panel-staff .fi-sidebar-header-ctn,
body.fi-panel-admin .fi-sidebar-header-ctn {
    border-bottom: 0;
}

body.fi-panel-staff .fi-sidebar-header,
body.fi-panel-admin .fi-sidebar-header {
    height: auto;
    padding: 0.95rem 0.85rem 0.45rem;
}

body.fi-panel-staff .fi-sidebar-header-logo-ctn,
body.fi-panel-admin .fi-sidebar-header-logo-ctn {
    display: block !important;
    padding: 0;
}

body.fi-panel-staff .fi-sidebar-nav,
body.fi-panel-admin .fi-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.55rem 0.85rem 0.45rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable;
}

body.fi-panel-staff .fi-sidebar-nav::before,
body.fi-panel-staff .fi-sidebar-nav::after,
body.fi-panel-admin .fi-sidebar-nav::before,
body.fi-panel-admin .fi-sidebar-nav::after {
    content: none !important;
}

body.fi-panel-staff .fi-sidebar-nav-groups,
body.fi-panel-admin .fi-sidebar-nav-groups,
body.fi-panel-staff .fi-sidebar-group-items,
body.fi-panel-admin .fi-sidebar-group-items {
    display: grid;
    gap: 0.38rem;
}

.ff-staff-sidebar-brand {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.72rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 0.78rem;
    box-shadow: 0 16px 36px -32px rgba(15, 23, 42, 0.7);
    font-family: var(--font-sans);
    font-synthesis: none;
    font-optical-sizing: none;
}

.ff-staff-sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    color: #ffffff;
}

.ff-staff-sidebar-brand p,
.ff-staff-sidebar-brand strong,
.ff-staff-sidebar-brand span {
    display: block;
    margin: 0;
    font-family: var(--font-sans);
    font-synthesis: none;
    font-optical-sizing: none;
}

.ff-staff-sidebar-brand p {
    color: var(--staff-ink);
    font-size: 1.5rem;
    line-height: 1.05;
    font-weight: 800;
}

.ff-staff-sidebar-brand strong {
    margin-top: 0.1rem;
    color: var(--staff-blue);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    font-weight: 950;
}

.ff-staff-sidebar-brand span {
    margin-top: 0.28rem;
    color: var(--staff-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.ff-staff-sidebar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding: 0 0.12rem;
}

body.fi-panel-staff .fi-sidebar-header,
body.fi-panel-admin .fi-sidebar-header {
    overflow: visible !important;
}

body.fi-panel-staff .fi-sidebar-header > *,
body.fi-panel-admin .fi-sidebar-header > * {
    overflow: visible !important;
}

.ff-online-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #16a34a;
    font-size: 0.72rem;
    font-weight: 800;
}

.ff-online-dot::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.ff-online-dot::after {
    content: 'Online';
}

body.fi-panel-staff .fi-sidebar-item-button,
body.fi-panel-admin .fi-sidebar-item-button {
    position: relative;
    min-height: 2.48rem;
    border-radius: 0.75rem;
    padding-inline: 0.78rem !important;
    gap: 0.7rem;
    color: #475569 !important;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 750;
    transform: translateX(0);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.fi-panel-staff .fi-sidebar-item-icon,
body.fi-panel-admin .fi-sidebar-item-icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
    flex: 0 0 1.1rem;
}

body.fi-panel-staff .fi-sidebar-item-button:hover,
body.fi-panel-admin .fi-sidebar-item-button:hover {
    transform: translateX(3px);
    border-color: #dbeafe;
    background: #f1f6ff !important;
    color: #1d4ed8 !important;
}

body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-button,
body.fi-panel-staff .fi-sidebar-item-button.fi-active,
body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-button,
body.fi-panel-admin .fi-sidebar-item-button.fi-active {
    border-color: #dbeafe;
    background: #eef4ff !important;
    color: #2563eb !important;
    box-shadow: 0 10px 24px -20px rgba(37, 99, 235, 0.8);
}

body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-button::before,
body.fi-panel-staff .fi-sidebar-item-button.fi-active::before,
body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-button::before,
body.fi-panel-admin .fi-sidebar-item-button.fi-active::before {
    content: '';
    position: absolute;
    left: -0.55rem;
    top: 0.48rem;
    bottom: 0.48rem;
    width: 0.2rem;
    border-radius: 999px;
    background: #0f766e;
}

body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
body.fi-panel-staff .fi-sidebar-item-button.fi-active .fi-sidebar-item-icon,
body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
body.fi-panel-admin .fi-sidebar-item-button.fi-active .fi-sidebar-item-icon {
    color: #2563eb !important;
}

html.dark body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
html.dark body.fi-panel-staff .fi-sidebar-item-button.fi-active .fi-sidebar-item-icon,
html.dark body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
html.dark body.fi-panel-admin .fi-sidebar-item-button.fi-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}
html.dark .ff-staff-profile {
    background: #1e293b;
    border-color: #334155;
}
html.dark body.fi-panel-staff,
html.dark body.fi-panel-admin {
    --staff-ink: #f8fafc;
    --staff-muted: #94a3b8;
    --staff-line: #334155;
}

html.dark body.fi-panel-staff .fi-sidebar,
html.dark body.fi-panel-admin .fi-sidebar {
    background: #0f172a !important;
    border-inline-end-color: #334155 !important;
    box-shadow: 18px 0 45px -40px rgba(0, 0, 0, 0.95);
}

html.dark body.fi-panel-staff .fi-sidebar-header,
html.dark body.fi-panel-admin .fi-sidebar-header {
    background: #0f172a !important;
}

html.dark body.fi-panel-staff .fi-sidebar-nav,
html.dark body.fi-panel-admin .fi-sidebar-nav {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
    box-shadow: none !important;
}

html.dark body.fi-panel-staff .fi-sidebar-nav::before,
html.dark body.fi-panel-admin .fi-sidebar-nav::before {
    color: #f8fafc;
}

html.dark body.fi-panel-staff .fi-sidebar-nav::after,
html.dark body.fi-panel-admin .fi-sidebar-nav::after {
    color: #94a3b8;
}

html.dark body.fi-panel-staff .fi-sidebar-item-button,
html.dark body.fi-panel-admin .fi-sidebar-item-button {
    color: #cbd5e1 !important;
}

html.dark body.fi-panel-staff .fi-sidebar-item-button:hover,
html.dark body.fi-panel-admin .fi-sidebar-item-button:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155;
}

html.dark body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-button,
html.dark body.fi-panel-staff .fi-sidebar-item-button.fi-active,
html.dark body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-button,
html.dark body.fi-panel-admin .fi-sidebar-item-button.fi-active {
    border-color: #1d4ed8;
    background: #1e3a8a !important;
    color: #ffffff !important;
}

html.dark body.fi-panel-staff .fi-sidebar-item.fi-active .fi-sidebar-item-button::before,
html.dark body.fi-panel-staff .fi-sidebar-item-button.fi-active::before,
html.dark body.fi-panel-admin .fi-sidebar-item.fi-active .fi-sidebar-item-button::before,
html.dark body.fi-panel-admin .fi-sidebar-item-button.fi-active::before {
    background: #22d3ee;
}

html.dark body.fi-panel-staff .ff-staff-sidebar-brand,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card,
html.dark body.fi-panel-admin .ff-staff-sidebar-brand,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card {
    background: linear-gradient(145deg, #0f172a 0%, #111827 100%);
    border-color: #334155;
    box-shadow: 0 16px 36px -32px rgba(0, 0, 0, 0.9);
}

html.dark body.fi-panel-staff .ff-staff-sidebar-brand p,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card strong,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card em,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card small,
html.dark body.fi-panel-admin .ff-staff-sidebar-brand p,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card strong,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card em,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card small {
    color: #e2e8f0;
}

html.dark body.fi-panel-staff .ff-staff-sidebar-brand strong,
html.dark body.fi-panel-staff .ff-staff-sidebar-brand span,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card em,
html.dark body.fi-panel-staff .ff-staff-sidebar-footer-card small,
html.dark body.fi-panel-admin .ff-staff-sidebar-brand strong,
html.dark body.fi-panel-admin .ff-staff-sidebar-brand span,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card em,
html.dark body.fi-panel-admin .ff-staff-sidebar-footer-card small {
    color: #94a3b8;
}

.ff-staff-sidebar-footer-card {
    flex: 0 0 auto;
    margin: 0.45rem 0.85rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: #ffffff;
    padding: 0.72rem;
    box-shadow: 0 16px 34px -30px rgba(15, 23, 42, 0.72);
}

.ff-staff-sidebar-footer-card span:last-child {
    display: grid;
    min-width: 0;
}

.ff-staff-sidebar-footer-card strong {
    color: var(--staff-ink);
    font-size: 0.84rem;
    line-height: 1.1;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-staff-sidebar-footer-card em {
    margin-top: 0.15rem;
    color: var(--staff-muted);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-staff-sidebar-footer-card small {
    margin-top: 0.36rem;
    width: max-content;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    padding: 0.16rem 0.48rem;
    font-size: 0.68rem;
    font-weight: 900;
}

body.fi-panel-staff .fi-main {
    background: #f7f9fc;
    padding-top: 1rem;
}

html.dark body.fi-panel-staff .fi-main {
    background: #020617 !important;
}

html.dark body.fi-panel-staff .fi-page-main,
html.dark body.fi-panel-staff .fi-page-content {
    background: transparent;
}

html.dark body.fi-panel-staff .fi-page-header-main-ctn {
    background: transparent;
}

html.dark body.fi-panel-staff .fi-page,
html.dark body.fi-panel-staff .fi-page-main,
html.dark body.fi-panel-staff .fi-page-content,
html.dark body.fi-panel-staff .fi-main-ctn {
    background: #020617 !important;
}

html.dark body.fi-panel-staff .futurefit-card,
html.dark body.fi-panel-staff .fi-wi-chart .fi-section,
html.dark body.fi-panel-staff .fi-wi-stats-overview-stat,
html.dark body.fi-panel-staff .fi-section:not(.fi-section-not-contained):not(.fi-aside),
html.dark body.fi-panel-staff .fi-section:not(.fi-section-not-contained).fi-aside>.fi-section-content-ctn,
html.dark body.fi-panel-staff .fi-tabs:not(.fi-contained),
html.dark body.fi-panel-staff .fi-empty-state {
    background: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 18px 42px -34px rgba(0, 0, 0, 0.9) !important;
}

html.dark body.fi-panel-staff .fi-page-header-heading,
html.dark body.fi-panel-staff .fi-page-header-subheading,
html.dark body.fi-panel-staff .futurefit-card,
html.dark body.fi-panel-staff .fi-wi-stats-overview-stat,
html.dark body.fi-panel-staff .fi-section,
html.dark body.fi-panel-staff .fi-empty-state {
    color: #e2e8f0 !important;
}
html.dark .ff-staff-sidebar-footer-card small {
    background: #14532d;
    color: #86efac;
}
html.dark body.fi-panel-staff .fi-topbar,
html.dark body.fi-panel-admin .fi-topbar {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid #334155;
    box-shadow: 0 16px 42px -34px rgba(0, 0, 0, 0.9);
}

body.fi-panel-staff .fi-page-header-main-ctn {
    gap: 0;
    padding-top: 0;
    padding-bottom: 1rem;
}

body.fi-panel-staff .fi-header {
    display: none !important;
}

body.fi-panel-staff .fi-page-main {
    gap: 0;
}

body.fi-panel-staff .fi-page-content {
    gap: 1rem;
}

@media (max-width: 1280px) {
    body.fi-panel-staff .ff-staff-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .ff-staff-profile-copy strong {
        max-width: 7rem;
    }
}

@media (max-width: 1100px) {
    body.fi-panel-staff .ff-staff-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .ff-staff-mobile-menu {
        display: inline-flex;
    }

    .ff-staff-profile-copy {
        display: none;
    }

    .ff-staff-profile {
        padding-right: 0.24rem;
    }

}

@media (max-width: 720px) {
    body.fi-panel-staff .ff-staff-topbar {
        gap: 0.55rem;
        padding: 0 0.75rem;
    }

    .ff-staff-crumb-line {
        font-size: 0.76rem;
    }

    .ff-staff-crumbs p {
        display: none;
    }
}
