/* ==========================================================================
   XYZ School & College — Design tokens
   Palette: deep navy ledger + gold foil seal. Tight, document-dense spacing.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&display=swap');
@import url('pos-select.css');

:root {
  --navy-950: #0a1422;
  --navy-900: #0f1b2d;
  --navy-800: #16263d;
  --navy-700: #1f3550;
  --navy-600: #2a4668;
  --navy-500: #3a5a82;
  --gold-700: #0b6350;
  --gold-600: #0f7a63;
  --gold-500: #0f7a63;
  --gold-400: #3aa58f;
  --gold-100: #e6f4f0;
  --pos-primary: #0f7a63;
  --pos-primary-dark: #0b6350;
  --pos-primary-soft: #e6f4f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7686;
  --line: #e3e8ef;
  --ok: #1c8a4e;
  --danger: #d1342f;
  --radius: 8px;
  --font-head: 'Baloo Da 2', 'Hind Siliguri', system-ui, sans-serif;
  --font-body: 'Hind Siliguri', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1120;
    --card: #101a30;
    --ink: #eef1f8;
    --muted: #93a1c0;
    --line: #223258;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1120;
  --card: #101a30;
  --ink: #eef1f8;
  --muted: #93a1c0;
  --line: #223258;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: max(calc(16.2px * var(--fb, 1.25)), var(--fmin, 18px));
  line-height: 1.55;
}
h1, h2, h3, h4, .font-head { font-family: var(--font-head); font-weight: 700; margin: 0; color: var(--ink); }
p { margin: 0 0 .5em; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }

/* ---------- layout shells ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
.section { padding: 28px 0; }
.section-tight { padding: 14px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: max(calc(22.4px * var(--fb, 1.25)), var(--fmin, 18px)); position: relative; padding-left: 12px; border-left: 4px solid var(--gold-500); }
.section-head .more { font-size: max(calc(14px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- top strip ---------- */
/* the strips are exactly as wide as the hero banner (same width / max-width / centering) - not full page width */
.topbar { background: transparent; color: #cfd8ee; font-size: max(calc(13.4px * var(--fb, 1.25)), var(--fmin, 18px)); padding: 10px 0 8px; }
.topbar .wrap { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: calc(100% - 40px); max-width: calc(1360px - 40px); margin: 0 auto; padding: 0; }
/* news ticker bar: gold slanted label + dark-green strip, headings scroll left -> right in ONE row */
.topbar .update { display: flex; flex-wrap: nowrap; align-items: stretch; min-width: 0; flex: 0 0 auto; width: 100%; height: 34px; background: #092723; border-radius: 4px; overflow: hidden; }
.topbar .update b { display: flex; align-items: center; flex-shrink: 0; background: var(--gold-500); color: #fff; padding: 0 26px 0 16px; font-weight: 700; white-space: nowrap; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.topbar .ticker { flex: 1 1 0; min-width: 0; overflow: hidden; position: relative; display: flex; align-items: center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.topbar .ticker-track { display: inline-flex; align-items: center; flex-wrap: nowrap; white-space: nowrap; will-change: transform; animation: ticker-ltr var(--tick-dur, 30s) linear infinite; }
.topbar .ticker:hover .ticker-track { animation-play-state: paused; }
.topbar .ticker-item { display: inline-flex; align-items: center; color: #fff; padding-right: 88px; } /* gap between one notice and the next */
.topbar .ticker-item::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #5fd0b6; margin-right: 10px; flex-shrink: 0; }
.topbar .ticker-item:hover { color: #5fd0b6; }
/* one set of headings is repeated to fill the bar; sliding by exactly one set width makes the loop seamless */
@keyframes ticker-ltr { from { transform: translateX(calc(-1 * var(--tick-w, 100%))); } to { transform: translateX(0); } }
.topbar .update-more { flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 12px; border-left: 1px solid rgba(255,255,255,.12); color: #5fd0b6; font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); white-space: nowrap; }
.topbar .update-more:hover { color: #fff; }
.topbar .update-more .icon { width: 10px; height: 10px; }
/* EIIN / School code / Reg. No: second strip, same size as the update strip - left, centre, right */
.topbar .codes { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 34px; padding: 0 10px 0 18px; background: #092723; border-radius: 4px; color: #cfd8ee; white-space: nowrap; overflow: hidden; }
.topbar .codes .topbar-login { flex-shrink: 0; padding: 3px 12px; font-size: max(calc(12.5px * var(--fb, 1.25)), var(--fmin, 18px)); line-height: 1.4; }
.topbar .codes .topbar-login .icon { width: 13px; height: 13px; }
.topbar .codes b { color: #5fd0b6; font-weight: 600; }

/* ---------- header / nav ---------- */
.site-header { background: var(--card); border-bottom: 2px solid var(--gold-500); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 16px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 30% 25%, var(--gold-400), var(--gold-700)); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-text .name { font-family: var(--font-head); font-size: max(calc(19px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; color: var(--navy-800); line-height: 1.1; }
.brand-text .tag { font-size: max(calc(11.8px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); }

nav.mainnav { display: flex; align-items: center; gap: 2px; }
nav.mainnav > ul { display: flex; align-items: center; gap: 2px; }
nav.mainnav > ul > li { position: relative; }
nav.mainnav a.nav-link, nav.mainnav button.nav-link {
  display: flex; align-items: center; gap: 4px; padding: 8px 10px; font-size: max(calc(15.1px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 600;
  color: var(--navy-800); border-radius: 4px; background: none; border: none;
}
nav.mainnav a.nav-link:hover, nav.mainnav button.nav-link:hover, nav.mainnav li.active > a.nav-link, nav.mainnav li.active > button.nav-link { color: var(--gold-700); background: var(--gold-100); }
.nav-caret { display: none; }
.dropdown { position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--gold-500); min-width: 210px; box-shadow: 0 10px 24px rgba(10,24,48,.14); border-radius: 0 0 6px 6px; padding: 4px; display: none; }
nav.mainnav li:hover .dropdown, nav.mainnav li.open .dropdown { display: block; }
.dropdown a { display: block; padding: 7px 10px; font-size: max(calc(14.6px * var(--fb, 1.25)), var(--fmin, 18px)); border-radius: 4px; color: var(--ink); }
.dropdown a:hover { background: var(--navy-900); color: #fff; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 4px; font-size: max(calc(14.6px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; border: 1px solid transparent; }
.btn-gold { background: var(--gold-500); color: #fff; }
.btn-gold:hover { background: var(--gold-400); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-700); }
.btn-danger { background: #fdecea; color: var(--danger); }
.btn-danger:hover { background: #fbd9d6; }
.btn-sm { padding: 5px 9px; font-size: max(calc(13.4px * var(--fb, 1.25)), var(--fmin, 18px)); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.hamburger { display: none; background: none; border: none; padding: 8px; color: var(--navy-800); }

/* ---------- breadcrumb / page head ---------- */

/* ---------- hero: clean picture slider (same width as the top notice strips) ---------- */
.hero { position: relative; width: calc(100% - 40px); max-width: calc(1360px - 40px); margin: 18px auto 0; border-radius: 12px; overflow: hidden; background: var(--navy-950); aspect-ratio: 21 / 8; }
.hero-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; user-select: none; -webkit-user-drag: none; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(6,16,31,.45); color: #fff; font-size: max(calc(26px * var(--fb, 1.25)), var(--fmin, 18px)); line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; opacity: 0; transition: opacity .2s, background .2s; z-index: 2; }
.hero-nav.prev { left: 12px; } .hero-nav.next { right: 12px; }
.hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { background: rgba(6,16,31,.75); }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 7px; z-index: 2; pointer-events: none; }
.hero-dots button { pointer-events: auto; width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(6,16,31,.25); transition: width .25s, background .25s; }
.hero-dots button.active { width: 24px; border-radius: 5px; background: var(--gold-500); }
.seal-ring { width: 190px; height: 190px; border-radius: 50%; border: 2px solid var(--gold-500); display: flex; align-items: center; justify-content: center; position: relative; }
.seal-ring::before { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(221,185,90,.5); border-radius: 50%; }
.seal-ring .icon { width: 74px; height: 74px; color: var(--gold-400); }

/* ---------- cards, generic ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* stat circles */
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-chip { flex: 1; min-width: 110px; text-align: center; padding: 14px 8px; border: 1px solid var(--line); border-radius: 50%/38%; background: var(--card); }
.stat-chip b { display: block; font-family: var(--font-head); font-size: max(calc(24.6px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--navy-800); }
.stat-chip span { font-size: max(calc(12.9px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); }

/* notice ticker on home */
.notice-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.notice-box .head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--navy-900); color: #fff; border-radius: 6px 6px 0 0; }
.notice-box .head h3 { color: #fff; font-size: max(calc(15.7px * var(--fb, 1.25)), var(--fmin, 18px)); display: flex; gap: 6px; align-items: center; }
.notice-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: max(calc(14.3px * var(--fb, 1.25)), var(--fmin, 18px)); }
.notice-list li:last-child { border-bottom: none; }
.notice-list a.title { flex: 1; color: var(--ink); }
.notice-list a.title:hover { color: var(--gold-700); }
.notice-list .go { color: var(--gold-600); font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); white-space: nowrap; }
.notice-box .foot { padding: 8px 12px; }

/* director message */
.director { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding: 18px; margin-bottom: 16px; }
.director-name { font-size: max(calc(16.8px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--navy-800); margin-top: 2px; }
.director blockquote { margin: 10px 0; color: var(--ink); font-size: max(calc(15.2px * var(--fb, 1.25)), var(--fmin, 18px)); }
.sub-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.sub-two h4 { font-size: max(calc(14.6px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); border-bottom: 1px solid var(--line); padding-bottom: 5px; margin-bottom: 6px; }
.sub-two ul li { position: relative; padding-left: 14px; font-size: max(calc(14.1px * var(--fb, 1.25)), var(--fmin, 18px)); margin-bottom: 5px; color: var(--muted); }
.sub-two ul li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500); }

/* people cards (teacher/committee) */
.person-card { padding: 12px; text-align: left; }
.ph-img { object-fit: cover; display: block; flex-shrink: 0; background: linear-gradient(135deg, var(--navy-700), var(--navy-950)); border: 1px solid var(--line); }
.person-name { font-size: max(calc(15.7px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; color: var(--navy-800); }
.person-role { font-size: max(calc(12.9px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); }
.person-meta { font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); margin-top: 6px; }

/* teacher / committee cards: photo fills the left side at full card height */
.grid-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card-h { display: flex; align-items: center; padding: 0; overflow: hidden; color: inherit; min-height: 128px; }
.person-card-h .ph-side { width: 108px; aspect-ratio: 7 / 9; flex-shrink: 0; }
.person-card-h .ph-fill { width: 100%; height: 100%; object-fit: cover; display: block; background: linear-gradient(135deg, var(--navy-700), var(--navy-950)); }
.person-card-h .info-side { flex: 1; min-width: 0; padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.person-card-h .p-name { font-size: max(calc(15.7px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; color: var(--navy-800); line-height: 1.25; }
.person-card-h .p-role { font-size: max(calc(12.9px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); font-weight: 600; margin-bottom: 2px; }
.person-card-h .p-meta-line { display: flex; align-items: center; gap: 6px; font-size: max(calc(12.7px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); overflow: hidden; }
.person-card-h .p-meta-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card-h .p-meta-line .icon { width: 12px; height: 12px; flex-shrink: 0; color: var(--gold-600); }
.person-card-h .p-contact-row { display: flex; gap: 6px; margin-top: 3px; }
.person-card-h .p-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-100); color: var(--gold-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.person-card-h .p-ic .icon { width: 12px; height: 12px; }
.person-card-h .p-more { margin-top: 5px; font-size: max(calc(12.9px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.person-card-h:hover { border-color: var(--gold-500); }

/* gallery */
.gallery-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); display: flex; align-items: flex-end; }
.gallery-tile .tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-tile .g-icon { position: absolute; top: 12px; left: 12px; color: var(--gold-400); background: rgba(6,16,31,.55); border-radius: 7px; padding: 6px; z-index: 1; }
.gallery-tile .g-icon .icon { width: 16px; height: 16px; display: block; }
.gallery-tile .g-cap { position: relative; z-index: 1; padding: 10px 12px; color: #fff; font-size: max(calc(14px * var(--fb, 1.25)), var(--fmin, 18px)); width: 100%; background: linear-gradient(0deg, rgba(6,16,31,.88), transparent); }
.g-badge { position: absolute; top: 12px; right: 12px; background: var(--gold-500); color: #fff; font-size: max(calc(11.2px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; padding: 2px 7px; border-radius: 10px; z-index: 1; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: max(calc(14.3px * var(--fb, 1.25)), var(--fmin, 18px)); min-width: 620px; }
table.data th { background: var(--navy-900); color: #fff; text-align: left; padding: 9px 10px; font-weight: 600; white-space: nowrap; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data tr:last-child td { border-bottom: none; }
table.data tr:nth-child(even) { background: rgba(15,33,64,.025); }
.kv-table td:first-child { width: 42%; color: var(--muted); font-weight: 600; background: rgba(15,33,64,.03); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; }
.pill-ok { background: #e7f6ee; color: var(--ok); }
.pill-warn { background: var(--gold-100); color: var(--gold-700); }

/* filters row */
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; }
.filters .f-item label { display: block; font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); color: #000; margin-bottom: 3px; font-weight: 700; }
.filters select, .filters input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; min-width: 150px; background: var(--card); color: var(--ink); }

/* blog / notice detail cards */
.blog-card { overflow: hidden; }
.blog-thumb { aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, var(--navy-700), var(--navy-950)); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-body { padding: 12px; }
.blog-meta { font-size: max(calc(12.3px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); display: flex; gap: 10px; margin-bottom: 6px; }
.blog-title { font-size: max(calc(16.2px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--navy-800); margin-bottom: 6px; }
.readmore { font-size: max(calc(13.4px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* contact */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: max(calc(13.4px * var(--fb, 1.25)), var(--fmin, 18px)); color: #000; margin-bottom: 4px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.field textarea { min-height: 90px; resize: vertical; }
.contact-info-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-info-item:last-child { border-bottom: none; }
.contact-info-item .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--navy-900); color: var(--gold-400); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.map-fake { aspect-ratio: 16/9; border-radius: var(--radius); background:
  repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(15,33,64,.06) 22px, rgba(15,33,64,.06) 23px),
  repeating-linear-gradient(90deg, transparent, transparent 22px, rgba(15,33,64,.06) 22px, rgba(15,33,64,.06) 23px),
  linear-gradient(135deg, #eef1f8, #dfe6f2);
  display: flex; align-items: center; justify-content: center; color: var(--navy-700); font-size: max(calc(14px * var(--fb, 1.25)), var(--fmin, 18px)); flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.map-fake .icon { width: 28px; height: 28px; color: var(--gold-600); }

/* footer */
footer.site-footer { background: var(--navy-950); color: #b9c4de; margin-top: 30px; }
footer .wrap { padding: 26px 16px 14px; display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; }
footer h4 { color: #fff; font-size: max(calc(15.1px * var(--fb, 1.25)), var(--fmin, 18px)); margin-bottom: 10px; padding-left: 9px; border-left: 3px solid var(--gold-500); }
footer li { margin-bottom: 6px; font-size: max(calc(13.8px * var(--fb, 1.25)), var(--fmin, 18px)); }
footer li a:hover { color: #5fd0b6; }
footer .contact-info-item .ic { background: rgba(205,162,58,.14); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; font-size: max(calc(12.9px * var(--fb, 1.25)), var(--fmin, 18px)); flex-wrap: wrap; gap: 8px; }
.foot-bottom a { color: #5fd0b6; }
.social { display: flex; gap: 8px; }
.social a { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--gold-500); color: #fff; }

/* misc */
.muted { color: var(--muted); }
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: max(calc(14.6px * var(--fb, 1.25)), var(--fmin, 18px)); }
.skel { background: linear-gradient(90deg, var(--line), #f0f2f7, var(--line)); background-size: 200% 100%; animation: shine 1.2s infinite; border-radius: 4px; }
@keyframes shine { to { background-position: -200% 0; } }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--navy-950); color: #fff; padding: 10px 16px; border-radius: 6px; font-size: max(calc(14.3px * var(--fb, 1.25)), var(--fmin, 18px)); z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.3); border: 1px solid var(--gold-600); }
.toast.err { border-color: var(--danger); }

/* admin fab */
.admin-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 30px; background: var(--navy-950); color: var(--gold-400); border: 1px solid var(--gold-600); box-shadow: 0 10px 24px rgba(6,16,31,.35); font-weight: 700; font-size: max(calc(14px * var(--fb, 1.25)), var(--fmin, 18px)); }
.admin-fab:hover { background: var(--navy-800); }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(6,16,31,.55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); border-radius: 8px; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-top: 4px solid var(--gold-500); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: max(calc(16.8px * var(--fb, 1.25)), var(--fmin, 18px)); }
.modal-body { padding: 14px 16px; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: max(calc(20.2px * var(--fb, 1.25)), var(--fmin, 18px)); line-height: 1; }
.modal.confirm .modal-body { font-size: max(calc(15.1px * var(--fb, 1.25)), var(--fmin, 18px)); }

/* admin dashboard */
.admin-shell { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: start; }
.admin-side { position: sticky; top: 64px; }
.admin-side button { width: 100%; text-align: right; display: flex; align-items: center; gap: 8px; justify-content: flex-start; padding: 8px 10px; border-radius: 5px; font-size: max(calc(14.3px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--ink); background: none; border: none; margin-bottom: 2px; }
.admin-side button:hover, .admin-side button.active { background: var(--navy-900); color: #fff; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.admin-table th, .admin-table td { vertical-align: top; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.login-box { max-width: 360px; margin: 40px auto; }

/* responsive */
@media (max-width: 980px) {
  .director, .sub-two, .form-grid { grid-template-columns: 1fr; }
  .hero { aspect-ratio: 16 / 9; border-radius: 10px; }
  .hero-nav { opacity: 1; width: 32px; height: 32px; font-size: max(calc(22px * var(--fb, 1.25)), var(--fmin, 18px)); }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  footer .wrap { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .admin-side button { width: auto; white-space: nowrap; }
}
@media (max-width: 760px) {
  nav.mainnav { position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: var(--card); flex-direction: column; align-items: stretch; padding: 10px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
  nav.mainnav.open { transform: translateX(0); }
  nav.mainnav > ul { flex-direction: column; align-items: stretch; width: 100%; }
  .dropdown { position: static; display: block !important; box-shadow: none; border: none; padding-left: 14px; }
  .hamburger { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .topbar { font-size: max(calc(11.8px * var(--fb, 1.25)), var(--fmin, 18px)); }
  /* phones: same two strips (banner width): update on top, EIIN / School code / Reg. No below it */
  .topbar { padding: 8px 0 6px; }
  .topbar .wrap { gap: 5px; }
  .topbar .update { height: 30px; }
  .topbar .update b { padding: 0 20px 0 10px; }
  .topbar .update-more span { display: none; }
  .topbar .update-more { padding: 0 8px; }
  .topbar .codes { display: flex; justify-content: space-between; height: 30px; padding: 0 8px; gap: 4px; font-size: calc(clamp(7.5px, 2.3vw, 10px) * var(--fb, 1.25)); }
}
/* larger text => switch to the hamburger menu a little earlier so the header never overflows */
@media (max-width: 1080px) {
  nav.mainnav { position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: var(--card); flex-direction: column; align-items: stretch; padding: 10px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
  nav.mainnav.open { transform: translateX(0); }
  nav.mainnav > ul { flex-direction: column; align-items: stretch; width: 100%; }
  .dropdown { position: static; display: block !important; box-shadow: none; border: none; padding-left: 14px; }
  .hamburger { display: block; }
}
@media (prefers-reduced-motion: reduce) { *:not(.ticker-track) { animation: none !important; transition: none !important; } } /* notice ticker keeps scrolling; it pauses on hover */

/* ---------- অনলাইন ভর্তি (#/admission) ---------- */
#app [hidden] { display: none !important; }
.oa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 14px; align-items: start; }
.oa-grid .field { margin: 0; min-width: 0; }
.oa-grid .field textarea { min-height: 70px; }
.oa-hint { display: block; font-size: max(calc(11.5px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--muted); margin-top: 3px; }
.oa-readonly { background: #f1f3f6; color: var(--ink); cursor: not-allowed; }
.oa-file { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; display: flex; gap: 12px; align-items: center; }
.oa-file-preview { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg); flex-shrink: 0; border: 1px solid var(--line); }
.oa-file-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-file-ctl { flex: 1; min-width: 0; }
.oa-file-ctl input[type="file"] { font-size: max(calc(12px * var(--fb, 1.25)), var(--fmin, 18px)); max-width: 100%; }
.oa-status { font-size: max(calc(12px * var(--fb, 1.25)), var(--fmin, 18px)); color: var(--gold-700); }
.oa-doc-name { display: block; font-size: max(calc(12.5px * var(--fb, 1.25)), var(--fmin, 18px)); word-break: break-all; }
.oa-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
/* অনলাইন শিক্ষক আবেদন (teacher-apply.js) */
.ta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ta-sec-title { margin: 0 0 8px; font-size: 1.05em; display: flex; align-items: center; gap: 6px; color: var(--navy-800); }
.ta-sec-title .icon { width: 16px; height: 16px; color: var(--gold-600); }
.ta-rep-row { display: grid; grid-template-columns: 28px repeat(4, 1fr) 34px; gap: 8px 12px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ta-rep-row .field { margin: 0; min-width: 0; }
.ta-rep-no { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-100); color: var(--gold-700); font-size: max(calc(12px * var(--fb, 1.25)), var(--fmin, 18px)); font-weight: 700; display: flex; align-items: center; justify-content: center; align-self: center; }
.ta-x { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: #b42318; font-size: max(calc(18px * var(--fb, 1.25)), var(--fmin, 18px)); line-height: 1; cursor: pointer; flex-shrink: 0; }
.ta-x:hover { background: #fdecea; }
.ta-doc-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.ta-doc-list li { display: flex; align-items: center; gap: 8px; font-size: max(calc(13px * var(--fb, 1.25)), var(--fmin, 18px)); }
.ta-doc-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .ta-rep-row { grid-template-columns: 28px 1fr 1fr 34px; } .ta-rep-no { grid-row: 1; } }
@media (max-width: 560px) { .ta-rep-row { grid-template-columns: 28px 1fr 34px; } }

@media (max-width: 1000px) { .oa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .oa-grid { grid-template-columns: 1fr; } }

/* অনলাইন ভর্তি — পেমেন্ট পপআপ */
.oa-popup-text { white-space: pre-line; margin-bottom: 12px; line-height: 1.7; }
.oa-popup-img { text-align: center; margin-bottom: 12px; }
.oa-popup-img img { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); }
.modal-body .field { margin-bottom: 10px; }

/* form headings: black in light mode, white in dark mode */
:root[data-theme="dark"] .field label, :root[data-theme="dark"] .filters .f-item label { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field label, :root:not([data-theme="light"]) .filters .f-item label { color: #fff; } }

/* চার কলামের ফর্ম অংশ (স্কুল তথ্য > বিদ্যালয়ের তথ্যাদি); ছোট পর্দায় ২ / ১ কলাম */
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .form-grid.cols-4 { grid-template-columns: 1fr; } }


/* ==========================================================================
   POS look — ফ্রন্টএন্ড কম্পোনেন্ট (সাদা কার্ড, হালকা বর্ডার, সবুজ-টিল বাটন, ৪০px ইনপুট)
   ========================================================================== */
.card, .notice-box, .person-card-h, .blog-card, .stat-chip { border-color: var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.site-header { border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 var(--gold-500); }
nav.mainnav a.nav-link:hover, nav.mainnav button.nav-link:hover,
nav.mainnav li.active > a.nav-link, nav.mainnav li.active > button.nav-link { color: var(--gold-600); background: var(--gold-100); }
.dropdown { border-top: 2px solid var(--gold-500); border-radius: 0 0 8px 8px; }
.dropdown a:hover { background: var(--gold-100); color: var(--gold-700); }

.btn { height: 30px; padding: 0 12px; border-radius: 4px; font-weight: 600; justify-content: center; }
.btn-sm { height: 26px; padding: 0 9px; }
.btn-navy { background: var(--gold-500); color: #fff; }
.btn-navy:hover, .btn-gold:hover { background: var(--gold-700); color: #fff; }
.btn-outline { background: #fff; border-color: #dde3ea; }
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-600); }

.field label, .filters .f-item label { font-weight: 500; font-size: .92em; margin-bottom: 2px; }
.field input, .field select, .field textarea, .filters select, .filters input {
  height: 30px; padding: 0 8px; border: 1px solid #dde3ea; border-radius: 4px; background: #fff; box-shadow: none; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 60px; padding: 5px 8px; }
.field input::placeholder, .field textarea::placeholder { color: #aab3c2; }
.field input:focus, .field select:focus, .field textarea:focus, .filters select:focus, .filters input:focus {
  border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(15,122,99,.12);
}

/* টেবিল: হালকা ধূসর হেডার + গ্রিড বর্ডার + স্ট্রাইপ */
.table-wrap { border-radius: var(--radius); }
table.data th { background: #f3f6f9; color: var(--ink); text-align: center; padding: 6px 10px; border: 1px solid var(--line); }
table.data td { padding: 5px 10px; border: 1px solid var(--line); }
table.data tr:nth-child(even) td { background: #fafbfd; }
table.data tr:hover td { background: var(--gold-100); }
.kv-table td:first-child { background: #f3f6f9; }
.pill-ok { background: #e6f6ec; color: var(--ok); }
.pill-warn { background: var(--gold-100); color: var(--gold-700); }
.modal { border-top: 0; border-radius: 10px; }
.section-head h2 { border-left-color: var(--gold-500); }
.hero { border-radius: 10px; }

/* notice attachment (PDF / picture): inline viewer + open / download buttons */
.notice-clip { display: inline-flex; vertical-align: middle; color: var(--gold-700, #a07a1a); }
.notice-clip .icon { width: 1em; height: 1em; }
.notice-actions { white-space: nowrap; }
.notice-attach { margin-top: 18px; border-top: 1px solid var(--line, #e3e7ee); padding-top: 14px; }
.notice-attach-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.notice-attach-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.notice-attach-title .icon { width: 1.1em; height: 1.1em; }
.notice-attach-btns { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.notice-attach-img { display: block; text-align: center; }
.notice-attach-img img { max-width: 100%; height: auto; border: 1px solid var(--line, #e3e7ee); border-radius: 8px; }
.notice-attach-pdf { display: block; width: 100%; height: 80vh; min-height: 420px; border: 1px solid var(--line, #e3e7ee); border-radius: 8px; background: #f6f7f9; }
