/* Best Brains Assessment Platform — shared styles (student + teacher) */
:root {
  --navy: #123B5E; --navy-2: #1B4B75; --blue: #1A6FB0; --blue-soft: #E6F0FA; --orange: #F39220; --orange-soft: #FFF1E0;
  --yellow: #FDD13A; --green: #1E7A45; --green-soft: #E2F3E7; --red: #B3261E; --red-soft: #FBE7E5;
  --ink: #1E2B3A; --muted: #536273; --line: #DCE4EE; --line-2: #E9EEF4; --bg: #F4F7FB; --card: #FFFFFF;
  --radius: 16px; --shadow: 0 1px 2px rgba(18, 59, 94, .06), 0 6px 20px rgba(18, 59, 94, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: Lexend, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, label, input, select, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { overscroll-behavior-y: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar { background: var(--navy); color: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.brand { font-size: 22px; font-weight: 600; letter-spacing: -.3px; white-space: nowrap; }
.brand span { color: #F7A13A; }
.brand-img img { display: block; max-height: 40px; max-width: 200px; width: auto; object-fit: contain; }
.sh-brand.brand-img img { max-height: 44px; }
.brand small { display: block; font-size: 11px; letter-spacing: 2.5px; color: #C9D6E3; font-weight: 500; margin-top: -2px; }
.topbar .meta { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #D5E0EA; flex-wrap: wrap; }
.chip-dark { background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; font-size: 14px; color: #fff; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 28px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 2px solid transparent; font-weight: 600; font-size: 17px; text-decoration: none; transition: transform .06s ease, background .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #E8860F; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; border-color: #C3CFDC; color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.btn-lg { min-height: 64px; font-size: 20px; padding: 0 36px; border-radius: 16px; }
.btn-block { width: 100%; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }
.input, .select, .textarea { width: 100%; border: 2px solid #C3CFDC; border-radius: 12px; padding: 12px 14px; font-size: 18px; background: #fff; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(26, 111, 176, .15); }
.textarea { resize: vertical; line-height: 1.6; }
.input-big { font-size: 24px; padding: 14px 16px; }
.code-input { text-transform: uppercase; letter-spacing: 6px; font-weight: 700; color: var(--navy); }

/* pills & badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-orange { background: var(--orange-soft); color: #8A4B00; }
.pill-blue { background: var(--blue-soft); color: var(--navy); }
.pill-grey { background: var(--line-2); color: var(--muted); }
.pill-red { background: var(--red-soft); color: var(--red); }

/* toast & modal */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 500; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }
.toast.error { background: var(--red); }
.modal-back { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(18, 30, 45, .55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 20px; max-width: 520px; width: 100%; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-size: 24px; margin-bottom: 10px; }
.modal-wide { max-width: 1000px; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 4px solid var(--blue-soft); border-top-color: var(--blue); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 60px 20px; color: var(--muted); }

.demo-banner { background: var(--yellow); color: var(--ink); text-align: center; font-size: 14px; padding: 8px 12px; font-weight: 500; }
.stripes { display: flex; gap: 8px; }
.stripes i { display: block; height: 8px; border-radius: 4px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 12px; border-top: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
table.data thead th { background: var(--bg); font-size: 12px; letter-spacing: .5px; color: var(--muted); font-weight: 600; border-top: none; position: sticky; top: 0; }
.table-box { overflow-x: auto; }
.num { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .pad { padding: 20px; }
  .wrap { padding: 20px 14px 40px; }
  .modal { padding: 24px; }
}
