:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e3e8ef;
  --ink: #1a2433;
  --muted: #667085;
  --brand: #1f6feb;
  --brand-d: #1a5fd0;
  --green: #17803d;
  --red: #c62828;
  --amber: #b26a00;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: var(--brand); }
button { font: inherit; }

/* ---- login ---- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; width: 340px; box-shadow: 0 8px 30px rgba(20, 30, 50, .08);
}
.login-card h1 { font-size: 18px; margin: 0 0 4px; }
.login-card p { color: var(--muted); margin: 0 0 20px; font-size: 13px; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100%; }
.side {
  background: #0f1b2d; color: #cdd6e4; padding: 16px 12px; display: flex; flex-direction: column;
}
.side .logo { font-weight: 700; color: #fff; padding: 8px 10px 16px; line-height: 1.25; }
.side .logo small { display: block; font-weight: 400; color: #93a4bd; font-size: 11px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  color: #cdd6e4; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500;
}
.side nav a:hover { background: #1b2b45; }
.side nav a.active { background: var(--brand); color: #fff; }
.side .gsearch { margin: 0 0 12px; background: #1b2b45; border: 1px solid #33465f; color: #fff; border-radius: 8px; padding: 8px 10px; }
.side .gsearch::placeholder { color: #93a4bd; }
.side .gresults { flex: none; background: #fff; color: #111; border-radius: 8px; margin: -6px 0 12px; max-height: 55vh; overflow: auto; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.side .gresults .gr-h { font-size: 11px; font-weight: 700; color: #667; padding: 8px 10px 2px; text-transform: uppercase; }
.side .gresults .gr-i { display: block; padding: 6px 10px; color: #111; text-decoration: none; border-top: 1px solid #eef0f3; }
.side .gresults .gr-i:hover { background: #eaf1fb; }
.side .gresults .gr-i b { display: block; font-size: 13px; font-weight: 600; }
.side .gresults .gr-i small { color: #667; font-size: 11px; }
.side .who { margin-top: auto; font-size: 12px; color: #93a4bd; padding: 12px 10px; }
.side .who button {
  margin-top: 8px; background: transparent; color: #cdd6e4; border: 1px solid #33465f;
  border-radius: 8px; padding: 6px 10px; cursor: pointer; width: 100%;
}

.main { padding: 24px 28px 60px; overflow: auto; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 20px; }
.page-head .grow { flex: 1; }

/* ---- widgets ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.grid { display: grid; gap: 14px; }
.grid.cols { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 26px; }
.stat span { color: var(--muted); font-size: 12px; }

.btn {
  background: var(--brand); color: #fff; border: 0; border-radius: 9px;
  padding: 9px 16px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--brand-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.icon-btn { background: transparent; border: 0; cursor: pointer; font-size: 16px; color: var(--muted); }

input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
}
textarea { min-height: 72px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { background: #f7f9fc; color: var(--muted); font-weight: 700; }
tr:hover td { background: #fafbfe; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.ok { background: #e6f4ea; color: var(--green); }
.pill.off { background: #fdeaea; color: var(--red); }

.muted { color: var(--muted); }
.right { text-align: right; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---- overlay/modal ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 27, 45, .45);
  display: grid; place-items: center; padding: 24px; z-index: 50;
  /* One column no wider than the screen, so a form (560px) shrinks to fit a phone instead of
     pushing its Save button off the side. */
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 600px) { .overlay { padding: 10px; } }
.modal { background: var(--card); border-radius: 14px; width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  background: #0f1b2d; color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0;
  transition: .25s; z-index: 60; pointer-events: none; max-width: 90vw;
}
.toast.show { transform: translateX(-50%); opacity: 1; }
.toast.err { background: var(--red); }

