/* IT EDHD SSKRU — public announcements page styles */
@import url('css/tokens.css');

:root {
  /* สีประจำคณะ: ฟ้า (ปรับเข้มจาก #1e9bf0 → #0c6fb5 ให้ผ่าน WCAG AA contrast — [P3-02]) */
  --theme-primary: #0c6fb5;
  --theme-dark:    #0e7dc9;
  --theme-deep:    #075691;
  /* สีประจำมหาวิทยาลัย: ขาว-ทอง */
  --theme-accent:  #f5b800;
  --theme-accent2: #ffd54f;
  --theme-soft:    #e7f4fc;
}

/* [P3-01] Keyboard focus visibility (WCAG 2.4.7) — แสดง outline เฉพาะตอน navigate ด้วยคีย์บอร์ด */
:focus-visible {
  outline: 3px solid var(--theme-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

body { background: #f7f9fc; color: var(--fg-1); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* ── UTILITY BAR (above topbar) ───────────────────────────────────────── */

.util-bar {
  background: linear-gradient(135deg, var(--theme-deep), var(--theme-dark));
  color: rgba(255,255,255,.86);
  font-size: .76rem;
}
.util-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 36px; gap: 16px;
}
.util-sys-name {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.util-sys-name i { color: var(--theme-accent); font-size: .9rem; }
.util-uni { opacity: .75; }
.util-links { display: flex; align-items: center; flex-shrink: 0; flex: 1; }
.util-dismiss {
  background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer;
  padding: 4px 8px; border-radius: 4px; font-size: 14px; flex-shrink: 0;
  transition: color .15s;
}
.util-dismiss:hover { color: #fff; }
.util-bar-restore {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--theme-dark); color: rgba(255,255,255,.7); border: none;
  padding: 2px 14px; border-radius: 0 0 10px 10px; font-size: 12px; cursor: pointer;
  z-index: 999; transition: color .15s;
}
.util-bar-restore:hover { color: #fff; }
.util-links a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  color: rgba(255,255,255,.88);
  text-decoration: none; font-weight: 500;
  transition: all .15s ease; border-radius: 6px;
}
.util-links a:hover { color: #fff; background: rgba(255,255,255,.10); }
.util-links a i { color: var(--theme-accent); }
.util-sep { width: 1px; height: 12px; background: rgba(255,255,255,.18); margin: 0 2px; }

/* ── BUTTONS ─────────────────────────────────────────────────────────── */

.btn-primary, .btn-ghost, .btn-login {
  font-family: var(--font-sans); font-weight: 600; font-size: .92rem;
  border: none; border-radius: var(--r-lg);
  padding: .65rem 1.15rem;
  display: inline-flex; align-items: center; gap: .5rem;
  cursor: pointer; text-decoration: none;
  transition: all .2s ease; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--theme-dark), var(--theme-primary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.btn-ghost {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.20); transform: translateY(-2px); }
.btn-ghost-light {
  background: #fff;
  color: var(--theme-primary);
  border: 1px solid var(--border);
}
.btn-ghost-light:hover { background: var(--theme-soft); border-color: var(--theme-soft); }

.btn-block { width: 100%; justify-content: center; padding: .8rem; }

.btn-icon-ghost {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--bg-3);
  background: var(--bg-0);
  color: var(--fg-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.btn-icon-ghost:hover { border-color: var(--theme-primary); color: var(--theme-primary); }

.btn-login {
  background: linear-gradient(135deg, var(--theme-dark), var(--theme-primary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(19,116,187,.30);
  padding: .55rem 1.1rem;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(19,116,187,.45); }

/* ── BRAND GLYPH (image-slot + fallback) ─────────────────────────────── */

.brand-glyph-wrap {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--theme-dark), var(--theme-primary));
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-glyph-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--theme-accent);
  font-size: 1.55rem;
  pointer-events: none;
  z-index: 0;
}
.brand-glyph-wrap image-slot { position: relative; z-index: 1; }

/* ── TOPBAR ──────────────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: all .25s ease;
}
.topbar.is-scrolled {
  background: rgba(255,255,255,.96);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.04);
}
.nav-wrap {
  display: flex; align-items: center; gap: 22px;
  height: 76px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg-1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.brand-dot { color: var(--theme-accent); margin: 0 2px; }
.brand-sub {
  font-size: .68rem; color: var(--fg-3);
  margin-top: 2px;
  max-width: 380px;
}

.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
}
.nav-link {
  font-size: .88rem; font-weight: 500;
  color: var(--fg-2);
  text-decoration: none;
  padding: .55rem .85rem;
  border-radius: var(--r-lg);
  transition: all .15s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--fg-1); background: var(--bg-1); }
.nav-link.is-active {
  color: var(--theme-primary);
  font-weight: 600;
  background: var(--theme-soft);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ── HERO ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  color: #fff;
  padding: 88px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(155deg, var(--theme-deep) 0%, var(--theme-dark) 45%, var(--theme-primary) 100%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
}
.hero-glow {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.hero-glow-1 { background: var(--theme-accent); top: -120px; right: -160px; opacity: .28; }
.hero-glow-2 { background: var(--theme-primary); bottom: -200px; left: -120px; opacity: .55; }

.hero-grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .35rem .85rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: .76rem; font-weight: 500;
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}
.gold-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 12px var(--theme-accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%    { opacity: .55; transform: scale(.7); }
}

.hero-title {
  margin: 1.1rem 0 .9rem;
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-title-accent {
  background: linear-gradient(110deg, #fff 0%, var(--theme-accent) 75%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  background-position: 0% 0%;
  animation: sheen 8s linear infinite;
  display: inline-block;
}
@keyframes sheen { to { background-position: -200% 0%; } }

.hero-lede {
  font-size: 1.02rem;
  color: rgba(255,255,255,.78);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 1.6rem;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-ctas .btn-primary {
  background: var(--theme-accent);
  color: var(--theme-deep);
  box-shadow: 0 6px 22px rgba(245,158,11,.35);
}
.hero-ctas .btn-primary:hover { box-shadow: 0 8px 28px rgba(245,158,11,.5); }

.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hero-stats li {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  display: grid;
  grid-template-areas: "icon n" "icon l";
  grid-template-columns: auto 1fr;
  column-gap: 12px; row-gap: 2px;
  align-items: center;
  backdrop-filter: blur(8px);
}
.hero-stat-icon {
  grid-area: icon;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: var(--theme-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.hero-stat-n { grid-area: n; font-weight: 700; font-size: 1.15rem; line-height: 1; }
.hero-stat-l { grid-area: l; font-size: .68rem; opacity: .65; }

/* ── HERO VIDEO CARD ─────────────────────────────────────────────────── */

.hero-video-col { display: flex; flex-direction: column; gap: 14px; }
.hero-video-card {
  background: #0d1029;
  border-radius: var(--r-3xl);
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
  position: relative;
}
.hvc-chrome {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.hvc-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.hvc-url {
  flex: 1; margin-left: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 7px;
  padding: 4px 12px;
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  display: flex; align-items: center; gap: 8px;
}
.hvc-ai-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  font-size: .65rem; font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
}
.hvc-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.hvc-frame iframe { display: block; }
.hvc-poster {
  position: absolute; inset: 0;
  border: none; padding: 0;
  cursor: pointer; display: block;
  overflow: hidden; text-align: left;
}
.hvc-poster-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(124,58,237,.5), transparent 55%),
              linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a8a 100%);
}
.hvc-poster-shapes { position: absolute; inset: 0; color: rgba(255,255,255,.18); }
.hvc-poster-shapes i { position: absolute; animation: float 6s ease-in-out infinite; }
.hvc-poster-shapes i:nth-child(2) { animation-delay: 1.5s; }
.hvc-poster-shapes i:nth-child(3) { animation-delay: 3s; }
.hvc-poster-shapes i:nth-child(4) { animation-delay: 4.5s; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(8deg); }
}
.hvc-poster-fg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}
.hvc-play {
  align-self: center; margin-top: auto; margin-bottom: 12px;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--theme-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  transition: transform .25s ease;
}
.hvc-poster:hover .hvc-play { transform: scale(1.08); }
.hvc-play::before {
  content: '';
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.hvc-poster-meta {
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
  margin: 0 -22px -22px;
  padding: 32px 22px 18px;
}
.hvc-poster-title { color: #fff; font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.hvc-poster-sub { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: rgba(255,255,255,.7); }
.dotsep { opacity: .5; }
.hero-video-tag {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem;
  color: rgba(255,255,255,.7);
}
.hero-video-tag i { color: var(--theme-accent); }

/* ── SECTION SHELL ───────────────────────────────────────────────────── */

.sec { padding: 80px 0; scroll-margin-top: 80px; }
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.sec-head-text { flex: 1; min-width: 280px; }
.sec-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600;
  color: var(--theme-primary);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 12px;
}
.sec-kicker-bar { width: 24px; height: 2px; background: var(--theme-primary); border-radius: 2px; }
.sec-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 8px;
  color: var(--fg-1);
}
.sec-sub { font-size: .95rem; color: var(--fg-2); max-width: 620px; margin: 0; }
.sec-link {
  font-size: .88rem; font-weight: 600;
  color: var(--theme-primary);
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  background: none;
  font-family: var(--font-sans);
  display: inline-flex; align-items: center; gap: 6px;
  padding: .5rem .75rem;
  border-radius: var(--r-lg);
  transition: all .15s ease;
}
.sec-link:hover { background: var(--theme-soft); }
.sec-tabs { display: flex; gap: 6px; }
.sec-tab {
  font: inherit; font-size: .82rem; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-0);
  color: var(--fg-2);
  padding: .5rem .85rem;
  border-radius: var(--r-lg);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.sec-tab.is-on {
  background: var(--theme-soft);
  color: var(--theme-primary);
  border-color: var(--theme-soft);
}

/* ── AI LESSONS ──────────────────────────────────────────────────────── */

