/* GFASchool — the brand layer every page shares (templates/brand/*.html; the board: assets/GFASchool Logo.html).
   Tokens from the board: midnight #101436, cream #FBF7EE, lavender #A7ACD1, electric blue #1A2BD9, coral #FF6B57,
   slate #5F6384. Syne (the wordmark) is vendored; the Arabic UI face is the portal's visual world's decision (Task 3)
   and stays the system's until then. */
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("../vendor/syne/syne-latin.559e8363d74f.woff2") format("woff2");   /* SIL OFL 1.1, see vendor/syne/OFL.txt */
}

:root {
  --midnight: #101436; --cream: #FBF7EE; --lavender: #A7ACD1; --blue: #1A2BD9; --coral: #FF6B57; --slate: #5F6384;
  --ink: var(--midnight); --ink-2: var(--slate); --ground: var(--cream); --paper: #FFFFFF;
  --line: rgba(16, 20, 54, .14); --line-strong: rgba(16, 20, 54, .35);
  --font-ui: "Segoe UI", Tahoma, system-ui, -apple-system, "Noto Naskh Arabic", sans-serif;
  --font-brand: "Syne", "Segoe UI", sans-serif;
  --font-mono: Consolas, "JetBrains Mono", "Courier New", monospace;
  --radius: 14px;
  color-scheme: light;
}

/* the browser's own surfaces carry the palette too */
::selection { background: var(--lavender); color: var(--midnight); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
input, textarea, select { caret-color: var(--blue); }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--midnight); }

