/* =====================================================================
   EventLine design system — Techno Main Salt Lake
   Type: Big Shoulders Display (posters, figures) + Instrument Sans (text)
   Palette: crimson, deep red, black, charcoal, white, subtle grey
   Signature: the running crimson "line" — a campus timeline
   ===================================================================== */

@font-face { font-family: "Big Shoulders"; src: url("../fonts/big-shoulders-display-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("../fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("../fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("../fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --el-crimson: #DC1E2D;
  --el-crimson-hover: #C21626;
  --el-deep: #8B0F1C;
  --el-black: #000000;
  --el-charcoal: #1F2024;
  --el-charcoal-2: #2B2D32;
  --el-white: #FFFFFF;
  --el-grey: #F2F2F4;
  --el-grey-2: #E4E4E8;
  --el-muted: #62656D;
  --el-ink: #15161A;
  --el-line: 6px;
  --el-display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --el-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --el-radius-sm: 6px;
  --el-radius: 10px;
  --el-radius-lg: 18px;
  --bs-body-font-family: var(--el-text);
  --bs-primary: #DC1E2D;
  --bs-primary-rgb: 220, 30, 45;
  --bs-link-color: #B3121F;
  --bs-link-color-rgb: 179, 18, 31;
  --bs-link-hover-color: #8B0F1C;
  --bs-border-radius: 8px;
  --bs-focus-ring-color: rgba(220, 30, 45, .35);
}

html { scroll-behavior: smooth; }
body { font-family: var(--el-text); color: var(--el-ink); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

:focus-visible { outline: 3px solid var(--el-crimson); outline-offset: 2px; }
a { text-underline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--el-black); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

.font-display { font-family: var(--el-display); letter-spacing: .01em; }
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--el-display); font-weight: 800; letter-spacing: .005em; line-height: 1.02; }
h4, h5, h6, .h4, .h5, .h6 { font-family: var(--el-text); font-weight: 700; letter-spacing: -.01em; }
.text-muted, .el-muted { color: var(--el-muted) !important; }
.text-crimson { color: var(--el-crimson) !important; }
.bg-charcoal { background: var(--el-charcoal) !important; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 999px; padding: .55rem 1.15rem; }
.btn-sm { padding: .35rem .85rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-primary, .btn-crimson { --bs-btn-bg: var(--el-crimson); --bs-btn-border-color: var(--el-crimson); --bs-btn-hover-bg: var(--el-crimson-hover); --bs-btn-hover-border-color: var(--el-crimson-hover); --bs-btn-active-bg: var(--el-deep); --bs-btn-active-border-color: var(--el-deep); --bs-btn-disabled-bg: #E98B93; --bs-btn-disabled-border-color: #E98B93; color: #fff; }
.btn-dark { --bs-btn-bg: var(--el-black); --bs-btn-border-color: var(--el-black); --bs-btn-hover-bg: var(--el-charcoal-2); }
.btn-outline-dark { --bs-btn-color: var(--el-ink); --bs-btn-border-color: #C9CAD0; --bs-btn-hover-bg: var(--el-ink); --bs-btn-hover-border-color: var(--el-ink); }
.btn-outline-light { --bs-btn-border-color: rgba(255,255,255,.45); }
.btn-outline-danger { --bs-btn-color: #B3121F; --bs-btn-border-color: #E7A1A7; --bs-btn-hover-bg: #B3121F; --bs-btn-hover-border-color: #B3121F; }
.btn-ghost { background: transparent; border: 0; color: var(--el-muted); }
.btn-ghost:hover { color: var(--el-ink); background: var(--el-grey); }
.btn-icon { width: 2.4rem; height: 2.4rem; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }

.form-control, .form-select { border-radius: 8px; border-color: #CFD0D6; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--el-crimson); box-shadow: 0 0 0 .2rem rgba(220,30,45,.18); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.form-text { color: var(--el-muted); }
.form-check-input:checked { background-color: var(--el-crimson); border-color: var(--el-crimson); }
.req::after { content: " *"; color: var(--el-crimson); }
.invalid-feedback { font-weight: 500; }

/* ---------- Status chips ---------- */
.el-status { display: inline-flex; align-items: center; gap: .35em; font-size: .78rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; white-space: nowrap; line-height: 1.3; }
.el-status::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.el-status--draft { background: #ECECEF; color: #4B4E55; }
.el-status--pending { background: #FFF1D6; color: #8A4B00; }
.el-status--approved { background: #DDF5E4; color: #13612F; }
.el-status--rejected { background: #FFE1E4; color: #9F1223; }
.el-status--completed { background: #1F2024; color: #fff; }
.el-status--archived { background: transparent; color: #4B4E55; border: 1px solid #C9CAD0; }
.el-timing { font-family: var(--el-display); font-weight: 800; font-size: .95rem; letter-spacing: .04em; padding: .15em .6em; border-radius: 4px; }
.el-timing--upcoming { background: var(--el-crimson); color: #fff; }
.el-timing--live { background: #fff; color: var(--el-crimson); box-shadow: inset 0 0 0 2px var(--el-crimson); }
.el-timing--completed { background: var(--el-charcoal); color: #D9D9DD; }

/* =====================================================================
   PUBLIC SITE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--el-grey-2); }
.site-header .navbar { padding: .55rem 0; }
.brand-lockup { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand-lockup img.tmsl { height: 46px; width: auto; }
.brand-lockup .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-lockup .brand-inst { font-weight: 700; font-size: .82rem; color: #1B3F9C; letter-spacing: .01em; }
.brand-lockup img.wordmark { height: 24px; width: auto; margin-top: 3px; }
.site-nav .nav-link { font-weight: 600; color: var(--el-ink); padding: .5rem .85rem !important; border-radius: 999px; }
.site-nav .nav-link:hover { background: var(--el-grey); }
.site-nav .nav-link.active { color: var(--el-crimson); }
.site-nav .nav-link.active::after { content: ""; display: block; height: 3px; background: var(--el-crimson); border-radius: 2px; margin-top: 2px; }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(220,30,45,.3); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--el-black); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 980px; max-height: 980px;
  background: radial-gradient(closest-side, rgba(220,30,45,.55), rgba(139,15,28,.25) 55%, transparent 72%); z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.hero-inner { padding-top: clamp(3rem, 8vw, 6.5rem); }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: #F2B8BD; margin-bottom: 1.4rem; font-size: .98rem; }
.hero-kicker .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--el-crimson); box-shadow: 0 0 0 0 rgba(220,30,45,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,30,45,.6); } 70% { box-shadow: 0 0 0 12px rgba(220,30,45,0); } 100% { box-shadow: 0 0 0 0 rgba(220,30,45,0); } }
.hero-title { font-family: var(--el-display); font-weight: 900; text-transform: uppercase; font-size: clamp(4.2rem, 13vw, 11.5rem); line-height: .82; letter-spacing: -.005em; margin: 0; }
.hero-title span { display: block; }
.hero-title .outline { color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.9); }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #D7D7DC; max-width: 34rem; margin: 1.6rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* The line: draws once across the hero, stations = live stats */
.the-line { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); padding: 0 0 3.2rem; }
.the-line .track { position: relative; height: var(--el-line); background: var(--el-crimson); border-radius: 3px; transform-origin: left center; animation: draw 1.4s cubic-bezier(.65,0,.35,1) .2s both; }
.the-line .track::after { content: ""; position: absolute; right: -14px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--el-crimson); box-shadow: inset 0 0 0 9px var(--el-crimson), inset 0 0 0 28px #000; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: -11px; }
.station { position: relative; padding-top: 2rem; opacity: 0; animation: rise .5s ease-out both; }
.station:nth-child(1) { animation-delay: .7s; } .station:nth-child(2) { animation-delay: .9s; } .station:nth-child(3) { animation-delay: 1.1s; } .station:nth-child(4) { animation-delay: 1.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.station::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: #000; border: 4px solid var(--el-crimson); }
.station .fig { font-family: var(--el-display); font-weight: 800; font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1; }
.station .lbl { color: #BDBDC4; font-size: .95rem; margin-top: .25rem; }
@media (max-width: 767.98px) { .stations { grid-template-columns: repeat(2, 1fr); row-gap: 1.6rem; } .stations .station:nth-child(n+3)::before { display: none; } .stations .station:nth-child(n+3) { padding-top: 0; } }

/* ---------- Section heads ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-dark { background: var(--el-black); color: #fff; }
.section-grey { background: var(--el-grey); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.section-title { font-family: var(--el-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .9; margin: 0; }
.section-lede { color: var(--el-muted); max-width: 36rem; margin: .75rem 0 0; font-size: 1.05rem; }
.section-dark .section-lede { color: #BDBDC4; }

/* ---------- "Next on the line" horizontal timeline ---------- */
.timeline-rail { position: relative; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 1.25rem; scrollbar-width: thin; scrollbar-color: var(--el-crimson) transparent; }
.timeline-rail::-webkit-scrollbar { height: 6px; } .timeline-rail::-webkit-scrollbar-thumb { background: var(--el-crimson); border-radius: 3px; }
.timeline-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 320px); gap: 1.5rem; position: relative; padding-top: 3.5rem; min-width: min-content; }
.timeline-track::before { content: ""; position: absolute; left: 0; right: 0; top: 1.25rem; height: var(--el-line); background: var(--el-crimson); border-radius: 3px; }
.tl-stop { scroll-snap-align: start; position: relative; }
.tl-stop::before { content: ""; position: absolute; top: -2.6rem; left: 0; width: 20px; height: 20px; border-radius: 50%; background: #000; border: 5px solid var(--el-crimson); }
.tl-date { position: absolute; top: -3.55rem; left: 1.9rem; font-family: var(--el-display); font-weight: 800; font-size: 1.35rem; color: #fff; letter-spacing: .02em; }
.tl-card { display: block; text-decoration: none; color: inherit; background: var(--el-charcoal); border-radius: var(--el-radius); overflow: hidden; height: 100%; transition: transform .2s ease, background .2s ease; }
.tl-card:hover { transform: translateY(-3px); background: var(--el-charcoal-2); color: inherit; }
.tl-card .art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--el-charcoal-2); }
.tl-card .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; display: block; }
.tl-card .body { padding: 1rem 1.1rem 1.2rem; }
.tl-card .name { font-family: var(--el-display); font-weight: 800; font-size: 1.6rem; line-height: 1; text-transform: uppercase; color: #fff; }
.tl-card .meta { color: #B5B5BC; font-size: .9rem; margin-top: .4rem; }
@media (max-width: 575.98px) {
  .timeline-rail { overflow: visible; }
  .timeline-track { grid-auto-flow: row; grid-auto-columns: auto; padding: 0 0 0 2.4rem; gap: 2.2rem; }
  .timeline-track::before { left: .55rem; right: auto; top: 0; bottom: 0; width: var(--el-line); height: auto; }
  .tl-stop::before { left: -2.4rem; top: .2rem; }
  .tl-date { position: static; display: block; margin-bottom: .5rem; }
}

/* ---------- Poster cards (event listing) ---------- */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.poster { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--el-radius); overflow: hidden; border: 1px solid var(--el-grey-2); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.poster:hover { border-color: var(--el-ink); transform: translateY(-2px); color: inherit; }
.poster .art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--el-charcoal); }
.poster .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster .art .el-timing { position: absolute; top: .8rem; left: .8rem; }
.poster .body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.poster .date { font-family: var(--el-display); font-weight: 800; font-size: 1.15rem; color: var(--el-crimson); letter-spacing: .02em; }
.poster .name { font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.poster .committee { color: var(--el-muted); font-size: .9rem; }
.poster .cta { margin-top: auto; padding-top: .6rem; font-weight: 700; font-size: .92rem; color: var(--el-ink); }
.poster .cta i { color: var(--el-crimson); margin-left: .25rem; }

/* Generated typographic poster when no artwork exists */
.gen-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem; color: #fff; overflow: hidden; }
.gen-poster .gp-name { font-family: var(--el-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: .86; word-break: break-word; position: relative; z-index: 1; }
.gen-poster .gp-day { position: absolute; right: -.5rem; top: -1.6rem; font-family: var(--el-display); font-weight: 900; font-size: 11rem; line-height: 1; opacity: .16; }
.gen-poster .gp-line { position: absolute; left: 0; right: 0; height: var(--el-line); background: currentColor; opacity: .9; }
.poster-v1 { background: var(--el-crimson); } .poster-v1 .gp-line { top: 38%; color: #000; }
.poster-v2 { background: var(--el-black); } .poster-v2 .gp-line { top: 30%; color: var(--el-crimson); }
.poster-v3 { background: linear-gradient(160deg, var(--el-deep), var(--el-crimson)); } .poster-v3 .gp-line { top: 46%; color: #fff; }
.poster-v4 { background: var(--el-charcoal); } .poster-v4 .gp-line { top: 36%; color: var(--el-crimson); }

/* ---------- Filters bar ---------- */
.filter-bar { background: #fff; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); padding: 1rem; }
.chip-toggle { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle label { border: 1px solid #CFD0D6; border-radius: 999px; padding: .35rem .85rem; font-weight: 600; font-size: .9rem; cursor: pointer; user-select: none; background: #fff; }
.chip-toggle input:checked + label { background: var(--el-ink); color: #fff; border-color: var(--el-ink); }
.chip-toggle input:focus-visible + label { outline: 3px solid var(--el-crimson); outline-offset: 2px; }

/* ---------- Event detail ---------- */
.event-hero { background: var(--el-black); color: #fff; position: relative; overflow: hidden; }
.event-hero .container { position: relative; z-index: 1; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.event-hero h1 { font-family: var(--el-display); font-weight: 900; text-transform: uppercase; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .86; margin: .8rem 0 1.4rem; }
.event-hero .hero-art { border-radius: var(--el-radius); overflow: hidden; aspect-ratio: 4 / 5; position: relative; background: var(--el-charcoal); }
.event-hero .hero-art img { width: 100%; height: 100%; object-fit: cover; }
.fact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: var(--el-line) solid var(--el-crimson); }
.fact { padding: 1rem 1rem 0 0; }
.fact .k { color: #A9A9B1; font-size: .85rem; }
.fact .v { font-family: var(--el-display); font-weight: 800; font-size: 1.7rem; line-height: 1.05; }
.prose { font-size: 1.06rem; line-height: 1.7; max-width: 46rem; }
.prose h3, .prose h4 { font-family: var(--el-text); font-weight: 700; font-size: 1.2rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.gallery a { display: block; aspect-ratio: 1; border-radius: var(--el-radius-sm); overflow: hidden; background: var(--el-grey); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.doc-link { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); text-decoration: none; color: inherit; background: #fff; }
.doc-link:hover { border-color: var(--el-ink); color: inherit; }
.doc-link .ico { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 8px; background: #FFE1E4; color: var(--el-crimson); font-size: 1.2rem; flex: none; }
.lightbox-img { max-height: 82vh; width: auto; max-width: 100%; }

/* ---------- Committees ---------- */
.committee-row { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--el-grey-2); text-decoration: none; color: inherit; }
.committee-row:last-child { border-bottom: 1px solid var(--el-grey-2); }
.committee-row:hover .cr-name { color: var(--el-crimson); }
.cr-name { font-family: var(--el-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.6rem); text-transform: uppercase; line-height: .95; transition: color .2s; }
.cr-convenor { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; color: var(--el-muted); }
.cr-convenor strong { color: var(--el-ink); }
.cr-stats { display: flex; gap: 1.5rem; text-align: right; }
.cr-stats .n { font-family: var(--el-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.cr-stats .l { font-size: .8rem; color: var(--el-muted); }
@media (max-width: 575.98px) { .committee-row { grid-template-columns: 1fr; } .cr-stats { text-align: left; } }
.avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--el-grey); color: var(--el-ink); flex: none; }
.avatar-lg { width: 4.2rem; height: 4.2rem; font-size: 1.3rem; }
.avatar-crimson { background: var(--el-crimson); color: #fff; }
.convenor-feature { display: flex; gap: 1.25rem; align-items: center; background: var(--el-black); color: #fff; border-radius: var(--el-radius-lg); padding: 1.5rem; border-left: var(--el-line) solid var(--el-crimson); }
.convenor-feature .role { color: #F2B8BD; font-weight: 600; font-size: .9rem; }
.convenor-feature .nm { font-family: var(--el-display); font-weight: 800; font-size: 2rem; line-height: 1; margin: .15rem 0 .35rem; text-transform: uppercase; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.member { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); background: #fff; }
.member .nm { font-weight: 700; line-height: 1.25; }
.member .ds { color: var(--el-crimson); font-weight: 600; font-size: .88rem; }
.member .meta { color: var(--el-muted); font-size: .86rem; }

/* ---------- Calendar ---------- */
.cal-wrap { background: #fff; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--el-grey-2); flex-wrap: wrap; }
.cal-title { font-family: var(--el-display); font-weight: 900; font-size: 2rem; text-transform: uppercase; line-height: 1; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .5rem; font-size: .8rem; font-weight: 700; color: var(--el-muted); border-bottom: 1px solid var(--el-grey-2); }
.cal-cell { min-height: 112px; border-right: 1px solid var(--el-grey-2); border-bottom: 1px solid var(--el-grey-2); padding: .35rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: #FAFAFB; color: #A3A5AC; }
.cal-cell .d { font-weight: 700; font-size: .85rem; }
.cal-cell.today .d { background: var(--el-crimson); color: #fff; border-radius: 999px; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; }
.cal-ev { display: block; font-size: .76rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--el-black); color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.completed { background: #D9DADF; color: #2B2D32; }
.cal-ev:hover { background: var(--el-crimson); color: #fff; }
.cal-list-day { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--el-grey-2); }
.cal-list-day .dd { font-family: var(--el-display); font-weight: 900; font-size: 2.4rem; line-height: .9; }
.cal-list-day .mm { font-size: .82rem; color: var(--el-muted); font-weight: 600; }
.cal-list-item { display: block; padding: .55rem .8rem; border-left: 4px solid var(--el-crimson); background: var(--el-grey); border-radius: 0 6px 6px 0; text-decoration: none; color: inherit; margin-bottom: .45rem; }
.cal-list-item.completed { border-left-color: #8D9098; }
.cal-list-item:hover { background: #E8E8EC; color: inherit; }
@media (max-width: 767.98px) { .cal-grid-view { display: none !important; } .cal-list-view { display: block !important; } .cal-view-toggle { display: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--el-black); color: #C9C9CF; padding: 3.5rem 0 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #F2B8BD; }
.site-footer .foot-logo { background: #fff; border-radius: 12px; padding: .5rem .7rem; display: inline-block; }
.site-footer .foot-logo img { height: 56px; }
.site-footer .rule { height: var(--el-line); background: var(--el-crimson); border-radius: 3px; margin: 2.5rem 0 1.5rem; }

/* =====================================================================
   APP SHELL (dashboards)
   ===================================================================== */
.app-body { background: var(--el-grey); }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 264px; flex: none; background: var(--el-charcoal); color: #D3D3D8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .sb-brand { padding: 1.1rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .sb-brand .chip { display: inline-flex; align-items: center; gap: .6rem; background: #fff; border-radius: 10px; padding: .35rem .6rem; }
.sidebar .sb-brand .chip img { height: 34px; }
.sidebar .sb-brand .wm { display: block; height: 22px; margin-top: .85rem; }
.sidebar .sb-role { padding: .9rem 1.25rem .2rem; font-size: .8rem; color: #9A9BA3; }
.sidebar .sb-role strong { display: block; color: #fff; font-size: .95rem; }
.sb-nav { list-style: none; margin: 0; padding: .6rem .7rem 1.5rem; }
.sb-nav .sb-group { padding: 1rem .6rem .35rem; font-size: .76rem; color: #8A8B93; font-weight: 600; }
.sb-nav a { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 8px; color: #D3D3D8; text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.sb-nav a i { width: 1.15rem; text-align: center; color: #9A9BA3; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-nav a.active { background: rgba(220,30,45,.16); color: #fff; }
.sb-nav a.active i { color: #FF6B76; }
.sb-nav a.active::before { content: ""; position: absolute; left: -.7rem; top: .45rem; bottom: .45rem; width: 4px; border-radius: 0 3px 3px 0; background: var(--el-crimson); }
.sb-nav .count { margin-left: auto; background: var(--el-crimson); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; }
.sidebar .sb-foot { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; }
.sidebar .sb-foot a { color: #D3D3D8; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid var(--el-grey-2); display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; min-height: 64px; }
.topbar .page-crumb { font-weight: 600; color: var(--el-muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .page-crumb a { color: var(--el-muted); text-decoration: none; }
.topbar .page-crumb a:hover { color: var(--el-ink); }
.notif-btn { position: relative; }
.notif-btn .badge-dot { position: absolute; top: 2px; right: 0; min-width: 1.15rem; height: 1.15rem; border-radius: 999px; background: var(--el-crimson); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding: 0 .3rem; border: 2px solid #fff; }
.notif-menu { width: min(380px, 92vw); padding: 0; border-radius: var(--el-radius); border: 1px solid var(--el-grey-2); box-shadow: 0 18px 40px -12px rgba(0,0,0,.25); overflow: hidden; }
.notif-menu .nm-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--el-grey-2); }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: .75rem; padding: .8rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid #F0F0F2; }
.notif-item:hover { background: #FAFAFB; color: inherit; }
.notif-item.unread { background: #FFF6F7; }
.notif-item .ni-ico { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--el-grey); color: var(--el-ink); flex: none; font-size: .9rem; }
.notif-item.unread .ni-ico { background: var(--el-crimson); color: #fff; }
.notif-item .ni-title { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.notif-item .ni-time { color: var(--el-muted); font-size: .78rem; }
.content { padding: 1.5rem 1.25rem 3rem; }
@media (min-width: 992px) { .content { padding: 2rem 2.25rem 3.5rem; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-family: var(--el-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.1rem, 4vw, 3rem); line-height: .92; margin: 0; }
.page-sub { color: var(--el-muted); margin: .4rem 0 0; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 1045; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .sidebar.open { transform: none; }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; display: none; }
  .sb-backdrop.show { display: block; }
}

/* ---------- Panels & tiles ---------- */
.panel { background: #fff; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--el-grey-2); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-family: var(--el-text); font-weight: 700; font-size: 1.05rem; margin: 0; letter-spacing: -.01em; text-transform: none; line-height: 1.3; }
.panel-body { padding: 1.2rem; }
.panel-flush .list-row:last-child { border-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.tile { background: #fff; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); padding: 1rem 1.1rem; text-decoration: none; color: inherit; display: block; position: relative; }
a.tile:hover { border-color: var(--el-ink); color: inherit; }
.tile .t-lbl { font-size: .86rem; color: var(--el-muted); font-weight: 600; }
.tile .t-fig { font-family: var(--el-display); font-weight: 800; font-size: 2.5rem; line-height: 1; margin-top: .35rem; }
.tile .t-note { font-size: .8rem; color: var(--el-muted); margin-top: .3rem; }
.tile-accent { background: var(--el-black); color: #fff; border-color: var(--el-black); }
.tile-accent .t-lbl, .tile-accent .t-note { color: #BDBDC4; }
.tile-accent::after { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0; height: 4px; background: var(--el-crimson); border-radius: 3px 3px 0 0; }
.tile-crimson { background: var(--el-crimson); color: #fff; border-color: var(--el-crimson); }
.tile-crimson .t-lbl, .tile-crimson .t-note { color: #FFE1E4; }
.list-row { display: flex; gap: .9rem; align-items: center; padding: .85rem 1.2rem; border-bottom: 1px solid #EFEFF2; text-decoration: none; color: inherit; }
a.list-row:hover { background: #FAFAFB; color: inherit; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-meta { color: var(--el-muted); font-size: .85rem; }
.date-block { width: 3.3rem; flex: none; text-align: center; border-radius: 8px; background: var(--el-grey); padding: .3rem 0; }
.date-block .db-d { font-family: var(--el-display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.date-block .db-m { font-size: .72rem; font-weight: 700; color: var(--el-crimson); }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--el-muted); }
.empty-state i { font-size: 1.8rem; color: #C3C4CA; margin-bottom: .6rem; display: block; }
.chart-box { position: relative; height: 280px; }

/* Tables: become cards on small screens */
.table-el { margin: 0; }
.table-el thead th { font-size: .8rem; font-weight: 700; color: var(--el-muted); background: #FAFAFB; border-bottom: 1px solid var(--el-grey-2); white-space: nowrap; padding: .7rem .9rem; }
.table-el td { padding: .75rem .9rem; vertical-align: middle; border-color: #EFEFF2; }
.table-el tbody tr:hover { background: #FCFCFD; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 767.98px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border-bottom: 1px solid var(--el-grey-2); padding: .6rem .2rem; }
  .table-stack td { border: 0; padding: .25rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--el-muted); text-align: left; flex: none; max-width: 45%; }
  .table-stack td.num { white-space: normal; }
  .table-stack td[data-label=""]::before { display: none; }
}

/* ---------- Multi-step form ---------- */
.steps { display: flex; gap: 0; counter-reset: step; margin-bottom: 1.5rem; overflow-x: auto; }
.steps a, .steps span { flex: 1; min-width: 120px; text-decoration: none; color: var(--el-muted); padding: .2rem .5rem 0 0; position: relative; font-weight: 600; font-size: .9rem; }
.steps .bar { display: block; height: 5px; background: var(--el-grey-2); border-radius: 3px; margin-bottom: .5rem; }
.steps .done .bar, .steps .current .bar { background: var(--el-crimson); }
.steps .current { color: var(--el-ink); }
.steps .num { font-family: var(--el-display); font-weight: 800; font-size: 1.15rem; margin-right: .3rem; color: inherit; }
.form-section { background: #fff; border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); padding: 1.4rem; margin-bottom: 1.25rem; }
.form-section > h2 { font-family: var(--el-text); font-weight: 700; font-size: 1.15rem; text-transform: none; letter-spacing: -.01em; margin: 0 0 .25rem; }
.form-section > .fs-sub { color: var(--el-muted); font-size: .92rem; margin-bottom: 1.2rem; }
.lock-note { display: flex; gap: .6rem; align-items: flex-start; background: #FFF6F7; border: 1px solid #F6C9CD; border-radius: 8px; padding: .75rem .9rem; font-size: .92rem; }
.lock-note i { color: var(--el-crimson); margin-top: .2rem; }
.info-note { display: flex; gap: .6rem; align-items: flex-start; background: var(--el-grey); border-radius: 8px; padding: .75rem .9rem; font-size: .92rem; }
.locked-value { background: #F6F6F8; border: 1px dashed #CFD0D6; border-radius: 8px; padding: .6rem .8rem; }
.input-group-text { background: var(--el-grey); border-color: #CFD0D6; font-weight: 600; }

/* Rich text editor */
.rte { border: 1px solid #CFD0D6; border-radius: 8px; background: #fff; }
.rte:focus-within { border-color: var(--el-crimson); box-shadow: 0 0 0 .2rem rgba(220,30,45,.18); }
.rte.is-invalid { border-color: var(--bs-form-invalid-border-color); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: .3rem; border-bottom: 1px solid var(--el-grey-2); background: #FAFAFB; border-radius: 8px 8px 0 0; }
.rte-toolbar button { border: 0; background: transparent; width: 2.1rem; height: 2.1rem; border-radius: 6px; color: var(--el-ink); }
.rte-toolbar button:hover, .rte-toolbar button.on { background: var(--el-grey-2); }
.rte-area { min-height: 160px; padding: .75rem .9rem; outline: none; line-height: 1.6; }
.rte-area:empty::before { content: attr(data-placeholder); color: #9A9CA3; }
.rte-area h3 { font-size: 1.15rem; font-family: var(--el-text); font-weight: 700; }

/* Upload slots */
.upload-slot { border: 1px solid var(--el-grey-2); border-radius: var(--el-radius); padding: 1rem; background: #fff; }
.upload-slot + .upload-slot { margin-top: .9rem; }
.us-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; flex-wrap: wrap; }
.us-title { font-weight: 700; }
.us-rule { font-size: .82rem; color: var(--el-muted); }
.us-badge { font-size: .74rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--el-grey); color: var(--el-muted); }
.us-badge.conf { background: #FFF1D6; color: #8A4B00; }
.us-badge.pub { background: #DDF5E4; color: #13612F; }
.dropzone { margin-top: .75rem; border: 2px dashed #CFD0D6; border-radius: 8px; padding: 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; color: var(--el-muted); }
.dropzone:hover, .dropzone.drag { border-color: var(--el-crimson); background: #FFF6F7; color: var(--el-ink); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-row { display: flex; gap: .8rem; align-items: center; padding: .65rem .2rem; border-top: 1px solid #EFEFF2; }
.file-row:first-of-type { margin-top: .6rem; }
.file-row .fr-thumb { width: 3rem; height: 3rem; border-radius: 6px; object-fit: cover; background: var(--el-grey); display: grid; place-items: center; color: var(--el-crimson); flex: none; overflow: hidden; }
.file-row .fr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-row .fr-main { flex: 1; min-width: 0; }
.file-row .fr-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .fr-meta { font-size: .8rem; color: var(--el-muted); }
.file-row .fr-meta .saved { color: #13612F; font-weight: 600; }
.progress-thin { height: 5px; border-radius: 3px; background: var(--el-grey-2); margin-top: .35rem; overflow: hidden; }
.progress-thin > div { height: 100%; width: 0; background: var(--el-crimson); transition: width .15s; }
.upload-error { color: #9F1223; font-size: .86rem; font-weight: 500; }

/* Dynamic member rows */
.member-table td { min-width: 150px; }
.member-table td.act { min-width: 56px; width: 56px; }
.member-table .form-control { padding: .45rem .6rem; font-size: .92rem; }
.convenor-row { background: #FFF6F7; }

/* Timeline (history) */
.hist { list-style: none; padding: 0; margin: 0; position: relative; }
.hist::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px; background: var(--el-grey-2); border-radius: 2px; }
.hist li { position: relative; padding: 0 0 1.1rem 1.9rem; }
.hist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 4px solid #B9BAC1; }
.hist li.ok::before { border-color: #1E8A45; } .hist li.bad::before { border-color: var(--el-crimson); } .hist li.key::before { border-color: var(--el-ink); }
.hist .h-title { font-weight: 600; }
.hist .h-meta { color: var(--el-muted); font-size: .85rem; }
.hist .h-remarks { background: var(--el-grey); border-radius: 6px; padding: .5rem .7rem; margin-top: .35rem; font-size: .92rem; }

.deadline-meter { background: var(--el-black); color: #fff; border-radius: var(--el-radius); padding: 1rem 1.2rem; }
.deadline-meter .dm-fig { font-family: var(--el-display); font-weight: 900; font-size: 2.6rem; line-height: 1; }
.deadline-meter .bar { height: 6px; background: rgba(255,255,255,.15); border-radius: 3px; margin-top: .7rem; overflow: hidden; }
.deadline-meter .bar > div { height: 100%; background: var(--el-crimson); }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: var(--el-black); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; right: -30%; bottom: -30%; width: 90%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(220,30,45,.55), transparent 70%); }
.auth-side .big { font-family: var(--el-display); font-weight: 900; font-size: clamp(3.5rem, 7vw, 6.5rem); line-height: .84; text-transform: uppercase; position: relative; }
.auth-side .line { height: var(--el-line); background: var(--el-crimson); border-radius: 3px; margin: 1.6rem 0; position: relative; width: 70%; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; background: #fff; }
.auth-card { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 1.5rem; min-height: auto; } .auth-side .big { font-size: 3rem; } .auth-side .hide-sm { display: none; } }

/* Alerts */
.alert { border-radius: var(--el-radius); border: 0; }
.alert-danger { background: #FFE1E4; color: #7A0D1A; }
.alert-success { background: #DDF5E4; color: #0F4D25; }
.alert-warning { background: #FFF1D6; color: #6B3A00; }
.alert-info { background: #E9EEF8; color: #1F3561; }

/* Modals */
.modal-content { border-radius: var(--el-radius-lg); border: 0; }
.modal-header { border-bottom-color: var(--el-grey-2); }
.modal-title { font-family: var(--el-text); font-weight: 700; font-size: 1.15rem; text-transform: none; }

.nav-tabs-el { border-bottom: 1px solid var(--el-grey-2); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; }
.nav-tabs-el .nav-link { border: 0; border-bottom: 3px solid transparent; color: var(--el-muted); font-weight: 600; border-radius: 0; padding: .65rem .9rem; white-space: nowrap; }
.nav-tabs-el .nav-link.active { color: var(--el-ink); border-bottom-color: var(--el-crimson); background: transparent; }

.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--el-muted); font-weight: 600; font-size: .9rem; }
.kv dd { margin: 0; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .5rem; } }

/* Print */
@media print {
  .sidebar, .topbar, .no-print, .site-header, .site-footer, .btn { display: none !important; }
  .app-body, .content { background: #fff !important; padding: 0 !important; }
  .panel, .tile { border-color: #ccc !important; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* Layout guards: keep long content inside its column on small screens */
.table-responsive { position: relative; }
.d-grid > *, .row > * { min-width: 0; }
.panel { min-width: 0; }
.fin-mini { width: 100%; font-size: .95rem; }
.fin-mini th { font-weight: 600; color: var(--el-muted); padding: .2rem 0; }
.fin-mini td { text-align: right; font-variant-numeric: tabular-nums; padding: .2rem 0; }
@media (max-width: 575.98px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .tile { padding: .8rem .85rem; }
  .tile .t-fig { font-size: 2rem; }
  .page-title { font-size: 2rem; }
}
select.form-select-sm { min-width: 8.5rem; }