.lessons { background: linear-gradient(180deg, #f7f9fc 0%, #fff 100%); }
.lessons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lesson-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s ease;
  display: flex; flex-direction: column;
}
.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(19,116,187,.15);
  border-color: var(--theme-soft);
}
.lc-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 32%) 0%, hsl(calc(var(--hue) + 30), 60%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 3rem;
  overflow: hidden;
}
.lc-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.45) 100%),
              repeating-linear-gradient(135deg, transparent 0, transparent 30px, rgba(255,255,255,.05) 30px, rgba(255,255,255,.05) 31px);
}
.lc-play {
  position: absolute;
  inset: 0; margin: auto;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #ff0033;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  z-index: 2;
  transition: transform .2s ease;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.lesson-card:hover .lc-play { transform: scale(1.1); }
.lc-dur {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: .72rem; font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 2;
}
.lc-num {
  position: absolute; top: 12px; left: 12px;
  background: var(--theme-accent);
  color: var(--theme-deep);
  font-size: .68rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  z-index: 2;
}
.lc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lc-cat {
  display: inline-flex;
  font-size: .72rem; font-weight: 600;
  color: var(--theme-primary);
  background: var(--theme-soft);
  padding: 4px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.lc-title {
  font-size: 1.02rem; font-weight: 600;
  line-height: 1.4;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-desc {
  font-size: .85rem;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-meta {
  display: flex; gap: 14px;
  font-size: .78rem;
  color: var(--fg-3);
  margin-top: auto;
  padding-top: 4px;
}
.lc-meta i { margin-right: 4px; }

.lessons-cta {
  margin-top: 28px;
  padding: 14px 20px;
  background: var(--theme-soft);
  border-radius: var(--r-lg);
  font-size: .88rem;
  color: var(--theme-deep);
  display: flex; align-items: center; gap: 10px;
}
.lessons-cta i { color: var(--theme-primary); font-size: 1.1rem; }

/* ─── AI Lessons Carousel [v2.4.6 · ปัญหา 3] ─────────────────────────────── */
.lesson-carousel { display: flex; align-items: stretch; gap: 14px; }
.lcar-nav {
  flex-shrink: 0; align-self: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff;
  color: var(--theme-primary); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; box-shadow: 0 4px 14px rgba(19,116,187,.12);
}
.lcar-nav:hover:not(:disabled) { background: var(--theme-primary); color: #fff; transform: scale(1.06); }
.lcar-nav:disabled { opacity: .35; cursor: default; box-shadow: none; }
.lcar-stage {
  flex: 1; display: grid; grid-template-columns: 1.15fr 1fr;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-2xl); overflow: hidden;
  box-shadow: 0 12px 32px rgba(19,116,187,.12);
}
.lcar-media {
  position: relative; border: none; padding: 0; cursor: pointer; min-height: 300px;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 32%) 0%, hsl(calc(var(--hue) + 30), 60%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); font-size: 3.6rem; overflow: hidden;
}
.lcar-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.4) 100%); }
.lcar-play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #ff0033;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; z-index: 2; transition: transform .2s ease;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.lcar-media:hover .lcar-play { transform: scale(1.1); }
.lcar-info { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.lcar-info-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lcar-info-top .lc-bookmark { position: static; flex-shrink: 0; } /* [v2.4.7] กัน .lc-bookmark (absolute) หลุดไปมุมจอ */
.lcar-title { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: 0; color: var(--fg-1); }
.lcar-desc { font-size: .92rem; color: var(--fg-2); line-height: 1.7; margin: 0; }
.lcar-meta { display: flex; gap: 18px; font-size: .82rem; color: var(--fg-3); }
.lcar-meta i { margin-right: 5px; color: var(--theme-primary); }
.lcar-watch { align-self: flex-start; margin-top: 6px; }
.lcar-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lcar-dot { width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: var(--border); transition: all .2s ease; }
.lcar-dot.is-on { background: var(--theme-primary); width: 26px; border-radius: 5px; }
.lcar-dot:hover:not(.is-on) { background: var(--theme-soft); }
@media (max-width: 760px) {
  .lesson-carousel { gap: 6px; }
  .lcar-stage { grid-template-columns: 1fr; }
  .lcar-media { min-height: 0; aspect-ratio: 16 / 9; }
  .lcar-nav { width: 38px; height: 38px; font-size: 1.1rem; }
  .lcar-info { padding: 20px 18px; }
  .lcar-title { font-size: 1.15rem; }
}

.lesson-modal {
  width: 100%; max-width: 820px;
  background: #fff;
  border-radius: var(--r-3xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.lm-player { aspect-ratio: 16 / 9; background: #000; position: relative; }
.lm-poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 6rem;
  overflow: hidden;
}
.lm-poster-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 32%) 0%, hsl(calc(var(--hue) + 30), 60%, 50%) 100%);
}
.lm-poster i { position: relative; z-index: 1; }
.lm-poster-note {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  z-index: 2;
}
.lm-body { padding: 24px 28px 26px; }
.lm-title { font-size: 1.35rem; margin: 10px 0 10px; line-height: 1.35; }
.lm-desc { color: var(--fg-2); line-height: 1.65; margin: 0 0 14px; font-size: .95rem; }
.lm-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: .85rem;
  color: var(--fg-3);
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.lm-meta i { margin-right: 5px; }

/* ── PERSONNEL ───────────────────────────────────────────────────────── */

.personnel { background: #fff; }

.psub { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-soft); }
.psub-leadership { margin-top: 0; padding-top: 0; border-top: none; }
.psub-h {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.15rem; font-weight: 700;
  margin: 0 0 24px;
  color: var(--fg-1);
}
.psub-h > i {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--theme-soft);
  color: var(--theme-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.psub-h > span:nth-of-type(1) { flex: 1; }
.psub-count {
  font-size: .78rem; font-weight: 500;
  color: var(--fg-3);
  background: var(--bg-1);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Leadership tree */
.ld-org { display: flex; flex-direction: column; align-items: center; }
.ld-dean-card {
  width: 100%; max-width: 760px;
  background: linear-gradient(135deg, #fff 0%, var(--theme-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: stretch;
  position: relative;
}
.ld-dean-card::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: var(--r-3xl);
  background: radial-gradient(circle at 20% 0%, var(--theme-accent), transparent 60%);
  opacity: .15;
  z-index: -1;
  filter: blur(20px);
}
.ld-dean-photo {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 25%, hsl(var(--hue), 60%, 75%) 0%, transparent 60%),
    linear-gradient(135deg, hsl(var(--hue), 55%, 35%) 0%, hsl(calc(var(--hue) + 25), 50%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95);
  min-height: 240px;
}
.ld-dean-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.22) 100%);
}
.ld-dean-body { display: flex; flex-direction: column; justify-content: center; padding: 4px 0; }
.ld-initials {
  font-size: 3.6rem; font-weight: 700;
  letter-spacing: -.02em;
  position: relative; z-index: 1;
  text-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.ld-rib {
  position: absolute; top: 14px; left: 14px;
  background: var(--theme-accent);
  color: var(--theme-deep);
  font-size: .72rem; font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
}
.ld-role {
  font-size: .72rem; font-weight: 600;
  color: var(--theme-primary);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px;
}
.ld-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.ld-quote {
  font-size: .92rem;
  color: var(--fg-2);
  line-height: 1.65;
  border-left: 3px solid var(--theme-accent);
  padding: 4px 0 4px 14px;
  margin: 0 0 16px;
}
.ld-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .8rem;
  color: var(--fg-2);
  text-decoration: none;
  transition: all .15s ease;
}
.chip-link:hover {
  background: #fff;
  border-color: var(--theme-primary);
  color: var(--theme-primary);
}

.ld-tree { width: 2px; height: 30px; background: var(--bg-3); margin: 0 auto; position: relative; }
.ld-tree::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%; transform: translateX(-50%);
  width: 76%; max-width: 920px; height: 2px;
  background: var(--bg-3);
}

