/* Mindsight Hub — application styles */
@font-face { font-family: "Mark GEO"; src: url("../fonts/MarkGEO-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --green: #3F826B; --green-600: #336B58; --green-50: #EEF5F2; --green-100: #D8EAE2;
  --navy: #123B62; --navy-700: #0E2F4F; --navy-50: #EDF2F7;
  --ink: #16263A; --ink-2: #4A5A6C; --ink-3: #7A8796;
  --line: #E4E8EC; --line-2: #EEF1F4; --bg: #FFFFFF; --bg-soft: #F7F8FA;
  --red: #B4432F; --red-50: #FBEEEB; --amber: #A66A12; --amber-50: #FBF3E4; --blue-50: #EAF1F8;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(18,59,98,.04), 0 2px 8px rgba(18,59,98,.04);
  --font-head: "Mark GEO", "Noto Sans Georgian", system-ui, sans-serif;
  --font-body: "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sidebar: 264px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 15px/1.55 var(--font-body); color: var(--ink); background: var(--bg-soft); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; } a:hover { color: var(--green-600); text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--navy); margin: 0; letter-spacing: -.005em; }
h2 { font-size: 17px; }
.mono { font-family: var(--mono); font-size: .9em; } .muted { color: var(--ink-3); } .small { font-size: 13px; } .block { display: block; }
.ic { flex: none; }

/* Layout */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); padding: 20px 14px; overflow-y: auto; }
.sidebar__logo { padding: 6px 10px 22px; display: block; } .sidebar__logo img { display: block; height: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; cursor: pointer; list-style: none; }
.nav__item::-webkit-details-marker { display: none; }
.nav__item:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }
.nav__item.is-active { background: var(--green-50); color: var(--green-600); }
.nav__item span { flex: 1; }
.nav__group[open] > summary .ic:last-child { transform: rotate(90deg); }
.nav__sub { display: block; padding: 7px 12px 7px 44px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; }
.nav__sub:hover { background: var(--bg-soft); text-decoration: none; color: var(--navy); }
.nav__sub.is-active { color: var(--green-600); font-weight: 600; }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; margin-top: 12px; border-top: 1px solid var(--line); }
.sidebar__who { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sidebar__who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar__who small { color: var(--ink-3); font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__title { font-size: 20px; flex: 1; } .topbar .topbar__menu { display: none; }
.content { padding: 28px 32px 48px; max-width: 1360px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.scrim { display: none; }

/* Components */
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); font: 600 13px var(--font-head); }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; } .avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: 600 14px var(--font-body); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; } .btn:disabled { opacity: .6; cursor: default; }
.btn--primary { background: var(--green); color: #fff; } .btn--primary:hover { background: var(--green-600); color: #fff; }
.btn--secondary { background: #fff; color: var(--navy); border-color: var(--line); } .btn--secondary:hover { border-color: #CBD3DB; color: var(--navy); }
.btn--ghost { background: transparent; color: var(--ink-2); } .btn--ghost:hover { background: var(--bg-soft); color: var(--navy); }
.btn--danger-ghost { background: #fff; color: var(--red); border-color: #EBCFC9; } .btn--danger-ghost:hover { background: var(--red-50); color: var(--red); }
.btn--block { width: 100%; height: 48px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px; }
.card--flush { padding: 0; overflow: hidden; } .card--flush .card__head { padding: 18px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge--active, .badge--published { background: var(--green-50); color: var(--green-600); }
.badge--suspended, .badge--revoked { background: var(--red-50); color: var(--red); }
.badge--disabled, .badge--archived { background: var(--line-2); color: var(--ink-3); }
.badge--draft, .badge--planned { background: var(--amber-50); color: var(--amber); }
.badge--lg { height: 32px; padding: 0 16px; font-size: 14px; }
.alert { padding: 12px 16px; border-radius: var(--r); font-size: 14px; border: 1px solid; display: flex; flex-direction: column; gap: 4px; }
.alert--success { background: var(--green-50); border-color: var(--green-100); color: var(--green-600); }
.alert--error { background: var(--red-50); border-color: #EBCFC9; color: var(--red); }
.alert--warn { background: var(--amber-50); border-color: #EFDDB9; color: #6E4608; }
.alert--info { background: var(--blue-50); border-color: #D3E0EE; color: var(--navy); }
.alert code { background: #fff; padding: 2px 6px; border-radius: 6px; font-family: var(--mono); }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.metric { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.metric__label { font-size: 13px; color: var(--ink-3); }
.metric__value { font: 600 28px/1.1 var(--font-head); color: var(--navy); font-variant-numeric: tabular-nums; }
.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar::-webkit-progress-bar { background: var(--line-2); border-radius: 99px; } .bar::-webkit-progress-value { background: var(--green); border-radius: 99px; } .bar::-moz-progress-bar { background: var(--green); border-radius: 99px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.greeting { font-size: 26px; }

.action-list { list-style: none; margin: 0; padding: 0; }
.action-list__row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.action-list li:last-child .action-list__row { border-bottom: 0; }
.action-list__row span:first-child { flex: 1; } .action-list__row:hover { text-decoration: none; color: var(--navy); }
.count { min-width: 28px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-3); font: 600 13px var(--font-body); display: grid; place-items: center; }
.has-items .count { background: var(--navy); color: #fff; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; } .feed li:last-child { border-bottom: 0; } .feed small { color: var(--ink-3); white-space: nowrap; }
.feed .is-unread span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }
.empty { color: var(--ink-3); text-align: center; padding: 28px 0 !important; }
.course-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 44px; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); } .course-row:last-child { border-bottom: 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px; padding: 12px 24px; background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 24px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; } .table tbody tr:hover td { background: #FBFCFD; }
.table--dense td { padding: 9px 16px; } .table--dense th { padding: 10px 16px; }
.card:not(.card--flush) .table th, .card:not(.card--flush) .table td { padding-left: 0; }
.person { display: flex; align-items: center; gap: 12px; color: var(--ink); } .person:hover { text-decoration: none; } .person span:last-child { display: flex; flex-direction: column; } .person small { color: var(--ink-3); }
.diff-old { display: block; color: var(--red); } .diff-new { display: block; color: var(--green-600); }

/* Forms */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar__filters { display: flex; gap: 10px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; } .search .ic { position: absolute; left: 12px; color: var(--ink-3); } .search .input { padding-left: 38px; width: 280px; }
.form { display: flex; flex-direction: column; gap: 18px; } .form--narrow { max-width: 760px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; } .field--wide { grid-column: 1 / -1; }
.field__label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); } .field__label em { font-style: normal; color: var(--ink-3); font-weight: 400; }
.field__hint { font-size: 12.5px; color: var(--ink-3); } .field__error { font-size: 12.5px; color: var(--red); }
.input { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 400 15px var(--font-body); color: var(--ink); width: 100%; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(63,130,107,.15); }
.form__note { margin: 0; font-size: 13.5px; color: var(--ink-3); } .form__actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line-2); padding-top: 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; } .check { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.inline-form { display: flex; gap: 10px; margin-top: 16px; }
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .profile-head__meta { flex: 1; min-width: 200px; } .profile-head__meta h2 { font-size: 22px; } .profile-head__meta p { margin: 4px 0 0; }
.profile-head__actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; padding-top: 14px; border-top: 1px solid var(--line-2); }
.pending { text-align: center; padding: 64px 24px; } .pending p { margin: 8px 0 0; }

/* Auth pages */
.auth { background: var(--bg-soft); }
.auth__wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 20px; }
.auth__foot { color: var(--ink-3); font-size: 13px; margin: 0; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(18,59,98,.04), 0 12px 32px rgba(18,59,98,.06); padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-card__logo { height: auto; margin-bottom: 12px; }
.auth-card__title { font-size: 24px; line-height: 1.3; } .auth-card__sub { margin: -8px 0 4px; color: var(--ink-2); }
.auth-card__link { align-self: center; font-size: 14px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.verify__list { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 8px 0 0; font-size: 14.5px; } .verify__list dt { color: var(--ink-3); } .verify__list dd { margin: 0; font-weight: 500; }


/* ===== Components added for content, learning, notifications ===== */
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form, .list__row form { margin: 0; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--full { width: 100%; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.input--sm { height: 36px; font-size: 14px; width: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; margin-top: 2px; } .page-head p { margin: 6px 0 0; }
.crumbs { font-size: 13.5px; color: var(--ink-3); } .crumbs a { color: var(--ink-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list__row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.list__row:last-child { border-bottom: 0; }
.list--pad .list__row { padding-left: 20px; padding-right: 20px; }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); overflow-wrap: anywhere; }
a.list__main:hover { text-decoration: none; color: var(--navy); }
.list__row.is-current { background: var(--green-50); border-radius: 8px; padding-left: 8px; }
.list__row.is-unread .list__main strong { color: var(--navy); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.is-unread .notif-dot { background: var(--green); }
.module__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.module__num { width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--navy); color: #fff; display: grid; place-items: center; font: 600 14px var(--font-head); }
.module__title { flex: 1; min-width: 0; } .module__title h3 { font-size: 16px; }
.inline-form--flush { margin-top: 0; }
.inline-form .input { flex: 1 1 auto; min-width: 0; }
.menu { position: relative; } .menu > summary { list-style: none; cursor: pointer; } .menu > summary::-webkit-details-marker { display: none; }
.menu__pop { position: absolute; right: 0; top: 42px; z-index: 15; width: 300px; max-width: calc(100vw - 40px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(18,59,98,.14); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.menu__pop .form { gap: 10px; }
.ext { width: 46px; height: 30px; flex: none; border-radius: 7px; background: var(--navy-50); color: var(--navy); display: grid; place-items: center; font: 700 10px var(--font-body); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.ext--pdf { background: #FBEEEB; color: #B4432F; } .ext--docx, .ext--doc { background: #EAF1F8; color: #1E5A9C; } .ext--xlsx, .ext--xls, .ext--csv { background: #EEF5F2; color: #336B58; } .ext--pptx, .ext--ppt { background: #FBF3E4; color: #A66A12; }
.ext--lg { width: 56px; height: 64px; border-radius: 10px; font-size: 12px; background: #fff; box-shadow: 0 1px 2px rgba(18,59,98,.1); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--ink); align-items: flex-start; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18,59,98,.08); }
.tile__code { font: 600 15px var(--font-head); color: var(--green-600); background: var(--green-50); border-radius: 10px; padding: 6px 10px; }
.tile__title { font: 600 16px/1.35 var(--font-head); color: var(--navy); }
.mat-card { display: flex; flex-direction: column; gap: 10px; }
.mat-card__top { display: flex; align-items: center; gap: 12px; } .mat-card__title { font: 600 16px/1.35 var(--font-head); color: var(--navy); }
.drop { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border: 1.5px dashed #D5DBE2; border-radius: 12px; background: var(--bg-soft); cursor: pointer; }
.drop:hover { border-color: var(--green); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop__title { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.drop.has-file { border-color: var(--green); background: var(--green-50); }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; margin: 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pick { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.pick label { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.pick label:hover { background: var(--bg-soft); } .pick label span { flex: 1; min-width: 0; }
.pick input { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.check input { accent-color: var(--green); width: 18px; height: 18px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 99px; max-width: 100%; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--navy); } .tabs a.is-active { background: var(--navy); color: #fff; }
.tabs__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(18,59,98,.08); font-size: 12px; display: inline-grid; place-items: center; }
.tabs a.is-active .tabs__n { background: rgba(255,255,255,.2); }
.course-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.course-card__code { width: 60px; height: 60px; flex: none; border-radius: 16px; background: var(--green-50); color: var(--green-600); display: grid; place-items: center; font: 600 17px var(--font-head); }
.course-card__body { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; } .course-card__body h3 { font-size: 17px; }
.course-card__body h3 a { color: var(--navy); }
.course-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.progress-line { display: flex; align-items: center; gap: 12px; } .progress-line .bar { max-width: 280px; }
.progress-box { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.bar--sm { width: 90px; flex: none; }
.chip { display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; }
.chip--amber { background: var(--amber-50); color: #7A5500; }
.dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid #C9D1DA; display: grid; place-items: center; font-size: 12px; color: #fff; }
.dot--completed { background: var(--green); border-color: var(--green); } .dot--in_progress { border-color: var(--green); color: var(--green); }
.tick { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid #C9D1DA; background: #fff; color: #fff; font-size: 13px; cursor: pointer; padding: 0; display: grid; place-items: center; }
.tick.is-on { background: var(--green); border-color: var(--green); }
.prose { font-size: 15.5px; line-height: 1.7; } .prose p { margin: 0 0 12px; } .prose h3 { margin-bottom: 8px; }
.lesson-title { font-size: 24px; margin: 10px 0 6px; } .lead { font-size: 16.5px; color: var(--ink-2); margin: 0 0 14px; }
.video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-top: 10px; background: #000; }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bell { position: relative; } .bell__n { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #E4755A; color: #fff; font: 600 10.5px/17px var(--font-body); text-align: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 500; }
@media (max-width: 640px) {
  .page-head h2 { font-size: 20px; }
  .module__head .row-actions { gap: 2px; }
  .list--pad .list__row { padding-left: 16px; padding-right: 16px; }
  .list__row { flex-wrap: wrap; } .list__row > .row-actions { width: 100%; justify-content: flex-start; padding-left: 0; }
  .list__row > .row-actions:has(.icon-btn:only-child) { width: auto; }
  .module .list__row > .row-actions { width: auto; }
  .list__row > .list__main { flex: 1 1 calc(100% - 64px); }
  .module .list__row > .badge { margin-left: 34px; }
  .inline-form .input { flex: none; }
  .course-card__actions { width: 100%; } .course-card__actions .btn { flex: 1; }
  .lesson-foot .row { width: 100%; } .lesson-foot .row > * { flex: 1; } .lesson-foot .btn { width: 100%; }
  .lesson-title { font-size: 21px; }
  .progress-box { width: 100%; }
  .tabs { width: 100%; }
  .grid-cards { grid-template-columns: minmax(0, 1fr); }
  .table td.row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .table td.row-actions::before { display: none; }
}


/* ===== Assignments, calendar, attendance ===== */
.row--between { justify-content: space-between; width: 100%; }
.text-red { color: var(--red); }
.grid-cards--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: #F4F1EA; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--navy); }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--green); }
.seg--sm span { height: 30px; padding: 0 10px; font-size: 12.5px; }
.seg--sm input:checked + .att-present { background: var(--green); } .seg--sm input:checked + .att-late { background: var(--amber); }
.seg--sm input:checked + .att-absent { background: var(--red); } .seg--sm input:checked + .att-excused { background: #5B6B7D; }
[data-target-box] { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } [data-target-box][hidden] { display: none; }
.file-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; margin: 4px 6px 4px 0; background: #fff; }
.file-pill:hover { border-color: var(--green); text-decoration: none; }
.file-pill .ext { width: 40px; height: 26px; }
.sub-row { padding: 14px 20px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.sub-row:last-child { border-bottom: 0; }
.sub-row__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub-row__note { margin: 0; font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.grade-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; background: var(--bg-soft); border-radius: 12px; }
.grade-form__score { display: flex; align-items: center; gap: 6px; } .grade-form__score .input { width: 80px; height: 36px; }
.grade-form__fb { flex: 1 1 220px; height: 36px; }
.task { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.task:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,59,98,.1); }
.task__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; }
.task__pill { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #fff; }
.task__due { font-size: 12px; font-weight: 600; }
.task__body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; } .task__body strong { font: 600 16.5px/1.35 var(--font-head); color: var(--navy); }
.task__foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: auto; }
.task__open { font-weight: 600; color: var(--navy); font-size: 13px; }
.task--amber .task__top { background: #FDF0E9; color: #A44A2C; } .task--red .task__top { background: #FBE3DE; color: #9C2F1D; }
.task--blue .task__top { background: #E7EEF8; color: #1E4C80; } .task--green .task__top { background: #E3F1EA; color: #1E4D3D; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager__n { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--navy); font-weight: 600; }
.pager__n:hover { text-decoration: none; border-color: var(--navy); } .pager__n.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.result-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.result-card__score { font: 600 34px/1.1 var(--font-head); color: var(--green-600); } .result-card p { margin: 0; color: var(--ink-2); }
.chip--red { background: var(--red-50); color: var(--red); }
.cal-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cal-form { position: sticky; top: 84px; } .cal-form h2 { font-size: 17px; }
.form__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .cal-head h2 { flex: 1; text-align: center; font-size: 18px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; } .cal-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__wd { text-align: center; font-size: 12px; color: var(--ink-3); padding: 4px 0; }
.cal__day { position: relative; min-height: 92px; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; color: var(--ink); background: #fff; overflow: hidden; min-width: 0; }
a.cal__day:hover { text-decoration: none; border-color: #C9D1DA; }
.cal__day.is-out { opacity: .45; } .cal__day.is-today .cal__n { background: var(--navy); color: #fff; }
.cal__day.is-sel { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cal__day input { position: absolute; opacity: 0; pointer-events: none; }
.cal__day:has(input:checked) { border-color: var(--green); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green); }
.cal__day:has(input:checked) .cal__n::after { content: " ✓"; color: var(--green); }
.cal__n { font-size: 13px; font-weight: 600; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal__ev { font-size: 11px; font-weight: 600; line-height: 1.25; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__more { font-size: 11px; color: var(--ink-3); } .cal__dots { display: none; gap: 3px; } .cal__dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.tone-navy { background: #E7EEF8; color: #1E4C80; } .tone-red { background: #FBE3DE; color: #9C2F1D; } .tone-amber { background: #FBF3E4; color: #7A5500; }
.tone-green { background: #E3F1EA; color: #1E4D3D; } .tone-gray { background: var(--line-2); color: var(--ink-2); }
.cal-legend .tone-navy, .cal__dots .tone-navy { background: #1E5A9C; } .cal-legend .tone-red, .cal__dots .tone-red { background: #B4432F; } .cal-legend .tone-amber, .cal__dots .tone-amber { background: #E9A23B; } .cal__dots .tone-green { background: var(--green); } .cal__dots .tone-gray { background: #9AA5B1; }
.date-box { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--bg-soft); padding: 4px 0; display: flex; flex-direction: column; }
.date-box b { font: 600 18px/1.2 var(--font-head); color: var(--navy); } .date-box small { font-size: 11px; color: var(--ink-3); }
.ev-card { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ev-card .badge { background: rgba(255,255,255,.7); }
.att-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line-2); }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
[data-aud-show] { display: none; } [data-aud-show].is-on { display: flex; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } .cal-form { position: static; } }
@media (max-width: 640px) {
  .cal { gap: 2px; } .cal__day { min-height: 54px; padding: 4px; border-radius: 8px; align-items: center; }
  .cal__ev, .cal__more { display: none; } .cal__dots { display: flex; }
  .cal__n { width: 22px; height: 22px; font-size: 12.5px; }
  .form__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-row { padding: 12px 16px; } .att-row .seg { width: 100%; justify-content: space-between; } .seg--sm label { flex: 1; } .seg--sm span { width: 100%; justify-content: center; padding: 0 4px; }
  .sub-row { padding: 14px 16px; } .grade-form .row .btn { flex: 1 1 auto; }
  .btn { white-space: normal; height: auto; min-height: 42px; padding-top: 8px; padding-bottom: 8px; line-height: 1.3; text-align: center; }
  .btn--sm { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
  .sub-row__head > .list__main { flex: 1 1 calc(100% - 50px); }
  .sub-row__head > .file-pill { margin-left: 44px; }
  .seg--sm span { font-size: 11.5px; line-height: 1.2; text-align: center; }
  .seg { width: 100%; } .seg label { flex: 1; } .seg span { width: 100%; justify-content: center; }
}


/* ===== Exams ===== */
.mt { margin-top: 8px; }
.stack--tight { gap: 6px; align-items: flex-end; }
.kv--sm { font-size: 13.5px; gap: 4px 14px; }
.exam-card { display: flex; flex-direction: column; gap: 10px; } .exam-card h3 { font-size: 17px; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pool { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pool .input { width: 76px; height: 38px; }
.fixed-q summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 6px 0; }
.fixed-q[open] { display: flex; flex-direction: column; gap: 8px; }
.pick--tall { max-height: 420px; }
.q-row { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.q-row:last-child { border-bottom: 0; } .q-row__act { margin-left: auto; }
.q-row__body { margin: 0; font-weight: 500; }
.q-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.q-opt { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.q-opt.is-ok { background: var(--green-50); border-color: var(--green-100); color: var(--green-600); font-weight: 600; }
.q-opt.is-bad { background: var(--red-50); border-color: #EBCFC9; color: var(--red); } .q-opt.is-pick { box-shadow: inset 0 0 0 1.5px currentColor; }
.opt-edit { display: flex; align-items: center; gap: 10px; } .opt-edit input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
[data-qshow].is-hidden { display: none; }
[data-sched-show] { display: none; } [data-sched-show].is-on { display: flex; }
.exam-body { background: var(--bg-soft); }
.exam-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.exam-bar__title { flex: 1; min-width: 0; display: flex; flex-direction: column; } .exam-bar__title strong { font: 600 16px var(--font-head); color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--navy-50); } .timer b { font: 600 20px var(--mono); color: var(--navy); font-variant-numeric: tabular-nums; }
.timer.is-low { background: var(--red-50); } .timer.is-low b { color: var(--red); }
.exam-wrap { max-width: 1100px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.exam-nav { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }
.qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qgrid__b { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--navy); cursor: pointer; }
.qgrid__b.is-done { background: var(--green-50); border-color: var(--green-100); color: var(--green-600); } .qgrid__b.is-cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.exam-q { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.exam-q__body { font-size: 20px; line-height: 1.45; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 15.5px; background: #fff; }
.opt:hover { border-color: #C9D1DA; } .opt input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.opt:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.exam-q__nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.case-box { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.result-hero { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line-2) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; }
.ring::before { content: ""; position: absolute; inset: 14px; background: #fff; border-radius: 50%; }
.ring b, .ring small { position: relative; } .ring b { font: 600 28px/1.1 var(--font-head); color: var(--navy); } .ring small { color: var(--ink-3); font-size: 13px; }
.ans-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.ans-row__n { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.ans--ok { background: var(--green-50); color: var(--green-600); } .ans--bad { background: var(--red-50); color: var(--red); } .ans--part { background: var(--amber-50); color: var(--amber); } .ans--wait { background: var(--line-2); color: var(--ink-3); }
.split--review { grid-template-columns: 260px minmax(0, 1fr); } .split--review > :only-child { grid-column: 1 / -1; }
.review-q { display: flex; flex-direction: column; gap: 10px; } .review-q.is-open { border-color: #EFDDB9; box-shadow: 0 0 0 3px var(--amber-50); }
.review-q__body { margin: 0; font-weight: 500; }
.answer-box { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; white-space: normal; }
@media (max-width: 900px) { .exam-wrap { grid-template-columns: minmax(0, 1fr); padding: 14px; } .exam-nav { position: static; order: 2; } .split--review { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .exam-bar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; } .exam-bar__title { flex-basis: 100%; } .timer { flex: 1; justify-content: center; }
  .exam-q { padding: 18px 16px; } .exam-q__body { font-size: 17.5px; } .exam-q__nav .btn { flex: 1; }
  .qgrid { grid-template-columns: repeat(6, 1fr); }
  .q-row { padding: 14px 16px; } .q-row__act { margin-left: 0; width: 100%; justify-content: flex-start; }
  .ans-row { padding: 12px 16px; }
}


/* ===== Gradebook, certificates, transcript ===== */
.weights { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.weight { display: flex; align-items: center; gap: 8px; font-size: 14px; } .weight__in { display: inline-flex; align-items: center; gap: 4px; } .weight .input { width: 70px; height: 36px; }
.gb-wrap { overflow-x: auto; } .gb th small { color: var(--ink-3); font-weight: 400; } .gb td:first-child { min-width: 160px; }
.gb-detail td { background: var(--bg-soft) !important; padding: 12px 24px; }
.gb-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); } .gb-item:last-of-type { border-bottom: 0; }
.gb-item__p { width: 90px; } .gb-item__r { width: 220px; }
.grade-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.grade-cat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--bg-soft); } .grade-cat b { font: 600 20px var(--font-head); color: var(--navy); }
.cert-card { display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--green); } .cert-card h3 { font-size: 17px; }
.cert-card.is-revoked { border-top-color: var(--red); opacity: .8; } .cert-card--pending { border-top-color: var(--line); }
.badge--revoked { background: var(--red-50); color: var(--red); }
.transcript .page-head img { display: block; margin-bottom: 10px; }
@media (max-width: 640px) {
  .gb-detail td { padding: 10px 0 !important; } .gb-item__p, .gb-item__r { width: 100%; }
  .weights .btn { width: 100%; }
}
@media print {
  .sidebar, .topbar, .scrim, .no-print, .toolbar { display: none !important; }
  .app { display: block; } .content { padding: 0; } .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(18,59,98,.15); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(18,38,58,.3); }
  .topbar .topbar__menu { display: grid; } .topbar { padding: 0 20px; } .content { padding: 20px; }
  .split, .split--wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar { height: 56px; padding: 0 8px 0 6px; gap: 4px; }
  .topbar__title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .content { padding: 16px 16px 40px; gap: 16px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .card--flush .card__head { padding: 16px; }
  .greeting { font-size: 22px; }

  /* Metrics: 2 per row instead of 1 */
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 14px; } .metric__value { font-size: 24px; }

  /* Toolbar & forms: full-width controls, 16px text so iOS does not zoom */
  .toolbar, .toolbar__filters { flex-direction: column; align-items: stretch; width: 100%; }
  .toolbar > .btn, .search, .search .input, .toolbar__filters .input { width: 100%; }
  .input, select.input, textarea.input { font-size: 16px; }
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .form__actions { flex-direction: column-reverse; align-items: stretch; } .form__actions .btn { width: 100%; }
  .inline-form { flex-direction: column; } .inline-form .btn { width: 100%; }
  .profile-head { gap: 14px; } .profile-head__meta p { overflow-wrap: anywhere; }
  .profile-head__actions > * { flex: 1 1 auto; } .profile-head__actions .btn { width: 100%; }
  .auth-card { padding: 28px 20px 22px; border-radius: 16px; }
  .feed li { flex-wrap: wrap; gap: 2px 12px; } .feed li span { min-width: 0; overflow-wrap: anywhere; }
  .checks .check { flex: 1 1 100%; }
  .course-row { grid-template-columns: minmax(0, 1fr) 44px; } .course-row .bar { grid-column: 1 / -1; grid-row: 2; }

  /* Tables → stacked cards (labels come from <th> via app.js) */
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table tbody tr:hover td { background: transparent; }
  .table td, .table--dense td, .card:not(.card--flush) .table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
  .table td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
  .table td:first-child { text-align: left; padding-bottom: 8px; }
  .table td:first-child::before, .table td.empty::before, .table td[data-label=""]::before { display: none; }
  .table td.empty { justify-content: center; }
  .table td:empty { display: none; }
  .card:not(.card--flush) .table tr { padding-left: 0; padding-right: 0; }
}
