/* ============================================================
   SAMIMI brand layer (v1)
   Deep navy + iris blue palette, Manrope / Inter type, calm motion,
   the new owl mark, and one line-icon set for the interface chrome.
   Decorations only: every rule here restyles what shared.css lays out.
   Nothing about layout logic, behaviour or content changes.
   ============================================================ */

/* ---------- typefaces (self-hosted, open licence: see vendor/fonts) ---------- */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/manrope-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- palette ---------- */
:root {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --ink: #1c2440;
  --muted: #5b6580;
  --accent: #4a5be8;
  --accent-soft: #eef0fd;
  --accent-deep: #3646c4;
  --green: #137a47;
  --red: #d83a3a;
  --amber: #d97706;
  --navy: #1b2a5b;
  --navy-deep: #121c45;
  --gold: #f6b23c;
  --teal: #149c8f;
  --coral: #f2704f;
  --border: #e3e6ef;
  --line: #d3d8e6;
  --focus-ring: 0 0 0 4px rgba(74, 91, 232, .16);
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-card: 0 1px 2px rgba(27, 42, 91, .04), 0 10px 28px -18px rgba(27, 42, 91, .24);
}

/* ---------- base ---------- */
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: radial-gradient(900px 460px at 50% -240px, rgba(74, 91, 232, .10), transparent 70%), #f5f6fa;
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--font-display); }
h2, h3, h4 { letter-spacing: -.005em; }
a { color: var(--accent); }
::selection { background: rgba(74, 91, 232, .2); }
* { scrollbar-color: #c9cedd transparent; }
::-webkit-scrollbar-thumb { background: #c9cedd; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
footer { font-size: 12px; color: #7a83a0; letter-spacing: .01em; }

/* ---------- background doodles: quiet navy line art, no drifting ---------- */
.deco-item { opacity: .09 !important; animation: none !important; filter: grayscale(1) brightness(.35); }
.deco-item.deco-blob { display: none; }
.deco-sticker { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- header: deep navy band with the real logo lockup ---------- */
header.topbar {
  position: relative; isolation: isolate;
  background: linear-gradient(100deg, #121c45 0%, #1b2a5b 52%, #2a3a80 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 30px -20px rgba(18, 28, 69, .7);
  color: #fff;
}
header.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 140% at 86% 130%, rgba(74, 91, 232, .5), transparent 60%),
    radial-gradient(40% 120% at 62% -70%, rgba(20, 156, 143, .3), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23fff' fill-opacity='.09'/%3E%3C/svg%3E");
}
.topbar-logo {
  width: 38px; height: 38px; border-radius: 10px; object-fit: contain; animation: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 16px -8px rgba(0, 0, 0, .6);
}
header.topbar .wordmark {
  display: none; flex: 0 0 auto; align-self: center; margin-left: 0; padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: .13em;
  color: #fff; user-select: none;
}
@media (min-width: 760px) { header.topbar .wordmark { display: block; } }
/* the landing page has no page title of its own: the name is the title, at every width */
body.landing header.topbar .wordmark { display: block; margin-left: 0; padding-left: 0; border-left: 0; }
@media (min-width: 760px) { body.landing header.topbar > .sub { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .22); } }
header.topbar h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: .005em; text-shadow: none; }
/* (phones keep the stepped title sizes from shared.css) */
@media (min-width: 721px) { header.topbar h1 { font-size: 17px; } }
header.topbar .sub { font-size: 12.5px; opacity: .66; text-shadow: none; }
/* On a wide screen the row is exactly as wide as the cards. The wordmark takes the place of the
   tagline there (the tagline still shows on tablets and phones, where the header is stacked), and the
   title gives way with "…" long before the buttons would ever wrap to a second row. */
@media (min-width: 1101px) {
  header.topbar .brand { flex: 0 10 auto; }
  body.dash header.topbar .brand .sub, body.student-page header.topbar .brand .sub { display: none; }
}
header.topbar .who { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-weight: 500; }
@media (min-width: 1101px) {
  header.topbar { gap: 10px; }
  header.topbar .brand { gap: 10px; }
  header.topbar .top-actions { gap: 8px !important; }
  header.topbar .top-actions { flex: 0 0 auto; }   /* the buttons keep one row; the title gives way instead */
  header.topbar .btn.small { padding-left: 12px; padding-right: 12px; }
  /* the page-type icon in the title is redundant next to the lockup on a wide screen */
  body.dash header.topbar h1 .ico, body.student-page header.topbar h1 .ico { display: none; }
}
header.topbar .btn.secondary {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); color: #fff; box-shadow: none;
}
header.topbar .btn.secondary:hover:not(:disabled) { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .42); transform: none; }
header.topbar .lang-switch { font-family: var(--font-display); border-color: rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .1); letter-spacing: .04em; }
header.topbar .lang-switch button { padding: 6px 10px; }
header.topbar .lang-switch button.on { background: #fff; color: var(--navy); }

/* ---------- cards: crisp edges, a quiet title bar, brand dots ---------- */
.card { border-radius: 16px; border-color: var(--border); padding-top: 50px; box-shadow: var(--shadow-card); }
.card:hover { box-shadow: var(--shadow-card); }
.card::before { height: 36px; background: #f8f9fc; border-bottom-color: var(--border); border-radius: 15px 15px 0 0; }
.card::after {
  top: 15px; left: 16px; width: 30px; height: 6px;
  background:
    radial-gradient(circle 3px at 3px 3px, var(--navy) 98%, transparent),
    radial-gradient(circle 3px at 15px 3px, var(--accent) 98%, transparent),
    radial-gradient(circle 3px at 27px 3px, var(--teal) 98%, transparent);
}
.card > h2 {
  top: 9px; left: 58px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #55607e;
}
.card h2 { font-weight: 700; }
.card h3 { font-weight: 700; }
.modal-head h3, .greet-body h2, .sheet-head h3, .fc-word { font-family: var(--font-display); }
.modal-head h3 { font-weight: 700; letter-spacing: -.01em; }

/* ---------- buttons: solid, grounded, no bounce ---------- */
.btn {
  border-radius: 10px; padding: 11px 20px; font-size: 14.5px; font-weight: 600;
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(27, 42, 91, .2);
}
.btn:hover:not(:disabled) {
  transform: none; background: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 14px -6px rgba(74, 91, 232, .6);
}
.btn:active:not(:disabled) { box-shadow: inset 0 1px 2px rgba(27, 42, 91, .28); }
.btn.secondary { background: #fff; color: var(--accent); border-color: #c7cdef; box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.secondary:hover:not(:disabled) { background: #f6f7fe; border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.danger { background: #fff; color: var(--red); border-color: #f1c3c3; box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.danger:hover:not(:disabled) { background: #fef3f3; border-color: var(--red); box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
table.list .btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible { outline: 3px solid rgba(74, 91, 232, .4); outline-offset: 2px; }

/* ---------- tabs: a segmented control instead of gradient pills ---------- */
.tabs {
  gap: 4px; padding: 4px; margin-bottom: 18px;
  background: #eceef4; border-radius: 12px; width: fit-content; max-width: 100%;
}
.gate > .tabs { padding: 4px; }
.tab {
  position: relative; padding: 8px 15px 9px; border-radius: 9px;
  border-color: transparent; background: transparent; color: #55607e; font-weight: 600; font-size: 14px;
}
.tab:hover:not(.active) { background: rgba(255, 255, 255, .75); color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); border-color: #d8dde9; box-shadow: 0 1px 2px rgba(27, 42, 91, .1); }
.tab.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent);
}
.tab.active .ico { color: var(--accent); }

/* ---------- chips & fields ---------- */
.chip { border-radius: 8px; background: #fff; border-color: var(--line); color: #3a4463; font-weight: 500; padding: 6px 13px; }
.chip:hover:not(.active):not(:disabled) { border-color: #b9c2f5; background: #f7f8ff; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent); }
.field label { font-size: 12.5px; font-weight: 600; color: #55607e; letter-spacing: .01em; }
.field :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea) {
  border-radius: 9px; border-color: var(--line); font-size: 14.5px; padding: 9px 12px; background-color: #fcfcfe;
}
.field select { padding: 9px 38px 9px 12px; }
.field :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea):focus {
  border-color: var(--accent); background-color: #fff; box-shadow: var(--focus-ring);
}

/* ---------- tables, badges ---------- */
table.list { font-size: 14px; }
table.list th { font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; color: #6b7490; border-bottom-color: var(--line); }
table.list th, table.list td { padding: 11px 10px; }
table.list tbody tr:hover { background: #f8f9fd; }
.badge, .tag { font-family: var(--font-display); border-radius: 6px; letter-spacing: .02em; }

/* ---------- dialogs & menus ---------- */
.modal-back { background: rgba(18, 28, 69, .52); }
.modal-box { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(18, 28, 69, .5); }
.modal-x { background: #f1f2f7; color: #55607e; border-radius: 9px; }
.modal-x:hover { background: #e6e8f0; }
.class-menu-drop { border-radius: 12px; }

/* ---------- sign-in & welcome art ---------- */
.gate { border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(18, 28, 69, .5); }
.gate-banner { height: 176px; }
.gate > .gate-banner { padding-left: 0; padding-right: 0; }   /* art runs edge to edge (the gate pads every child) */   /* art runs edge to edge (the gate padded every child) */
.gate-banner img { opacity: 1; object-position: center 73%; }
.gate-banner::after { background: linear-gradient(180deg, rgba(18, 28, 69, .62) 0%, rgba(18, 28, 69, .15) 46%, rgba(18, 28, 69, 0) 70%); }
.gate-welcome { top: 14px; bottom: auto; text-shadow: 0 1px 8px rgba(10, 16, 40, .5); }
.gate-welcome h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.gate-welcome p { opacity: .85; }
.login-flex .login-art img { object-position: center 28%; }

/* ---------- hero banners ---------- */
.hero-art { border-radius: 18px; box-shadow: 0 20px 44px -26px rgba(18, 28, 69, .55); min-height: 300px; }
.hero-art img { object-position: center 6%; }
.hero-art .hero-overlay { padding: 26px 30px; text-shadow: none; text-align: left; align-items: flex-start; background: linear-gradient(180deg, rgba(18, 28, 69, 0) 34%, rgba(18, 28, 69, .72) 100%); }
.hero-art .hero-overlay h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.hero-art .hero-overlay p { opacity: .86; max-width: 380px; }
.rewards-hero { min-height: 280px; }
.rewards-hero img { object-position: center 10%; }
.rewards-hero .hero-overlay h1 { text-shadow: none; }
body.landing .role-card::before { display: none; }

/* ---------- tokens & welcome card ---------- */
.token-chip { animation: none; }
.greet-top { background: linear-gradient(120deg, #121c45, #1b2a5b 55%, #2a3a80); }
.greet-avatar { border-radius: 18px; color: var(--accent); font-family: var(--font-display); }
.greet-body h2 { font-weight: 700; }
.greet-wave { animation: none; }

/* ---------- UI icons (see ui-icons.js) ---------- */
.ico {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 1.1em; height: 1.1em; margin-right: .14em; vertical-align: -.19em;
}
.ico-end { margin-right: 0; margin-left: .14em; }
.ico-e { display: none !important; }
.ico > svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2 > .ico, h3 > .ico, th > .ico, .card > h2 .ico { color: var(--accent); }
.btn .ico, .token-chip .ico { margin: 0; }
/* the lockup in the header already says who we are: the page title carries no icon */
body.dash header.topbar h1 .ico, body.student-page header.topbar h1 .ico { display: none; }
header.topbar h1 .ico { color: rgba(255, 255, 255, .9); }

/* ---------- print stays plain paper ---------- */
@media print {
  body { background: #fff; }
  header.topbar::before { display: none; }
  .card::after { display: none; }
}
