/* ═══════════════════════════════════════════════════════════════
   UNIFIED DESIGN SYSTEM v2
   WinClass Platform — Light Theme + Lime Green Brand
   Merged from: style.css + homework-modern.css
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --brand-lime:       #59ff3a;
    --brand-lime-rgb:   89, 255, 58;
    --brand-teal:       #46D2D2;
    --brand-teal-rgb:   70, 210, 210;
    --brand-purple:     #BF80FF;
    --brand-purple-rgb: 191, 128, 255;

    /* Neutrals */
    --text-primary:     #2d3748;
    --text-secondary:   #64748b;
    --text-muted:       #94a3b8;
    --bg-page:          #f8fafc;
    --bg-card:          #ffffff;
    --bg-subtle:        #f1f5f9;
    --border-color:     rgba(0, 0, 0, 0.06);
    --border-light:     rgba(0, 0, 0, 0.04);

    /* Semantic */
    --color-success:    #10b981;
    --color-danger:     #ef4444;
    --color-warning:    #f59e0b;
    --color-info:       #0ea5e9;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lime: 0 4px 16px rgba(89, 255, 58, 0.2);
    --shadow-teal: 0 4px 16px rgba(70, 210, 210, 0.2);

    /* Radii */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-pill: 24px;
    --radius-round: 50%;

    /* Typography Scale */
    --font-xs:    0.75rem;    /* 12px — labels, badges */
    --font-sm:    0.8125rem;  /* 13px — table cells, small text */
    --font-base:  0.9375rem;  /* 15px — body */
    --font-lg:    1.125rem;   /* 18px — subheadings */
    --font-xl:    1.5rem;     /* 24px — headings */
    --font-2xl:   2rem;       /* 32px — page titles */

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Glass-morphism */
    --glass-bg:     rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.35);

    /* Legacy compatibility aliases */
    --primary-color:   var(--brand-lime);
    --accent-color:    var(--brand-lime);
    --secondary-color: var(--brand-teal);
    --dark-color:      var(--text-primary);
    --gray-color:      var(--text-secondary);
    --white-color:     var(--bg-card);
    --light-color:     var(--bg-subtle);
    --hw-purple:       #7c3aed;
    --hw-purple-light: #a78bfa;
    --hw-purple-border:rgba(124, 58, 237, 0.25);
    --hw-purple-bg:    rgba(124, 58, 237, 0.06);
    --hw-green:        var(--color-success);
    --hw-blue:         var(--color-info);
    --hw-red:          var(--color-danger);
    --hw-orange:       var(--color-warning);
    --hw-glass:        var(--glass-bg);
    --hw-glass-border: var(--glass-border);
    --hw-radius:       14px;
    --hw-pill:         var(--radius-pill);
    --hw-transition:   var(--transition);
}


/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes hw-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hw-slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shine {
    to { background-position: 200% center; }
}
@keyframes badgePulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.15); }
}


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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: var(--font-base);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

h3 {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

a {
    color: var(--brand-teal);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--brand-lime);
}


/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-subtle);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-lime), var(--brand-teal));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brand-teal), var(--brand-purple));
}


/* ═══════════════════════════════════════════════════════════════
   NAVBAR — White with rainbow accent strip
   ═══════════════════════════════════════════════════════════════ */
.navbar {
    background: var(--bg-card) !important;
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1030;
}
/* Rainbow accent strip at bottom */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal), var(--brand-purple));
}

.navbar-brand {
    font-weight: 700;
    font-size: var(--font-lg);
    color: var(--text-primary) !important;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--brand-teal) !important;
}

.navbar-toggler {
    border-color: var(--border-color);
    padding: 4px 8px;
}
.navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}


/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — White with lime green accents
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 250px;
    height: calc(100vh - 24px);
    background-color: var(--bg-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 1050;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: #fff;
    border-radius: 20px 20px 0 0;
}
.sidebar .logo h4 {
    color: #fff; 
    font-weight: 800;
    margin: 0;
    -webkit-text-fill-color: initial;
    background: none;
}

.sidebar .sidebar-heading {
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 15px 20px 5px;
    font-weight: 700;
}

.sidebar .nav-link {
    color: var(--text-primary);
    padding: 10px 20px;
     font-size: var(--font-base); 
    font-weight: 500;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
    font-size: 1rem;
}
.sidebar .nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(var(--brand-lime-rgb), 0.06);
    border-left-color: rgba(var(--brand-lime-rgb), 0.3);
    transform: translateX(5px);
}
.sidebar .nav-link.active {
    color: var(--text-primary);
    background-color: rgba(var(--brand-lime-rgb), 0.1);
    border-left-color: var(--brand-lime);
    font-weight: 600;
}
.sidebar .nav-link.active i {
    color: var(--brand-lime);
}

/* Content wrapper */
.content-wrapper {
    margin-left: 274px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar collapsed state */
body.sidebar-collapsed .sidebar {
    left: -262px;
}
body.sidebar-collapsed .content-wrapper {
    margin-left: 0;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1060;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-round);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: var(--text-primary);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
}
.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lime);
}

/* Sidebar transition helpers */
.sidebar, .content-wrapper, .sidebar-toggle {
    transition: all 0.3s ease;
}

body.sidebar-active .content-wrapper {
    transform: translateX(250px);
}


/* ═══════════════════════════════════════════════════════════════
   CARDS — Light with optional glass-morphism
   ═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    background: transparent;
    border-bottom: 2px solid rgba(var(--brand-lime-rgb), 0.15);
    padding: 16px 20px;
    font-weight: 700;
    font-size: var(--font-base);
    color: var(--text-primary);
}
.card-body {
    padding: 20px;
}
.card-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Glass-morphism variant (homework pages) */
.card-glass,
.step-container .card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD STATS
   ═══════════════════════════════════════════════════════════════ */
.dashboard-stat {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.dashboard-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal), var(--brand-purple));
}
.dashboard-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.dashboard-stat i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dashboard-stat .stat-count {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.dashboard-stat .stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}


/* ═══════════════════════════════════════════════════════════════
   BUTTONS — Brand system + action gradients
   ═══════════════════════════════════════════════════════════════ */

/* Base button */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-sm);
    padding: 8px 18px;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Primary — Lime to Teal gradient */
.btn-primary,
.btn-info,
.card .btn-primary,
.card .btn-info,
.table .btn-primary,
.table .btn-info {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
}
.btn-primary:hover,
.btn-info:hover {
    box-shadow: var(--shadow-lime) !important;
}

