/* Vidyora brand tokens (sampled from docs/design/brand/vidyora_logo.png) and the shared mock-up shell.
   Used by the landing page and the new portals (sales manager, institute, super admin). */
@font-face { font-family: Figtree; src: url(/static/fonts/figtree-latin.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
  --navy: #0b284d; --navy-2: #12365f; --navy-3: #1c4677;
  --teal: #04a8a9; --teal-dark: #037f80; --teal-soft: #e3f6f6;
  --amber: #ffa51f; --amber-dark: #c77700; --amber-soft: #fff3df;
  --ink: #14213a; --muted: #5b6678; --line: #e2e7ee; --bg: #f4f6fa; --card: #fff;
  --good: #1f9d55; --bad: #d64545; --warn: #e08a00; --violet: #6a3fb5;
  --radius: 14px; --shadow: 0 1px 2px rgba(11, 40, 77, .06), 0 4px 14px rgba(11, 40, 77, .06);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Figtree, system-ui, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: var(--teal-dark); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select { font: inherit; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: .2px; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo.dark { color: var(--navy); }

/* app header (navy) */
.top { background: var(--navy); color: #fff; }
.top-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.top .grow { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; }
.who small { display: block; opacity: .75; font-size: 12px; }
.role-chip { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: rgba(255,255,255,.12); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: var(--navy-2); }
.nav-in { width: 100%; max-width: 1240px; margin: 0 auto; display: flex; gap: 2px; padding: 0 12px; }
.nav a { flex: none; color: #cfe0f2; padding: 10px 14px; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a.on { color: #fff; border-bottom-color: var(--amber); font-weight: 700; }

/* page */
.page { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.page-title { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 16px; margin-bottom: 16px; }
.page-title h1 { font-size: 24px; color: var(--navy); }
.page-title p { margin: 0; color: var(--muted); }
.page-title .grow { flex: 1; }
.section-h { font-size: 17px; color: var(--navy); margin: 26px 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.section-h small { font-weight: 500; color: var(--muted); font-size: 13px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* tiles: one big number each */
.tile { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); border-top: 4px solid var(--teal); min-width: 0; }
.tile.amber { border-top-color: var(--amber); }
.tile.navy { border-top-color: var(--navy); }
.tile.violet { border-top-color: var(--violet); }
.tile.green { border-top-color: var(--good); }
.tile.red { border-top-color: var(--bad); }
.tile .lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.tile .lbl svg { width: 20px; height: 20px; color: var(--teal-dark); flex: none; }
.tile .num { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.tile .num small { font-size: 15px; font-weight: 600; color: var(--muted); }
.tile .sub { font-size: 13px; color: var(--muted); }
.tile .open { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--teal-dark); }
.split { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--bg); color: var(--ink); white-space: nowrap; }
.pill.teal { background: var(--teal-soft); color: var(--teal-dark); }
.pill.amber { background: var(--amber-soft); color: var(--amber-dark); }
.pill.red { background: #fde7e7; color: #a32727; }
.pill.green { background: #e2f5ea; color: #157040; }
.pill.grey { background: #eceff3; color: #4a5568; }
.pill.violet { background: #efe8fb; color: var(--violet); }

/* bars and rings */
.bar { height: 8px; border-radius: 99px; background: #e8edf3; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.bar.amber i { background: var(--amber); }
.bar.red i { background: var(--bad); }
.ring { --p: 60; --c: var(--teal); width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e8edf3 0); }
.ring::before { content: ""; grid-area: 1 / 1; width: 70px; height: 70px; border-radius: 50%; background: #fff; }
.ring b { grid-area: 1 / 1; z-index: 1; font-size: 19px; color: var(--navy); }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 18px; border-radius: 10px; border: 0; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn.amber { background: var(--amber); color: #2a1a00; }
.btn.navy { background: var(--navy); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.sm { min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #cdd5df; border-radius: 10px; background: #fff; color: var(--ink); }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #cdd5df; border-radius: 10px; background: #fff; font-size: 14px; min-height: 42px; }
.radio.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }
.radio .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9aa6b5; flex: none; }
.radio.on .dot { border-color: var(--teal); background: radial-gradient(var(--teal) 45%, #fff 50%); }
.chk { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #9aa6b5; flex: none; display: inline-grid; place-items: center; }
.chk.on { background: var(--teal); border-color: var(--teal); }
.chk.on::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

/* subject tabs: scroll sideways on phones */
.stabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stab { flex: none; padding: 8px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.stab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* exam switcher */
.switcher { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.switcher a { flex: none; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #cfe0f2; border: 1px solid rgba(255,255,255,.2); }
.switcher a.on { background: var(--amber); color: #2a1a00; border-color: var(--amber); }

/* tables -> cards on phones */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font-size: 14px; }
.tbl th { text-align: left; background: #eef2f7; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.mock-flag { position: fixed; right: 8px; bottom: 8px; z-index: 99; font: 700 11px/1 system-ui; background: #fff8; color: #7a8699; padding: 4px 8px; border-radius: 6px; pointer-events: none; }

@media (max-width: 1000px) {
  .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .page { padding: 14px 16px 32px; }
  .page-title h1 { font-size: 20px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .tile .num { font-size: 28px; }
  .who .name-full, .role-chip { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl { background: none; box-shadow: none; }
  .tbl thead { display: none; }
  .tbl tr { background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 10px; padding: 8px 12px; }
  .tbl td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; text-align: right; }
  .tbl td::before { content: attr(data-l); font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; }
  .tbl td.first { font-weight: 800; color: var(--navy); font-size: 15px; text-align: left; }
  .tbl td.first::before { content: none; }
  .tbl td.n { text-align: right; }
}
  .hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
  .hero::after { content: ""; position: absolute; right: -160px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(4,168,169,.22), transparent 65%); pointer-events: none; }
  .hero-in { max-width: 1180px; margin: 0 auto; padding: 18px 20px 48px; position: relative; z-index: 1; }
  .hero-top { display: flex; align-items: center; justify-content: space-between; }
  .hero-top .logo { font-size: 26px; } .hero-top .logo svg { width: 36px; height: 36px; }
  .hero-top a { color: #cfe0f2; font-size: 14px; }
  .hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; margin-top: 40px; }
  .hero h1 { font-size: 42px; font-weight: 800; letter-spacing: -.5px; }
  .hero h1 em { font-style: normal; color: var(--amber); }
  .hero p.lead { color: #cfe0f2; font-size: 17px; max-width: 560px; margin: 16px 0 22px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chips span { padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: 13px; font-weight: 700; }
  .login { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
  .login h2 { color: var(--navy); font-size: 21px; }
  .login p { margin: 4px 0 18px; color: var(--muted); font-size: 14px; }
  .login .btn { width: 100%; min-height: 48px; font-size: 16px; }
  .login .row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 12px; color: var(--muted); }
  .proof { background: #fff; border-bottom: 1px solid var(--line); }
  .proof-in { max-width: 1180px; margin: 0 auto; padding: 18px 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .proof b { display: block; font-size: 26px; color: var(--navy); font-weight: 800; }
  .proof span { font-size: 13px; color: var(--muted); }
  .blocks { max-width: 1180px; margin: 0 auto; padding: 36px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .block { background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
  .block h3 { font-size: 20px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
  .block h3 i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); font-style: normal; }
  .block.inst h3 i { background: var(--amber-soft); color: var(--amber-dark); }
  .block ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
  .block li { display: flex; gap: 10px; align-items: flex-start; }
  .block li::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center/14px no-repeat; }
  .block.inst li::before { background-color: var(--amber); }
  footer { background: var(--navy); color: #cfe0f2; font-size: 14px; }
  footer .in { max-width: 1180px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
  footer .in .grow { flex: 1; }
  footer small { opacity: .7; }
  @media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; gap: 26px; margin-top: 24px; }
    .hero h1 { font-size: 30px; }
    .hero-in { padding-bottom: 30px; }
    .proof-in { grid-template-columns: repeat(2, 1fr); }
    .proof-in > div:first-child { grid-column: 1 / -1; }
    .blocks { grid-template-columns: 1fr; padding: 24px 16px; }
    .login { padding: 20px; }
  }

/* forms, flash messages and cards shared by the portals */
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.flash.ok { background: #e2f5ea; color: #157040; }
.flash.bad { background: #fde7e7; color: #a32727; }
.login .flash { font-size: 14px; }
.logout { margin: 0; }
.logout button { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.creds { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; margin: 12px 0; }
.creds dt { color: var(--muted); } .creds dd { margin: 0; font-weight: 800; color: var(--navy); font-family: ui-monospace, Consolas, monospace; }
.inline { display: inline; margin: 0; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.ilogo { width: 40px; height: 40px; border-radius: 10px; background: #fff; object-fit: contain; flex: none; }
.ended { max-width: 560px; margin: 40px auto; text-align: center; border-top: 5px solid var(--amber); }
.ended h1 { color: var(--navy); font-size: 24px; margin-bottom: 10px; }
.pw-reminder { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.linkish { background: none; border: 0; color: var(--teal-dark); font-weight: 700; cursor: pointer; padding: 0; }
.form-card { max-width: 560px; }
.confirm { max-width: 560px; border-top: 5px solid var(--teal); }
.confirm h2 { color: var(--navy); margin-bottom: 6px; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 12px; }
.filters-bar .input { flex: 1 1 180px; width: auto; }
.filters-bar select.input { flex: 0 1 140px; }
.radio input { accent-color: var(--teal); margin: 0; }
.hint { font-size: 12px; color: var(--muted); }
.tbl td .inline + .inline { margin-left: 6px; }
@media (max-width: 640px) { .tbl td[data-l="Actions"], .tbl td[data-l="Action"] { justify-content: flex-end; flex-wrap: wrap; gap: 6px; } }
/* create-exam form */
.step { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.step h3 { font-size: 16px; color: var(--navy); }
.step-body { margin-left: 40px; }
.blk { padding: 16px 0; border-top: 1px solid var(--line); }
.exam-form .field:first-of-type { margin-bottom: 6px; }
.chap-panel { border: 0; padding: 0; margin: 10px 0 0; }
.chap-panel[data-hidden] { display: none; }
.chaps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 8px; }
.chaps label, .chap-panel .all { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; }
.chap-panel .all { font-weight: 700; }
.chaps small { margin-left: auto; color: var(--muted); }
.chaps input, .chap-panel .all input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.narrow { width: 120px; display: inline-block; }
.ro { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.radios a.radio { color: var(--ink); }
.window { margin-top: 10px; }
.stab { cursor: pointer; }
@media (max-width: 640px) { .chaps { grid-template-columns: 1fr; } .step-body { margin-left: 0; } }

@media (max-width: 640px) { .inst-brand .name-full { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .inst-brand .name-full small { display: none; } }
/* institute analytics: score bands and lists, a student's read-only tiles */
.bands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.band { border-radius: 12px; padding: 12px 14px; color: #fff; }
.band b { display: block; font-size: 28px; line-height: 1.1; } .band span { font-size: 13px; }
.band1 { background: var(--good); } .band2 { background: var(--teal-dark); } .band3 { background: var(--amber-dark); } .band4 { background: var(--bad); }
.band-list { margin-top: 10px; } .band-list summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.band-list ul { margin: 8px 0 0; padding-left: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.tile .good { color: var(--good); } .tile .bad { color: var(--bad); }
.streak i { flex: 1; max-width: 9px; height: 16px; border-radius: 3px; background: #e3e8ef; }
.streak i.y { background: var(--amber); }
.streak-row { display: flex; flex-wrap: wrap; gap: 4px; }
.sd { display: inline-flex; flex-direction: column; align-items: center; width: 40px; padding: 4px 0; border-radius: 6px; background: #eef1f5; font-size: 11px; }
.sd.y { background: var(--amber); }
.student-view h2 { color: var(--navy); font-size: 17px; margin: 22px 0 8px; }
.student-view table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: 14px; }
.student-view th { text-align: left; background: #eef2f7; color: var(--muted); font-size: 12px; padding: 8px 10px; }
.student-view td { padding: 8px 10px; border-top: 1px solid var(--line); }
.student-view .num { text-align: right; }
.student-view .bar { display: inline-block; vertical-align: middle; width: 70px; height: 7px; }
.subject-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
@media (max-width: 640px) {
  .bands { grid-template-columns: 1fr 1fr; }
  .student-view table.cards, .student-view table.cards tbody, .student-view table.cards tr, .student-view table.cards td { display: block; width: 100%; }
  .student-view table.cards thead { display: none; }
  .student-view table.cards tr { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: #fff; }
  .student-view table.cards td { display: flex; justify-content: space-between; border: 0; padding: 3px 0; }
  .student-view table.cards td::before { content: attr(data-l); font-weight: 700; color: var(--muted); font-size: 12px; }
}
/* super admin: sign-ups per week */
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 190px; }
.chart div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; font-size: 11px; color: var(--muted); }
.chart i { display: block; width: 100%; max-width: 36px; min-height: 2px; background: var(--teal); border-radius: 6px 6px 0 0; }
.chart b { color: var(--navy); font-size: 12px; }
@media (max-width: 640px) { .chart { gap: 3px; height: 150px; } .chart span { font-size: 8px; } }