/* ---- the mark ------------------------------------------------------------------------------------------------- */
.mark {
  --mark-g: #1A2BD9; --mark-book: #101436; --mark-dot: #FF6B57; --mark-ground: #FBF7EE;
  display: block; flex: none; overflow: visible;
}
.mark-on-dark { --mark-g: #FBF7EE; --mark-book: #A7ACD1; --mark-ground: #101436; }
.mark .m-book { fill: var(--mark-book); stroke: var(--mark-book); stroke-width: 1.6; stroke-linejoin: round; }
.mark .m-spine { fill: none; stroke: var(--mark-ground); stroke-width: 1; stroke-linecap: round; }
.mark .m-words { font: 800 6.5px var(--font-brand); fill: var(--mark-ground); }
.mark .m-g { fill: none; stroke: var(--mark-g); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.mark .m-cap { fill: var(--mark-g); stroke: var(--mark-g); stroke-width: 2.5; stroke-linejoin: round; }
.mark .m-cord { fill: none; stroke: var(--mark-book); stroke-width: 1.5; stroke-linecap: round; }
.mark .m-knot, .mark .m-fringe, .mark .m-pivot { fill: var(--mark-book); }
.mark .m-dot { fill: var(--mark-dot); }
/* the board's rule: at 32 px the tassel goes too, leaving the cap, the book and the dot, drawn heavier */
.mark-small .m-tassel, .mark-small .m-pivot, .mark-small .m-words, .mark-small .m-spine { display: none; }
.mark-small .m-g { stroke-width: 12; }
.mark-small .m-cap { stroke-width: 4; }
.mark-small .m-book { stroke-width: 3; }
/* motion: the tassel swings from the cap's corner; the find-dot never moves on its own */
.mark .m-tassel { transform-box: view-box; transform-origin: 96px 32px; }
.mark-motion .m-tassel { animation: gs-tassel 2.8s ease-in-out infinite; }
@keyframes gs-tassel { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@media (prefers-reduced-motion: reduce) { .mark-motion .m-tassel { animation: none; } }

/* ---- the horizontal lockup: mark | GFASchool / BY GOFINDALL — Latin, so always left to right -------------------- */
.lockup { display: flex; align-items: center; gap: 14px; direction: ltr; color: var(--midnight); }
.lockup .mark { width: 84px; height: auto; }
.lockup-rule { width: 2px; align-self: stretch; background: currentColor; opacity: .15; }
.lockup-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wordmark { font: 800 24px/1.05 var(--font-brand); letter-spacing: -.025em; white-space: nowrap; }
.wordmark span { color: var(--blue); }
.byline { font: 400 9px/1 var(--font-mono); letter-spacing: .16em; color: var(--slate); }
.lockup-on-dark { color: var(--cream); }
.lockup-on-dark .mark { --mark-g: #FBF7EE; --mark-book: #A7ACD1; --mark-ground: #101436; }
.lockup-on-dark .lockup-rule { background: #FBF7EE; opacity: .18; }
.lockup-on-dark .wordmark span, .lockup-on-dark .byline { color: var(--lavender); }
.lockup-compact { gap: 10px; }
.lockup-compact .mark { width: 58px; }
.lockup-compact .wordmark { font-size: 18px; }
.lockup-compact .byline { font-size: 8px; }

/* ---- the plain pages: a host's front page, the sign-in pages, the error pages ---------------------------------- */
body.plain-page { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink); font: 16px/1.75 var(--font-ui); -webkit-font-smoothing: antialiased; }
.plain { width: min(100% - 2rem, 30rem); margin: 0 auto; padding: clamp(2rem, 8vh, 5rem) 0 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
.plain-head { display: flex; flex-direction: column; gap: 1rem; }
.plain-home { display: inline-flex; width: max-content; color: inherit; text-decoration: none; border-radius: 6px; }
.plain-title { margin: .75rem 0 0; font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1.3; font-weight: 700; text-wrap: balance; }
.plain-lead { margin: 0; color: var(--ink-2); max-width: 38ch; }
.plain-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 14px 32px -20px rgba(16, 20, 54, .4); }
.plain-card p { margin: 0; }
.plain-hint { margin: 0; color: var(--ink-2); font-size: .92rem; }
.plain-links { margin: 0; font-size: .92rem; }
/* a school's own head (D-084): its logo, whatever its shape, on a white plate 72px tall and as wide as the logo needs
   up to 200px, contained, beside its name; and the quiet credit at the foot */
.plain-school { align-items: center; gap: 14px; width: auto; max-width: 100%; color: var(--ink); text-decoration: none; }
.plain-school:hover { color: var(--ink); }
.plain-school b { font-size: 1.15rem; font-weight: 700; line-height: 1.4; text-wrap: balance; }
.plain-logo { flex: none; display: flex; align-items: center; justify-content: center; height: 72px; min-width: 72px; max-width: 200px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.plain-logo img { display: block; height: 54px; width: auto; max-width: 182px; object-fit: contain; }
.plain-credit { margin: .5rem 0 0; font-size: .85rem; color: var(--ink-2); }

/* ---- forms and buttons --------------------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: .7rem .9rem; min-height: 48px; width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.field input:hover { border-color: var(--line-strong); }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 43, 217, .18); }
.field input::placeholder { color: var(--slate); }
.field input:disabled { background: var(--cream); color: var(--slate); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.4rem;
  font: inherit; font-weight: 700; font-size: 1rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background .15s ease-out, border-color .15s ease-out, transform .15s ease-out;
}
.btn:hover { background: var(--cream); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 24px -14px rgba(26, 43, 217, .8); }
.btn-primary:hover { background: #1522B3; border-color: #1522B3; color: #fff; }
.btn-danger { color: #9B2B20; border-color: rgba(155, 43, 32, .4); }
.btn-danger:hover { background: #FBEBE9; color: #9B2B20; }
.btn-block { width: 100%; }
.alert { padding: .8rem 1rem; border-radius: 10px; font-size: .95rem; border: 1px solid; }
.alert ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
.alert-error { background: #FBEBE9; border-color: #E8AFA6; color: #8A2C22; }
.alert-success { background: #E8F2E4; border-color: #A9CFA0; color: #245B2A; }
.alert-info { background: #EEF0FA; border-color: #C7CCEB; color: #1C2466; }
.alert-warning { background: #FFF4E5; border-color: #F2CFA1; color: #7A4B00; }

/* ---- the Django admin's header (templates/admin/base_site.html) ------------------------------------------------ */
#site-name a.admin-brand { display: inline-flex; align-items: center; gap: 10px; }
.admin-mark { width: 40px; height: auto; --mark-ground: var(--header-bg, #264b5d); }