/* Success — Green */
.btn-success {
    background: linear-gradient(135deg, #34d399, var(--color-success)) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* Warning — Green brand */
.btn-warning,
.card .btn-warning,
.table .btn-warning {
    background: linear-gradient(135deg, var(--brand-lime), #4DC247) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
}

/* Danger */
.btn-danger,
.card .btn-danger,
.table .btn-danger {
    background: linear-gradient(135deg, #f87171, var(--color-danger)) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* Secondary (outline / back) */
.btn-secondary {
    background: rgba(148, 163, 184, 0.08) !important;
    border: 2px solid rgba(148, 163, 184, 0.15) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    transition: var(--transition);
}
.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #475569 !important;
    transform: translateX(-2px) !important;
}

/* Outline variants */
.btn-outline-primary {
    border: 2px solid rgba(var(--brand-lime-rgb), 0.3);
    color: var(--text-primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: rgba(var(--brand-lime-rgb), 0.1);
    border-color: var(--brand-lime);
    color: var(--text-primary) !important;
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* Custom action buttons (legacy from style.css) */
.custom-btn {
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    margin: 0 2px;
    padding: 6px 10px;
}
.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.custom-btn-view {
    background: linear-gradient(135deg, var(--brand-teal), #38bdf8);
    color: #fff;
}
.custom-btn-view:hover {
    background: linear-gradient(135deg, #38bdf8, var(--brand-teal));
    color: #fff;
}
.custom-btn-edit {
    background: linear-gradient(135deg, #8EDC50, #4DC247);
    color: #fff;
}
.custom-btn-edit:hover {
    background: linear-gradient(135deg, #4DC247, #8EDC50);
    color: #fff;
}
.custom-btn-delete {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #fff;
}
.custom-btn-delete:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}
.table thead th {
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    font-size: var(--font-xs) !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid rgba(var(--brand-lime-rgb), 0.15) !important;
    padding: 10px 14px !important;
}
.table tbody tr {
    background: var(--bg-card) !important;
    border-radius: var(--hw-radius) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition);
}
.table tbody tr:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(var(--brand-lime-rgb), 0.08) !important;
}
.table tbody td {
    padding: 14px !important;
    border: none !important;
    vertical-align: middle !important;
    font-size: var(--font-sm);
}
.table tbody tr td:first-child {
    border-radius: var(--hw-radius) 0 0 var(--hw-radius) !important;
}
.table tbody tr td:last-child {
    border-radius: 0 var(--hw-radius) var(--hw-radius) 0 !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: transparent !important;
}
.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: transparent !important;
}
.table-responsive {
    border: 0;
}


/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
.form-control,
.form-select {
    border: 2px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    transition: var(--transition);
    font-size: var(--font-sm);
    color: var(--text-primary);
}
.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--brand-lime-rgb), 0.4) !important;
    box-shadow: 0 0 0 3px rgba(var(--brand-lime-rgb), 0.15) !important;
    background: #fff !important;
    outline: none;
}
.form-label {
    font-weight: 600 !important;
    font-size: var(--font-sm) !important;
    color: #475569 !important;
    margin-bottom: 5px !important;
}
textarea.form-control {
    min-height: 80px;
}


/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
    font-weight: 600 !important;
    font-size: var(--font-xs) !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    border: none !important;
    transition: var(--transition);
}
.badge.bg-primary   { background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important; color: var(--text-primary) !important; }
.badge.bg-secondary { background: linear-gradient(135deg, #a78bfa, #8b5cf6) !important; color: #fff !important; }
.badge.bg-success   { background: linear-gradient(135deg, #34d399, var(--color-success)) !important; color: #fff !important; }
.badge.bg-warning   { background: linear-gradient(135deg, #fbbf24, var(--color-warning)) !important; color: #78350f !important; }
.badge.bg-danger    { background: linear-gradient(135deg, #f87171, var(--color-danger)) !important; color: #fff !important; }
.badge.bg-info      { background: linear-gradient(135deg, #38bdf8, var(--color-info)) !important; color: #fff !important; }


/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
    border: none;
    border-left: 4px solid;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: var(--font-sm);
    animation: hw-fadeIn 0.3s ease;
}
.alert-success {
    background: rgba(16, 185, 129, 0.06);
    border-left-color: var(--color-success);
    color: #065f46;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.06);
    border-left-color: var(--color-danger);
    color: #991b1b;
}
.alert-info {
    background: rgba(14, 165, 233, 0.06);
    border-left-color: var(--color-info);
    color: #075985;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.06);
    border-left-color: var(--color-warning);
    color: #78350f;
}


/* ═══════════════════════════════════════════════════════════════
   TEXT HELPERS
   ═══════════════════════════════════════════════════════════════ */
.text-muted { color: var(--text-muted) !important; font-size: var(--font-sm); }


/* ═══════════════════════════════════════════════════════════════
   HOMEWORK WIZARD — Step Container
   ═══════════════════════════════════════════════════════════════ */
.step-container {
    animation: hw-fadeIn 0.35s ease;
}
.step-nav {
    display: flex;
    gap: 8px;
    padding: 16px;
    flex-wrap: wrap;
}
.step-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
}
.step-nav-btn.active {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: var(--shadow-lime);
}
.step-nav-btn .step-num {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-round);
    background: rgba(0, 0, 0, 0.08);
    font-size: var(--font-xs);
    font-weight: 700;
}
.step-nav-btn.active .step-num {
    background: rgba(255, 255, 255, 0.4);
}

/* Step content areas */
.step-content { padding: 16px; }
.step-pane { display: none; animation: hw-fadeIn 0.3s ease; }
.step-pane.active { display: block; }


/* ═══════════════════════════════════════════════════════════════
   PILL CHECKBOXES & RADIOS (Groups & Students)
   ═══════════════════════════════════════════════════════════════ */

/* Hide native inputs */
.step-container .form-check-input[type="checkbox"],
.step-container .form-check-input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* Pill labels */
.step-container .form-check-label,
#group-students-container .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(var(--brand-lime-rgb), 0.15);
    background: rgba(var(--brand-lime-rgb), 0.04);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}
.step-container .form-check-label:hover,
#group-students-container .form-check-label:hover {
    border-color: rgba(var(--brand-lime-rgb), 0.3);
    background: rgba(var(--brand-lime-rgb), 0.08);
    color: var(--text-primary);
}

/* Checked state */
.step-container .form-check-input:checked + .form-check-label,
#group-students-container .form-check-input:checked + .form-check-label {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: var(--shadow-lime);
    font-weight: 700;
}

/* Container layout */
#group-students-container,
#individual-students-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Individual students — smaller pills */
#individual-students-container .form-check-label {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: var(--font-xs);
}
#individual-students-container .form-check-input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}
#individual-students-container .form-check-input:checked + .form-check-label {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: var(--shadow-lime);
}


/* ═══════════════════════════════════════════════════════════════
   TRAINER CHIPS (Step 2)
   ═══════════════════════════════════════════════════════════════ */
.trainer-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.trainer-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.trainer-chip label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(var(--brand-teal-rgb), 0.15);
    background: rgba(var(--brand-teal-rgb), 0.04);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
}
.trainer-chip label:hover {
    border-color: rgba(var(--brand-teal-rgb), 0.3);
    background: rgba(var(--brand-teal-rgb), 0.08);
}
.trainer-chip input:checked + label {
    background: linear-gradient(135deg, var(--brand-teal), #2EB4D4);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-teal);
}


/* ═══════════════════════════════════════════════════════════════
   TRAINER PANELS — Compact settings (standard checkboxes)
   ═══════════════════════════════════════════════════════════════ */
#trainer-panels > .card > .card-body {
    padding: 10px 14px;
}
#trainer-panels .trainer-settings-form .row.g-3 {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
}
#trainer-panels .trainer-settings-form .col-md-4 {
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
    max-width: 220px;
}
#trainer-panels .trainer-settings-form .col-md-12 {
    width: 100%;
}

/* Selects & inputs inside trainer panels */
#trainer-panels .trainer-settings-form .form-select,
#trainer-panels .trainer-settings-form .form-control {
    padding: 5px 28px 5px 10px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background-color: #fff;
    min-height: 0;
    height: auto;
    width: 100%;
}
#trainer-panels .trainer-settings-form .form-select:focus,
#trainer-panels .trainer-settings-form .form-control:focus {
    border-color: rgba(var(--brand-lime-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--brand-lime-rgb), 0.1);
}

/* Labels */
#trainer-panels .trainer-settings-form .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

/* Dividers */
#trainer-panels .trainer-settings-form hr {
    margin: 10px 0;
    opacity: 0.06;
}

/* Section headings */
#trainer-panels .trainer-settings-form h6 {
    font-size: var(--font-sm);
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    margin-top: 0;
}

/* Flex gaps */
#trainer-panels .trainer-settings-form .d-flex.flex-wrap {
    gap: 6px 14px;
}
#trainer-panels .trainer-settings-form .mt-3 {
    margin-top: 10px;
}

/* Standard checkboxes (NOT pills) inside trainer panels */
#trainer-panels .trainer-settings-form .form-check {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
    padding-left: 0;
    min-height: 0;
}
#trainer-panels .trainer-settings-form .form-check-input {
    position: relative;
    opacity: 1;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    pointer-events: auto;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    accent-color: var(--brand-lime);
    border: 1.5px solid rgba(var(--brand-lime-rgb), 0.3);
}
#trainer-panels .trainer-settings-form .form-check-input:checked {
    border-color: var(--brand-lime);
}
#trainer-panels .trainer-settings-form .form-check-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    /* Reset pill styles for trainer panel labels */
    display: inline;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
#trainer-panels .trainer-settings-form .form-check-input:checked + .form-check-label {
    color: var(--text-primary);
    font-weight: 600;
    background: none;
    border: none;
    box-shadow: none;
}


/* ── Pill-стили для чекбоксов ЦИФР внутри trainer panels ── */
#trainer-panels .trainer-settings-form .digit-checkbox,
#trainer-panels .trainer-settings-form .first-digit,
#trainer-panels .trainer-settings-form .second-digit,
#trainer-panels .trainer-settings-form .single-digit,
#trainer-panels .trainer-settings-form [id$="digitAll"],
#trainer-panels .trainer-settings-form [id$="firstDigitAll"],
#trainer-panels .trainer-settings-form [id$="secondDigitAll"],
#trainer-panels .trainer-settings-form [id$="singleDigitAll"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#trainer-panels .trainer-settings-form .digit-checkbox + .form-check-label,
#trainer-panels .trainer-settings-form .first-digit + .form-check-label,
#trainer-panels .trainer-settings-form .second-digit + .form-check-label,
#trainer-panels .trainer-settings-form .single-digit + .form-check-label,
#trainer-panels .trainer-settings-form [id$="digitAll"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="firstDigitAll"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="secondDigitAll"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="singleDigitAll"] + .form-check-label {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-pill) !important;
    border: 2px solid rgba(var(--brand-lime-rgb), 0.15) !important;
    background: rgba(var(--brand-lime-rgb), 0.04) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: var(--font-sm) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

#trainer-panels .trainer-settings-form .digit-checkbox:checked + .form-check-label,
#trainer-panels .trainer-settings-form .first-digit:checked + .form-check-label,
#trainer-panels .trainer-settings-form .second-digit:checked + .form-check-label,
#trainer-panels .trainer-settings-form .single-digit:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="digitAll"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="firstDigitAll"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="secondDigitAll"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="singleDigitAll"]:checked + .form-check-label {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lime) !important;
    font-weight: 700 !important;
}


