:root {
  --ink: #24305e; --text: #2b2f45; --muted: #5b6382;
  --sun: #f6a821; --sun-soft: #fff1d3; --leaf: #2e9e6a; --leaf-soft: #d3eedf;
  --sky: #dcebfa; --sky-deep: #2f6fb8; --coral: #ef5d6e; --coral-soft: #fde2e5;
  --bg: #f3f6fb; --line: #dfe6f1;
}
* { box-sizing: border-box; }
body { margin: 0; font: 1rem/1.55 "Mukta", "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--bg); }
h1, h2, legend { font-family: "Baloo 2", system-ui, sans-serif; color: var(--ink); line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .3rem; }
h2 { font-size: 1.25rem; margin: 0 0 .8rem; }
a { color: var(--sky-deep); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.a-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.a-side { background: var(--ink); color: #fff; padding: 1.3rem 1rem; display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.a-brand { color: #fff; text-decoration: none; font: 800 1.25rem/1.15 "Baloo 2", sans-serif; padding: 0 .6rem; }
.a-brand span { display: block; font: 500 .85rem "Mukta", sans-serif; color: var(--sun); margin-top: .2rem; }
.a-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.a-side nav a { display: flex; justify-content: space-between; align-items: center; color: #d6dbef; text-decoration: none; padding: .5rem .7rem; border-radius: 8px; }
.a-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.a-side nav a.is-active { background: var(--sun); color: var(--ink); font-weight: 700; }
.a-badge { background: var(--coral); color: #fff; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 0 .5rem; }
.a-side__foot { margin-top: auto; display: grid; gap: .4rem; padding: 0 .6rem; font-size: .95rem; }
.a-side__foot a, .a-linkbtn { color: #d6dbef; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; text-decoration: underline; }
.a-main { padding: 2rem clamp(1rem, 3vw, 2.8rem) 4rem; max-width: 1100px; width: 100%; }
@media (max-width: 860px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-side { position: static; height: auto; }
  .a-side ul { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.a-lead { color: var(--muted); margin: 0 0 1.6rem; max-width: 70ch; }
.a-muted { color: var(--muted); }
.a-mt { margin-top: 1.6rem; }
.a-crumb { margin: 0 0 .3rem; color: var(--muted); font-size: .95rem; }
.a-titlebar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.a-titlebar h1 { margin: 0; }

.a-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; margin: 0 0 1.2rem; }
fieldset.a-card { min-width: 0; }
.a-card legend { font-size: 1.15rem; font-weight: 700; padding: 0 .4rem; margin-left: -.4rem; }
.a-empty { text-align: center; padding: 2.5rem 1rem; }
.a-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; }
@media (max-width: 900px) { .a-cols { grid-template-columns: 1fr; } }

.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.a-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; text-decoration: none; color: var(--muted); }
.a-stat strong { display: block; font: 800 2rem/1 "Baloo 2", sans-serif; color: var(--ink); margin-bottom: .2rem; }
.a-stat:first-child { background: var(--sun-soft); border-color: #f5d79a; }
.a-stat:hover { border-color: var(--sun); }

.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.a-list li span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.a-list li.is-new a { font-weight: 700; }
.a-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.a-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.a-tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; text-decoration: none; color: var(--muted); }
.a-tile strong { display: block; font: 700 1.2rem "Baloo 2", sans-serif; color: var(--ink); }
.a-tile:hover { border-color: var(--sun); }

/* Forms */
.a-form { display: block; }
.a-narrow { max-width: 520px; }
.a-field { margin-bottom: 1.15rem; }
.a-field:last-child { margin-bottom: 0; }
.a-field > label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .25rem; }
.a-opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.a-field input[type=text], .a-field input[type=url], .a-field input[type=date], .a-field input[type=number], .a-field input[type=password], .a-field input:not([type]), .a-field select, .a-field textarea {
  width: 100%; font: inherit; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--text);
}
.a-field input:focus, .a-field select:focus, .a-field textarea:focus { border-color: var(--sky-deep); outline: none; box-shadow: 0 0 0 3px rgba(47,111,184,.18); }
.a-field input[type=number] { max-width: 140px; }
.a-field input[type=date] { max-width: 220px; }
.a-mono { font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: .93rem !important; }
.a-hint { font-size: .88rem; color: var(--muted); margin: .3rem 0 0; }
.a-check { display: flex; gap: .5rem; align-items: center; font-weight: 600; color: var(--ink); cursor: pointer; }
.a-check input { width: 18px; height: 18px; }
.a-check--small { font-weight: 400; font-size: .93rem; margin-top: .4rem; }
.a-image { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.a-image img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.a-savebar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding: .8rem 0; }
.a-savebar form { margin: 0; }
.a-danger { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.a-btn { display: inline-flex; align-items: center; justify-content: center; font: 700 .98rem "Mukta", sans-serif; padding: .55rem 1.1rem; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.a-btn:hover { border-color: var(--ink); }
.a-btn--primary { background: var(--sun); border-color: var(--sun); }
.a-btn--primary:hover { background: #e08a00; border-color: #e08a00; color: #fff; }
.a-btn--quiet { border-color: transparent; background: transparent; }
.a-btn--danger { color: #a8273a; border-color: #f2b7bf; }
.a-btn--danger:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.a-btn--block { width: 100%; padding: .75rem; }

.a-flash { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; background: var(--leaf-soft); color: #165c3c; }
.a-flash--err { background: var(--coral-soft); color: #8d1e30; }
.a-flash--warn { background: var(--sun-soft); color: #7a4a00; }

/* Tables & lists */
.a-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.a-table th, .a-table td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table thead th { background: #f8fafd; font-size: .9rem; color: var(--muted); font-weight: 600; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tr.is-new td { background: #fffaf0; }
.a-table tr.is-new a { font-weight: 700; }
.a-right { text-align: right !important; }
.a-rowtitle { display: flex; align-items: center; gap: .7rem; }
.a-rowtitle img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.a-tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: .05rem .55rem; border-radius: 999px; background: #eceff5; color: var(--muted); font-style: normal; }
.a-tag--live { background: var(--leaf-soft); color: #165c3c; }
@media (max-width: 640px) { .a-table { display: block; overflow-x: auto; } }

.a-thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.a-thumbs a { display: block; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); }
.a-thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.a-thumbs span { display: block; padding: .45rem .7rem; font-size: .92rem; }
.a-thumbs .a-tag { position: absolute; top: .5rem; left: .5rem; }
.a-thumbs a:hover { border-color: var(--sun); }

.a-pills { display: flex; gap: .4rem; margin-bottom: 1rem; }
.a-pills a { padding: .3rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.a-pills a.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.a-dl { margin: 0; display: grid; gap: .9rem; }
.a-dl dt { font-size: .88rem; color: var(--muted); font-weight: 600; }
.a-dl dd { margin: .1rem 0 0; font-size: 1.08rem; }

/* Login */
.a-login { display: grid; place-items: center; min-height: 100vh; padding: 1rem; background: linear-gradient(180deg, #cfe5fa, #fff0d4); }
.a-login__card { background: #fff; width: min(420px, 100%); padding: 2rem; border-radius: 18px; box-shadow: 0 20px 50px -25px rgba(36,48,94,.45); }
.a-login__school { font: 700 1rem "Baloo 2", sans-serif; color: #b36a00; margin: 0; }
.a-login h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.a-login__back { text-align: center; margin: 1.2rem 0 0; font-size: .95rem; }

.a-doc { display: grid; gap: .35rem; max-width: 560px; }
.a-doc__cur { margin: 0; font-size: .95rem; background: var(--leaf-soft); padding: .35rem .7rem; border-radius: 8px; }
.a-doc__or { font-size: .88rem; color: var(--muted); margin-top: .2rem; }
.a-doc input[type=url] { width: 100%; font: inherit; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: 9px; }