.ld-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1000px;
  margin-top: -1px;
  position: relative;
}
.ld-row::before {
  content: '';
  position: absolute;
  top: -30px; left: 12.5%; right: 12.5%;
  height: 30px;
  background-image:
    linear-gradient(var(--bg-3), var(--bg-3)),
    linear-gradient(var(--bg-3), var(--bg-3)),
    linear-gradient(var(--bg-3), var(--bg-3)),
    linear-gradient(var(--bg-3), var(--bg-3));
  background-size: 2px 30px;
  background-repeat: no-repeat;
  background-position: 0% 0%, 33.33% 0%, 66.66% 0%, 100% 0%;
  pointer-events: none;
}
.ld-mini-card {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 18px;
  text-align: center;
  transition: all .2s ease;
}
.ld-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-soft);
}
.ld-mini-card .ld-photo {
  width: 88px; height: 88px;
  border-radius: 50%;
  margin: 0 auto 12px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 25%, hsl(var(--hue), 60%, 75%) 0%, transparent 60%),
    linear-gradient(135deg, hsl(var(--hue), 55%, 35%) 0%, hsl(calc(var(--hue) + 25), 50%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95);
}
.ld-mini-card .ld-photo::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #fff;
}
.ld-mini-card .ld-initials { font-size: 1.6rem; }
.ld-mini-card .ld-role { font-size: .68rem; margin-bottom: 4px; }
.ld-mini-name { font-size: .96rem; font-weight: 600; margin: 0 0 4px; line-height: 1.3; }
.ld-mini-role { font-size: .8rem; color: var(--fg-3); margin: 0 0 12px; line-height: 1.4; min-height: 2.2em; }
.ld-mini-icons { display: flex; gap: 6px; justify-content: center; }
.ld-mini-icons a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-1);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  font-size: .9rem;
  text-decoration: none;
  transition: all .15s ease;
}
.ld-mini-icons a:hover { background: var(--theme-primary); color: #fff; }

/* Faculty tabs */
.fac-tabs {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 12px;
  background: var(--bg-1);
  border-radius: var(--r-2xl);
}
.fac-tab {
  --maj-c: var(--theme-primary);
  font: inherit;
  font-size: .82rem; font-weight: 500;
  padding: .45rem .85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s ease;
}
.fac-tab:hover { background: #fff; color: var(--fg-1); }
.fac-tab.is-on {
  background: var(--maj-c);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--maj-c) 35%, transparent);
}
.fac-tab-dot { width: 8px; height: 8px; border-radius: 50%; }
.fac-tab.is-on .fac-tab-dot { background: rgba(255,255,255,.85) !important; }
.fac-tab-count { /* [v2.4.6] ตัวนับอาจารย์ต่อสาขา */
  font-size: .68rem; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 999px;
  background: var(--theme-soft); color: var(--theme-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.fac-tab.is-on .fac-tab-count { background: rgba(255,255,255,.25); color: #fff; }

.fac-major-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
  gap: 16px;
}
.fac-major-pill {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}
.fac-major-count { font-size: .82rem; color: var(--fg-3); font-weight: 500; }

.fac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fac-card {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .2s ease;
}
.fac-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-soft);
}
.fac-photo {
  position: relative;
  width: 80px; height: 80px;
  border-radius: var(--r-xl);
  flex-shrink: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 25%, hsl(var(--hue), 60%, 75%) 0%, transparent 60%),
    linear-gradient(135deg, hsl(var(--hue), 55%, 35%) 0%, hsl(calc(var(--hue) + 25), 50%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95);
}
.fac-rib {
  position: absolute;
  bottom: -2px; left: -2px; right: -2px;
  background: var(--theme-accent);
  color: var(--theme-deep);
  font-size: .58rem; font-weight: 700;
  padding: 3px 6px;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.fac-body { flex: 1; min-width: 0; }
.fac-role {
  font-size: .7rem; font-weight: 600;
  color: var(--theme-primary);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 4px;
}
.fac-name { font-size: .95rem; font-weight: 600; margin: 0 0 10px; line-height: 1.35; }
.fac-icons { display: flex; gap: 6px; }
.fac-icons a {
  width: 36px; height: 36px;
  border-radius: 7px;
  background: var(--bg-1);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  font-size: .82rem;
  text-decoration: none;
  transition: all .15s ease;
}
.fac-icons a:hover { background: var(--theme-primary); color: #fff; }

/* Staff grid */
.staff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.staff-card {
  display: flex; gap: 12px;
  padding: 14px;
  background: var(--bg-1);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  transition: all .2s ease;
}
.staff-card:hover {
  background: #fff;
  border-color: var(--theme-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.staff-photo {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 30% 25%, hsl(var(--hue), 60%, 75%) 0%, transparent 60%),
    linear-gradient(135deg, hsl(var(--hue), 55%, 35%) 0%, hsl(calc(var(--hue) + 25), 50%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95);
  font-weight: 700;
  font-size: 1rem;
}
.staff-photo::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff;
}
.staff-body { flex: 1; min-width: 0; }
.staff-name { font-size: .9rem; font-weight: 600; margin: 0 0 3px; line-height: 1.3; }
.staff-role { font-size: .78rem; color: var(--fg-2); margin-bottom: 4px; line-height: 1.3; }
.staff-unit {
  font-size: .72rem;
  color: var(--theme-primary);
  display: inline-flex; align-items: center; gap: 4px;
}
.staff-unit i { font-size: .8rem; }

/* ── NEWS ────────────────────────────────────────────────────────────── */

.news { background: #f7f9fc; }

.admin-strip {
  background: linear-gradient(135deg, var(--theme-deep), var(--theme-primary));
  border-radius: var(--r-3xl);
  padding: 22px 26px 26px;
  color: #fff;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(19,116,187,.25);
}
.admin-strip::before {
  content: '';
  position: absolute;
  top: -100px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: var(--theme-accent);
  opacity: .12;
  filter: blur(40px);
}
.admin-strip-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.admin-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  backdrop-filter: blur(8px);
}
.admin-badge i { color: var(--theme-accent); }
.admin-strip-meta { font-size: .76rem; opacity: .75; display: inline-flex; align-items: center; gap: 6px; }
.admin-strip-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
}
.admin-item {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-2xl);
  padding: 16px 18px;
  display: flex; gap: 14px;
  backdrop-filter: blur(8px);
}
.admin-item-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--theme-accent);
  color: var(--theme-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.admin-item-body { flex: 1; min-width: 0; }
.news-cat-admin {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
}
.admin-item-title {
  font-size: 1rem; font-weight: 600;
  margin: 6px 0 4px;
  line-height: 1.4;
  color: #fff;
}
.admin-item-body-text {
  font-size: .84rem;
  color: rgba(255,255,255,.8);
  line-height: 1.55;
  margin: 0 0 10px;
}
.admin-item .news-meta { color: rgba(255,255,255,.65); font-size: .76rem; }
.meta-pin {
  background: var(--theme-accent);
  color: var(--theme-deep);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}

.news-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}
.nf-img {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 60%) 0%, transparent 60%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 30%) 0%, hsl(calc(var(--hue) + 30), 65%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 5rem;
  overflow: hidden;
}
.nf-img::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0, transparent 30px, rgba(255,255,255,.04) 30px, rgba(255,255,255,.04) 31px);
}
.nf-pin {
  position: absolute; top: 16px; left: 16px;
  background: var(--theme-accent);
  color: var(--theme-deep);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
}
.nf-dept {
  position: absolute; top: 16px; right: 16px;
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.nf-body {
  padding: 32px 36px 30px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.nf-title {
  font-size: 1.4rem; font-weight: 700;
  line-height: 1.3;
  margin: 14px 0 14px;
  letter-spacing: -.01em;
}
.nf-excerpt {
  font-size: .94rem;
  color: var(--fg-2);
  line-height: 1.65;
  margin: 0 0 18px;
}

.news-cat {
  display: inline-flex;
  font-size: .72rem; font-weight: 600;
  color: var(--theme-primary);
  background: var(--theme-soft);
  padding: 4px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.news-meta {
  display: flex; flex-wrap: wrap;
  gap: 14px;
  font-size: .78rem;
  color: var(--fg-3);
  align-items: center;
  margin-top: auto;
}
.news-meta i { margin-right: 4px; }
.news-readmore {
  margin-left: auto;
  color: var(--theme-primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.news-readmore:hover i { transform: translateX(2px); }
.news-readmore i { transition: transform .15s ease; }

.major-row {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
}
.major-chip {
  --maj-c: var(--theme-primary);
  font: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  padding: .5rem .95rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg-2);
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.major-chip:hover { background: var(--bg-1); color: var(--fg-1); }
.major-chip.is-on {
  background: var(--maj-c);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--maj-c) 35%, transparent);
}
.major-chip.is-on .major-dot { background: rgba(255,255,255,.85) !important; }
.major-dot { width: 8px; height: 8px; border-radius: 50%; }
.major-count {
  font-size: .68rem;
  background: var(--bg-2);
  color: var(--fg-3);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-left: 2px;
}
.major-chip.is-on .major-count {
  background: rgba(255,255,255,.25);
  color: #fff;
}

.dept-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}
.dept-col {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.dept-col-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--dept-c) 92%, #000), var(--dept-c));
  color: #fff;
}
.dept-col-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.dept-col-title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.dept-col-count { font-size: .72rem; opacity: .78; margin-top: 2px; }
.dept-col-body {
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 12px;
  flex: 1;
}
.dept-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  background: var(--bg-1);
  transition: all .15s ease;
  cursor: pointer;
}
.dept-card:hover {
  border-color: color-mix(in srgb, var(--dept-c) 35%, transparent);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.dc-thumb {
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 32%) 0%, hsl(calc(var(--hue) + 30), 60%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 1.5rem;
}
.dc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dc-body .news-cat {
  font-size: .65rem;
  padding: 2px 8px;
  color: var(--dept-c);
  background: color-mix(in srgb, var(--dept-c) 10%, transparent);
}
.dc-title {
  font-size: .9rem; font-weight: 600;
  line-height: 1.4;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dc-excerpt {
  font-size: .78rem;
  color: var(--fg-2);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dc-body .news-meta { font-size: .72rem; gap: 10px; margin-top: 4px; }
.dc-body .meta-pin {
  background: var(--theme-accent);
  color: var(--theme-deep);
}

.dept-col-link {
  padding: 12px 18px;
  margin: 0;
  font-size: .82rem; font-weight: 600;
  color: var(--dept-c);
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-top: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--dept-c) 5%, transparent);
}
.dept-col-link:hover { background: color-mix(in srgb, var(--dept-c) 12%, transparent); }

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--fg-4);
}
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: .88rem; }
.empty-small { padding: 24px 12px; }
.empty-small i { font-size: 1.8rem; }

/* ── GALLERY ─────────────────────────────────────────────────────────── */

.gallery { background: #fff; }
.gallery-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.legend-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  font-size: .78rem; font-weight: 500;
  color: var(--fg-2);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gc); }
.legend-chip i { color: var(--gc); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}
.g-tile {
  position: relative;
  border: none;
  border-radius: var(--r-2xl);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0;
  background: none;
}
.g-tile.g-big   { grid-column: span 2; grid-row: span 2; }
.g-tile.g-tall  { grid-row: span 2; }
.g-tile.g-wide  { grid-column: span 2; }

.g-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 30%) 0%, hsl(calc(var(--hue) + 30), 55%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: 3.5rem;
  transition: transform .35s ease;
}
.g-art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55) 100%);
}
.g-tile:hover .g-art { transform: scale(1.08); }
.g-num {
  position: absolute; top: 14px; left: 14px;
  font-size: .7rem; font-weight: 700;
  color: rgba(255,255,255,.78);
  letter-spacing: .08em;
  background: rgba(0,0,0,.32);
  padding: 3px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.g-group-tag {
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  background: var(--gc);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .68rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  white-space: nowrap;
}
.g-meta {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  color: #fff;
  z-index: 2;
}
.g-date { display: block; font-size: .7rem; opacity: .82; margin-bottom: 2px; }
.g-title {
  display: block;
  font-weight: 600;
  font-size: .95rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  line-height: 1.3;
}
.g-hover-cue {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all .2s ease;
  z-index: 2;
}
.g-tile:hover .g-hover-cue { opacity: 1; transform: scale(1.05); }

/* ── LIGHTBOX ────────────────────────────────────────────────────────── */

.lb-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .15s ease;
  overflow-y: auto;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.lb-modal {
  width: 100%; max-width: 720px;
  background: #fff;
  border-radius: var(--r-3xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.lb-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.95);
  color: var(--fg-1);
  font-size: .9rem;
  cursor: pointer;
  z-index: 3;
}
.lb-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 30%) 0%, hsl(calc(var(--hue) + 30), 55%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: 6rem;
}
.lb-body { padding: 24px 28px 26px; }
.lb-date { font-size: .8rem; color: var(--fg-3); margin-bottom: 8px; }
.lb-title { font-size: 1.3rem; margin: 0 0 10px; }
.lb-desc { color: var(--fg-2); line-height: 1.6; margin: 0; font-size: .92rem; }