/* ── Pill-стили для чекбоксов ОЗВУЧКИ внутри trainer panels ── */
#trainer-panels .trainer-settings-form [id$="audioCountdown"],
#trainer-panels .trainer-settings-form [id$="audioNumbers"],
#trainer-panels .trainer-settings-form [id$="audioChange"],
#trainer-panels .trainer-settings-form [id$="audioPraise"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#trainer-panels .trainer-settings-form [id$="audioCountdown"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioNumbers"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioChange"] + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioPraise"] + .form-check-label {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-pill) !important;
    border: 2px solid rgba(var(--brand-lime-rgb), 0.15) !important;
    background: rgba(var(--brand-lime-rgb), 0.04) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: var(--font-sm) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}

#trainer-panels .trainer-settings-form [id$="audioCountdown"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioNumbers"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioChange"]:checked + .form-check-label,
#trainer-panels .trainer-settings-form [id$="audioPraise"]:checked + .form-check-label {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lime) !important;
    font-weight: 700 !important;
}


/* ═══════════════════════════════════════════════════════════════
   STEP 3 — Compact Layout (dates, numbers, message, mode)
   ═══════════════════════════════════════════════════════════════ */
.step3-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.step3-bottom-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.step3-field {
    flex: 1;
    min-width: 160px;
}
.step3-field label {
    font-weight: 600;
    font-size: var(--font-xs);
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}
.step3-mode-pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.step3-mode-pills .form-check {
    margin-bottom: 0;
}

/* Step navigation buttons */
.next-step {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important;
    border: none !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-md) !important;
    transition: var(--transition);
}
.next-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lime);
}
.prev-step {
    background: transparent !important;
    border: 2px solid rgba(148, 163, 184, 0.2) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-md) !important;
    transition: var(--transition);
}
.prev-step:hover {
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #475569 !important;
}
#createHomeworksBtn {
    background: linear-gradient(135deg, var(--color-success), #059669) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-md) !important;
}
#createHomeworksBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}


/* Toggle switch (group/individual) */
.hw-toggle-switch {
    display: flex;
    gap: 6px;
}
.hw-toggle-option {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(148, 163, 184, 0.15);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    user-select: none;
}
.hw-toggle-option:hover {
    border-color: rgba(var(--brand-lime-rgb), 0.25);
    background: rgba(var(--brand-lime-rgb), 0.06);
}
.hw-toggle-option.hw-toggle-active {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: var(--shadow-lime);
}
.hw-toggle-option.hw-toggle-active span { color: rgba(0, 0, 0, 0.5); }
.hw-toggle-option strong { display: block; font-size: var(--font-sm); }
.hw-toggle-option span { font-size: var(--font-xs); color: var(--text-muted); }

.step-container .form-check { position: relative; }


/* ═══════════════════════════════════════════════════════════════
   HW ACTION BUTTONS — 5 branded gradients
   ═══════════════════════════════════════════════════════════════ */
.hw-actions {
    display: flex;
    gap: 6px;
}
.hw-act {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: #fff !important;
    transition: var(--transition);
    text-decoration: none !important;
}

