/* SevStudy — dizayn sistemi
   Rəng: mürəkkəb göyü (ink), dəftər xətti göyü, marker sarısı. Şrift: Unbounded (başlıq) + Onest (mətn). */
:root {
  --ink: #16324F;
  --ink-2: #214870;
  --line-blue: #3E7CB1;
  --teal: #2A9D8F;
  --marker: #FFD166;
  --marker-2: #F4B93E;
  --paper: #F7F9FB;
  --text: #1C2733;
  --muted: #5B6B7B;
  --line: #DCE3EA;
  --card: #FFFFFF;
  --danger: #D1495B;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 50, 79, .06), 0 8px 24px -12px rgba(22, 50, 79, .18);
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--paper);
  --bs-primary: var(--ink);
  --bs-primary-rgb: 22, 50, 79;
  --bs-link-color: var(--ink-2);
  --bs-link-color-rgb: 33, 72, 112;
  --bs-link-hover-color: var(--line-blue);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
}

body { font-family: var(--font-body); background: var(--paper); color: var(--text); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .page-title, .section-title, .hero-title { font-family: var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.h6, h6 { font-family: var(--font-body); font-weight: 650; font-size: 1rem; color: var(--ink); }
a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--marker); padding: .5rem 1rem; border-radius: 8px; color: var(--ink); }
.min-w-0 { min-width: 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- Düymələr ---------- */
.btn { border-radius: 10px; font-weight: 550; }
.btn-ink { --bs-btn-color: #fff; --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink-2); --bs-btn-hover-border-color: var(--ink-2); --bs-btn-hover-color: #fff; --bs-btn-active-bg: #0f2439; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: #8a9bb0; --bs-btn-disabled-border-color: #8a9bb0; --bs-btn-disabled-color: #fff; }
.btn-outline-ink { --bs-btn-color: var(--ink); --bs-btn-border-color: #b9c7d6; --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--ink); --bs-btn-active-color: #fff; }
.btn-marker { --bs-btn-color: var(--ink); --bs-btn-bg: var(--marker); --bs-btn-border-color: var(--marker); --bs-btn-hover-bg: var(--marker-2); --bs-btn-hover-border-color: var(--marker-2); --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--marker-2); }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 10px; color: var(--ink); }
.btn-icon:hover { background: #e9eef3; }
.link-ink { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--marker); }
.link-ink:hover { color: var(--line-blue); }

/* ---------- Üst panel ---------- */
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 1.15rem; }
.brand b { font-weight: 700; }
.topbar .nav-link { color: var(--text); font-weight: 500; }
.topbar .nav-link:hover { color: var(--line-blue); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: #fff; }
.lang-switch a { padding: .25rem .55rem; font-size: .78rem; font-weight: 600; color: var(--muted); border-radius: 8px; }
.lang-switch a.active { background: var(--ink); color: #fff; }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: #fff; padding: .2rem .7rem .2rem .25rem; border-radius: 999px; }
.dot-badge { position: absolute; top: 2px; right: 0; background: var(--danger); color: #fff; font-size: .65rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.avatar-xs { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-md { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.avatar-xl { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow); }

.flash-stack { position: fixed; top: 76px; right: 1rem; z-index: 1080; width: min(420px, calc(100% - 2rem)); }
.flash-stack .alert { border: 0; border-left: 4px solid currentColor; border-radius: var(--radius); }

/* ---------- Kabinet qabığı ---------- */
.app-shell { display: flex; min-height: calc(100vh - 64px); }
.sidebar { width: 250px; background: #fff; border-right: 1px solid var(--line); flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; } }
.sidebar .offcanvas-body { padding: 1.25rem .9rem; }
.side-role { font-size: .8rem; color: var(--muted); padding: 0 .75rem .75rem; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.side-nav a i { font-size: 1.1rem; color: var(--muted); }
.side-nav a:hover { background: #f0f4f8; }
.side-nav a.active { background: var(--ink); color: #fff; }
.side-nav a.active i { color: var(--marker); }
.count { font-style: normal; background: var(--marker); color: var(--ink); font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; }
.count.zero { background: #e9eef3; color: var(--muted); }
.app-main { flex: 1; min-width: 0; padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.75rem; }
.page-head h1 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 0; }
.page-head p { margin: .35rem 0 0; color: var(--muted); }
.page-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; }
.panel.p-0 { overflow: hidden; }
.panel .table { --bs-table-bg: transparent; }
.panel .table th { font-size: .78rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--line); white-space: nowrap; }
.panel.p-0 .table td:first-child, .panel.p-0 .table th:first-child { padding-left: 1.25rem; }
.panel.p-0 .table td:last-child, .panel.p-0 .table th:last-child { padding-right: 1.25rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-tile { display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
.stat-tile > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 1.25rem; background: #e8eef5; color: var(--ink); }
.stat-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.stat-tile .l { font-size: .82rem; color: var(--muted); }
.tone-blue > i { background: #e3eef8; color: var(--line-blue); }
.tone-green > i { background: #dff3f0; color: var(--teal); }
.tone-marker > i { background: #fff3d4; color: #a87400; }

.badge-soft-success { background: #dff3ea; color: #1d7a52; }
.badge-soft-warning { background: #fff3d4; color: #8a6100; }
.badge-soft-danger { background: #fbe3e6; color: #a62c3d; }
.badge-soft-info { background: #e3eef8; color: #245e8f; }
.badge-soft-primary { background: #e1e8f0; color: var(--ink); }
.badge-soft-secondary { background: #eef1f4; color: var(--muted); }
.badge[class*="badge-soft"] { font-weight: 600; padding: .38em .7em; border-radius: 999px; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.2rem; color: #b6c4d2; display: block; margin-bottom: .6rem; }
.empty-state p { max-width: 36ch; margin: 0 auto 1rem; }

/* ---------- Ana səhifə: hero cədvəl ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 3rem; background:
  linear-gradient(transparent 31px, rgba(62, 124, 177, .09) 32px) 0 0 / 100% 32px, var(--paper); }
.hero-title { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; font-weight: 700; margin-bottom: 1.1rem; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 44ch; margin-bottom: 1.75rem; }
.hero-search { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .35rem .35rem .35rem .9rem; box-shadow: var(--shadow); }
.hero-search i { color: var(--muted); }
.hero-search .form-control { border: 0; box-shadow: none; padding-left: .25rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.25rem; }
.hero-links a { color: var(--ink); font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.hero-links a:hover { color: var(--line-blue); }

.timetable { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(22, 50, 79, .35); padding: 1.1rem; }
.tt-head { display: grid; grid-template-columns: 52px repeat(5, 1fr); gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-align: center; }
.tt-body { display: grid; grid-template-columns: 52px 1fr; gap: 6px; }
.tt-times { display: grid; grid-template-rows: repeat(4, 74px); gap: 6px; font-size: .72rem; color: var(--muted); }
.tt-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 74px); gap: 6px;
  background: repeating-linear-gradient(90deg, #f3f6f9 0 calc(20% - 6px), transparent calc(20% - 6px) 20%); border-radius: 10px; }
.tt-block { grid-column: calc(var(--c) + 1); grid-row: calc(var(--r) + 1) / span var(--s); border-radius: 10px; padding: .55rem .6rem; font-size: .76rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  animation: tt-drop .55s cubic-bezier(.2, .8, .2, 1.15) both; animation-delay: calc(.25s + var(--i) * .11s); }
.tt-block b { font-weight: 650; line-height: 1.2; }
.tt-block small { opacity: .8; font-size: .68rem; }
.tt-block.group { background: var(--ink); color: #fff; }
.tt-block.group small { color: var(--marker); opacity: 1; }
.tt-block.individual { background: #dff3f0; color: #155e56; border: 1px solid #b8e3dd; }
@keyframes tt-drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 1.4rem; padding-left: .5rem; }
.hero-stats b { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); display: block; line-height: 1.1; }
.hero-stats span { font-size: .82rem; color: var(--muted); }

.section { padding: 3.5rem 0; }
.section-title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: 1.5rem; }
.subject-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.subject-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; color: var(--text); font-weight: 500; transition: border-color .15s, background .15s; }
.subject-pill i { color: var(--line-blue); }
.subject-pill small { color: var(--muted); font-size: .75rem; background: #eef2f6; border-radius: 999px; padding: 0 .45rem; }
.subject-pill:hover { border-color: var(--ink); background: #f6f9fc; }

.steps-band { background: var(--ink); color: #dfe8f1; }
.steps-band .section-title { color: #fff; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid rgba(255, 255, 255, .15); padding-top: 1rem; }
.steps li::before { content: counter(s); font-family: var(--font-display); color: var(--marker); font-size: 1.3rem; font-weight: 700; display: block; margin-bottom: .4rem; }
.steps h3 { font-family: var(--font-body); color: #fff; font-size: 1.05rem; font-weight: 650; }
.steps p { font-size: .92rem; margin: 0; color: #b8c7d6; }
.teach-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; background: #fff; border: 2px solid var(--ink); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.teach-cta h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.teach-cta p { color: var(--muted); max-width: 56ch; margin: 0; }

/* ---------- Kurs kartı ---------- */
.course-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.course-card:hover { border-color: var(--ink); }
.course-cover { height: 132px; display: grid; place-items: center; position: relative; overflow: hidden; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover > i { font-size: 2.6rem; opacity: .85; }
.subj-0 { background: #e3eef8; color: var(--line-blue); } .subj-1 { background: #dff3f0; color: var(--teal); }
.subj-2 { background: #fff3d4; color: #a87400; } .subj-3 { background: #eae6f7; color: #5a4a9c; }
.subj-4 { background: #fbe7e0; color: #b4532f; } .subj-5 { background: #e1e8f0; color: var(--ink); }
.type-tag { position: absolute; top: .7rem; left: .7rem; font-size: .72rem; font-weight: 650; padding: .2rem .6rem; border-radius: 999px; background: #fff; color: var(--ink); }
.type-tag.static { position: static; display: inline-block; }
.type-tag.group { background: var(--ink); color: #fff; }
.type-tag.individual { background: #dff3f0; color: #155e56; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.seats { font-size: .75rem; color: var(--teal); font-weight: 600; }
.seats.low { color: var(--danger); }

.filter-bar { display: grid; grid-template-columns: 2fr repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; padding: .25rem .7rem; border-radius: 999px; background: #eef2f6; color: var(--text); }
.course-hero-img { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius-lg); }
.prose { max-width: 70ch; font-size: 1.02rem; line-height: 1.7; }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; top: 84px; box-shadow: var(--shadow); }
.price-lg { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--ink); }
.facts li { display: flex; gap: .6rem; padding: .35rem 0; }
.facts i { color: var(--line-blue); }
.teacher-mini { display: flex; gap: .8rem; align-items: center; color: var(--text); padding: 1rem; border: 1px dashed #c3d0dd; border-radius: var(--radius); }
.teacher-mini:hover { border-color: var(--ink); }
.teacher-head { display: flex; gap: 1.75rem; align-items: center; flex-wrap: wrap; }

.session-list { list-style: none; padding: 0; margin: 0; }
.session-list li { display: flex; gap: 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid #edf1f5; }
.session-list li:last-child { border-bottom: 0; }
.session-list li.past { opacity: .6; }
.session-list .date { width: 58px; flex-shrink: 0; text-align: center; background: #f0f4f8; border-radius: 10px; padding: .35rem 0; font-size: .74rem; color: var(--muted); line-height: 1.2; }
.session-list .date b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 2rem 1rem;
  background: linear-gradient(transparent 31px, rgba(62, 124, 177, .09) 32px) 0 0 / 100% 32px, var(--paper); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.auth-card.wide { width: min(640px, 100%); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.role-switch a, .role-switch label { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem; border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.role-switch i { font-size: 1.4rem; color: var(--muted); }
.role-switch small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.role-switch .active { border-color: var(--ink); background: #f3f7fb; }
.role-switch .active i { color: var(--ink); }
.pw-meter { height: 5px; background: #eef2f6; border-radius: 3px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }

.form-control, .form-select { border-radius: 10px; border-color: #cfd9e3; }
.form-control:focus, .form-select:focus { border-color: var(--line-blue); box-shadow: 0 0 0 .2rem rgba(62, 124, 177, .18); }
.form-label { font-weight: 550; font-size: .9rem; }

/* ---------- Seçim çipləri ---------- */
.check-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.check-chip input { position: absolute; opacity: 0; }
.check-chip span { display: inline-flex; gap: .35rem; align-items: center; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; transition: all .15s; }
.check-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-chip input:focus-visible + span { outline: 3px solid var(--marker); }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday-picker input { position: absolute; opacity: 0; }
.weekday-picker span { display: block; text-align: center; padding: .4rem 0; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; cursor: pointer; }
.weekday-picker input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }

.checklist li { display: flex; gap: .6rem; align-items: center; padding: .3rem 0; color: var(--muted); }
.checklist li i::before { content: "\F28A"; }
.checklist li.done { color: var(--text); }
.checklist li.done i::before { content: "\F26B"; color: var(--teal); }
.todo-link { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 10px; color: var(--text); }
.todo-link:hover { background: #f0f4f8; }
.todo-link i { font-size: 1.15rem; color: var(--line-blue); }
.todo-link span { flex: 1; }
.todo-link small { display: block; color: var(--muted); font-size: .78rem; }
.todo-link.muted { opacity: .6; }

.receipt-rows { display: grid; grid-template-columns: 1fr auto; row-gap: .55rem; margin: 0; }
.receipt-rows dt { font-weight: 400; color: var(--muted); }
.receipt-rows dd { margin: 0; text-align: right; font-weight: 550; }
.receipt-rows .total { border-top: 1px dashed #c3d0dd; padding-top: .7rem; color: var(--ink); font-weight: 700; font-size: 1.05rem; }

/* ---------- Dərs otağı ---------- */
.video-room { height: min(72vh, 720px); background: #0f2439; border-radius: var(--radius-lg); overflow: hidden; }
.video-room iframe { width: 100%; height: 100%; border: 0; }
.video-room.waiting { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c6d3e0; text-align: center; padding: 2rem; }
.video-room.waiting i { font-size: 2.5rem; color: var(--marker); margin-bottom: 1rem; }
.countdown { font-family: var(--font-display); font-size: 2rem; color: #fff; margin-top: .5rem; }
.material-list li { padding: .45rem 0; }
.material-list a { display: inline-flex; gap: .5rem; color: var(--text); }
.material-list a:hover { color: var(--line-blue); }
.material-list.big li { border-bottom: 1px solid #edf1f5; padding: .8rem 0; }
.wa-panel { border-color: #bfe6cd; background: #f5fcf7; }
.wa-panel h2 i { color: #25a55f; }

.attend-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; cursor: pointer; transition: all .15s; }
.attend-row input { position: absolute; opacity: 0; }
.attend-row > i { color: #d3dce5; font-size: 1.3rem; }
.attend-row:has(input:checked) { border-color: var(--teal); background: #f1faf8; }
.attend-row:has(input:checked) > i { color: var(--teal); }
.attend-row:has(input:focus-visible) { outline: 3px solid var(--marker); }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: .5rem; overflow-x: auto; }
.week-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; min-height: 320px; }
.week-col.today { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--marker); }
.week-day { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: .6rem; color: var(--muted); }
.week-day b { color: var(--ink); }
.week-item { display: block; border-radius: 8px; padding: .45rem .55rem; font-size: .78rem; margin-bottom: .4rem; line-height: 1.3; }
.week-item b { display: block; }
.week-item.group { background: var(--ink); color: #fff; }
.week-item.individual { background: #dff3f0; color: #155e56; }
.week-item.free { background: #fff; border: 1px dashed #9fcfc7; color: var(--muted); }

/* ---------- Mesajlar ---------- */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 64px - 5rem); min-height: 480px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list > a { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; color: var(--text); border-bottom: 1px solid #f0f3f6; }
.chat-list > a:hover { background: #f6f9fc; }
.chat-list > a.active { background: #eef3f8; box-shadow: inset 3px 0 0 var(--ink); }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: .4rem; background: linear-gradient(transparent 31px, rgba(62, 124, 177, .05) 32px) 0 0 / 100% 32px; }
.bubble { max-width: 72%; padding: .55rem .8rem; border-radius: 14px 14px 14px 4px; background: #eef2f6; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 14px 14px 4px 14px; }
.bubble time { display: block; font-size: .68rem; opacity: .65; margin-top: .15rem; text-align: right; }
.bubble.new { animation: pop .25s ease-out; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.chat-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); }
.chat-form textarea { resize: none; max-height: 140px; }
@media (max-width: 767.98px) { .chat { grid-template-columns: 1fr; height: calc(100vh - 64px - 3rem); } }

/* ---------- Admin ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 1rem; }
.bar-chart .col-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar-chart .b1, .bar-chart .b2 { width: 42%; max-width: 22px; border-radius: 5px 5px 0 0; transform-origin: bottom; animation: grow .6s ease-out both; }
.bar-chart .b1 { background: var(--ink); }
.bar-chart .b2 { background: var(--marker); }
.bar-chart small { font-size: .68rem; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } }
.chart-legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); margin-top: .8rem; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #c3ced9; }
.live-dot.on { background: var(--danger); box-shadow: 0 0 0 0 rgba(209, 73, 91, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(209, 73, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(209, 73, 91, 0); } }
.nav-pills .nav-link { color: var(--text); border-radius: 999px; font-size: .88rem; }
.nav-pills .nav-link.active { background: var(--ink); }
.nav-underline .nav-link { color: var(--muted); }
.nav-underline .nav-link.active { color: var(--ink); border-bottom-color: var(--marker); border-bottom-width: 3px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 3rem 0 2rem; margin-top: 2rem; }
.site-footer h6 { margin-bottom: .8rem; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 991.98px) {
  .sidebar { width: 280px; }
  .app-main { padding-top: 1.25rem; }
  .flash-stack { top: 70px; }
}
@media (max-width: 575.98px) {
  .tt-head { grid-template-columns: 38px repeat(5, 1fr); font-size: .68rem; }
  .tt-body { grid-template-columns: 38px 1fr; }
  .tt-times, .tt-grid { grid-template-rows: repeat(4, 62px); }
  .tt-block { font-size: .64rem; padding: .35rem; }
  .tt-block small { display: none; }
  .hero-stats { gap: 1.2rem; }
  .role-switch { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