/* ── CONTACT ─────────────────────────────────────────────────────────── */

.contact { background: #f7f9fc; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}
.contact-info {
  background: #fff;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  padding: 28px;
}
.ci-row {
  display: flex; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.ci-row:last-of-type { border-bottom: none; }
.ci-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--theme-soft);
  color: var(--theme-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ci-label {
  font-size: .72rem;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 4px;
}
.ci-value { font-size: .95rem; color: var(--fg-1); line-height: 1.5; }
.contact-sep { color: var(--fg-4); margin: 0 4px; }
.muted { color: var(--fg-3); font-size: .82rem; }

.contact-socials {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.soc {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .5rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform .15s ease;
}
.soc:hover { transform: translateY(-2px); }
.soc-fb   { background: #1877f2; color: #fff; }
.soc-line { background: #06c755; color: #fff; }
.soc-yt   { background: #ff0033; color: #fff; }

.contact-map { display: flex; flex-direction: column; gap: 14px; }
.map-canvas {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  background: #e8f4ec;
  overflow: hidden;
}
.map-canvas::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, #d4e8dc 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, #d8e6d4 0%, transparent 35%);
}
.map-roads .rd { position: absolute; background: #fff; box-shadow: 0 0 0 1px #c8d5d0; }
.rd-h { left: 0; right: 0; height: 8px; top: 38%; }
.rd-h2 { top: 72%; }
.rd-v { top: 0; bottom: 0; width: 6px; left: 32%; }
.rd-v2 { left: 68%; }
.rd-diag {
  width: 130%; height: 4px;
  top: 55%; left: -15%;
  transform: rotate(-18deg);
  background: #f3e8d0;
  box-shadow: 0 0 0 1px #d6c9aa;
}
.map-block { position: absolute; background: #fafaf6; border: 1px solid #d8d8cd; border-radius: 4px; }
.mb1 { left: 8%;  top: 12%; width: 18%; height: 18%; }
.mb2 { left: 42%; top: 14%; width: 22%; height: 16%; background: #f3eddf; }
.mb3 { right: 6%; top: 44%; width: 16%; height: 20%; }
.mb4 { left: 14%; bottom: 8%; width: 14%; height: 14%; }
.map-river {
  position: absolute;
  left: -10%; right: -10%;
  top: 82%; height: 18%;
  background: linear-gradient(180deg, #bfd9ed 0%, #a4c6df 100%);
  transform: rotate(-3deg);
}
.map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--theme-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  z-index: 3;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  border: 3px solid #fff;
}
.map-pin-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--theme-primary);
  opacity: .5;
  animation: pulse-ring 2.2s ease-out infinite;
}
.map-tag {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, 14px);
  background: #fff;
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: .76rem;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; gap: 1px;
}
.map-tag strong { font-weight: 600; }
.map-tag span { font-size: .68rem; color: var(--fg-3); font-family: var(--font-mono); }
.map-attr {
  position: absolute; right: 8px; bottom: 8px;
  font-size: .62rem;
  color: var(--fg-3);
  background: rgba(255,255,255,.85);
  padding: 2px 8px;
  border-radius: 4px;
}
.map-cta { display: flex; gap: 10px; }

/* ── FOOTER ──────────────────────────────────────────────────────────── */

.footer {
  background: linear-gradient(180deg, var(--theme-deep) 0%, var(--theme-dark) 100%);
  color: rgba(255,255,255,.78);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  gap: 28px;
  padding-bottom: 36px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand .brand-glyph-wrap { width: 52px; height: 52px; }
.footer-name { font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.footer-sub { font-size: .82rem; opacity: .65; line-height: 1.5; }
.footer-h {
  font-size: .78rem; color: #fff; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.footer-list li, .footer-list a {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-list a:hover { color: var(--theme-accent); }
.footer-list i { color: var(--theme-accent); width: 16px; }

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.10);
  font-size: .76rem;
  opacity: .55;
  display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto;
  padding: 18px 28px;
}

/* ── LOGIN MODAL ─────────────────────────────────────────────────────── */

.login-modal {
  width: 100%; max-width: 520px;
  background: #fff;
  border-radius: var(--r-3xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-modal-head {
  background: linear-gradient(135deg, var(--theme-dark), var(--theme-primary));
  color: #fff;
  padding: 22px 24px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  transition: background .25s ease;
}
.login-modal-head h3 { margin: 0; font-size: 1.1rem; }
.login-modal-head p  { margin: 2px 0 0; font-size: .8rem; opacity: .85; }
.login-modal-head .lb-close { background: rgba(255,255,255,.15); color: #fff; }
.lb-back {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
  z-index: 2;
}
.lb-back:hover { background: rgba(255,255,255,.30); }
.login-modal-head:has(.lb-back) { padding-left: 60px; }

.login-modal-body { padding: 22px 24px 24px; }

/* System picker (step 1) */
.sys-pick-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 22px; }
.sys-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-2xl);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: all .2s ease;
  width: 100%;
  align-items: center;
}
.sys-card:hover {
  border-color: var(--theme-primary);
  background: var(--theme-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.sys-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
}
.sys-card-icon-1 { background: linear-gradient(135deg, #073f64, #1374bb); }
.sys-card-icon-2 { background: linear-gradient(135deg, #e65100, #f57c00); }
.sys-card-body { flex: 1; min-width: 0; }
.sys-card-tag {
  font-size: .68rem;
  font-weight: 700;
  color: var(--theme-primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.sys-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.35;
  color: var(--fg-1);
}
.sys-card-desc {
  font-size: .82rem;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0 0 10px;
}
.sys-card-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.sys-card-role {
  --rc: var(--theme-primary);
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rc) 12%, transparent);
  color: var(--rc);
}
.sys-card-ext {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem;
  font-weight: 600;
  color: #f57c00;
}
.sys-card-arrow {
  font-size: 1.4rem;
  color: var(--fg-4);
  flex-shrink: 0;
  transition: all .15s ease;
}
.sys-card:hover .sys-card-arrow { color: var(--theme-primary); transform: translateX(2px); }

/* Role pick (step 2) */
.role-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.role-pick {
  --rc: var(--theme-primary);
  font: inherit;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: all .15s ease;
}
.role-pick:hover { border-color: var(--rc); }
.role-pick.is-on {
  border-color: var(--rc);
  background: color-mix(in srgb, var(--rc) 7%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 15%, transparent);
}
.role-pick-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--rc) 14%, #fff);
  color: var(--rc);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.role-pick.is-on .role-pick-icon { background: var(--rc); color: #fff; }
.role-pick-label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--fg-1);
  line-height: 1.3;
}
.role-pick-tick {
  position: absolute;
  top: -8px; right: -8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--rc);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
}

.field-label {
  display: block;
  font-size: .78rem; font-weight: 600;
  color: var(--fg-2);
  margin-bottom: 6px;
  margin-top: 12px;
}
.role-pick-grid + .field-label { margin-top: 0; }
.input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  transition: border-color .15s ease;
}
.input-group:focus-within { border-color: var(--theme-primary); }
.input-group .ig-icon {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 0 .75rem;
  display: flex; align-items: center;
  color: var(--fg-4);
}
.input-group input {
  border: none; outline: none;
  padding: .6rem .75rem;
  flex: 1;
  font-family: var(--font-sans);
  font-size: .92rem;
}
.input-group .eye {
  background: #fff;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 .75rem;
  color: var(--fg-4);
  cursor: pointer;
}
.login-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0 18px;
  font-size: .85rem;
}
.login-row a { color: var(--theme-primary); text-decoration: none; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }

.login-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--theme-soft);
  border-radius: var(--r-md);
  font-size: .78rem;
  color: var(--theme-deep);
  display: flex; gap: 8px; align-items: flex-start;
  line-height: 1.5;
}
.login-note i { color: var(--theme-primary); margin-top: 2px; }

/* ── TOAST ───────────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  color: var(--fg-1);
  border-radius: var(--r-lg);
  padding: 12px 18px;
  min-width: min(280px, calc(100vw - 48px));
  max-width: min(420px, calc(100vw - 32px));
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.20), 0 0 0 1px rgba(0,0,0,.04);
  border-left: 4px solid var(--theme-primary);
  animation: toast-in .3s cubic-bezier(.2,.9,.4,1.3);
  pointer-events: auto;
}
@keyframes toast-in {
  from { transform: translateX(20px) scale(.95); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
.toast i { font-size: 1.2rem; flex-shrink: 0; }
.toast-success         { border-left-color: #16a34a; }
.toast-success i       { color: #16a34a; }
.toast-error           { border-left-color: #dc2626; }
.toast-error i         { color: #dc2626; }
.toast-warning         { border-left-color: #d97706; }
.toast-warning i       { color: #d97706; }
.toast-info            { border-left-color: var(--theme-primary); }
.toast-info i          { color: var(--theme-primary); }

/* ── NEWS DETAIL MODAL ───────────────────────────────────────────────── */

.news-detail {
  width: 100%; max-width: 820px;
  background: #fff;
  border-radius: var(--r-3xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.nd-hero {
  position: relative;
  aspect-ratio: 21 / 9;
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 30%) 0%, hsl(calc(var(--hue) + 30), 55%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 5.5rem;
  flex-shrink: 0;
}
.nd-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0, transparent 30px, rgba(255,255,255,.04) 30px, rgba(255,255,255,.04) 31px);
}
.nd-dept-pill {
  position: absolute; top: 18px; left: 18px;
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  z-index: 2;
}
.nd-pin {
  position: absolute; top: 18px; right: 18px;
  background: var(--theme-accent);
  color: var(--theme-deep);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
}
.nd-body { padding: 28px 32px 30px; overflow-y: auto; }
.nd-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 10px 0 12px;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.nd-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: .82rem;
  color: var(--fg-3);
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--border-soft);
}
.nd-meta i { margin-right: 5px; color: var(--theme-primary); }
.nd-content {
  padding: 18px 0;
  color: var(--fg-2);
  line-height: 1.75;
  font-size: .95rem;
}
.nd-content p { margin: 0 0 1em; }
.nd-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.nd-list li {
  background: var(--bg-1);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: .88rem;
  color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.nd-list li i { color: var(--theme-primary); }
.nd-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  margin-top: 10px;
}

/* ── ADMIN DASHBOARD ─────────────────────────────────────────────────── */

.dash-shell {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #f3f5f9;
  display: flex; flex-direction: column;
  animation: fadeIn .2s ease;
  overflow: hidden;
}

/* Top bar */
.dash-top {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  position: relative;
}
.dash-top::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--dept-c);
}
.dash-top-left { display: flex; align-items: center; gap: 14px; }
.dash-glyph {
  width: 48px; height: 48px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, color-mix(in srgb, var(--dept-c) 92%, #000), var(--dept-c));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.dash-top-title { font-weight: 700; font-size: 1.02rem; }
.dash-top-sub { font-size: .76rem; color: var(--fg-3); margin-top: 2px; }
.dash-top-right { display: flex; align-items: center; gap: 12px; }

.dash-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg-2);
  cursor: pointer;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all .15s ease;
}
.dash-icon-btn:hover { color: var(--theme-primary); border-color: var(--theme-primary); }
.dash-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: #dc2626;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 2px solid #fff;
}
.dash-divider { width: 1px; height: 28px; background: var(--border); }
.dash-user { display: flex; align-items: center; gap: 10px; }
.dash-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dash-user-name { display: flex; flex-direction: column; line-height: 1.2; }
.dash-user-name span { font-size: .88rem; font-weight: 600; }
.dash-user-name small { font-size: .7rem; color: var(--fg-3); }
.dash-logout {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-weight: 500;
  padding: .55rem .95rem;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.dash-logout:hover { color: #dc2626; border-color: #dc2626; background: #fef2f2; }

/* Body */
.dash-body {
  flex: 1;
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 0;
}
.dash-side {
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.dash-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.dash-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: .65rem .95rem;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}
.dash-nav-item:hover { background: var(--bg-1); color: var(--fg-1); }
.dash-nav-item.is-on {
  background: var(--theme-soft);
  color: var(--theme-primary);
  font-weight: 600;
}
.dash-nav-item i { font-size: 1.05rem; width: 22px; }
.dash-side-card {
  margin: 12px;
  padding: 12px;
  background: var(--theme-soft);
  border-radius: var(--r-md);
  font-size: .8rem;
  color: var(--theme-deep);
  display: flex; gap: 8px;
}
.dash-side-card i { font-size: 1.1rem; color: var(--theme-primary); flex-shrink: 0; }
.dash-side-card p { margin: 0; line-height: 1.5; }

.dash-main {
  overflow-y: auto;
  padding: 24px 28px 60px;
}
.dash-pane { display: flex; flex-direction: column; gap: 20px; max-width: 1100px; }

.pane-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pane-head h3 { font-size: 1.4rem; margin: 0 0 4px; font-weight: 700; }
.pane-head p { margin: 0; font-size: .9rem; color: var(--fg-3); }

.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.dash-card-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.dash-card-head h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.muted-count { color: var(--fg-3); font-weight: 500; }
.dash-table-filter {
  display: flex; align-items: center;
  background: var(--bg-1);
  border-radius: var(--r-md);
  padding: 0 .65rem;
  border: 1px solid var(--border);
  color: var(--fg-3);
}
.dash-table-filter i { font-size: .85rem; margin-right: 6px; }
.dash-table-filter input {
  border: none;
  background: transparent;
  outline: none;
  padding: .45rem 0;
  font-family: var(--font-sans);
  font-size: .85rem;
  min-width: 100px;
  max-width: 200px;
}

/* Overview */
.ov-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ov-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 18px;
  position: relative;
}
.ov-stat-ic {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.ov-stat-n {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.ov-stat-l { font-size: .82rem; color: var(--fg-3); }
.ov-quick { background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); padding: 18px 22px 22px; }
.ov-quick h4 { font-size: 1rem; margin: 0 0 14px; }
.ov-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ov-q {
  background: var(--bg-1);
  border: 1px dashed var(--border);
  border-radius: var(--r-xl);
  padding: 16px 14px;
  font-family: var(--font-sans);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  transition: all .15s ease;
  font-size: .85rem;
  font-weight: 500;
  color: var(--fg-2);
}
.ov-q:hover {
  background: var(--theme-soft);
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  transform: translateY(-2px);
}
.ov-q i { font-size: 1.4rem; color: var(--theme-primary); }
.ov-activity {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); padding: 18px 22px 22px;
}
.ov-activity h4 { font-size: 1rem; margin: 0 0 14px; }
.ov-activity ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ov-activity li {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.ov-activity li:last-child { border-bottom: none; }
.ov-act-ic {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.ov-act-body { flex: 1; min-width: 0; }
.ov-act-body div { font-size: .9rem; color: var(--fg-1); }
.ov-act-body small { color: var(--fg-3); font-size: .76rem; }

/* Tables */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { text-align: left; padding: 12px 22px; font-size: .85rem; }
.dash-table th {
  font-weight: 600;
  color: var(--fg-3);
  background: var(--bg-1);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dash-table tbody tr { border-bottom: 1px solid var(--border-soft); }
.dash-table tbody tr:hover { background: color-mix(in srgb, var(--theme-soft) 50%, transparent); }
.dash-row-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500;
}
.dash-row-title i { color: var(--theme-primary); }
.dash-act-btn {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg-3);
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 4px;
  font-family: var(--font-sans);
}
.dash-act-btn:hover { background: var(--theme-soft); border-color: var(--theme-primary); color: var(--theme-primary); }
.dash-act-danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.btn-danger { background: linear-gradient(135deg, #b91c1c, #dc2626) !important; }

/* Forms */
.dash-form .dash-card-head { background: var(--bg-1); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  padding: 22px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.is-full { grid-column: 1 / -1; }
.form-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--fg-2);
}
.form-field .req { color: #dc2626; }
.dash-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: .6rem .85rem;
  font-family: var(--font-sans);
  font-size: .9rem;
  background: #fff;
  color: var(--fg-1);
  transition: border-color .15s ease;
  outline: none;
}
.dash-input:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 15%, transparent); }
.dash-input:disabled { background: var(--bg-1); color: var(--fg-3); }
textarea.dash-input { font-family: var(--font-sans); resize: vertical; min-height: 80px; }
.dash-input-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}
.dash-input-prefix:focus-within { border-color: var(--theme-primary); }
.dash-input-prefix span {
  padding: 0 12px;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--fg-3);
  white-space: nowrap;
  align-self: stretch;
  display: flex; align-items: center;
}
.dash-input-prefix .dash-input { border: none; border-radius: 0; }
.dash-input-prefix .dash-input:focus { box-shadow: none; }