/* Play/Preview — teal */
.hw-act--turquoise {
    background: linear-gradient(135deg, #46D2D2, #2EB4D4);
    box-shadow: 0 3px 12px rgba(70, 210, 210, 0.3);
}
.hw-act--turquoise:hover {
    box-shadow: 0 5px 20px rgba(70, 210, 210, 0.5);
    color: #fff;
}

/* View — blue-teal */
.hw-act--blue {
    background: linear-gradient(135deg, #41C8E5, #46D2D2);
    box-shadow: 0 3px 12px rgba(65, 200, 229, 0.3);
}
.hw-act--blue:hover {
    box-shadow: 0 5px 20px rgba(65, 200, 229, 0.5);
    color: #fff;
}

/* Edit — green */
.hw-act--green {
    background: linear-gradient(135deg, #8EDC50, #4DC247);
    box-shadow: 0 3px 12px rgba(77, 194, 71, 0.3);
}
.hw-act--green:hover {
    box-shadow: 0 5px 20px rgba(77, 194, 71, 0.5);
    color: #fff;
}

/* Copy — purple */
.hw-act--purple {
    background: linear-gradient(135deg, #BF80FF, #9966CC);
    box-shadow: 0 3px 12px rgba(153, 102, 204, 0.3);
}
.hw-act--purple:hover {
    box-shadow: 0 5px 20px rgba(153, 102, 204, 0.5);
    color: #fff;
}

/* Delete — cosmic (purple→teal) */
.hw-act--cosmic {
    background: linear-gradient(135deg, #9966CC, #46D2D2);
    box-shadow: 0 3px 12px rgba(153, 102, 204, 0.3);
}
.hw-act--cosmic:hover {
    box-shadow: 0 5px 20px rgba(153, 102, 204, 0.5);
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════════
   BTN-GROUP (Table action icon buttons)
   ═══════════════════════════════════════════════════════════════ */
.btn-group {
    gap: 5px !important;
    display: flex !important;
}
.btn-group .btn {
    border-radius: 10px !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid transparent !important;
    transition: var(--transition);
}
.btn-group .btn i {
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-group .btn:hover {
    transform: translateY(-2px) scale(1.08) !important;
}

.btn-group .btn-info {
    background: rgba(14, 165, 233, 0.08) !important;
    border-color: rgba(14, 165, 233, 0.15) !important;
    color: var(--color-info) !important;
}
.btn-group .btn-info:hover {
    background: linear-gradient(135deg, var(--brand-teal), #38bdf8) !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(70, 210, 210, 0.3) !important;
}
.btn-group .btn-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.15) !important;
    color: var(--color-warning) !important;
}
.btn-group .btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, var(--color-warning)) !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3) !important;
}
.btn-group .btn-success {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
    color: var(--color-success) !important;
}
.btn-group .btn-success:hover {
    background: linear-gradient(135deg, #34d399, var(--color-success)) !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(52, 211, 153, 0.3) !important;
}
.btn-group .btn-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
    color: var(--color-danger) !important;
}
.btn-group .btn-danger:hover {
    background: linear-gradient(135deg, #f87171, var(--color-danger)) !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(248, 113, 113, 0.3) !important;
}


/* ═══════════════════════════════════════════════════════════════
   ACCORDION
   ═══════════════════════════════════════════════════════════════ */
.accordion-item {
    border: none !important;
    background: transparent !important;
}
.accordion-button {
    background: rgba(var(--brand-lime-rgb), 0.04) !important;
    border: 1px solid rgba(var(--brand-lime-rgb), 0.1) !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: var(--font-sm) !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    transition: var(--transition);
}
.accordion-button:not(.collapsed) {
    background: rgba(var(--brand-lime-rgb), 0.08) !important;
    color: var(--text-primary) !important;
}
.accordion-button::after {
    filter: none;
    transition: var(--transition);
}
.accordion-body {
    padding: 12px 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
}


/* ═══════════════════════════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════════════════════════ */
.progress {
    height: 8px;
    border-radius: 20px;
    background: var(--bg-subtle);
    overflow: hidden;
}
.progress-bar {
    border-radius: 20px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal), var(--brand-purple));
    background-size: 200% 100%;
    animation: shine 2s linear infinite;
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: var(--radius-round);
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}


/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(var(--brand-teal-rgb), 0.25) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.modal-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(var(--brand-teal-rgb), 0.12);
    padding: 18px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header .modal-title {
    font-weight: 700;
    color: var(--text-primary);
}
.modal-body {
    background: #ffffff;
    padding: 24px;
    color: var(--text-primary);
}
.modal-footer {
    background: #ffffff;
    border-top: 1px solid rgba(var(--brand-teal-rgb), 0.12);
    padding: 16px 24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.modal-title {
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ═══════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
    background: rgba(var(--brand-lime-rgb), 0.04);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: var(--font-sm);
}
.breadcrumb-item a {
    color: var(--brand-teal);
    font-weight: 500;
}
.breadcrumb-item a:hover {
    color: var(--brand-lime);
}
.breadcrumb-item.active {
    color: var(--text-secondary);
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════
   INSTRUCTOR LINK
   ═══════════════════════════════════════════════════════════════ */
.instructor-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-teal);
    background: rgba(var(--brand-teal-rgb), 0.08);
    border: 1.5px solid rgba(var(--brand-teal-rgb), 0.2);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
}
.instructor-link i {
    font-size: 14px;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.instructor-link:hover {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: var(--text-primary);
    border-color: transparent;
    box-shadow: var(--shadow-lime);
    text-decoration: none;
}
.instructor-link:hover i {
    -webkit-text-fill-color: var(--text-primary);
    background: none;
}


/* ═══════════════════════════════════════════════════════════════
   DETAILS PAGES — Metrics, Settings, Results
   ═══════════════════════════════════════════════════════════════ */

/* ── Metrics row ── */
.hw-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hw-metric {
    flex: 1;
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    transition: var(--transition);
}
.hw-metric:hover {
    transform: translateY(-2px);
}
.hw-metric__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}
.hw-metric__value {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e293b;
}
.hw-metric__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Metric color variants */
.hw-metric--turquoise {
    background: rgba(70, 210, 210, 0.08);
    border: 1.5px solid rgba(70, 210, 210, 0.2);
}
.hw-metric--turquoise .hw-metric__icon {
    background: linear-gradient(135deg, #46D2D2, #2EB4D4);
}
.hw-metric--blue {
    background: rgba(65, 200, 229, 0.08);
    border: 1.5px solid rgba(65, 200, 229, 0.2);
}
.hw-metric--blue .hw-metric__icon {
    background: linear-gradient(135deg, #41C8E5, #3b82f6);
}
.hw-metric--green {
    background: rgba(77, 194, 71, 0.08);
    border: 1.5px solid rgba(77, 194, 71, 0.2);
}
.hw-metric--green .hw-metric__icon {
    background: linear-gradient(135deg, #8EDC50, #4DC247);
}
.hw-metric--purple {
    background: rgba(153, 102, 204, 0.08);
    border: 1.5px solid rgba(153, 102, 204, 0.2);
}
.hw-metric--purple .hw-metric__icon {
    background: linear-gradient(135deg, #BF80FF, #9966CC);
}
.hw-metric--cosmic {
    background: rgba(124, 58, 237, 0.06);
    border: 1.5px solid rgba(124, 58, 237, 0.15);
}
.hw-metric--cosmic .hw-metric__icon {
    background: linear-gradient(135deg, #9966CC, #46D2D2);
}


/* ── Settings bar ── */
.hw-settings-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(var(--brand-lime-rgb), 0.03);
    border: 1px solid rgba(var(--brand-lime-rgb), 0.08);
    font-size: var(--font-sm);
    color: #475569;
}
.hw-settings-bar i {
    background: linear-gradient(45deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hw-settings-bar br { display: none; }
.hw-settings-sep {
    margin: 0 6px;
    color: rgba(var(--brand-lime-rgb), 0.25);
    font-weight: 300;
}


/* ── Progress strip ── */
.hw-progress-strip {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-light);
}


/* ── Result rows (clickable) ── */
.hw-result-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.hw-result-row:hover {
    background-color: rgba(var(--brand-lime-rgb), 0.03) !important;
}
.hw-result-row:active {
    background-color: rgba(var(--brand-lime-rgb), 0.06) !important;
}
.hw-expand-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Expand button ── */
.hw-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 18px;
    border: 1.5px solid rgba(var(--brand-teal-rgb), 0.15);
    background: rgba(var(--brand-teal-rgb), 0.04);
    color: var(--brand-teal);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    white-space: nowrap;
}
.hw-expand-btn:hover {
    background: rgba(var(--brand-teal-rgb), 0.1);
    border-color: rgba(var(--brand-teal-rgb), 0.3);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(var(--brand-teal-rgb), 0.12);
}
.hw-expand-btn--active {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lime);
}
.hw-expand-btn .hw-expand-icon {
    font-size: 0.65rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.hw-expand-btn__text {
    letter-spacing: 0.2px;
}

/* ── Student row (homework_details) ── */
.hw-student-row {
    cursor: pointer;
    transition: var(--transition);
}
.hw-student-row:hover {
    background: rgba(var(--brand-lime-rgb), 0.04) !important;
}

/* ── Examples panel ── */
.hw-examples-panel {
    animation: hw-slideDown 0.25s ease;
}
.hw-examples-panel td {
    padding: 8px 14px !important;
}
.hw-examples-row td {
    background: transparent !important;
    box-shadow: none !important;
}
.hw-examples-panel {
    margin: 0 12px 12px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.02), rgba(var(--brand-teal-rgb), 0.02));
    border: 1px solid rgba(var(--brand-lime-rgb), 0.08);
    overflow: hidden;
}
.hw-examples-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-sm);
}

/* ── Inner table (nested examples) ── */
.hw-inner-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.hw-inner-table thead th {
    background: rgba(var(--brand-lime-rgb), 0.04);
    padding: 8px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(var(--brand-lime-rgb), 0.08);
}
.hw-inner-table tbody td {
    padding: 7px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.hw-inner-table code {
    background: rgba(var(--brand-lime-rgb), 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #334155;
}
.hw-inner-table tr.hw-ex-err td {
    background: rgba(239, 68, 68, 0.03);
}
.hw-inner-table tr.hw-ex-err td:nth-child(4) {
    color: var(--color-danger);
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background-color: var(--bg-card);
    color: var(--text-secondary);
    padding: 15px 0;
    font-size: var(--font-sm);
    border-top: 3px solid;
    border-image: linear-gradient(90deg, var(--brand-lime), var(--brand-teal), var(--brand-purple)) 1;
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV (bottom bar)
   ═══════════════════════════════════════════════════════════════ */
.mobile-nav {
    display: none;
}


/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES & AVATARS
   ═══════════════════════════════════════════════════════════════ */
.status-badge {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    margin-right: 6px;
}
.status-active {
    background-color: var(--brand-lime);
    box-shadow: 0 0 0 3px rgba(var(--brand-lime-rgb), 0.2);
}
.status-inactive {
    background-color: var(--text-secondary);
}
.status-warning {
    background-color: var(--color-warning);
}

/* Avatar */
.avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: var(--radius-round);
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    padding: 4px;
}
.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-round);
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.avatar-wrapper:hover .avatar-image {
    transform: scale(1.05);
}

/* Info box */
.info-box {
    padding: 15px;
    border-radius: var(--radius-sm);
    background-color: rgba(var(--brand-teal-rgb), 0.1);
    border-left: 4px solid var(--brand-teal);
    margin-bottom: 20px;
}
.info-box.success {
    background-color: rgba(var(--brand-lime-rgb), 0.1);
    border-left-color: var(--brand-lime);
}
.info-box.warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--color-warning);
}

/* Main content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Sidebar sticky */
.sidebar-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar logo link */
.sidebar .logo a {
    color: #fff; 
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 700;
}

/* Sidebar nav hover icon */
.sidebar .nav-link:hover i {
    transform: scale(1.2);
    opacity: 1;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pulse animation */
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(var(--brand-lime-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0); }
}
.btn-primary:active { animation: pulse 0.5s; }

/* Navbar dark override — force white */
.navbar-dark {
    background: var(--bg-card) !important;
}
.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: var(--text-primary) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Stats, trainer cards, welcome section
   ═══════════════════════════════════════════════════════════════ */

/* ── Welcome text ── */
.dashboard-container .welcome-text {
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.dashboard-container .welcome-text i {
    background: linear-gradient(45deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 10px;
    font-size: 1.4rem;
}

/* ── Stats row ── */
.dashboard-container .stats-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

.dashboard-container .stat-card {
    flex: 1;
    min-width: 180px;
    background-color: #fff;
    border-radius: var(--radius-md);
    padding: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 130px;
    display: flex;
    flex-direction: column;
}
.dashboard-container .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.dashboard-container .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal));
}

.dashboard-container .stat-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.dashboard-container .stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    margin-right: 12px;
    flex-shrink: 0;
}
.dashboard-container .stat-card-icon i {
    font-size: 18px;
    color: #fff;
}
.dashboard-container .stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.dashboard-container .stat-card-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 3px;
}
.dashboard-container .stat-card-signal {
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    font-size: var(--font-xs);
    margin-top: auto;
}
.dashboard-container .signal-warning   { background-color: rgba(var(--brand-lime-rgb), 0.08); color: var(--color-warning); }
.dashboard-container .signal-danger    { background-color: rgba(239, 68, 68, 0.1); color: var(--color-danger); }
.dashboard-container .signal-success   { background-color: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.dashboard-container .signal-info      { background-color: rgba(14, 165, 233, 0.1); color: var(--color-info); }
.dashboard-container .signal-secondary { background-color: rgba(100, 116, 139, 0.1); color: var(--text-secondary); }

/* ── Section title ── */
.dashboard-container .section-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 5px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid var(--brand-lime);
}

/* ── Trainer cards row ── */
.trainers-row,
.trainers-row-second {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow-x: auto;
    margin-bottom: 15px;
    padding: 5px;
    position: relative;
}

.trainer-card {
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
    min-width: 200px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(var(--brand-teal-rgb), 0.35);
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 170px;
    align-items: center;
    text-align: center;
}
.trainer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.trainer-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.1), rgba(var(--brand-teal-rgb), 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}
.trainer-card:hover .trainer-icon-wrapper {
    transform: translateY(-8px) scale(1.1) rotate(5deg);
}
.trainer-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--brand-lime), var(--brand-teal));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.trainer-card:hover .trainer-icon-wrapper::before {
    opacity: 1;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.trainer-card:nth-child(1):hover .trainer-icon { animation: bounce 2s infinite; }
.trainer-card:nth-child(2):hover .trainer-icon { animation: pulse 1.5s infinite; }
.trainer-card:nth-child(3):hover .trainer-icon { animation: spin 3s infinite; }
.trainer-card:nth-child(4):hover .trainer-icon { animation: bounce 2.5s infinite; }
.trainer-card:nth-child(5):hover .trainer-icon { animation: pulse 2s infinite; }

.trainer-icon {
    font-size: 24px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}
.trainer-card:hover .trainer-icon {
    color: #ffffff !important;
}

.trainer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
}
.trainer-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal));
    border-radius: 3px;
    transition: width 0.3s ease;
}
.trainer-card:hover .trainer-title::after {
    width: 60px;
}

.trainer-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: auto;
    padding: 0 5px;
}

.trainer-button {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 10px;
}
.trainer-button:hover {
    box-shadow: var(--shadow-lime);
    color: #fff;
}
.trainer-button i {
    margin-right: 8px;
}