/* ---- photos ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid .ph { position: relative; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-grid .ph button { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.9); border-radius: 6px; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* ---- extras: contact log, photo mode ---- */
.clog { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.clog .meta { font-weight: 600; }
.clog .sub { color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.photo-stage { max-width: 420px; margin: 16px auto; text-align: center; }
.photo-stage .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0; }
.photo-stage .bar > i { display: block; height: 100%; background: var(--brand); }

.side { overflow-y: auto; }


/* Desktop: the left menu is as tall as the window; the list of tabs scrolls on its own with a
   visible scroll bar (logo + search stay at the top, Sign out stays at the bottom). */
.side { position: sticky; top: 0; align-self: start; height: 100vh; overflow: hidden; }
.side nav {
  flex: 1 1 auto; min-height: 0; overflow-y: scroll; padding-right: 6px; margin-right: -4px;
  scrollbar-width: thin; scrollbar-color: #6a80a3 #16243b;
}
.side nav::-webkit-scrollbar { width: 10px; }
.side nav::-webkit-scrollbar-track { background: #16243b; border-radius: 6px; }
.side nav::-webkit-scrollbar-thumb { background: #6a80a3; border-radius: 6px; border: 2px solid #16243b; }
.side nav::-webkit-scrollbar-thumb:hover { background: #8aa2c9; }
.side .who { flex: 0 0 auto; }

/* Grouped left menu: Dashboard, then collapsible groups; one is open at a time (the current
   page's group opens by itself). Change Password and Help sit by Sign out. */
.side nav { gap: 1px; }
.side nav a { padding: 7px 12px; }
.side .nav-head {
  display: flex; align-items: center; width: 100%; margin-top: 6px; padding: 8px 12px;
  background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  color: #93a4bd; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.side .nav-head:hover { background: #1b2b45; color: #fff; }
.side .nav-head span { flex: 1; }
.side .nav-head .chev {
  width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform .15s;
}
.side .nav-group.open .nav-head { color: #fff; }
.side .nav-group.open .chev { transform: rotate(45deg); }
.side .nav-links { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px 10px; padding-left: 8px; border-left: 1px solid #33465f; }
.side .nav-group.open .nav-links { display: flex; }
.side .who-name { display: block; }
.side .foot-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.side .foot-links a {
  flex: 1; text-align: center; color: #cdd6e4; text-decoration: none; font-size: 12px;
  border: 1px solid #33465f; border-radius: 8px; padding: 5px 6px; white-space: nowrap;
}
.side .foot-links a:hover { background: #1b2b45; }
.side .foot-links a.active { background: var(--brand); border-color: var(--brand); color: #fff; }


/* ---- Material look, matching the phone app: college-green colour scheme, green-tinted
   surfaces, rounder cards and dialogs, pill buttons, a deep-green menu. Later rules win. ---- */
:root {
  --bg: #f1f6ef;
  --card: #ffffff;
  --line: #dde5da;
  --ink: #181d18;
  --muted: #59635a;
  --brand: #0f7b2e;
  --brand-d: #0b6324;
  --brand-soft: #c4f1c9;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 40, 22, .06), 0 2px 8px rgba(16, 40, 22, .06);
  --field: #ffffff;
  --th: #eaf2e8;
  --th-ink: #414941;
  --hover: #f4f9f2;
  --hl: #e3f1e3;
  --soft: #f4f8f2;
  --modal-line: #e6ece4;
}
.side { background: #0e2616; color: #d4e4d6; }
.side .logo small, .side .who { color: #9dbaa3; }
.side nav a, .side .foot-links a, .side .who button { color: #d4e4d6; }
.side nav a { border-radius: 999px; }
.side nav a:hover, .side .nav-head:hover, .side .foot-links a:hover { background: #18402a; }
.side nav a.active { background: var(--brand-soft); color: #002107; font-weight: 600; }
.side .foot-links a.active { background: var(--brand-soft); border-color: var(--brand-soft); color: #002107; }
.side .nav-head { color: #9dbaa3; }
.side .nav-links, .side .foot-links a, .side .who button { border-color: #2a5238; }
.side .gsearch { background: #18402a; border-color: #2a5238; border-radius: 999px; padding: 8px 14px; }
.side .gsearch::placeholder { color: #9dbaa3; }
.side .gresults .gr-i:hover { background: #e3f1e3; }
.side nav { scrollbar-color: #5f8a6a #12301d; }
.side nav::-webkit-scrollbar-track { background: #12301d; }
.side nav::-webkit-scrollbar-thumb { background: #5f8a6a; border-color: #12301d; }
.side nav::-webkit-scrollbar-thumb:hover { background: #7fa98a; }

.card { border-color: transparent; box-shadow: var(--shadow); }
.btn { border-radius: 999px; padding: 9px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.btn.sm { padding: 6px 14px; }
.btn.ghost { box-shadow: none; color: var(--brand); border-color: #b9c6b6; }
.btn.ghost:hover { background: var(--hl); }
input, select, textarea { border-radius: 10px; border-color: #c1c9bf; background: var(--field); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 123, 46, .18); }
.side .gsearch:focus { box-shadow: 0 0 0 3px rgba(196, 241, 201, .25); }
table { box-shadow: var(--shadow); }
th { background: var(--th); color: var(--th-ink); }
tr:hover td { background: var(--hover); }
.overlay { background: rgba(10, 30, 16, .45); }
.modal { border-radius: 24px; box-shadow: 0 12px 40px rgba(10, 30, 16, .25); }
.modal-head, .modal-foot { border-color: var(--modal-line); }
.toast { background: #2d322c; border-radius: 12px; }
.login-card { border-radius: 24px; border-color: transparent; box-shadow: 0 8px 30px rgba(16, 40, 22, .10); }

/* Phone: a green top bar with ☰; the same grouped menu slides in from the left. */
.topbar { display: none; }
.menu-scrim { display: none; }
@media (max-width: 760px) {
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    background: var(--brand); color: #fff; padding: 8px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.15);
  }
  .topbar button { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; padding: 6px 8px; border-radius: 999px; cursor: pointer; }
  .topbar button:hover { background: rgba(255,255,255,.15); }
  .topbar b { font-size: 15px; letter-spacing: .02em; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; max-width: 85vw; height: 100%; z-index: 45;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  body.menu-open .side { transform: none; }
  body.menu-open .menu-scrim { display: block; position: fixed; inset: 0; background: rgba(10,30,16,.45); z-index: 40; }
  .main { padding: 16px 14px 60px; }
}
.side .nav-head .gicon { width: 18px; height: 18px; fill: currentColor; margin-right: 10px; flex: none; opacity: .9; }

/* ---- Dark mode: follows the computer's setting; the moon button by Sign out switches it. ---- */
html.dark {
  color-scheme: dark;
  --bg: #0f140f;
  --card: #1a201a;
  --line: #2e372e;
  --ink: #e0e6dd;
  --muted: #a3ada1;
  --brand: #1f8a3f;
  --brand-d: #27a04b;
  --brand-soft: #c4f1c9;
  --green: #7dd88c;
  --red: #ff8a80;
  --amber: #f0b44c;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --field: #121812;
  --th: #222a22;
  --th-ink: #c1c9bf;
  --hover: #1f271f;
  --hl: #1d3a24;
  --soft: #161c16;
  --modal-line: #2e372e;
}
html.dark .side { background: #0a1c10; }
html.dark input, html.dark select, html.dark textarea { border-color: #3a453a; }
html.dark .btn.ghost { color: #8fd99a; border-color: #3a453a; }
html.dark .pill.ok { background: #1d3a24; }
html.dark .pill.off { background: #3d1c1c; }
html.dark .gresults { background: #1a201a; color: var(--ink); }
html.dark .side .gresults .gr-i { color: var(--ink); border-color: #2e372e; }
html.dark .side .gresults .gr-i:hover { background: #1f271f; }
html.dark .overlay { background: rgba(0, 0, 0, .6); }
/* Pages that set a light background inline (status boxes, timetable cells) keep dark text on it,
   and grey inline text is lifted so it stays readable on the dark page. */
html.dark [style*="background:#f"], html.dark [style*="background: #f"],
html.dark [style*="background:#e"], html.dark [style*="background: #e"],
html.dark [style*="background:#d"], html.dark [style*="background:#c"] { color: #1a1f1a; }
html.dark [style*="color:#666"], html.dark [style*="color:#555"], html.dark [style*="color:#888"],
html.dark [style*="color:#999"], html.dark [style*="color:#444"], html.dark [style*="color:#333"],
html.dark [style*="color: #666"], html.dark [style*="color: #555"] { color: var(--muted) !important; }
.side .theme-btn {
  flex: 0 0 auto; background: none; border: 1px solid #2a5238; color: #d4e4d6; border-radius: 8px;
  padding: 5px 9px; cursor: pointer; font-size: 13px; line-height: 1;
}
.side .theme-btn:hover { background: #18402a; }
.side .foot-row { display: flex; gap: 4px; align-items: stretch; margin-top: 8px; }
.side .foot-row .foot-links { margin-top: 0; flex: 1; min-width: 0; }

/* Empty lists and loading: a soft panel with an icon instead of bare grey text. */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 8px 0; padding: 32px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--soft); color: var(--muted); font-size: 14px; line-height: 1.45;
}
.empty::before {
  content: ""; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--hl) no-repeat center / 24px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f7b2e'%3E%3Cpath d='M19 3H4.99C3.88 3 3 3.9 3 5v14c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z'/%3E%3C/svg%3E");
}
html.dark .empty::before { background-color: #1d3a24; }
.empty.loading { border-style: solid; border-color: transparent; background: transparent; }
.empty.loading::before {
  width: 28px; height: 28px; background: none; border: 3px solid var(--hl); border-top-color: var(--brand);
  animation: vspin .8s linear infinite;
}
@keyframes vspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .empty.loading::before { animation-duration: 2.4s; } }
.side .who .theme-btn { width: auto; margin-top: 0; }
@media (max-width: 760px) {
  .topbar { margin: -16px -14px 14px; top: -16px; }
  .grid.cols { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* Command Center / Start My Day: one line per thing that needs attention. */
.cc-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.cc-row.go { cursor: pointer; }
.cc-row.go:hover { background: var(--hover); }
.cc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cc-n { font-size: 17px; min-width: 28px; }
.cc-t { flex: 1; }
.cc-go { color: var(--muted); font-size: 20px; line-height: 1; }
.cc-names { margin: 0 0 4px 44px; padding: 0; columns: 2 280px; font-size: 13px; color: var(--muted); }
.cc-names li { margin: 2px 0; break-inside: avoid; }
.side .who-row { display: flex; align-items: center; gap: 8px; }
.side .who-row .who-name { flex: 1; min-width: 0; }

/* One DD-MM-YYYY date box with a small calendar button beside it (ui.js enhanceDate). */
.dmy-wrap { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: middle; }
.field .dmy-wrap { display: flex; }
.dmy-wrap .dmy-text { flex: 1 1 auto; min-width: 118px; }
.dmy-wrap .dmy-text.bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(198, 40, 40, .15); }
input.dmy-pick { flex: none; width: 38px !important; min-width: 38px !important; padding: 6px 4px; color: transparent; cursor: pointer; }
input.dmy-pick::-webkit-datetime-edit { display: none; }
input.dmy-pick::-webkit-calendar-picker-indicator { margin: 0 auto; cursor: pointer; opacity: .8; }
html.dark input.dmy-pick::-webkit-calendar-picker-indicator { filter: invert(.85); }

/* Smart Home (staff Dashboard): big shortcuts for their own jobs. */
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.home-tile { background: var(--hl); color: var(--ink); border: 0; border-radius: 14px; padding: 16px 12px; font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.home-tile:hover { background: var(--brand-soft); color: #002107; }

/* Column headings that sort when clicked (ui.js) */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--brand); text-decoration: underline; }

/* "⬇ Excel" above every table (ui.js) */
.tbl-tools { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.tbl-tools .btn { padding: 4px 12px; font-size: 12px; }
@media print { .tbl-tools { display: none; } }

/* Table headings stay at the top while a long list scrolls (computer screens: the page area
   scrolls on its own, so a heading can stick to its top). overflow: clip still rounds the
   corners but, unlike hidden, lets the headings stick. */
table { overflow: clip; }
@media (min-width: 761px) {
  .app { height: 100vh; }
  .main { height: 100vh; }
  /* -24px: the page area's own top padding, so no rows show above the heading. */
  .main thead th { position: sticky; top: -24px; z-index: 2; }
}
.modal-body thead th { position: sticky; top: -18px; z-index: 2; }
@media print { .app, .main { height: auto; overflow: visible; } }

/* Full manual (README) on the website */
.manual { line-height: 1.55; }
.manual h1 { color: var(--brand); font-size: 24px; margin: 4px 0 8px; }
.manual h2 { color: var(--brand); font-size: 19px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 26px 0 10px; }
.manual h3 { font-size: 15px; margin: 18px 0 6px; }
.manual ul, .manual ol { margin: 6px 0 10px 22px; }
.manual li { margin: 3px 0; }
.manual table { margin: 8px 0 14px; box-shadow: none; border: 1px solid var(--line); }
.manual mark { background: #ffe58a; color: #111; border-radius: 3px; }

/* ---- The college's sign-in page and College & Contacts page (site.js) ---- */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.landing-hero {
  flex: 1 0 auto; min-height: 520px; display: grid; grid-template-columns: 1.3fr minmax(300px, 380px); gap: 40px;
  align-items: center; padding: 48px 6vw; color: #fff; background-size: cover; background-position: center;
  background-color: #0e2616; background-image: linear-gradient(135deg, #0e2616 0%, #0f7b2e 100%);
}
.landing-intro { max-width: 640px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.landing-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.site-logo { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); flex: none; }
.landing-brand h1 { margin: 0; font-size: clamp(22px, 3.2vw, 38px); line-height: 1.15; letter-spacing: .01em; }
.landing-tag { margin: 6px 0 0; font-size: 16px; opacity: .92; }
.site-details { display: grid; gap: 8px; font-size: 15px; }
.site-details a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.site-details .site-map { justify-self: start; margin-top: 8px; color: #fff; border-color: rgba(255,255,255,.7); text-decoration: none; text-shadow: none; }
.landing-card .login-card { color: var(--ink); margin: 0; width: 100%; max-width: 380px; box-shadow: 0 16px 40px rgba(0,0,0,.30); }
.landing-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 6vw; font-size: 12px; color: var(--muted); }

.photo-strip { overflow: hidden; background: #0e2616; padding: 10px 0; }
.strip-track { display: flex; gap: 10px; width: max-content; animation: strip-move 60s linear infinite; }
.photo-strip:hover .strip-track { animation-play-state: paused; }
.strip-track img { height: 150px; width: 225px; object-fit: cover; border-radius: 10px; cursor: zoom-in; flex: none; }
/* Left to right: the second copy starts off-screen on the left and slides into place. */
@keyframes strip-move { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } .photo-strip { overflow-x: auto; } }
.photo-zoom { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.85); display: grid; place-items: center; cursor: zoom-out; padding: 20px; }
.photo-zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }

@media (max-width: 760px) {
  .landing-hero { grid-template-columns: 1fr; padding: 28px 16px; gap: 24px; min-height: 0; }
  .site-logo { width: 64px; height: 64px; }
  .landing-card .login-card { max-width: none; }
  .strip-track img { height: 110px; width: 165px; }
}

.college-banner { border-radius: var(--radius); padding: 26px 24px; color: #fff; background: linear-gradient(135deg, #0e2616, #0f7b2e); background-size: cover; background-position: center; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.college-banner.has-photo { min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; }
.college-banner + .photo-strip { margin-top: 12px; border-radius: var(--radius); }
.contact-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.contact-group-name { display: block; color: var(--brand); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; margin-bottom: 6px; }
.contact-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.contact-row:first-of-type { border-top: 0; }
.contact-who { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; }
.contact-row .btn { text-decoration: none; white-space: nowrap; }

.site-editor h4 { margin: 18px 0 6px; }
.site-photo-main img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.site-gallery-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-thumb { width: 150px; text-align: center; }
.site-thumb img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; display: block; }
.site-contact-row { display: grid; grid-template-columns: 110px 1.4fr 1fr 130px auto auto; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 760px) { .site-contact-row { grid-template-columns: 1fr 1fr; } }
.contact-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contact-group > summary::-webkit-details-marker { display: none; }
.contact-group > summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.contact-group[open] > summary::after { transform: rotate(180deg); }
.contact-group > summary .contact-group-name { margin: 0; }
.contact-group[open] > summary { margin-bottom: 6px; }
.contact-groups { align-items: start; }
.dash-college { margin: 0 0 16px; }
.dash-college .photo-strip { margin-top: 10px; border-radius: var(--radius); }
.dash-college .college-banner.has-photo { min-height: 200px; }
.dash-college-edit { text-align: right; font-size: 12px; margin-top: 4px; }

/* Admin → College Website */
.web-editor .web-sec { margin-bottom: 10px; }
.web-editor .web-sec > summary { cursor: pointer; padding: 2px 0; }
.web-editor .web-sec[open] > summary { margin-bottom: 10px; }
.web-list { display: grid; gap: 10px; }
.web-item { background: var(--bg); }
.web-file { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.web-thumb { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; }

/* Version at the bottom of the menu, and the "new version available" bar. */
.side .ver { font-size: 11px; opacity: .65; margin-top: 8px; text-align: center; }
.update-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 32px);
  background: #1b5e20; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600; }
.update-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }

/* ---- Elegant look (2026), the same as the college website: serif titles, ivory pages, deep green
   with gold accents. Later rules win; dark mode keeps its own colours. ---- */
:root {
  --bg: #f8f6ef; --line: #e6e2d6; --gold: #c9a227; --gold-l: #f3e3a6; --serif: "Cormorant Garamond", Georgia, serif;
  --shadow: 0 1px 2px rgba(16,40,24,.05), 0 6px 22px rgba(16,40,24,.07);
}
body { font-family: Inter, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.page-head h2 { font-family: var(--serif); font-size: 32px; font-weight: 700; color: #0b3d1e; letter-spacing: .2px; position: relative; padding-bottom: 6px; }
.page-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), #e8cf7a); }
html.dark .page-head h2 { color: #e6efe3; }
.modal-head h3, .modal-head b, .login-card h1 { font-family: var(--serif); font-size: 24px; letter-spacing: .2px; }
.card > b:first-child { font-family: var(--serif); font-size: 19px; color: #0b3d1e; }
html.dark .card > b:first-child { color: #dfeadc; }
.card { border-radius: 18px; }
/* Menu: deep green with a gold rule, serif college name, a gold bar on the open page. */
.side { background: linear-gradient(180deg, #0b2a17 0%, #071d0f 100%); border-right: 1px solid rgba(201,162,39,.25); }
.side .logo { font-family: var(--serif); font-size: 20px; letter-spacing: .5px; color: #fff; border-bottom: 1px solid rgba(201,162,39,.35); margin-bottom: 10px; }
.side .logo small { font-family: Inter, system-ui, sans-serif; color: var(--gold-l); letter-spacing: 1.2px; text-transform: uppercase; font-size: 10.5px; }
.side nav a.active { background: rgba(243,227,166,.16); color: #fff; box-shadow: inset 3px 0 0 var(--gold); border-radius: 10px; }
.side .foot-links a.active { background: rgba(243,227,166,.16); border-color: var(--gold); color: #fff; }
.side .nav-head .gicon { color: var(--gold-l); }
.side .ver { color: var(--gold-l); opacity: .7; }
/* Buttons: the main action in deep green, gold on focus. */
.btn { background: linear-gradient(135deg, #0f7b2e, #0a5c22); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.22); }
th { font-weight: 600; letter-spacing: .2px; }
/* Sign-in page: deeper shade, serif name, gold accents. */
.landing-hero { background-image: linear-gradient(120deg, rgba(4,26,12,.92) 0%, rgba(4,26,12,.7) 50%, rgba(4,26,12,.35) 100%), linear-gradient(135deg, #0e2616 0%, #0f7b2e 100%); }
.landing-brand h1 { font-family: var(--serif); font-size: clamp(28px, 4vw, 48px); font-weight: 700; letter-spacing: .8px; }
.landing-tag { color: var(--gold-l); font-family: var(--serif); font-size: 20px; font-style: italic; }
.site-logo { box-shadow: 0 0 0 3px var(--gold), 0 6px 20px rgba(0,0,0,.3); }
.landing-card .login-card { border-radius: 22px; position: relative; overflow: hidden; }
.landing-card .login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--gold), #e8cf7a, var(--gold)); }
.college-banner { border-left: 5px solid var(--gold); }
.college-banner h1, .college-banner h2, .college-banner b:first-child { font-family: var(--serif); letter-spacing: .5px; }
.topbar { background: linear-gradient(90deg, #0b2a17, #0f7b2e); border-bottom: 2px solid var(--gold); }
.topbar b { font-family: var(--serif); font-size: 18px; }