.dash-switch {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.dash-switch input { display: none; }
.dash-switch-slider {
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--bg-3);
  position: relative;
  transition: background .15s ease;
}
.dash-switch-slider::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.dash-switch input:checked + .dash-switch-slider { background: var(--theme-primary); }
.dash-switch input:checked + .dash-switch-slider::before { transform: translateX(20px); }
.dash-switch-text { font-size: .85rem; color: var(--fg-2); }

.dash-uploader {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  background: var(--bg-1);
  cursor: pointer;
  color: var(--fg-2);
  transition: all .15s ease;
}
.dash-uploader:hover {
  border-color: var(--theme-primary);
  background: var(--theme-soft);
  color: var(--theme-primary);
}
.dash-uploader i { font-size: 1.6rem; color: var(--theme-primary); flex-shrink: 0; }
.dash-uploader strong { display: block; font-size: .88rem; }
.dash-uploader small { display: block; font-size: .75rem; color: var(--fg-3); margin-top: 1px; }
.dash-uploader-big { padding: 40px 22px; flex-direction: column; text-align: center; }
.dash-uploader-big i { font-size: 3.5rem; }

.dash-form-actions {
  padding: 18px 22px;
  background: var(--bg-1);
  border-top: 1px solid var(--border-soft);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* Lessons admin */
.lessons-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 22px;
}
.la-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--bg-1);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
}
.la-thumb {
  position: relative;
  width: 120px; aspect-ratio: 16/9;
  border-radius: var(--r-md);
  background:
    radial-gradient(ellipse at 30% 30%, hsl(var(--hue), 70%, 65%) 0%, transparent 55%),
    linear-gradient(135deg, hsl(var(--hue), 60%, 32%) 0%, hsl(calc(var(--hue) + 30), 60%, 50%) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.9);
  font-size: 1.5rem;
  flex-shrink: 0;
}
.la-dur {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .68rem;
}
.la-body { flex: 1; min-width: 0; }
.la-body h5 { font-size: .95rem; margin: 6px 0 4px; line-height: 1.35; }
.la-yt {
  font-size: .75rem; color: var(--fg-3);
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}
.la-yt i { color: #ff0033; }
.la-actions { margin-top: 8px; display: flex; gap: 4px; }

/* Personnel admin */
.dash-action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px 22px 22px;
}
.dash-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}
.dash-tile:hover { border-color: var(--theme-primary); background: var(--theme-soft); }
.dash-tile i { font-size: 1.8rem; color: var(--theme-primary); flex-shrink: 0; }
.dash-tile strong { display: block; font-size: .92rem; }
.dash-tile small { font-size: .76rem; color: var(--fg-3); margin-top: 2px; display: block; }

/* Settings */
.dash-settings-rows { padding: 6px 22px 16px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-weight: 600; font-size: .92rem; }
.setting-desc { font-size: .8rem; color: var(--fg-3); margin-top: 2px; }