/* --- Асимметричная система Aurora (6 цветов из кабинета ученика) --- */

.trainers-compact .trainer-card:nth-child(6n+1) .trainer-icon-wrapper { background: rgba(191, 128, 255, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+1) .trainer-icon { color: #BF80FF !important; }
.trainers-compact .trainer-card:nth-child(6n+1) .trainer-button { 
    background: linear-gradient(135deg, #BF80FF, #9f5fef) !important;
    box-shadow: 0 4px 12px rgba(191, 128, 255, 0.4) !important;
}

.trainers-compact .trainer-card:nth-child(6n+2) .trainer-icon-wrapper { background: rgba(245, 158, 11, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+2) .trainer-icon { color: #f59e0b !important; }
.trainers-compact .trainer-card:nth-child(6n+2) .trainer-button { 
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

.trainers-compact .trainer-card:nth-child(6n+3) .trainer-icon-wrapper { background: rgba(70, 210, 210, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+3) .trainer-icon { color: #46D2D2 !important; }
.trainers-compact .trainer-card:nth-child(6n+3) .trainer-button { 
    background: linear-gradient(135deg, #46D2D2, #3bbdbd) !important;
    box-shadow: 0 4px 12px rgba(70, 210, 210, 0.4) !important;
}

.trainers-compact .trainer-card:nth-child(6n+4) .trainer-icon-wrapper { background: rgba(236, 72, 153, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+4) .trainer-icon { color: #ec4899 !important; }
.trainers-compact .trainer-card:nth-child(6n+4) .trainer-button { 
    background: linear-gradient(135deg, #ec4899, #be185d) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4) !important;
}

.trainers-compact .trainer-card:nth-child(6n+5) .trainer-icon-wrapper { background: rgba(89, 255, 58, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+5) .trainer-icon { color: #38c11a !important; }
.trainers-compact .trainer-card:nth-child(6n+5) .trainer-button { 
    background: linear-gradient(135deg, #59ff3a, #4ade80) !important;
    box-shadow: 0 4px 12px rgba(89, 255, 58, 0.4) !important;
    color: #1a5c0e !important;
}

.trainers-compact .trainer-card:nth-child(6n+6) .trainer-icon-wrapper { background: rgba(59, 130, 246, 0.1) !important; }
.trainers-compact .trainer-card:nth-child(6n+6) .trainer-icon { color: #3b82f6 !important; }
.trainers-compact .trainer-card:nth-child(6n+6) .trainer-button { 
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

.trainers-compact .trainer-button {
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.2s ease !important;
}
.trainers-compact .trainer-button:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.1) !important;
}

/* Trainer icon colors */
.icon-anzan     { color: var(--brand-teal); }
.icon-flash     { color: var(--brand-lime); }
.icon-pills     { color: var(--brand-teal); }
.icon-math      { color: var(--brand-lime); }
.icon-generator { color: var(--brand-teal); }

/* ── Coming soon badge ── */
.trainer-card .coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    z-index: 5;
    animation: pulse-badge 2s infinite;
}
.trainer-card .coming-soon-badge i {
    margin-right: 3px;
    font-size: 0.7rem;
}
@keyframes pulse-badge {
    0%   { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(255, 153, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0); }
}

/* ── Disabled trainer button ── */
.trainer-button.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}
.trainer-button.disabled:hover {
    background: #e0e0e0;
    transform: none;
    box-shadow: none;
}

/* ── NEW / Free badge (red star) ── */
.trainer-card .new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    z-index: 10;
}
.trainer-card .new-badge i {
    font-size: 10px;
}

/* ── Scroll indicator (mobile) ── */
.scroll-indicator {
    display: none;
}


/* ── Compact trainer grid (5 per row, smaller cards) ── */
.trainers-compact .trainer-card {
    flex: 0 0 calc(20% - 12px);
    max-width: calc(20% - 12px);
    height: 130px;
    padding: 12px 10px;
}
.trainers-compact .trainer-icon-wrapper {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
}
.trainers-compact .trainer-icon {
    font-size: 18px;
}
.trainers-compact .trainer-title {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.2;
}
.trainers-compact .trainer-title::after {
    bottom: -3px;
    width: 30px;
    height: 2px;
}
.trainers-compact .trainer-card:hover .trainer-title::after {
    width: 45px;
}
.trainers-compact .trainer-button {
    padding: 5px 14px;
    font-size: 12px;
    margin-top: 6px;
}
.trainers-compact .trainer-button i {
    margin-right: 5px;
}
.trainers-compact .coming-soon-badge,
.trainers-compact .new-badge {
    font-size: 9px;
    padding: 2px 6px;
    top: 6px;
    right: 6px;
}


/* ── Info alert block (gradient left border) ── */
.dashboard-container .info-alert {
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.08), rgba(var(--brand-teal-rgb), 0.08));
    border-left: 4px solid var(--brand-teal);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
}
.dashboard-container .info-alert i {
    color: var(--brand-teal);
    font-size: 20px;
}
.dashboard-container .info-alert .badge {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: #fff;
    font-weight: 600;
    padding: 4px 10px;
    margin: 0 5px;
}


/* ── Balance page ── */
.balance-hero {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(var(--brand-teal-rgb), 0.35);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    text-align: center;
}
.balance-hero .balance-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.15), rgba(var(--brand-teal-rgb), 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}
.balance-hero .balance-icon i {
    font-size: 28px;
    color: var(--brand-teal);
}
.balance-hero .balance-amount {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0 20px;
}
.balance-hero .balance-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Transaction table badges */
.badge-deposit    { background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)); color: #fff; }
.badge-withdrawal { background: linear-gradient(135deg, var(--color-danger), #c0392b); color: #fff; }
.badge-tariff     { background: linear-gradient(135deg, var(--brand-purple), #9b59b6); color: #fff; }
.badge-activation { background: linear-gradient(135deg, var(--brand-teal), #2dd4bf); color: #fff; }
.badge-referral   { background: linear-gradient(135deg, var(--brand-lime), #22c55e); color: #fff; }
.badge-status-ok  { background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal)); color: #fff; }
.badge-status-pending { background: linear-gradient(135deg, var(--color-warning), #d97706); color: #fff; }
.badge-status-fail    { background: linear-gradient(135deg, var(--color-danger), #c0392b); color: #fff; }


/* ── Tariff cards ── */
.tariff-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}
.tariff-card {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(var(--brand-teal-rgb), 0.2);
    box-shadow: var(--shadow-sm);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition);
}
.tariff-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.tariff-card--active {
    border: 2px solid var(--brand-teal);
    box-shadow: 0 4px 20px rgba(var(--brand-teal-rgb), 0.2);
}
.tariff-card--recommended {
    border: 2px solid var(--brand-lime);
    box-shadow: 0 4px 20px rgba(var(--brand-lime-rgb), 0.2);
}
.tariff-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.tariff-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 22px;
}
.tariff-card__icon--free     { background: rgba(100,116,139,0.1); color: #64748b; }
.tariff-card__icon--class    { background: rgba(var(--brand-teal-rgb),0.12); color: var(--brand-teal); }
.tariff-card__icon--profi    { background: rgba(var(--brand-lime-rgb),0.12); color: var(--brand-lime); }
.tariff-card__icon--premium  { background: rgba(191,128,255,0.12); color: var(--brand-purple); }
.tariff-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.tariff-card__price {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    line-height: 1.2;
}
.tariff-card__period {
    font-size: var(--font-xs);
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.tariff-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
    width: 100%;
    text-align: left;
}
.tariff-card__features li {
    padding: 5px 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.tariff-card__features li i.fa-check { color: var(--brand-teal); font-size: 12px; margin-top: 3px; }
.tariff-card__features li i.fa-times { color: #ccc; font-size: 12px; margin-top: 3px; }
.tariff-card__features li.feature-disabled { opacity: 0.55; color: #aaa; }
.tariff-card__action {
    margin-top: 20px;
    width: 100%;
}
.tariff-card__action .btn {
    width: 100%;
}

/* Tariff status bar */
.tariff-status-bar {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--brand-teal-rgb), 0.35);
    box-shadow: var(--shadow-sm);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.tariff-status-bar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tariff-status-bar__name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.tariff-status-bar__meta {
    font-size: var(--font-sm);
}
.tariff-status-bar__meta.text-success { color: var(--brand-teal) !important; }
.tariff-status-bar__meta.text-warning { color: var(--color-warning) !important; }
.tariff-status-bar__meta.text-danger  { color: var(--color-danger) !important; }
.tariff-status-bar .progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(var(--brand-lime-rgb), 0.1);
    width: 120px;
}
.tariff-status-bar .progress-bar {
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal));
    border-radius: 3px;
}


/* ═══════════════════════════════════════════════════════════════
   HEADER BAR — Top navigation panel
   ═══════════════════════════════════════════════════════════════ */
.header-container {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
    margin: 12px 12px 0 0;
    border-radius: 16px;
}

.header-brand {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(90deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav .balance-badge {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.15), rgba(var(--brand-teal-rgb), 0.15));
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.header-nav .balance-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.header-nav .balance-icon {
    margin-right: 8px;
    color: var(--brand-teal);
}

.header-nav .tariff-badge {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(var(--brand-lime-rgb), 0.1), rgba(var(--brand-teal-rgb), 0.1));
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.header-nav .tariff-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.header-nav .tariff-icon {
    margin-right: 8px;
    color: var(--brand-lime);
}
.header-nav .tariff-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.header-nav .tariff-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.header-nav .tariff-days {
    font-size: var(--font-xs);
    color: var(--text-secondary);
}

.header-nav .suggestion-btn {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.header-nav .suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lime);
    color: #fff;
}
.header-nav .suggestion-btn i {
    margin-right: 6px;
}

.header-nav .user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.header-nav .user-menu:hover {
    background-color: rgba(var(--brand-lime-rgb), 0.08);
}
.header-nav .user-name {
    font-weight: 600;
    white-space: nowrap;
}
.header-nav .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    transition: var(--transition);
}
.header-nav .user-menu:hover .user-avatar {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.header-nav .dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}
.header-nav .dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: var(--transition);
}
.header-nav .dropdown-item:hover {
    background-color: rgba(var(--brand-lime-rgb), 0.08);
}
.header-nav .dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}


/* ═══════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.sidebar .notification-bell {
    position: relative;
}
.sidebar .notification-icon {
    display: inline-block;
    font-size: 0.9rem;
    color: #fff;
    transition: var(--transition);
    padding: 5px;
}
.sidebar .notification-icon:hover {
    color: var(--brand-teal);
}

@keyframes bell-shake {
    0% { transform: rotate(0); }
    15% { transform: rotate(5deg); }
    30% { transform: rotate(-5deg); }
    45% { transform: rotate(4deg); }
    60% { transform: rotate(-4deg); }
    75% { transform: rotate(2deg); }
    85% { transform: rotate(-2deg); }
    92% { transform: rotate(1deg); }
    100% { transform: rotate(0); }
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}
.notification-item.unread {
    background-color: rgba(var(--brand-lime-rgb), 0.04);
}
.notification-item:hover {
    background-color: rgba(var(--brand-lime-rgb), 0.08);
}
.notification-icon-info    { color: var(--color-info); }
.notification-icon-warning { color: var(--color-warning); }
.notification-icon-success { color: var(--color-success); }
.notification-icon-error   { color: var(--color-danger); }


/* ═══════════════════════════════════════════════════════════════
   SCHEDULE — Weekly schedule cards
   ═══════════════════════════════════════════════════════════════ */
.schedule-day-card {
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}
.schedule-day-card:hover {
    box-shadow: var(--shadow-md);
}
.schedule-day-header {
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(var(--brand-teal-rgb), 0.06);
    border-bottom: 1px solid var(--border-light);
}
.schedule-day-header.today {
    background: linear-gradient(135deg, rgba(70,210,210,0.15), rgba(89,255,58,0.1));
}
.schedule-day-header .day-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--brand-teal);
    color: #fff;
}
.schedule-day-header.today .day-badge {
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
}
.schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item:hover { background: rgba(var(--brand-lime-rgb), 0.04); }
.schedule-time {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 100px;
    color: var(--text-primary);
}
.schedule-group-bar {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}
.schedule-group-info { flex: 1; min-width: 0; }
.schedule-group-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.schedule-group-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.schedule-empty {
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}
.schedule-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.schedule-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.schedule-legend-dot { width: 12px; height: 12px; border-radius: 3px; }


/* ═══════════════════════════════════════════════════════════════
   ATTENDANCE
   ═══════════════════════════════════════════════════════════════ */
.attendance-list { display: flex; flex-direction: column; gap: 4px; }
.attendance-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    user-select: none;
}
.attendance-item:hover { background: rgba(var(--brand-teal-rgb), 0.04); }
.attendance-item.is-present { background: rgba(89, 255, 58, 0.06); border-color: rgba(89, 255, 58, 0.15); }
.attendance-item.is-absent { background: rgba(255, 107, 129, 0.06); border-color: rgba(255, 107, 129, 0.15); }
.attendance-checkbox { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--brand-teal); cursor: pointer; }
.attendance-num {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(var(--brand-teal-rgb), 0.1);
    font-size: 0.8rem; font-weight: 700;
    color: var(--text-primary); flex-shrink: 0;
}
.attendance-name { flex: 1; font-weight: 500; font-size: 0.95rem; }
.attendance-status { flex-shrink: 0; width: 24px; text-align: center; }
.attendance-item.is-present .attendance-status { color: var(--brand-lime); }
.attendance-item.is-absent .attendance-status { color: #FF6B81; }
.attendance-item.is-absent .attendance-status .fa-check { display: none; }
.attendance-item.is-absent .attendance-status::after {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}


/* ═══════════════════════════════════════════════════════════════
   COSMO NEW BADGE
   ═══════════════════════════════════════════════════════════════ */
.sidebar .cosmo-new-badge {
    position: absolute;
    top: 8px;
    right: 15px;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
    animation: cosmoBadgePulse 2s ease-in-out infinite;
    z-index: 10;
}
@keyframes cosmoBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 3px 10px rgba(255, 71, 87, 0.6); }
}


/* ═══════════════════════════════════════════════════════════════
   HELP CENTER
   ═══════════════════════════════════════════════════════════════ */
.sidebar .help-center-link a:hover {
    transform: scale(1.2);
}


/* ═══════════════════════════════════════════════════════════════
   TUITION
   ═══════════════════════════════════════════════════════════════ */
.tuition-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.tuition-stat-card:hover { box-shadow: var(--shadow-md); }
.tuition-stat-label {
    font-size: var(--font-xs); font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px;
}
.tuition-stat-value { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.tuition-stat--success { background: rgba(var(--brand-lime-rgb), 0.06); border-color: rgba(var(--brand-lime-rgb), 0.15); }
.tuition-stat--success .tuition-stat-value { color: var(--color-success); }
.tuition-stat--danger { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.15); }
.tuition-stat--danger .tuition-stat-value { color: var(--color-danger); }
.tuition-stat--info { background: rgba(var(--brand-teal-rgb), 0.06); border-color: rgba(var(--brand-teal-rgb), 0.15); }
.tuition-stat--info .tuition-stat-value { color: var(--brand-teal); }

.tuition-price-display {
    font-weight: 700; font-size: 1.1rem;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.tuition-list { display: flex; flex-direction: column; }
.tuition-item { border-bottom: 1px solid var(--border-light); transition: var(--transition); }
.tuition-item:last-child { border-bottom: none; }
.tuition-item.expanded { background: var(--bg-subtle); }
.tuition-item-main {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; cursor: pointer; transition: var(--transition);
}
.tuition-item-main:hover { background: rgba(var(--brand-teal-rgb), 0.04); }

.tuition-num {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-round);
    background: rgba(var(--brand-teal-rgb), 0.1);
    font-size: var(--font-xs); font-weight: 700;
    color: var(--text-primary); flex-shrink: 0;
}
.tuition-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tuition-name {
    font-weight: 600; font-size: var(--font-base); color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tuition-expected { font-size: var(--font-xs); color: var(--text-muted); }
.tuition-expected i { color: var(--brand-teal); margin-right: 2px; font-size: 10px; }

.tuition-amounts { text-align: right; min-width: 90px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1px; }
.tuition-paid-amount { font-size: var(--font-base); font-weight: 700; color: var(--color-success); }
.tuition-debt-amount { font-size: var(--font-xs); color: var(--color-danger); font-weight: 500; }

.tuition-status-badge {
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: var(--font-xs); font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.tuition-badge-paid { background: rgba(var(--brand-lime-rgb), 0.12); color: var(--color-success); }
.tuition-badge-partial { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.tuition-badge-unpaid { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); }

.tuition-item.tuition-paid { border-left: 3px solid var(--color-success); }
.tuition-item.tuition-partial { border-left: 3px solid var(--color-warning); }
.tuition-item.tuition-unpaid { border-left: 3px solid var(--color-danger); }

.tuition-expand-icon { font-size: 11px; color: var(--text-muted); transition: transform 0.25s ease; flex-shrink: 0; }

.tuition-detail { padding: 0 20px 16px 60px; }
.tuition-detail-label {
    font-size: var(--font-xs); font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 8px;
}

.tuition-payments-history { margin-bottom: 14px; }
.tuition-payment-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: var(--bg-card);
    border-radius: var(--radius-sm); margin-bottom: 4px;
    font-size: var(--font-sm); border: 1px solid var(--border-light);
}
.tuition-payment-amount { color: var(--color-success); font-weight: 700; white-space: nowrap; }
.tuition-payment-date { color: var(--text-muted); white-space: nowrap; }
.tuition-payment-comment {
    color: var(--text-secondary); font-style: italic; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tuition-payment-delete {
    color: var(--text-muted); opacity: 0; transition: var(--transition);
    font-size: 12px; flex-shrink: 0;
}
.tuition-payment-row:hover .tuition-payment-delete { opacity: 1; }
.tuition-payment-delete:hover { color: var(--color-danger); }

.tuition-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }


/* ═══════════════════════════════════════════════════════════════
   REPORTS
   ═══════════════════════════════════════════════════════════════ */
.report-toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.report-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    border: 2px solid var(--border-color); background: var(--bg-card);
    font-size: var(--font-sm); font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: var(--transition); user-select: none;
}
.report-toggle:hover { border-color: rgba(var(--brand-teal-rgb), 0.4); background: rgba(var(--brand-teal-rgb), 0.04); }
.report-toggle.active { border-color: var(--brand-teal); background: rgba(var(--brand-teal-rgb), 0.08); color: var(--text-primary); }
.report-toggle input[type="radio"] { display: none; }
.report-toggle-sm { padding: 6px 12px; font-size: var(--font-xs); }

.report-matrix { font-size: var(--font-sm); }
.report-matrix th { font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.report-matrix .sticky-col { position: sticky; left: 0; background: var(--bg-card); z-index: 1; min-width: 160px; }

.report-cell {
    display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: var(--font-xs); min-width: 50px; text-align: center;
}
.report-cell--paid { background: rgba(var(--brand-lime-rgb), 0.12); color: var(--color-success); }
.report-cell--partial { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.report-cell--unpaid { color: var(--text-muted); }

.report-att-day {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-light); min-width: 52px;
    font-size: var(--font-xs); transition: var(--transition);
}
.report-att-day.report-att-present { background: rgba(var(--brand-lime-rgb), 0.08); border-color: rgba(var(--brand-lime-rgb), 0.2); color: var(--color-success); }
.report-att-day.report-att-absent { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.report-att-date { font-weight: 700; }
.report-att-dow { font-size: 10px; color: var(--text-muted); }
.report-att-day i { font-size: 12px; }

.report-print-header,
.report-print-footer { display: none; }


/* ═══════════════════════════════════════════════════════════════
   DCARD — Unified Section Cards (from Student Dashboard)
   Используется на распределительных страницах учителя
   ═══════════════════════════════════════════════════════════════ */

.dcard-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

/* ── Единая карточка ── */
.dcard {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    min-height: 150px;
}
.dcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: height 0.3s ease;
}
.dcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
.dcard:hover::before {
    height: 4px;
}

/* ── Цвета полосок (8 вариантов) ── */
.dcard--teal::before   { background: linear-gradient(90deg, #46D2D2, #0ea5e9); }
.dcard--pink::before   { background: linear-gradient(90deg, #ec4899, #BF80FF); }
.dcard--lime::before   { background: linear-gradient(90deg, #59ff3a, #46D2D2); }
.dcard--purple::before { background: linear-gradient(90deg, #BF80FF, #7c3aed); }
.dcard--orange::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.dcard--gold::before   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dcard--green::before  { background: linear-gradient(90deg, #10b981, #59ff3a); }
.dcard--blue::before   { background: linear-gradient(90deg, #0ea5e9, #46D2D2); }

/* ── Иконка ── */
.dcard-top {
    margin-bottom: 10px;
}
.dcard-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.dcard:hover .dcard-icon {
    transform: scale(1.15) rotate(-8deg);
}
.dcard-icon i {
    font-size: 18px;
    color: #fff;
}

/* ── Градиенты иконок ── */
.dcard--teal   .dcard-icon { background: linear-gradient(135deg, #46D2D2, #0ea5e9); }
.dcard--pink   .dcard-icon { background: linear-gradient(135deg, #ec4899, #BF80FF); }
.dcard--lime   .dcard-icon { background: linear-gradient(135deg, #59ff3a, #46D2D2); }
.dcard--purple .dcard-icon { background: linear-gradient(135deg, #BF80FF, #7c3aed); }
.dcard--orange .dcard-icon { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.dcard--gold   .dcard-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.dcard--green  .dcard-icon { background: linear-gradient(135deg, #10b981, #59ff3a); }
.dcard--blue   .dcard-icon { background: linear-gradient(135deg, #0ea5e9, #46D2D2); }

/* ── Текст ── */
.dcard-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.dcard-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    flex: 1;
}

/* ── Бейдж (число) ── */
.dcard-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    box-shadow: 0 2px 8px rgba(var(--brand-lime-rgb), 0.3);
    animation: badgePulse 2s ease infinite;
}

/* ── Кнопка (pill) ── */
.dcard-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.82rem;
    width: fit-content;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    color: #fff !important;
}
.dcard:hover .dcard-btn {
    transform: translateX(4px);
    filter: brightness(1.1);
}

/* ── Кнопки — цвета ── */
.dcard--teal   .dcard-btn { background: linear-gradient(135deg, #46D2D2, #0ea5e9); }
.dcard--pink   .dcard-btn { background: linear-gradient(135deg, #ec4899, #BF80FF); }
.dcard--lime   .dcard-btn { background: linear-gradient(135deg, #59ff3a, #46D2D2); color: var(--text-primary) !important; }
.dcard--purple .dcard-btn { background: linear-gradient(135deg, #BF80FF, #7c3aed); }
.dcard--orange .dcard-btn { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.dcard--gold   .dcard-btn { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: var(--text-primary) !important; }
.dcard--green  .dcard-btn { background: linear-gradient(135deg, #10b981, #59ff3a); color: var(--text-primary) !important; }
.dcard--blue   .dcard-btn { background: linear-gradient(135deg, #0ea5e9, #46D2D2); }

/* ── DCARD Responsive ── */
@media (max-width: 1024px) {
    .dcard-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dcard-row { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLETS (≤ 768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar {
        left: -262px;
        top: 12px;
        height: calc(100vh - 24px);
        border-radius: 20px;
        z-index: 1050;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    body.sidebar-active .sidebar,
    body.sidebar-expanded .sidebar {
        left: 12px;
    }

    .sidebar-toggle {
        width: 55px;
        height: 55px;
        bottom: 25px;
        left: 25px;
    }
    .sidebar-toggle i { font-size: 1.25rem; }

    body.sidebar-active .sidebar-toggle,
    body.sidebar-expanded .sidebar-toggle {
        left: 274px;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    body.sidebar-active .sidebar-backdrop,
    body.sidebar-expanded .sidebar-backdrop {
        display: block;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background-color: var(--bg-card);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1030;
    }
    .mobile-nav-item {
        flex: 1; text-align: center; padding: 10px 0;
        color: var(--text-primary); text-decoration: none;
    }
    .mobile-nav-item i { display: block; font-size: 1.25rem; margin-bottom: 5px; }
    .mobile-nav-item span { font-size: var(--font-xs); }
    .mobile-nav-item.active { color: var(--brand-lime); }

    body { padding-bottom: 65px; }

    .card-title { font-size: var(--font-lg); }
    h1.h3 { font-size: var(--font-xl); }

    .step3-top-row, .step3-bottom-row { flex-direction: column; }
    .step3-field { min-width: 100%; }
    .hw-toggle-switch { flex-direction: column; }
    .hw-expand-btn span { display: none; }

    .hw-metrics { gap: 8px; }
    .hw-metric { min-width: calc(50% - 8px); padding: 10px 14px; }
    .hw-metric__icon { width: 32px; height: 32px; font-size: 0.8rem; }
    .hw-metric__value { font-size: 0.9rem; }
    .hw-settings-bar { font-size: 0.78rem; }

    .header-nav { gap: 1rem; }
    .header-nav .user-name { display: none; }
    .header-nav .tariff-info { display: none; }
    .header-nav .tariff-badge { padding: 0.4rem; }
    .header-nav .tariff-icon { margin-right: 0; }
    .header-nav .balance-badge span { display: none; }
    .header-nav .suggestion-btn span { display: none; }
    .header-nav .suggestion-btn i { margin-right: 0; }

    .report-toggle { padding: 6px 10px; font-size: var(--font-xs); }
    .report-matrix .sticky-col { min-width: 120px; }
    .report-att-day { min-width: 44px; padding: 6px 8px; }

    .trainers-row, .trainers-row-second {
        flex-direction: column; overflow-x: visible; gap: 15px; padding-bottom: 0;
    }
    .scroll-indicator { display: none; }
    .trainer-card {
        flex: 0 0 100%; max-width: 100%; min-width: 100%; width: 100%;
        margin-bottom: 15px; height: 130px;
        flex-direction: row; text-align: left; align-items: center; padding: 15px;
    }
    .trainer-icon-wrapper { margin-bottom: 0; margin-right: 15px; }
    .trainer-title { margin-bottom: 5px; }
    .trainer-title::after { display: none; }
    .trainer-button { margin-left: auto; margin-top: 0; }

    .trainers-compact .trainer-card { flex: 0 0 100%; max-width: 100%; height: auto; }

    .tuition-item-main { padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
    .tuition-info { flex: 1 1 calc(100% - 100px); min-width: 0; }
    .tuition-amounts { min-width: auto; text-align: left; flex-direction: row; gap: 8px; }
    .tuition-status-badge { font-size: 11px; padding: 3px 8px; }
    .tuition-detail { padding: 0 14px 14px 14px; }
    .tuition-stat-value { font-size: 1.1rem; }
    .tuition-payment-row { flex-wrap: wrap; gap: 6px; }
    .tuition-payment-delete { opacity: 1; }

    .tariff-card { flex: 0 0 100%; }
    .tariff-status-bar { flex-direction: column; align-items: flex-start; }

    .sidebar-toggle {
        position: fixed; top: 90px; left: 15px; z-index: 1050;
        width: 48px; height: 48px; border-radius: 50%;
        background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
        color: #fff; border: none; box-shadow: var(--shadow-lime);
        display: flex; align-items: center; justify-content: center;
        font-size: 1.2rem; transition: var(--transition);
        animation: pulse-mobile 2s infinite;
    }
    @keyframes pulse-mobile {
        0%   { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0.5); transform: scale(1); }
        70%  { box-shadow: 0 0 0 10px rgba(var(--brand-lime-rgb), 0); transform: scale(1.05); }
        100% { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0); transform: scale(1); }
    }
    .sidebar-toggle:after {
        content: "Меню";
        position: absolute; left: 110%; white-space: nowrap;
        background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
        color: #fff; padding: 5px 12px; border-radius: 15px;
        font-size: 14px; box-shadow: var(--shadow-lime);
        opacity: 0; animation: showTip 4s ease-in-out 1s forwards;
    }
    @keyframes showTip {
        0%, 100% { opacity: 0; }
        20%, 80% { opacity: 1; }
    }
    .sidebar-toggle.active .fa-bars:before { content: "\f00d"; }
    .sidebar .cosmo-new-badge { right: 10px; font-size: 7px; padding: 1px 4px; }
}

@media (max-width: 480px) {
    .navbar .container-fluid { padding: 0.5rem !important; }
    .container-fluid { padding-left: 12px; padding-right: 12px; }
    .dashboard-stat { padding: 15px; }
    .dashboard-stat i { font-size: 2rem; margin-bottom: 10px; }
    .dashboard-stat .stat-count { font-size: var(--font-xl); }
    .row > [class*="col-"] { padding-right: 8px; padding-left: 8px; }
    .row { margin-right: -8px; margin-left: -8px; }
    .card { border-radius: 10px; }
    .card-body { padding: 1rem; }
    .btn { padding: 0.375rem 0.75rem; }
    .hw-metrics { flex-direction: column; }
    .hw-metric { min-width: 100%; }
    .btn-group { flex-wrap: wrap !important; }
    .btn-group .btn { width: 32px !important; height: 32px !important; }
}

@media (max-width: 576px) {
    .hw-expand-btn .hw-expand-text,
    .hw-expand-btn__text { display: none; }
    .hw-expand-btn { padding: 5px 10px; }
}

@media (max-width: 992px) {
    .dashboard-container .stats-container,
    .trainers-row, .trainers-row-second {
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory; padding-bottom: 15px;
    }
    .dashboard-container .stat-card, .trainer-card { scroll-snap-align: start; }
    .trainer-description { font-size: 0.8rem; }
    .trainer-button { padding: 8px 16px; font-size: 14px; }
    .scroll-indicator {
        display: block; position: absolute; right: 15px; top: 50%;
        transform: translateY(-50%); width: 30px; height: 30px;
        background-color: rgba(255, 255, 255, 0.8); border-radius: 50%;
        box-shadow: var(--shadow-sm); z-index: 10; text-align: center;
        line-height: 30px; animation: pulse-indicator 1.5s infinite ease-in-out;
    }
    .scroll-indicator i { color: var(--brand-lime); font-size: 16px; }
    @keyframes pulse-indicator {
        0%   { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0.4); }
        70%  { box-shadow: 0 0 0 10px rgba(var(--brand-lime-rgb), 0); }
        100% { box-shadow: 0 0 0 0 rgba(var(--brand-lime-rgb), 0); }
    }

    .header-nav { gap: 1rem; }
}

@media (max-width: 1200px) {
    .trainer-card { flex: 0 0 calc(33.33% - 10px); max-width: calc(33.33% - 10px); }
    .trainers-compact .trainer-card { flex: 0 0 calc(25% - 12px); max-width: calc(25% - 12px); }
    .tariff-grid { flex-wrap: wrap; }
    .tariff-card { flex: 0 0 calc(50% - 10px); }
}

@media (max-width: 992px) {
    .trainers-compact .trainer-card { flex: 0 0 calc(33.33% - 10px); max-width: calc(33.33% - 10px); }
}


/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {
    .sidebar, .sidebar-toggle, .mobile-nav, .navbar::after { display: none !important; }
    .content-wrapper { margin-left: 0 !important; }
    body { background: #fff; padding-bottom: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   END OF UNIFIED STYLESHEET
   ═══════════════════════════════════════════════════════════════ */
   
/* ═══════════════════════════════════════════════════════════════
   SIDEBAR GROUPED NAVIGATION — Accordion sections
   Добавить В КОНЕЦ style.css (заменяет предыдущий блок sidebar-grouped)
   ═══════════════════════════════════════════════════════════════ */

/* ── Секция-контейнер ── */
.sidebar-section {
    list-style: none;
    margin-top: 2px;
    padding: 0;
}

/* ── Заголовок секции (кликабельный) ── */
.sidebar-section__header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-teal);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    user-select: none;
    cursor: pointer;
    transition: var(--transition);
    background-color: rgba(var(--brand-lime-rgb), 0.06);
    border-left: 3px solid rgba(var(--brand-lime-rgb), 0.4);
    margin: 4px 0 0;
}

.sidebar-section__header:hover {
    opacity: 0.85;
}

.sidebar-section__header--open {
    /* без изменений — список раскрылся и всё понятно */
}

/* Разделительная линия над секцией */
.sidebar-section__header::before {
    display: none;
}

/* Иконка раздела — всегда teal как текст заголовка */
.sidebar-section__icon {
    font-size: 0.75rem;
    color: var(--brand-teal) !important;
    -webkit-text-fill-color: var(--brand-teal) !important;
    background: none !important;
    transition: none;
    width: 20px;
    text-align: center;
}

/* Иконки подпунктов — не менять цвет ни при hover, ни при active */
.sidebar-section__body .nav-link:hover:not(.active) i {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    transform: none !important;
}

.sidebar-section__body .nav-link.active i {
    color: inherit !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
}

/* Стрелка (шеврон) */
.sidebar-section__arrow {
    font-size: 0.55rem;
    margin-left: auto;
    color: var(--brand-lime);
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    transform: rotate(-90deg);
}

.sidebar-section__header:hover .sidebar-section__arrow {
    opacity: 1;
}

.sidebar-section__header--open .sidebar-section__arrow {
    transform: rotate(0deg);
    opacity: 0.8;
}

/* ── Тело секции (аккордеон) ── */
.sidebar-section__body {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: 
        max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        padding 0.3s ease;
}

.sidebar-section__body--open {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 4px;
}

/* Ссылки внутри секций */
.sidebar-section__body .nav-link {
    padding: 8px 20px;
    font-size: 0.88rem;
}

/* ── Первый блок (Наши продукты) — тот же стиль что и остальные ── */
.sidebar-section--highlight {
    margin-top: 0;
}

.sidebar-section--highlight .sidebar-section__header {
    padding-top: 10px;
}

.sidebar-section--highlight .sidebar-section__header:hover {
    opacity: 0.85;
}

.sidebar-section--highlight .sidebar-section__icon {
    color: var(--brand-teal);
}

/* Акцентные точки у ссылок первого блока */
.nav-link--highlight {
    position: relative;
    font-weight: 600 !important;
}

.nav-link--highlight::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-lime), var(--brand-teal));
    opacity: 0.4;
    transition: var(--transition);
}

.nav-link--highlight:hover::after {
    opacity: 1;
    box-shadow: 0 0 8px rgba(var(--brand-lime-rgb), 0.5);
}

.nav-link--highlight.active::after {
    opacity: 1;
    width: 8px;
    height: 8px;
    box-shadow: 0 0 10px rgba(var(--brand-lime-rgb), 0.6);
}

/* ── Счётчик пунктов (показывается когда секция свёрнута) ── */
.sidebar-section__header--open .sidebar-section__count {
    display: none;
}

.sidebar-section__count {
    margin-left: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    background: rgba(var(--brand-teal-rgb), 0.12);
    color: var(--brand-teal);
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

/* ── LIVE-точка для видеосвязи ── */
.sidebar-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
    animation: livePulse 2s ease-in-out infinite;
}

.sidebar-live-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    animation: liveRing 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes liveRing {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* ── Бейдж "скоро" ── */
.sidebar-soon-badge {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;
    flex-shrink: 0;
    animation: pulse-badge 2.5s ease-in-out infinite;
}

/* ── Disabled ссылки ── */
.nav-link--disabled {
    opacity: 0.5 !important;
    pointer-events: none;
    cursor: default;
}

/* ── Общий контейнер ── */
.sidebar-grouped {
    padding-bottom: 20px;
}

/* ── Адаптив ── */
@media (max-width: 768px) {
    .sidebar-section__header {
        font-size: 0.6rem;
        padding: 10px 16px 4px;
        letter-spacing: 1.5px;
    }
    
    .sidebar-section__header::before {
        left: 16px;
        right: 16px;
    }
    
    .sidebar-section__body .nav-link {
        padding: 7px 16px;
        font-size: 0.85rem;
    }
}


.sidebar-new-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF3E9F 0%, #BF80FF 100%);
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(255, 62, 159, 0.4);
}