:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #8a94a6;
  --accent: #3E96FA;
  --accent-dark: #1c7ed6;
  --my-row: #e7f5ff;
  --border: #e9ecef;
  --good: #2e9e5b;
  --mark5: #2e9e5b;
  --mark4: #3E96FA;
  --mark3: #f59f00;
  --mark2: #f76707;
  --mark1: #e8590c;
  --class-1: #3E96FA;
  --class-2: #E368DD;
  --class-3: #7E60FF;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
body { background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--accent-dark); }

.page { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; }

/* ===== Вход ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--card); border-radius: 20px; padding: 32px; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.1); }
.login-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.login-form { display: flex; gap: 8px; }
.login-form input { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font-size: 14px; outline: none; }
.login-form input:focus { border-color: var(--accent); }
.btn-primary { border: 0; background: var(--accent); color: #fff; border-radius: 12px; padding: 11px 22px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.login-error { color: #e8590c; font-size: 13px; margin-top: 10px; min-height: 18px; }
.login-profiles { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.login-profile-btn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: #fbfcfe; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.login-profile-btn:hover { border-color: var(--accent); }

/* ===== Верхняя панель ===== */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #5cabfc, #1c7ed6); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.brand-name { font-size: 17px; font-weight: 800; }
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; transition: .15s; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill .caret { color: var(--muted); font-size: 11px; }
.pill.on { background: #fff3bf; border-color: #f59f00; color: #b0640a; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #E368DD, #7E60FF); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.profile-menu { position: relative; }
.dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.15); min-width: 240px; padding: 6px; z-index: 50; }
.dropdown.open { display: block; }
.dropdown .dd-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.dropdown .dd-item:hover { background: #f1f3f5; }
.dropdown .dd-item.active { background: var(--my-row); color: var(--accent-dark); }
.dropdown .dd-item .dd-del { margin-left: auto; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.dropdown .dd-item .dd-del:hover { color: #e8590c; background: #ffe3e3; }
.dropdown-add { width: 100%; border: 0; border-top: 1px solid var(--border); background: transparent; padding: 10px; font-size: 13px; font-weight: 700; color: var(--accent); cursor: pointer; margin-top: 4px; }

/* ===== Табы ===== */
.nav-tabs { display: inline-flex; background: var(--card); border-radius: 12px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 18px; }
.nav-tabs button { border: 0; background: transparent; padding: 9px 22px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .15s; }
.nav-tabs button.active { background: var(--accent); color: #fff; }
.subtabs { display: flex; margin-bottom: 16px; gap: 16px; border-bottom: 2px solid var(--border); }
.subtabs button { border: 0; background: transparent; padding: 9px 4px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .15s; }
.subtabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.toggle { display: inline-flex; background: var(--card); border-radius: 12px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); flex-wrap: wrap; gap: 2px; }
.toggle button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .15s; white-space: nowrap; }
.toggle button.active { background: var(--accent); color: #fff; }
.toggle.wide { width: 100%; }
.toggle.wide button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 8px 10px; }

.card { background: var(--card); border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.banner { border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; color: #fff; font-size: 14px; font-weight: 600; }
.banner .icon { font-size: 22px; }
.banner small { display: block; font-weight: 500; opacity: .85; font-size: 12px; margin-top: 2px; }
.banner.class { background: linear-gradient(135deg, #51cf66, #2e9e5b); }
.banner.parallel { background: linear-gradient(135deg, #7E60FF, #5f3dc4); }
.footnote { font-size: 12px; color: var(--muted); margin-top: 12px; }
.placeholder-note { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.loading { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; }

/* ===== Текущая: дни ===== */
.day-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.day-chip { flex-shrink: 0; border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 7px 13px; text-align: center; cursor: pointer; transition: .15s; min-width: 64px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.day-chip .wd { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.day-chip .d { font-size: 15px; font-weight: 700; }
.day-chip:hover { border-color: var(--accent); }
.day-chip.active { background: var(--accent); border-color: var(--accent); }
.day-chip.active .wd, .day-chip.active .d { color: #fff; }
.day-chip.today .wd::after { content: ' · сегодня'; color: var(--accent); }
.day-chip.active.today .wd::after { color: #fff; }
.day-chip.off { opacity: .55; }
.day-card { overflow: hidden; margin-bottom: 14px; }
.day-card-head { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #fbfcfe; }
.day-card-head .dname { font-size: 15px; font-weight: 800; }
.day-card-head .dnum { font-size: 12px; color: var(--muted); font-weight: 600; }
.day-card-head.today { background: var(--my-row); }
.lesson-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: #f8f9fa; }
.lesson-row .num { font-size: 13px; font-weight: 800; color: var(--muted); text-align: center; padding-top: 2px; }
.lesson-row .info .subject-name { font-size: 14px; font-weight: 700; }
.lesson-row .info .meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.lesson-row .hw { font-size: 13px; color: var(--text); margin-top: 5px; line-height: 1.45; }
.lesson-row .hw .hw-icon { color: var(--accent); margin-right: 4px; }
.lesson-row .day-marks { display: flex; gap: 4px; padding-top: 2px; flex-wrap: wrap; justify-content: flex-end; }
.att-badge { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.att-ill { background: #ffe9a8; color: #9a6b00; }
.att-pass { background: #ffe3e3; color: #c92a2a; }
.weekend-card { background: var(--card); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }

/* ===== ДЗ ===== */
.hw-filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.hw-count { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: auto; }
.hw-day-group { margin-bottom: 16px; }
.hw-day-title { font-size: 14px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hw-day-title .cnt { font-size: 12px; color: var(--muted); font-weight: 600; background: #f1f3f5; border-radius: 6px; padding: 2px 8px; }
.hw-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.hw-item:last-child { border-bottom: 0; }
.hw-item:hover { background: #f8f9fa; }
.hw-item .hw-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #ced4da; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; transition: .15s; margin-top: 1px; }
.hw-item .hw-check.done { background: var(--good); border-color: var(--good); }
.hw-item .hw-body { flex: 1; }
.hw-item .hw-subject { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-dark); background: var(--my-row); border-radius: 6px; padding: 2px 8px; margin-bottom: 4px; }
.hw-item .hw-text { font-size: 14px; line-height: 1.5; }
.hw-item .hw-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hw-item .hw-meta b { color: var(--text); font-weight: 600; }
.hw-item.done .hw-text { color: var(--muted); text-decoration: line-through; text-decoration-color: #adb5bd; }
.badge-new { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 8px; margin-left: 6px; }

/* ===== Расписание ===== */
.sched-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.sched-title { font-size: 15px; font-weight: 800; }
.sched-title small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.week-nav { display: flex; gap: 6px; }
.week-nav button { border: 1px solid var(--border); background: var(--card); border-radius: 10px; width: 34px; height: 34px; font-size: 15px; color: var(--muted); cursor: pointer; }
.week-nav button:hover { border-color: var(--accent); color: var(--accent); }
.sched-card { overflow-x: auto; }
.sched-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.sched-table th { padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--border); text-align: center; background: #fbfcfe; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.sched-table th.today-col { color: var(--accent); border-bottom-color: var(--accent); background: var(--my-row); }
.sched-table td { border-bottom: 1px solid var(--border); padding: 6px; vertical-align: top; height: 64px; }
.sched-table td.lesson-num { text-align: center; font-weight: 800; color: var(--muted); width: 30px; background: #fbfcfe; font-size: 12px; }
.sched-table td.today-col { background: #f5fbff; }
.sched-cell { border-radius: 10px; padding: 8px 10px; background: var(--my-row); height: 100%; }
.sched-cell .s { font-weight: 700; font-size: 13px; }
.sched-cell .t { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sched-cell .r { font-size: 11px; color: var(--muted); margin-top: 1px; }
.sched-empty { color: #dee2e6; text-align: center; font-size: 14px; }

/* ===== Успеваемость ===== */
.periods { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.year-chip { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.period-chip { border: 1px solid var(--border); background: var(--card); border-radius: 999px; min-width: 44px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .15s; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: relative; }
.period-chip:hover { border-color: var(--accent); color: var(--accent); }
.period-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.period-chip.current::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.period-chip.active.current::after { background: #fff; }
.period-chip.wide { padding: 0 16px; min-width: 64px; }
.rating-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
@media (max-width: 640px) { .rating-banners { grid-template-columns: 1fr; } }
.subject-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.subject-card { padding: 14px; position: relative; }
.subject-card .name { font-size: 14px; font-weight: 700; margin-bottom: 6px; padding-right: 42px; }
.subject-card .count-badge { position: absolute; top: 12px; right: 12px; background: var(--my-row); color: var(--accent-dark); border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.subject-card .trend { font-size: 12px; color: var(--muted); }
.subject-card .marks-preview { margin-top: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.marks-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.marks-table th { padding: 12px 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); text-align: center; background: #fbfcfe; white-space: nowrap; }
.marks-table th:first-child { text-align: left; padding-left: 16px; }
.marks-table th .sub { display: block; font-size: 9px; font-weight: 600; color: var(--accent); text-transform: none; letter-spacing: 0; }
.marks-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: center; }
.marks-table tr:last-child td { border-bottom: 0; }
.marks-table td.subject { text-align: left; padding-left: 16px; font-weight: 600; }
.marks-table tr:hover td { background: #f8f9fa; }
.mark { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 8px; margin: 0 1px; color: #fff; font-weight: 700; font-size: 13px; padding: 0 4px; cursor: pointer; transition: .12s; }
.mark:hover { transform: scale(1.15); box-shadow: 0 3px 10px rgba(0,0,0,.25); z-index: 2; }
.m5 { background: var(--mark5); } .m4 { background: var(--mark4); }
.m3 { background: var(--mark3); } .m2 { background: var(--mark2); }
.mark.dual { display: inline-flex; padding: 0; overflow: hidden; border-radius: 8px; min-width: 44px; }
.mark.dual .half { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 26px; font-weight: 700; font-size: 13px; color: #fff; }
.mark.dual .half + .half { border-left: 2px solid #fff; }
.avg-cell { font-weight: 700; }
.avg-cell small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.dash { color: var(--muted); }
.marks-strip { display: flex; gap: 3px; overflow-x: auto; padding: 2px 0; max-width: 220px; scrollbar-width: thin; }
.marks-strip::-webkit-scrollbar { height: 4px; }
.marks-strip::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 2px; }
.strip-count { flex-shrink: 0; align-self: center; margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--muted); background: #f1f3f5; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.strip-more { flex-shrink: 0; align-self: center; border: 0; background: var(--my-row); color: var(--accent-dark); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .15s; }
.strip-more:hover { background: var(--accent); color: #fff; }
tr.detail-row td { background: #fbfcfe; padding: 10px 16px; }
.detail-strip-wrap { display: flex; flex-direction: column; gap: 6px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.detail-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.collapse-btn { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.collapse-btn:hover { border-color: var(--accent); color: var(--accent); }
.detail-strip { display: flex; gap: 4px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; align-items: center; }
.detail-strip::-webkit-scrollbar { height: 6px; }
.detail-strip::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 3px; }

/* ===== Рейтинг ===== */
.summary-card { background: linear-gradient(135deg, #5cabfc 0%, #3E96FA 60%, #1c7ed6 100%); color: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(62,150,250,.35); margin-bottom: 18px; }
.summary-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.summary-name { font-size: 20px; font-weight: 700; }
.summary-class { background: rgba(255,255,255,.22); padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-box { background: rgba(255,255,255,.15); border-radius: 14px; padding: 14px 10px; text-align: center; }
.stat-place { font-size: 34px; font-weight: 800; line-height: 1.1; }
.stat-place small { font-size: 14px; font-weight: 500; opacity: .85; }
.stat-label { font-size: 12px; opacity: .85; margin-top: 4px; }
.stat-box.avg .stat-place { font-size: 28px; padding-top: 5px; }
.toolbar { margin: 4px 0 12px; display: flex; flex-direction: column; gap: 10px; }
.toolbar-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rating-head { display: grid; grid-template-columns: 44px 1fr 76px; gap: 8px; padding: 12px 16px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); }
.rating-head .num { text-align: center; }
.rating-head .avg { text-align: right; }
.rating-row { display: grid; grid-template-columns: 44px 1fr 76px; gap: 8px; align-items: center; padding: 6px 16px 6px 8px; border-bottom: 1px solid var(--border); transition: background .15s; }
.rating-row:last-child { border-bottom: 0; }
.rating-row:hover { background: #f8f9fa; }
.rating-row.me { background: var(--my-row); }
.place { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.place.medal { font-size: 17px; }
.class-bar { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 12px; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.class-bar .cls { font-size: 11px; font-weight: 700; background: rgba(0,0,0,.18); padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }
.class-bar .pupil { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating-row.me .class-bar { outline: 2px solid #fff; box-shadow: 0 0 0 2px var(--class-1); }
.avg-mark { font-size: 15px; font-weight: 700; text-align: right; }

/* ===== Тултип и модалка ===== */
.mark-tip { position: fixed; z-index: 100; max-width: 300px; background: #1a1a2e; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; opacity: 0; transition: opacity .12s; }
.mark-tip.show { opacity: 1; }
.mark-tip .tip-title { font-weight: 700; font-size: 14px; }
.mark-tip .tip-row { color: #c3cad6; }
.mark-tip .tip-row b { color: #fff; font-weight: 600; }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,25,40,.45); display: none; align-items: center; justify-content: center; z-index: 90; padding: 16px; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 22px; }
.modal .m-subject { color: var(--accent); font-weight: 700; font-size: 14px; }
.modal h3 { font-size: 18px; margin: 2px 0 4px; }
.modal .m-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.modal .m-my { background: var(--my-row); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal .m-my .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.m-histo-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.histo { display: flex; gap: 10px; align-items: flex-end; height: 70px; margin: 8px 0 16px; }
.histo .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.histo .bar { width: 100%; border-radius: 8px 8px 4px 4px; }
.histo .bar-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.classmates-list { display: flex; flex-direction: column; gap: 4px; }
.classmate-row { display: flex; align-items: center; gap: 10px; background: #f8f9fa; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.classmate-row .num { color: var(--muted); font-size: 12px; width: 18px; }
.classmate-row .mark { margin-left: auto; cursor: default; }
.classmate-row.me { background: var(--my-row); }
.modal .m-close { position: sticky; top: 0; float: right; margin: -10px -8px 0 0; border: 0; background: #f1f3f5; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; color: var(--muted); cursor: pointer; }
.modal .m-close:hover { background: #e9ecef; color: var(--text); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: #1a1a2e; color: #fff; border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .25s; z-index: 200; }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 560px) {
  .lesson-row { grid-template-columns: 28px 1fr; }
  .lesson-row .day-marks { grid-column: 2; justify-content: flex-start; }
}