/* Confirm modal */
.confirm-overlay { z-index: 300; }
.confirm-modal {
  width: 100%; max-width: 380px;
  background: #fff;
  border-radius: var(--r-2xl);
  padding: 26px 26px 22px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.confirm-modal h4 { font-size: 1.15rem; margin: 0 0 8px; }
.confirm-modal p { font-size: .9rem; color: var(--fg-2); margin: 0 0 18px; line-height: 1.55; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions .btn-block { padding: .65rem; font-size: .9rem; }

/* Dashboard responsive (≤900px) — narrow sidebar, grid adjustments */
@media (max-width: 900px) {
  .ov-stats { grid-template-columns: repeat(2, 1fr); }
  .ov-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .lessons-admin-grid { grid-template-columns: 1fr; }
  .dash-action-row { grid-template-columns: 1fr; }
  .dash-top { padding: 12px 16px; flex-wrap: wrap; }
  .dash-main { padding: 18px 16px 60px; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .nav-link { padding: .5rem .65rem; font-size: .84rem; }
  .brand-sub { display: none; }
}
@media (max-width: 1100px) {
  .hero-grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .ld-dean-card { grid-template-columns: 1fr; max-width: 520px; }
  .ld-row { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
  .ld-row::before { display: none; }
  .ld-tree { display: none; }
  .lessons-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-columns { grid-template-columns: 1fr; }
  .admin-strip-items { grid-template-columns: 1fr; }
  .news-feature { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .fac-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .util-uni { display: none; }
}
@media (max-width: 760px) {
  .util-wrap { height: auto; padding: 6px 0; flex-wrap: wrap; gap: 4px; }
  .util-sys-name { font-size: .7rem; }
  .nav-links { display: none; }
  .nav-wrap { height: 64px; }
  .sec { padding: 56px 0; }
  .lessons-grid { grid-template-columns: 1fr; }
  .ld-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .g-tile.g-big, .g-tile.g-wide { grid-column: span 2; }
  .g-tile.g-tall { grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 18px; }
  .role-pick-grid { grid-template-columns: 1fr; }
  .fac-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .sys-card { flex-direction: column; align-items: flex-start; }
  .sys-card-arrow { display: none; }
  .cf-grid { grid-template-columns: 1fr; }
  .reg-modal { max-height: 96vh; }
  .feedback-panel { width: 300px; right: 0; bottom: 72px; }
}

/* ═══════════════════════════════════════════════════════════════
   FORM FIELDS — shared helpers
═══════════════════════════════════════════════════════════════ */

.ff { margin-bottom: 4px; }
.ff-req { color: #ef4444; margin-left: 2px; }
.ff-opt { font-size: .72rem; color: var(--fg-2); font-weight: 400; }
.ff-error { font-size: .75rem; color: #ef4444; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.ff-error::before { content: '⚠'; font-size: .7rem; }

.input-group.ig-err { border-color: #ef4444; }
.input-group.ig-err:focus-within { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

.cf-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .6rem .75rem;
  font-family: inherit;
  font-size: inherit;
  color: var(--fg-1);
  background: #fff;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.cf-textarea:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px rgba(12,111,181,.1); }
.cf-textarea.ig-err { border-color: #ef4444; }
.cf-textarea.ig-err:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .82rem; font-weight: 500;
  cursor: pointer; user-select: none;
  transition: all .15s;
  color: var(--fg-2);
}
.radio-chip input[type="radio"] { display: none; }
.radio-chip:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.radio-chip.is-on {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
}

.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════
   REGISTER MODAL
═══════════════════════════════════════════════════════════════ */

.reg-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.reg-modal-head {
  background: linear-gradient(135deg, #075691, #0c6fb5);
  padding: 22px 24px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.reg-modal-head-text { flex: 1; min-width: 0; }
.reg-modal-tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.7); margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.reg-modal-title {
  font-size: 1.05rem; font-weight: 700; color: #fff;
  margin: 0 0 8px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reg-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.reg-note {
  font-size: .75rem; color: var(--fg-2); margin-top: 10px; margin-bottom: 0;
  display: flex; align-items: flex-start; gap: 5px; line-height: 1.5;
}
.reg-note i { flex-shrink: 0; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   CONTACT FORM
═══════════════════════════════════════════════════════════════ */

.contact-form-wrap {
  margin-top: 3rem;
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}
.cf-title {
  font-size: 1.05rem; font-weight: 700;
  color: var(--theme-primary);
  margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: 8px;
}
.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
.cf-full { grid-column: 1 / -1; }

/* ═══════════════════════════════════════════════════════════════
   NEWS — register button
═══════════════════════════════════════════════════════════════ */

.news-reg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: var(--theme-primary);
  color: #fff;
  border: none; border-radius: 8px;
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.news-reg-btn:hover { background: var(--theme-dark); transform: translateY(-1px); }
.news-reg-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   LESSONS — bookmark button & tabs
═══════════════════════════════════════════════════════════════ */

.lc-bookmark {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(0,0,0,.45);
  border: none; border-radius: 8px;
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  z-index: 2;
}
.lc-bookmark:hover { background: rgba(0,0,0,.65); color: #fff; transform: scale(1.1); }
.lc-bookmark.is-saved { background: var(--theme-primary); color: #fff; }

.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  font-size: .65rem; font-weight: 700;
  padding: 0 5px;
  margin-left: 4px;
}

.lessons-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--fg-2);
}
.lessons-empty i { font-size: 3rem; color: var(--border); display: block; margin-bottom: .75rem; }
.lessons-empty p { margin: 0; font-size: .95rem; }
.lessons-empty-sub { font-size: .82rem !important; margin-top: .4rem !important; color: var(--fg-3, #94a3b8); }

/* ═══════════════════════════════════════════════════════════════
   FEEDBACK WIDGET (floating bottom-left)
═══════════════════════════════════════════════════════════════ */

.feedback-fab-wrap {
  position: fixed;
  bottom: 28px; left: 28px;
  z-index: 1500;
  display: flex; flex-direction: column; align-items: flex-start;
}
.feedback-panel {
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 12px;
  animation: fbSlideUp .2s ease;
}
@keyframes fbSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fb-head {
  background: linear-gradient(135deg, #075691, #0c6fb5);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 600; font-size: .9rem;
}
.fb-head i { font-size: 1rem; }
.fb-head span { flex: 1; }
.fb-close {
  background: none; border: none; color: rgba(255,255,255,.8);
  cursor: pointer; font-size: .85rem; padding: 2px 4px;
  line-height: 1; border-radius: 4px;
  transition: color .15s;
}
.fb-close:hover { color: #fff; }
.fb-body { padding: 14px 16px 16px; }

.feedback-fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #075691, #0c6fb5);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(12,111,181,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.feedback-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(12,111,181,.5); }
.feedback-fab-wrap.is-open .feedback-fab { background: linear-gradient(135deg, #374151, #4b5563); box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* ═══════════════════════════════════════════════════════════════
   PERSONNEL ADMIN
═══════════════════════════════════════════════════════════════ */

.per-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: .72rem; font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   GALLERY ADMIN
═══════════════════════════════════════════════════════════════ */

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 0 20px 20px;
}
.ga-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #fff;
  transition: box-shadow .15s;
}
.ga-tile:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.ga-art {
  height: 90px;
  background: linear-gradient(135deg, hsl(var(--hue),70%,38%), hsl(var(--hue),60%,52%));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: rgba(255,255,255,.9);
}
.ga-body { padding: 10px 12px 10px; }
.ga-title { font-size: .83rem; font-weight: 600; color: var(--fg-1); margin-bottom: 4px; line-height: 1.3; }
.ga-date { font-size: .72rem; color: var(--fg-2); display: flex; align-items: center; gap: 4px; }
.ga-del {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,.45);
  border: none; border-radius: 6px;
  color: rgba(255,255,255,.85);
  font-size: .75rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.ga-tile:hover .ga-del { opacity: 1; }
.ga-del:hover { background: #ef4444; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   WEB CONTENT ADMIN
═══════════════════════════════════════════════════════════════ */

.wc-tabs {
  display: flex; gap: 6px;
  margin-bottom: 20px;
  background: var(--bg-1);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.wc-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px;
  border: none; border-radius: 8px;
  font-size: .82rem; font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--fg-2);
  transition: all .15s;
}
.wc-tab:hover { background: #fff; color: var(--fg-1); }
.wc-tab.is-on { background: #fff; color: var(--theme-primary); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.wc-tab i { font-size: .9rem; }

.wc-stats-head {
  padding: 14px 20px 6px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.wc-stats-head h5 {
  font-size: .88rem; font-weight: 600; color: var(--fg-1);
  margin: 0; display: flex; align-items: center; gap: 6px;
}
.wc-stats-head h5 i { color: var(--theme-primary); }
.wc-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 20px 20px;
}
.wc-stat-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.wc-stat-icon {
  width: 34px; height: 34px;
  background: var(--theme-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  flex-shrink: 0;
}
.wc-stat-fields { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.wc-stat-n { font-size: .82rem !important; font-weight: 700 !important; }
.wc-stat-l { font-size: .78rem !important; }

@media (max-width: 600px) {
  .wc-tabs { flex-direction: column; }
  .wc-stats-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER
═══════════════════════════════════════════════════════════════ */

.nav-hamburger { display: none; }
.d-desktop {}

@media (max-width: 760px) {
  .nav-hamburger { display: inline-flex; }
  .d-desktop { display: none !important; }
}

.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
}
.mobile-nav {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 999;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  display: flex; flex-direction: column;
}
.mobile-nav-link {
  padding: 13px 24px;
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 500; font-size: .95rem;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.mobile-nav-link:hover { color: var(--fg-1); background: var(--bg-1); }
.mobile-nav-link.is-active {
  color: var(--theme-primary);
  background: var(--theme-soft);
  border-left-color: var(--theme-primary);
  font-weight: 600;
}
.mobile-nav-divider { height: 1px; background: var(--border); margin: 8px 0; }
.mobile-nav-login { margin: 4px 24px 0; align-self: flex-start; }

/* ═══════════════════════════════════════════════════════════════
   GALLERY FILTER CHIPS
═══════════════════════════════════════════════════════════════ */

.gallery-filter-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.gal-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: #fff;
  color: var(--fg-2);
  font-size: .83rem; font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.gal-chip:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.gal-chip.is-on {
  background: var(--gc, var(--theme-primary));
  border-color: var(--gc, var(--theme-primary));
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.gal-chip-count {
  background: rgba(255,255,255,.25);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: .72rem;
  font-weight: 700;
}
.gal-chip:not(.is-on) .gal-chip-count {
  background: var(--bg-1);
  color: var(--fg-3);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN DEMO HINT
═══════════════════════════════════════════════════════════════ */

.login-demo-hint {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: .76rem; color: #166534;
  margin-bottom: 12px;
}
.login-demo-hint i { flex-shrink: 0; }
.login-demo-hint code {
  background: rgba(22,101,52,.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .75rem;
  color: #166534;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN NEWS — DEPT PILL
═══════════════════════════════════════════════════════════════ */

.dept-mini-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .73rem; font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   BRAND LOGO IMAGE
═══════════════════════════════════════════════════════════════ */

.brand-logo-img {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 6px;
}
.footer .brand-logo-img { width: 48px; height: 48px; }

/* ═══════════════════════════════════════════════════════════════
   LOGO UPLOAD TAB
═══════════════════════════════════════════════════════════════ */

.logo-preview-box {
  width: 120px; height: 120px;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #f8fafc;
  overflow: hidden;
}
.logo-preview-img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #94a3b8; font-size: .75rem;
}
.logo-preview-empty i { font-size: 2rem; }

/* ═══════════════════════════════════════════════════════════════
   IMAGE PREVIEW GRID (gallery upload)
═══════════════════════════════════════════════════════════════ */

.img-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.img-preview-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}
.img-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-del {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.img-preview-del:hover { background: #ef4444; }

/* ═══════════════════════════════════════════════════════════════
   TIMS SYNC BADGES & PERSONNEL AVATAR
═══════════════════════════════════════════════════════════════ */

.tims-badge {
  display: inline-flex; align-items: center;
  background: #d1fae5; color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 4px;
  font-size: .65rem; font-weight: 700;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .04em;
}
.per-avatar-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   API STATUS BADGE (SettingsAdmin)
═══════════════════════════════════════════════════════════════ */

.api-status-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .78rem;
  margin-top: 10px;
}
.api-status-badge.ok   { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.api-status-badge.fail { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 1024px
═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .container { padding: 0 20px; }

  /* Hero */
  .hero-grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .hero-video-col { order: -1; }
  .hero-lede { max-width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  /* Faculty */
  .fac-grid { grid-template-columns: repeat(2, 1fr); }

  /* Staff */
  .staff-grid { grid-template-columns: repeat(3, 1fr); }

  /* Org tree */
  .ld-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .ld-row::before { background-position: 0% 0%, 100% 0%; }

  /* News dept columns */
  .dept-columns { grid-template-columns: repeat(2, 1fr); }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  /* Footer */
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* Admin dashboard */
  .dash-body { grid-template-columns: 220px 1fr; }
  .ov-stats { grid-template-columns: repeat(2, 1fr); }
  .ov-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin sidebar narrower at tablet-portrait */
@media (max-width: 900px) {
  .dash-body { grid-template-columns: 180px 1fr; }
  .dash-nav-item span { font-size: .8rem; }
  .dash-nav-item { padding: .6rem .7rem; gap: 8px; }
}

/* [UX-06] Mobile sidebar toggle button — hidden on desktop */
.dash-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--fg-1, #374151);
  flex-shrink: 0;
  transition: background .15s;
}
.dash-menu-toggle:hover { background: var(--bg-1, #f8fafc); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 768px
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Utility bar */
  .util-uni { display: none; }
  .util-links a span { display: none; }
  .util-links a { padding: 6px 8px; }

  /* Topbar */
  .nav-wrap { height: 64px; gap: 12px; }
  .brand-sub { display: none; }

  /* Hero */
  .hero { padding: 52px 0 48px; }
  .hero-grid-2 { gap: 28px; }
  .hero-title { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .hero-ctas { gap: 10px; }
  .hero-ctas .btn-primary, .hero-ctas .btn-ghost { font-size: .85rem; padding: .55rem .95rem; }
  .hero-stats { gap: 10px; }
  .hero-stats li { padding: 11px 12px; }
  .hero-stat-n { font-size: 1rem; }

  /* Sections */
  .sec { padding: 52px 0; }
  .sec-head { margin-bottom: 24px; }

  /* Lessons */
  .lessons-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Leadership */
  .ld-dean-card { grid-template-columns: 1fr; }
  .ld-dean-photo { min-height: 180px; }
  .ld-row { grid-template-columns: repeat(2, 1fr); }

  /* Faculty */
  .fac-grid { grid-template-columns: 1fr; }
  .fac-tabs { gap: 4px; padding: 8px; }
  .fac-tab { font-size: .76rem; padding: .35rem .65rem; }

  /* Staff */
  .staff-grid { grid-template-columns: repeat(2, 1fr); }

  /* News */
  .admin-strip-items { grid-template-columns: 1fr; }
  .news-feature { grid-template-columns: 1fr; }
  .nf-img { min-height: 200px; }
  .nf-body { padding: 22px 20px 20px; }
  .dept-columns { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
  }
  .g-tile.g-big  { grid-column: span 2; grid-row: span 2; }
  .g-tile.g-tall { grid-row: span 1; }
  .g-tile.g-wide { grid-column: span 2; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; }
  .footer { padding: 40px 0 0; }
  .footer-bar { flex-direction: column; gap: 8px; padding: 14px 16px; }

  /* Modals — full-screen feel on mobile */
  .lb-overlay { padding: 0; align-items: flex-end; }
  .lb-modal, .lesson-modal, .news-detail, .login-modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-width: 100%;
    max-height: 92vh;
  }
  .news-detail { max-height: 95vh; }

  /* [UX-06] Admin dashboard — mobile sidebar toggle */
  .dash-menu-toggle { display: flex; }
  .dash-body { grid-template-columns: 1fr; }

  /* Sidebar visible (default state on mobile) */
  .dash-side {
    display: flex;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    overflow-y: visible;
    max-height: none;
  }

  /* Sidebar collapsed — hidden by toggle */
  .dash-body.side-collapsed .dash-side {
    display: none;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 4px;
  }
  .dash-nav-item {
    padding: .4rem .65rem;
    font-size: .78rem;
    gap: 6px;
  }
  .dash-nav-item i { font-size: .9rem; }
  .dash-main { padding: 16px 16px 48px; }
  .dash-top { padding: 12px 16px; }
  .dash-user-name { display: none; }

  /* Dashboard panels */
  .ov-stats { grid-template-columns: repeat(2, 1fr); }
  .ov-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }

  /* Table scroll — wrap only the table, not the whole card */
  .dash-card-table-wrap,
  .dash-card > .dash-table { overflow-x: auto; }
  .dash-table { min-width: 520px; }

  /* Form actions wrap on small screens */
  .dash-form-actions { flex-wrap: wrap; gap: 8px; }

  /* Feedback panel */
  .feedback-fab-wrap { left: 12px; bottom: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  ≤ 480px
═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  /* Hero stats — 2 columns */
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero-stat-n { font-size: .95rem; }
  .hero-stat-l { font-size: .62rem; }

  /* Faculty — full width cards */
  .fac-card { flex-direction: column; align-items: flex-start; }
  .fac-photo { width: 64px; height: 64px; }

  /* Staff — 1 column */
  .staff-grid { grid-template-columns: 1fr; }

  /* Org tree — 1 column */
  .ld-row { grid-template-columns: 1fr; }

  /* Gallery — 1 column */
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .g-tile.g-big, .g-tile.g-wide { grid-column: span 1; grid-row: span 1; }

  /* Login modal */
  .role-pick-grid { grid-template-columns: 1fr; }

  /* Section title */
  .sec-head { flex-direction: column; align-items: flex-start; }

  /* Dashboard overview */
  .ov-quick-grid { grid-template-columns: repeat(2, 1fr); }

  /* Topbar height */
  .nav-wrap { height: 58px; }
  .mobile-nav { top: 58px; }

  /* Inbox — stack list + detail vertically on mobile */
  .inbox-grid { grid-template-columns: 1fr !important; }

  /* Admin overview stats → 1 column */
  .ov-stats { grid-template-columns: 1fr; }
  .ov-quick-grid { grid-template-columns: 1fr; }

  /* Admin pane/card padding tighter */
  .dash-main { padding: 12px 12px 48px; }
  .form-grid { padding: 14px; gap: 10px; }
  .dash-form-actions { padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
  .pane-head { padding: 0 0 12px; }
  .pane-head h3 { font-size: 1.1rem; }
  .dash-card-head { padding: 14px 16px; }
  .dash-table th, .dash-table td { padding: 10px 12px; }

  /* Hero */
  .hero-title { font-size: clamp(1.45rem, 7vw, 1.9rem); }
  .hero-lede { font-size: .88rem; }
  .hero { padding: 44px 0 36px; }

  /* Feedback panel closer to edge */
  .feedback-fab-wrap { left: 10px; bottom: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — VERY SMALL  ≤ 360px
═══════════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
  .container { padding: 0 12px; }

  /* Hero — stack CTAs */
  .hero-ctas { flex-direction: column; gap: 8px; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost { width: 100%; justify-content: center; }
  .hero-stats { gap: 6px; }
  .hero-stat-n { font-size: .85rem; }
  .hero-stat-l { font-size: .58rem; }

  /* Toast fits screen */
  .toast { font-size: .8rem; padding: 10px 12px; gap: 8px; }

  /* Admin */
  .dash-main { padding: 10px 10px 44px; }
  .ov-stat-card { padding: 14px; }
  .dash-act-btn { width: 38px; height: 38px; }
}

/* ═══════════════════════════════════════════════════════════════
   TIMS DATA INTEGRATION BADGES
═══════════════════════════════════════════════════════════════ */

.tims-data-note {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px;
  font-size: .72rem; color: rgba(255,255,255,.65);
  letter-spacing: .02em;
}
.tims-data-note i { font-size: .8rem; }

.tims-badge-inline {
  display: inline-flex; align-items: center; gap: 3px;
  background: #fff3e0; color: #f57c00;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  font-size: .62rem; font-weight: 700;
  padding: 1px 5px;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.dept-card-tims {
  border-left: 3px solid #f57c00;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING ANIMATION (login button spinner)
═══════════════════════════════════════════════════════════════ */

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE FIXES — DEPT COLUMNS HORIZONTAL SCROLL ≤600px
═══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  /* Contact form — force single column */
  .cf-grid { grid-template-columns: 1fr !important; }

  /* Dept news columns — single column */
  .dept-columns { grid-template-columns: 1fr; }

  /* Dashboard top bar compact */
  .dash-top-left .dash-top-sub { display: none; }
  .dash-top { flex-wrap: wrap; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════════
   v2.1.1 — NEWS HORIZONTAL CARDS + ARCHIVE PAGE + NOTIF DROPDOWN
═══════════════════════════════════════════════════════════════ */

/* ── Dept row grid (2 depts per row on desktop) ─────────────── */
.dept-row-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.dept-row {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8edf2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Dept row header ─────────────────────────────────────────── */
.dept-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dept-row-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dept-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--dept-c) 12%, transparent);
  color: var(--dept-c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dept-row-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a2236;
  line-height: 1.2;
}

.dept-row-count {
  font-size: 12px;
  color: #7a8899;
  margin-top: 2px;
}

.dept-row-all {
  font-size: 13px;
  color: var(--dept-c, #0c6fb5);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity .15s;
}
.dept-row-all:hover { opacity: .75; text-decoration: underline; }

/* ── Horizontal news cards grid ──────────────────────────────── */
.dept-row-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Single horizontal card ──────────────────────────────────── */
.news-hcard {
  display: flex;
  gap: 12px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.news-hcard:hover {
  background: #fff;
  border-color: #d0dae6;
  box-shadow: 0 2px 8px rgba(12,111,181,.08);
}
.news-hcard-tims {
  border-left: 3px solid #f57c00;
}

.news-hcard-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: hsl(var(--hue, 212) 65% 92%);
  color: hsl(var(--hue, 212) 60% 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.news-hcard-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-hcard-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-hcard-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.news-hcard-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a2236;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.news-hcard-excerpt {
  font-size: 12px;
  color: #5a6a7e;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ── Google Maps iframe wrapper ──────────────────────────────── */
.map-iframe-wrap {
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}
.map-iframe-wrap iframe {
  display: block;
  width: 100%;
}

/* ── Notification dropdown ───────────────────────────────────── */
.notif-btn-wrap {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  border: 1px solid #e0e8f0;
  z-index: 1000;
  overflow: hidden;
}

.notif-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #edf1f7;
}

.notif-dropdown-head strong {
  font-size: 14px;
  font-weight: 600;
  color: #1a2236;
}

.notif-mark-all {
  font-size: 12px;
  color: #0c6fb5;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f5f8fb; }
.notif-item.unread { background: #f0f7ff; }
.notif-item.unread:hover { background: #e6f2ff; }

.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0c6fb5;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-item:not(.unread) .notif-item-dot { background: transparent; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-action {
  font-size: 12px;
  font-weight: 600;
  color: #1a2236;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-detail {
  font-size: 11px;
  color: #6b7a8d;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 11px;
  color: #a0aab4;
  white-space: nowrap;
  margin-top: 2px;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #a0aab4;
  font-size: 13px;
}

/* ── Archive page (news.php) ─────────────────────────────────── */
.archive-page {
  min-height: 100vh;
  background: #f4f7fb;
  font-family: 'Prompt', 'Sarabun', sans-serif;
}

.archive-hero {
  background: var(--dept-color, #0c6fb5);
  color: #fff;
  padding: 40px 0 32px;
}

.archive-hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.archive-back {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.archive-back:hover { color: #fff; }

.archive-hero-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.archive-hero-title { font-size: 24px; font-weight: 700; margin: 0; }
.archive-hero-sub   { font-size: 14px; opacity: .8; margin: 4px 0 0; }

.archive-body {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 24px;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.archive-page-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid #d0dae6;
  background: #fff;
  color: #1a2236;
  cursor: pointer;
  font-size: 14px;
  transition: background .12s;
}
.archive-page-btn:hover:not(:disabled) { background: #f0f4f8; }
.archive-page-btn:disabled { opacity: .4; cursor: default; }
.archive-page-info { font-size: 13px; color: #6b7a8d; }

/* ── Responsive breakpoints ──────────────────────────────────── */
@media (max-width: 900px) {
  .dept-row-wrap  { grid-template-columns: 1fr; }
  .notif-dropdown { width: 300px; }
}

@media (max-width: 600px) {
  .dept-row-cards { grid-template-columns: 1fr; }
  .archive-grid   { grid-template-columns: 1fr; }
  .notif-dropdown { width: calc(100vw - 32px); right: -8px; }
}

/* ── SEARCH MODAL ──────────────────────────────────────────────── */
.search-overlay { align-items: flex-start; padding-top: 80px; }
.search-modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
}
.search-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid #e8edf2;
}
.search-bar-icon { color: #94a3b8; font-size: 18px; flex-shrink: 0; }
.search-input {
  flex: 1; border: none; outline: none; font-size: 17px;
  font-family: inherit; background: transparent; color: #1a2236;
}
.search-clear { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 4px; }
.search-results { max-height: 340px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; cursor: pointer; transition: background .12s;
}
.search-result-item:hover { background: #f5f8fb; }
.search-result-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: hsl(var(--hue,212) 65% 92%); color: hsl(var(--hue,212) 60% 40%);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.search-result-title { font-size: 14px; font-weight: 600; color: #1a2236; line-height: 1.3; }
.search-result-sub { font-size: 12px; color: #6b7a8d; margin-top: 2px; }
.search-empty, .search-hint {
  padding: 32px 20px; text-align: center; color: #94a3b8; font-size: 14px;
}
.search-hint { color: #0c6fb5; }

/* ── HELP MODAL ────────────────────────────────────────────────── */
.help-modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden; max-height: 80vh; display: flex; flex-direction: column;
}
.help-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e8edf2; flex-shrink: 0;
}
.help-modal-body { overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.help-faq-item { background: #f8fafc; border-radius: 10px; padding: 12px 14px; }
.help-faq-q { font-size: 14px; font-weight: 600; color: #1a2236; margin-bottom: 6px; }
.help-faq-q i { color: #0c6fb5; margin-right: 6px; }
.help-faq-a { font-size: 13px; color: #4a5568; line-height: 1.6; }

/* ── COVER IMAGE UPLOADER ──────────────────────────────────────── */
.cover-img-row { display: flex; gap: 8px; }

/* ── GALLERY EDIT/DELETE actions ───────────────────────────────── */
.ga-tile { position: relative; }
.ga-actions { display: flex; gap: 4px; position: absolute; top: 8px; right: 8px; }
/* inside ga-actions: override the original absolute ga-del positioning */
.ga-actions .ga-del,
.ga-actions .ga-edit {
  position: static; opacity: 1;
  width: 28px; height: 28px; border-radius: 6px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  transition: background .15s;
}
.ga-actions .ga-edit { background: rgba(255,255,255,.9); color: #0c6fb5; }
.ga-actions .ga-edit:hover { background: #fff; }
.ga-actions .ga-del { background: rgba(255,255,255,.9); color: #ef4444; }
.ga-actions .ga-del:hover { background: #fff; }
.ga-tile:hover .ga-actions { opacity: 1; }

/* ── ADMIN_AUTH.PHP: update_self password fix ──────────────────── */
.attachment-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #f0f7ff; border-radius: 8px; color: #0c6fb5;
  text-decoration: none; font-size: 13px;
}
.attachment-link:hover { background: #e0f0ff; }

/* ── Personnel Detail Modal ── */
.personnel-modal {
  background: #fff; border-radius: 20px; width: 360px; max-width: 94vw;
  overflow: hidden; position: relative; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.pm-avatar-wrap {
  background: linear-gradient(135deg, hsl(var(--hue,212),72%,46%), hsl(var(--hue,212),72%,34%));
  padding: 32px 24px 52px;
}
.pm-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.6); }
.pm-avatar { width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,255,255,.25); display: flex; align-items: center;
  justify-content: center; margin: 0 auto;
  font-size: 2.2rem; font-weight: 700; color: #fff; }
.pm-body { padding: 16px 24px 28px; margin-top: -28px;
  background: #fff; border-radius: 20px 20px 0 0; }
.pm-name { font-size: 1.1rem; font-weight: 700; color: #1a2236; margin-bottom: 4px; }
.pm-role { font-size: .9rem; color: #0c6fb5; font-weight: 600; margin-bottom: 4px; }
.pm-unit { font-size: .82rem; color: #6b7a90; margin-bottom: 12px; }
.pm-contacts { display: flex; flex-direction: column; gap: 8px; }
.pm-contact { display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: #f0f7ff; border-radius: 10px; color: #0c6fb5;
  text-decoration: none; font-size: .85rem; }
.pm-contact:hover { background: #e0f0ff; }

/* ── Lightbox image nav ── */
.lb-img-nav { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.5);
  border-radius: 20px; padding: 4px 10px; }
.lb-img-btn { background: none; border: none; color: #fff; cursor: pointer;
  font-size: 1rem; padding: 2px 6px; }
.lb-img-counter { color: #fff; font-size: .8rem; min-width: 40px; text-align: center; }
.lb-thumbs { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.lb-thumb { width: 52px; height: 42px; border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: none; padding: 0; }
.lb-thumb.is-on { border-color: #0c6fb5; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Gallery cover image ── */
.g-cover-img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; }
.g-tile { position: relative; }

/* ── Photo in leadership cards ── */
.ld-photo-img { width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; }
.attach-size { color: #94a3b8; font-size: 11px; margin-left: auto; }

/* [P3-05] Lightbox main image as <img> (เดิมเป็น CSS background-image) */
.lb-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* [P3-04] Skip navigation link (a11y) — ซ่อนไว้จนกว่าจะ focus ด้วยคีย์บอร์ด */
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 10000;
  background: var(--theme-primary); color: #fff;
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

/* [P3-04] Cookie consent banner (PDPA) */
.cookie-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9000;
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 12px 40px rgba(2,32,71,.18); padding: 14px 18px;
}
.cookie-consent-text { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px;
  font-size: .92rem; color: var(--fg-1, #1e293b); line-height: 1.5; }
.cookie-consent-text i { font-size: 1.5rem; color: var(--theme-primary); flex-shrink: 0; }
.cookie-consent-btn {
  border: none; background: var(--theme-primary); color: #fff;
  padding: 10px 22px; border-radius: 10px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.cookie-consent-btn:hover { background: var(--theme-dark); }
@media (max-width: 520px) {
  .cookie-consent { flex-direction: column; align-items: stretch; }
  .cookie-consent-btn { justify-content: center; }
}
