/* ── Heritage Pulse palette (Camp Gan Israel BMD) ─────────────────────────── */
:root, html[data-theme="light"], html[data-theme="dark"] {
  --bg: #f7f9fc;
  --card: #ffffff;
  --card-2: #f2f4f7;
  --ink: #191c1e;
  --muted: #3f4851;
  --accent: #006194;
  --accent-2: #186a22;
  --line: #e6e8eb;
  --danger: #ba1a1a;
  --gold: #fcab28;
  --hover: rgba(0,97,148,.06);
  --press: rgba(0,97,148,.12);
  --shadow: 0 1px 2px rgba(23,26,43,.04), 0 4px 16px rgba(23,26,43,.05);
  --total-shadow: 0 8px 28px rgba(0,97,148,.18);
  /* accent families for cards / icon tiles */
  --c-primary: #006194;   --c-primary-fixed: #cce5ff;
  --c-secondary: #835400; --c-secondary-fixed: #ffddb5;
  --c-tertiary: #186a22;  --c-tertiary-fixed: #a3f69c;
  --c-error: #ba1a1a;     --c-error-fixed: #ffdad6;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-head: "Hanken Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.material-symbols-outlined {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1; display: inline-block; vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga'; user-select: none;
}
.material-symbols-outlined.fill { font-variation-settings: 'FILL' 1, 'wght' 500; }
.material-symbols-outlined.sm { font-size: 18px; }

/* ── App frame: sidebar + topbar + main ───────────────────────────────────── */
.sidebar {
  position: fixed; left: 0; top: 0; height: 100%; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; padding: 20px 14px;
  background: var(--card); border-right: 1px solid var(--line);
  transition: transform .22s ease;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 0; margin-bottom: 26px; }
.side-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.side-brand-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--accent); }
.side-brand-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.side-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; margin-bottom: 22px; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,97,148,.24); transition: background .15s, transform .08s;
}
.side-cta:hover { background: var(--c-primary-fixed); color: var(--accent); }
.side-cta:active { transform: scale(.97); }
.side-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  border: none; background: transparent; cursor: pointer; width: 100%; text-align: left;
  font-family: var(--font-body); transition: background .15s, color .15s;
}
.nav-item span:last-child { font-size: 14px; }
.nav-item:hover { background: var(--card-2); color: var(--ink); }
.nav-item.active { background: var(--c-primary-fixed); color: var(--accent); font-weight: 700; }
.nav-item.danger { color: var(--danger); }
.nav-item.danger:hover { background: rgba(186,26,26,.08); }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }

.topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--topbar-h); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.top-title { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--accent); margin: 0; white-space: nowrap; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: var(--card-2); color: var(--muted); font-family: var(--font-mono); font-size: 11px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-tertiary); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.top-right { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: none; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--card-2); color: var(--accent); }
.menu-btn { display: none; }
.top-div { width: 1px; height: 30px; background: var(--line); margin: 0 6px; }
.top-user { display: flex; align-items: center; gap: 11px; padding-left: 2px; }
.top-user-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.tu-name { font-size: 14px; font-weight: 600; }
.tu-role { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; border: 2px solid var(--c-primary-fixed); }

.main {
  margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 32px) 32px 56px;
  min-height: 100vh;
}

/* ── Dashboard page head + bento grid ─────────────────────────────────────── */
.page-head { max-width: 1200px; margin: 0 auto 28px; }
.welcome { font-family: var(--font-head); font-weight: 600; font-size: 32px; letter-spacing: -.01em; margin: 0; }
.welcome-sub { font-size: 18px; color: var(--muted); margin: 8px 0 0; }
.bento { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento-card {
  position: relative; grid-column: span 4; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: box-shadow .25s, transform .12s;
}
.bento-card:hover { box-shadow: 0 8px 24px -6px rgba(0,97,148,.22); transform: translateY(-2px); }
.bento-card { min-width: 0; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; }
.bento-card.primary { border-left-color: var(--c-primary); }
.bento-card.secondary { border-left-color: var(--c-secondary); }
.bento-card.tertiary { border-left-color: var(--c-tertiary); }
.bento-card.error { border-left-color: var(--c-error); }
.bento-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.icon-box { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.bento-head .icon-box { margin-bottom: 0; }
.icon-box .material-symbols-outlined { font-size: 28px; }
.icon-box.primary { background: var(--c-primary-fixed); color: var(--c-primary); }
.icon-box.secondary { background: var(--c-secondary-fixed); color: var(--c-secondary); }
.icon-box.tertiary { background: var(--c-tertiary-fixed); color: var(--c-tertiary); }
.icon-box.error { background: var(--c-error-fixed); color: var(--c-error); }
.bento-title { font-family: var(--font-head); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.bento-desc { font-size: 14px; color: var(--muted); margin: 0; max-width: 42ch; }
.bento-link { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); }
.bento-card.secondary .bento-link { color: var(--c-secondary); }
.bento-card.tertiary .bento-link { color: var(--c-tertiary); }
.bento-card:hover .bento-link .material-symbols-outlined { transform: translateX(4px); transition: transform .2s; }
.bento-glow { position: absolute; right: -32px; top: -32px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(0,97,148,.05); filter: blur(40px); pointer-events: none; }
/* Hero card sub-buttons */
.hero-subs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.hero-sub { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  padding: 14px 8px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line);
  text-decoration: none; transition: background .15s, border-color .15s; }
.hero-sub:hover { background: var(--c-primary-fixed); border-color: var(--c-primary-fixed); }
.hs-label { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--accent); }
.hs-sub { font-size: 13px; color: var(--muted); }

/* ── Section page header with actions (Pictures / Signs) ───────────────────── */
.sf-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.sf-head .page-title { margin-bottom: 4px; }
.sf-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn .material-symbols-outlined { font-size: 20px; }
.filter-wrap { position: relative; display: flex; align-items: center; }
.filter-wrap .filter-ic { position: absolute; left: 12px; color: var(--muted); font-size: 20px; pointer-events: none; }
.album-filter { min-width: 260px; padding: 11px 14px 11px 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }

.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.back-link:hover { color: var(--accent); }

/* ── Icon color helpers ───────────────────────────────────────────────────── */
.gold-ic { color: var(--gold); } .blue-ic { color: var(--c-primary); }
.green-ic { color: var(--c-tertiary); } .red-ic { color: var(--c-error); }

/* ── Filter chips ─────────────────────────────────────────────────────────── */
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip-btn { padding: 8px 16px; border-radius: 999px; border: none; cursor: pointer;
  background: #e6e8eb; color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.chip-btn:hover { background: var(--line); color: var(--ink); }
.chip-btn.active { background: var(--accent); color: #fff; }

/* ── Section blocks + h3 ──────────────────────────────────────────────────── */
.sf-section { margin-bottom: 34px; }
.sf-h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 22px; margin: 0 0 18px; }

/* ── Category / album badges ──────────────────────────────────────────────── */
.cat-badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.k-green { background: rgba(53,132,56,.16); color: #186a22; }
.k-gold  { background: rgba(252,171,40,.24); color: #694300; }
.k-blue  { background: rgba(0,123,185,.15); color: #004b73; }

/* ── Flyer (PDF) featured cards ───────────────────────────────────────────── */
.flyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.flyer-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); transition: box-shadow .25s; }
.flyer-card:hover { box-shadow: 0 8px 24px -6px rgba(0,97,148,.18); }
.pdf-preview { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--card-2); margin-bottom: 14px; }
.pdf-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--outline, #9aa3af); }
.pdf-fallback .material-symbols-outlined { font-size: 56px; color: #c0c7d2; }
.pdf-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #fff; }
.pdf-open { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,97,148,.10); opacity: 0; transition: opacity .2s; }
.pdf-preview:hover .pdf-open { opacity: 1; }
.pdf-open > span { background: rgba(255,255,255,.92); border-radius: 50%; padding: 10px; display: grid; box-shadow: var(--shadow); color: var(--accent); }
.flyer-body { display: flex; flex-direction: column; gap: 7px; }
.flyer-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flyer-time { font-size: 13px; margin: 0; }
.flyer-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dl-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.dl-link:hover { text-decoration: underline; }
.kebab { border: none; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; padding: 2px; border-radius: 6px; }
.kebab:hover { color: var(--danger); }

/* ── Categorized archive (accordion) ──────────────────────────────────────── */
.archive-list { display: flex; flex-direction: column; gap: 12px; }
.archive-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.archive-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: transparent; border: none; cursor: pointer; text-align: left; }
.archive-head:hover { background: var(--card-2); }
.ah-left { display: flex; align-items: center; gap: 14px; }
.ah-ic { font-size: 28px; }
.ah-text h5 { margin: 0; font-size: 15px; font-weight: 700; }
.ah-text p { margin: 2px 0 0; font-family: var(--font-mono); font-size: 12px; }
.af-chev { color: var(--muted); transition: transform .2s; }
.af-chev.open { transform: rotate(180deg); }
.archive-files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.archive-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.archive-file:last-child { border-bottom: none; }
.af-name { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 14px; min-width: 0; }
.af-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.af-date { font-family: var(--font-mono); font-size: 12px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .material-symbols-outlined { font-size: 18px; }
.icon-btn.danger:hover { color: var(--danger); background: rgba(186,26,26,.08); }

/* ── Picture album grid (design) ──────────────────────────────────────────── */
.album-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.album-card2 { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; }
.album-card2:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,97,148,.12); }
.album-cover2 { position: relative; height: 180px; background: var(--card-2); }
.album-cover2 img { width: 100%; height: 100%; object-fit: cover; }
.album-nocover { position: absolute; inset: 0; display: grid; place-items: center; color: #c0c7d2; }
.album-nocover .material-symbols-outlined { font-size: 48px; }
.album-badge { position: absolute; top: 12px; left: 12px; padding: 4px 8px; border-radius: 5px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.album-badge.k-green { background: var(--c-tertiary); color: #fff; }
.album-badge.k-gold  { background: var(--gold); color: #3a2a00; }
.album-badge.k-blue  { background: var(--c-primary); color: #fff; }
.album-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.album-title2 { font-family: var(--font-head); font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.album-meta2 { display: flex; gap: 16px; margin-bottom: 16px; }
.am-item { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.view-album { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; border-radius: 10px; transition: background .15s; }
.album-card2:hover .view-album { background: var(--c-primary-fixed); }
.new-album-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px;
  min-height: 340px; padding: 24px; border: 2px dashed var(--line); border-radius: 14px; background: var(--card-2); cursor: pointer; transition: border-color .15s, background .15s; }
.new-album-card:hover { border-color: var(--accent); background: var(--card); }
.new-album-card h4 { font-family: var(--font-head); font-size: 20px; margin: 4px 0 0; }
.new-album-card p { font-size: 14px; max-width: 200px; margin: 0; }
.na-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
.na-circle .material-symbols-outlined { font-size: 32px; color: var(--accent); }
.new-album-card:hover .na-circle { background: var(--accent); }
.new-album-card:hover .na-circle .material-symbols-outlined { color: #fff; }
.album-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── Titles ─────────────────────────────────────────────────────────────── */
.page-title { font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; color: var(--accent); }
.page-sub { margin: 0 0 22px; font-size: 16px; }

/* ── Home / hub grid ────────────────────────────────────────────────────── */
.home-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.home-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow); transition: transform .08s, border-color .12s, background .12s;
}
.home-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.home-card.disabled { opacity: .55; pointer-events: none; }
.home-icon {
  width: 52px; height: 52px; flex: none; border-radius: 14px; font-size: 26px;
  display: grid; place-items: center; background: var(--card-2);
}
.home-card-title { font-size: 17px; font-weight: 700; }
.home-card-desc { font-size: 13px; margin-top: 2px; }

/* ── Toolbar / inputs ───────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search-input { flex: 1; min-width: 160px; }
input[type=text], input[type=number], input[type=password], input[type=date], textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--ink); font-size: 16px; font-family: inherit;
  transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,123,255,.25);
}
::placeholder { color: #6f76a0; }
select {
  padding: 12px 38px 12px 12px; border-radius: 10px; border: 1px solid var(--line);
  background-color: var(--card-2); color: var(--ink); font-size: 16px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2399a0c0' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter .12s, transform .06s, background .12s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: rgba(255,107,107,.14); border-color: rgba(255,107,107,.4); color: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
button.go {
  width: 100%; margin-top: 8px; padding: 15px; border: none; border-radius: 14px;
  background: var(--accent-2); color: #062018; font-weight: 800; font-size: 16px; cursor: pointer;
  transition: transform .06s, filter .12s;
}
button.go:hover { filter: brightness(1.05); }
button.go:active { transform: scale(.985); }
button.go:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards / messages ───────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.placeholder { text-align: center; padding: 34px 20px; }
.card.placeholder .btn { margin-top: 12px; }
.msg { margin: 8px 0; padding: 12px; border-radius: 10px; font-size: 14px; background: var(--card-2); }
.msg.ok { background: rgba(74,211,167,.15); color: var(--accent-2); }
.msg.err { background: rgba(255,107,107,.15); color: var(--danger); }
code { background: var(--card-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.badge { background: rgba(108,123,255,.2); color: var(--accent); border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; }

/* ── PDF document grid ──────────────────────────────────────────────────── */
.doc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.doc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.doc-thumb {
  display: grid; place-items: center; height: 120px; border-radius: 10px; text-decoration: none;
  background: linear-gradient(135deg, var(--card-2), var(--card)); border: 1px solid var(--line); margin-bottom: 10px;
}
.doc-thumb span { font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.doc-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.doc-meta { font-size: 12px; margin-top: 3px; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ── Logo grid ──────────────────────────────────────────────────────────── */
.logo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.logo-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.logo-preview { height: 130px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.logo-preview img { max-width: 90%; max-height: 90%; object-fit: contain; }
.logo-grid[data-bg="grid"] .logo-preview { background:
  conic-gradient(#0000 90deg, rgba(128,128,128,.15) 0 180deg, #0000 0 270deg, rgba(128,128,128,.15) 0) 0 0/18px 18px; }
.logo-grid[data-bg="dark"] .logo-preview { background: #15181f; }
.logo-grid[data-bg="light"] .logo-preview { background: #ffffff; }
.logo-name { font-weight: 700; font-size: 14px; }
.logo-fmt { font-size: 11px; letter-spacing: .05em; }

/* ── Album / photo / video grids ────────────────────────────────────────── */
.album-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.album-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; cursor: pointer; transition: transform .08s, border-color .12s; }
.album-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.album-cover { height: 140px; display: grid; place-items: center; background: var(--card-2); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-emoji { font-size: 40px; }
.album-title { font-weight: 700; font-size: 14px; padding: 10px 12px 2px; }
.album-meta { font-size: 12px; padding: 0 12px 12px; }
.photo-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.photo-thumb { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Camper table ───────────────────────────────────────────────────────── */
.camper-table { width: 100%; border-collapse: collapse; }
.camper-table th, .camper-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.camper-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.bunk-group-full { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px 4px; margin-bottom: 14px; box-shadow: var(--shadow); }
.bg-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; padding: 8px 0; }
.bg-head .count { background: rgba(108,123,255,.18); color: var(--accent); border-radius: 20px; padding: 1px 10px; font-size: 13px; }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow: auto; z-index: 50; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 460px; }
.modal-wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.field label.fld { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline input { flex: 1; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chk input { width: 20px; height: 20px; }
.video-frame { position: relative; padding-top: 56.25%; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }

/* ── Admin rows ─────────────────────────────────────────────────────────── */
.admin-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-row:last-child { border-bottom: none; }
.ar-name { min-width: 110px; font-weight: 600; }

/* ── Sign-in gate — "Heritage Pulse" (Camp Gan Israel BMD) ───────────────── */
.gate-host {
  --lp-primary: #006194; --lp-primary-hover: #007bb9;
  --lp-ink: #191c1e; --lp-ink-soft: #3f4851;
  --lp-outline: #6f7882; --lp-outline-v: #bfc7d2;
  --lp-bg: #f7f9fc; --lp-white: #ffffff;
  --lp-gold: #fcab28; --lp-green: #358438;
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 16px; overflow: hidden;
  background: var(--lp-bg); color: var(--lp-ink);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
}
.login-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login-bg .blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.blob-a { top: -100px; left: -100px; width: 380px; height: 380px; background: rgba(0,123,185,.20); }
.blob-b { top: 40%; right: -190px; width: 520px; height: 520px; background: rgba(252,171,40,.12); filter: blur(110px); }
.blob-c { bottom: -160px; left: 22%; width: 620px; height: 620px; background: rgba(53,132,56,.07); filter: blur(120px); }
.login-dots { position: absolute; inset: 0; opacity: .04;
  background-image: radial-gradient(#006194 .5px, transparent .5px); background-size: 24px 24px; }

.login-main { position: relative; z-index: 1; width: 100%; max-width: 440px;
  animation: lp-in .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes lp-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.login-head { text-align: center; margin-bottom: 8px; }
.login-logo { width: 116px; height: 116px; object-fit: contain; margin: 0 auto 20px;
  transition: transform .5s; }
.login-logo:hover { transform: scale(1.05); }
.login-title { font-family: "Hanken Grotesk", sans-serif; font-weight: 700; font-size: 32px;
  letter-spacing: -.01em; color: var(--lp-primary); margin: 0; }
.login-sub { font-size: 16px; color: var(--lp-ink-soft); margin: 8px 0 32px; }

.login-card { background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border: 1px solid rgba(191,199,210,.3); border-radius: 16px; padding: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 22px; }

.lf-field { display: flex; flex-direction: column; gap: 8px; }
.lf-label { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--lp-ink-soft); margin-left: 4px; }
.lf-input-wrap { position: relative; display: flex; align-items: center; }
.lf-lead { position: absolute; left: 12px; display: inline-flex; color: var(--lp-outline); pointer-events: none; }
.lf-lead svg, .lf-eye svg { width: 20px; height: 20px; }
.gate-host .lf-input {
  width: 100%; padding: 13px 46px 13px 42px; font-size: 16px; font-family: inherit;
  color: var(--lp-ink); background: var(--lp-white);
  border: 1px solid var(--lp-outline-v); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.gate-host .lf-input::placeholder { color: var(--lp-outline-v); }
.gate-host .lf-input:focus { border-color: var(--lp-primary); box-shadow: 0 0 0 3px rgba(0,97,148,.18); }
.lf-input-wrap:focus-within .lf-lead { color: var(--lp-primary); }
.lf-eye { position: absolute; right: 8px; display: inline-flex; padding: 6px; border: none;
  background: transparent; color: var(--lp-outline-v); cursor: pointer; border-radius: 8px; transition: color .15s; }
.lf-eye:hover { color: var(--lp-ink-soft); }

.lf-remember { display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 14px; color: var(--lp-ink-soft); margin-top: -6px; }
.lf-remember input { width: 17px; height: 17px; accent-color: var(--lp-primary); }

.lf-btn { display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px; border: none; border-radius: 10px;
  background: var(--lp-primary); color: #fff; cursor: pointer;
  font-family: "Hanken Grotesk", sans-serif; font-weight: 600; font-size: 18px;
  box-shadow: 0 6px 16px rgba(0,97,148,.28); transition: background .2s, transform .1s; }
.lf-btn svg { width: 20px; height: 20px; transition: transform .2s; }
.lf-btn:hover { background: var(--lp-primary-hover); }
.lf-btn:hover svg { transform: translateX(4px); }
.lf-btn:active { transform: scale(.98); }
.lf-btn:disabled { opacity: .7; cursor: not-allowed; }

.login-card #gateMsg:empty { display: none; }
.login-card #gateMsg { margin-top: -8px; padding: 11px; border-radius: 10px; font-size: 14px;
  background: #ffdad6; color: #93000a; }

.lf-foot { margin-top: 4px; padding-top: 22px; border-top: 1px solid rgba(191,199,210,.35); text-align: center; }
.lf-foot a { font-size: 14px; font-weight: 500; color: var(--lp-primary);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(0,97,148,.3); }
.login-footer { margin-top: 44px; text-align: center; font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lp-outline-v); }

@media (max-width: 480px) {
  .login-title { font-size: 28px; }
  .login-card { padding: 24px; }
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px);
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--total-shadow);
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--accent-2); }
.toast.err { border-color: var(--danger); color: var(--danger); }

/* ── Focus rings ────────────────────────────────────────────────────────── */
.btn:focus-visible, button.go:focus-visible, .home-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Tablet: collapse bento to 2 columns ──────────────────────────────────── */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-8 { grid-column: span 2; }
  .span-6 { grid-column: span 1; }
  .span-4 { grid-column: span 1; }
}

/* ── Mobile: off-canvas sidebar, single-column bento ──────────────────────── */
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--total-shadow); }
  .sidebar.open { transform: translateX(0); }
  .topbar { left: 0; padding: 0 14px; }
  .main { margin-left: 0; padding: calc(var(--topbar-h) + 20px) 16px 48px; }
  .menu-btn { display: inline-flex; }
  .top-title { font-size: 19px; }
  .status-pill { display: none; }
  .top-user-text { display: none; }
  .top-div { display: none; }
  .bento { grid-template-columns: 1fr; }
  .span-8, .span-6, .span-4 { grid-column: span 1; }
  .bento-desc { max-width: none; }
  .hero-subs { grid-template-columns: repeat(2, 1fr); }
  .hero-sub { min-width: 0; }
  .welcome { font-size: 26px; }
  .page-title { font-size: 24px; }
}

/* ── Popover menu (kebab) ─────────────────────────────────────────────────── */
.popmenu { position: fixed; z-index: 90; min-width: 168px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--total-shadow);
  padding: 6px; display: flex; flex-direction: column; }
.popmenu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px;
  border: none; background: transparent; color: var(--ink); font: inherit; font-size: 14px;
  text-align: left; border-radius: 8px; cursor: pointer; }
.popmenu-item:hover { background: var(--card-2); }
.popmenu-item.danger { color: var(--danger); }
.popmenu-item.danger:hover { background: rgba(186,26,26,.08); }

/* ── PDF viewer modal ─────────────────────────────────────────────────────── */
.pdf-preview { cursor: pointer; }
.pdf-modal-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pdf-modal-frame { position: relative; height: 72vh; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pdf-modal-frame iframe { width: 100%; height: 100%; border: 0; }

/* ── Logo preview modal ───────────────────────────────────────────────────── */
.logo-preview.clickable { cursor: pointer; }
.logo-stage { min-height: 320px; display: grid; place-items: center; padding: 20px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.logo-stage img { max-width: 100%; max-height: 380px; object-fit: contain; }
.logo-stage[data-bg="grid"] { background:
  conic-gradient(#0000 90deg, rgba(128,128,128,.16) 0 180deg, #0000 0 270deg, rgba(128,128,128,.16) 0) 0 0/22px 22px; }
.logo-stage[data-bg="dark"] { background: #15181f; }
.logo-stage[data-bg="light"] { background: #ffffff; }

/* ── Camper row actions + group rename ────────────────────────────────────── */
.ct-actions { text-align: right; white-space: nowrap; width: 1%; }
.ct-actions .icon-btn.sm { width: 30px; height: 30px; }
.bg-head { gap: 8px; }
.bg-head > span:first-child { flex: 1; }
.bg-rename { color: var(--muted); }

/* archive filename is a button now */
.af-name { border: none; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.af-name:hover span:last-child { text-decoration: underline; }

/* ── Points system ────────────────────────────────────────────────────────── */
label.fld { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pt-tabs { display: flex; gap: 8px; margin: 4px 0 20px; flex-wrap: wrap; }
.pt-tab { padding: 10px 18px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 11px; cursor: pointer; font-size: 15px; font-weight: 600; font-family: var(--font-body); transition: .12s; }
.pt-tab:hover { color: var(--ink); }
.pt-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.item-info { min-width: 0; }
.pname { font-size: 15px; line-height: 1.25; }
.pts-badge { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }

.stepper { display: flex; align-items: center; flex: none; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: none; background: transparent; color: var(--ink); font-size: 26px; font-weight: 700; line-height: 1; cursor: pointer; transition: background .12s; }
.stepper button:hover { background: var(--hover); }
.stepper button:active { background: var(--press); }
.stepper button:disabled { opacity: .25; cursor: not-allowed; }
.stepper .val { width: 48px; height: 46px; text-align: center; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; border: none; outline: none; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.stepper .val::-webkit-inner-spin-button, .stepper .val::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.filled { border-color: var(--accent); }
.stepper.filled .val { color: var(--accent-2); }

.sm-row { padding: 14px 0 4px; border-top: 1px solid var(--line); }
.sm-head, .sm-bonus-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sm-bonus-row { margin-top: 14px; }
.toggle { position: relative; display: inline-block; width: 54px; height: 30px; flex: none; cursor: pointer; }
.toggle input { display: none; }
.toggle .track { position: absolute; inset: 0; background: var(--card-2); border: 1px solid var(--line); border-radius: 20px; transition: .15s; }
.toggle .track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: .15s; }
.toggle input:checked + .track { background: var(--accent-2); border-color: var(--accent-2); }
.toggle input:checked + .track::before { transform: translateX(23px); background: #fff; }

.total-bar { position: sticky; bottom: 12px; margin-top: 14px; padding: 15px 18px;
  background: linear-gradient(90deg, var(--accent), #3f7fd6); border-radius: 14px;
  display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 18px; color: #fff; box-shadow: var(--total-shadow); }
.total-bar small { font-weight: 500; opacity: .85; }

.pt-board { width: 100%; border-collapse: collapse; }
.pt-board th, .pt-board td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pt-board th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.pt-board td.num, .pt-board th.num { text-align: right; }
.pt-board .rank { width: 36px; font-weight: 800; font-size: 17px; color: var(--muted); }
.pt-board .rank.g1 { color: #e0a400; } .pt-board .rank.g2 { color: #8a93a6; } .pt-board .rank.g3 { color: #c0763a; }
.bar-cell { width: 120px; }
.pbar { height: 10px; background: var(--card-2); border-radius: 6px; overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pt-board tbody tr:first-child { background: rgba(252,171,40,.08); }

.edit-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; margin-top: 6px; }
.edit-lbl { font-size: 14px; }
@media (max-width: 600px) { .bar-cell { display: none; } }

/* ── Points — Heritage design (two-column entry) ──────────────────────────── */
.pt-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .pt-grid { grid-template-columns: 1fr; } }
.pt-col-left { display: flex; flex-direction: column; gap: 20px; }
.pt-card-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--accent); margin: 0; }
.pt-details .pt-card-title { border-left: 4px solid var(--accent); padding-left: 12px; margin: 0 0 18px; }
.fld.upper { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 11px; }
.pt-info { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 12px; background: var(--card-2); border-radius: 10px; font-size: 13px; color: var(--muted); }
.pt-info .material-symbols-outlined { color: var(--muted); flex: none; }

.pt-progress { background: var(--accent); color: #fff; border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.ptp-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-head); font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.ptp-pct { font-size: 40px; font-weight: 800; line-height: 1; margin-bottom: 14px; }
.ptp-track { height: 12px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.ptp-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width .4s; }
.ptp-foot { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; font-weight: 700; opacity: .92; }

.pt-checklist { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.ptc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.ptc-body { display: flex; flex-direction: column; }
.ptc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .12s; }
.ptc-row:last-child { border-bottom: none; }
.ptc-row:hover { background: var(--card-2); }
.ptc-row h4 { margin: 0; font-size: 15px; font-weight: 700; }
.ptc-row p { margin: 2px 0 0; font-size: 13px; }

/* Pill stepper (overrides the earlier boxed stepper) */
.stepper { display: flex; align-items: center; gap: 6px; background: #e6e8eb; border: 1px solid var(--line); border-radius: 999px; padding: 4px; overflow: visible; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--card); color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .12s, color .12s, transform .06s; }
.stepper button:hover { background: var(--c-primary-fixed); color: var(--accent); }
.stepper button:active { transform: scale(.9); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper .val { width: 34px; height: 34px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; border: none; outline: none; background: transparent; color: var(--ink); }
.stepper.filled { border-color: var(--accent); }
.stepper.filled .val { color: var(--accent-2); }

.pt-submitbar { position: sticky; bottom: 0; margin-top: 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; box-shadow: var(--total-shadow); }
.ptb-stat { display: flex; flex-direction: column; }
.ptb-lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ptb-val { font-size: 20px; font-weight: 800; }
.ptb-val.green { color: var(--accent-2); }
.pt-submit { width: auto; margin: 0 0 0 auto; padding: 14px 26px; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 600px) { .pt-submit { margin: 8px 0 0; width: 100%; justify-content: center; } .pt-submitbar { gap: 16px; } }

/* ── Points submit/save buttons (blue, matching primary actions) ──────────── */
.go.pt-submit, .go.pt-save { background: var(--accent); color: #fff; }
.go.pt-submit:hover, .go.pt-save:hover { background: var(--c-primary-fixed); color: var(--accent); }
.pt-save { width: auto; margin-top: 16px; padding: 13px 24px; }

/* ── Leaderboard stat cards ───────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-row { grid-template-columns: 1fr; } }
.stat-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.stat-card.primary { border-left-color: var(--c-primary); }
.stat-card.secondary { border-left-color: var(--c-secondary); }
.stat-card.tertiary { border-left-color: var(--c-tertiary); }
.stat-card.error { border-left-color: var(--c-error); }
.stat-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stat-value { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-top: 6px; }

/* ── Leaderboard / manage table ───────────────────────────────────────────── */
.pt-board-card { padding: 0; overflow: hidden; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th, .lb-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.lb-table thead th { background: var(--card-2); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table td.num, .lb-table th.num { text-align: right; }
.lb-table .rank { width: 44px; font-weight: 800; font-size: 17px; color: var(--muted); }
.lb-table .rank.g1 { color: #d0a000; } .lb-table .rank.g2 { color: #8a93a6; } .lb-table .rank.g3 { color: #c0763a; }
.lb-table tr.lb-first { background: rgba(252,171,40,.08); }
.lb-name { display: flex; align-items: center; gap: 12px; }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; background: var(--card-2); color: var(--muted); }
.lb-avatar.a1 { background: var(--gold); color: #3a2a00; }
.lb-avatar.a2 { background: #c8cfda; color: #33384a; }
.lb-avatar.a3 { background: #dd9040; color: #fff; }
.lb-pts { color: var(--accent); font-weight: 700; }
.lb-table .pbar { height: 8px; }
.lb-table .pbar > span { background: var(--accent); }
.lb-table .pbar > span.green { background: var(--accent-2); }
.lb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.lb-pager { display: flex; gap: 8px; }
.lb-pager .icon-btn { border: 1px solid var(--line); }
.lb-pager .btn[disabled], .lb-pager .icon-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ── Manage week controls ─────────────────────────────────────────────────── */
.mw-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px) { .mw-controls { grid-template-columns: 1fr; } }
.mw-group { display: flex; flex-direction: column; gap: 8px; }
.mw-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mw-row select, .mw-row input { flex: 1; min-width: 140px; }
.mw-name { font-weight: 700; }

/* ── Missing-list card ────────────────────────────────────────────────────── */
.missing-card { border-left: 4px solid var(--gold); }
.mc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mc-head strong { font-family: var(--font-head); font-size: 18px; color: var(--c-secondary); }
.miss-pill { background: rgba(252,171,40,.22); color: #694300; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; }
.miss-names { margin-top: 12px; line-height: 1.9; font-size: 14px; color: var(--muted); }

/* ── Settings — point value rows ──────────────────────────────────────────── */
.sv-row { gap: 12px; }
.sv-lab { flex: 1; } .sv-lab input { width: 100%; }
.sv-type { width: 56px; text-align: right; }
.sv-pts { display: flex; align-items: center; gap: 6px; }
.pts-input { width: 72px; text-align: center; }

/* ── "Max" quick-fill button in points checklist ──────────────────────────── */
.ptc-controls { display: flex; align-items: center; gap: 10px; flex: none; }
.max-btn { border: 1px solid var(--line); background: var(--card); color: var(--accent);
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: background .12s, border-color .12s; }
.max-btn:hover { background: var(--c-primary-fixed); border-color: var(--c-primary-fixed); }
.max-btn:active { transform: scale(.95); }

/* ── Photo lightbox viewer ────────────────────────────────────────────────── */
.photo-thumb { border: none; padding: 0; background: var(--card-2); cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0a0a0f;
  display: flex; flex-direction: column; animation: lb-fade .15s ease; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: #fff; }
.lb-counter { font-family: var(--font-mono); font-size: 13px; opacity: .85; }
.lb-close, .lb-dl { width: 42px; height: 42px; border-radius: 10px; border: none; flex: none;
  background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: background .12s; }
.lb-close:hover, .lb-dl:hover { background: rgba(255,255,255,.24); }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 0 16px 20px; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 12px 44px rgba(0,0,0,.55); }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .12s; }
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-nav .material-symbols-outlined { font-size: 30px; }
@media (max-width: 600px) {
  .lb-nav { width: 46px; height: 46px; top: auto; bottom: 22px; transform: none; }
  .lb-prev { left: 22px; } .lb-next { right: 22px; }
}

/* ── Video album cards ────────────────────────────────────────────────────── */
.album-card2.video-card { font: inherit; text-align: left; }
.video-cover { position: relative; background: #11151c; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 56px; text-shadow: 0 2px 10px rgba(0,0,0,.6); pointer-events: none; }
.video-card:hover .video-play { transform: translate(-50%, -50%) scale(1.08); transition: transform .12s; }
.video-name { font-size: 15px; white-space: normal; }

/* ── Album delete button (on card cover) ──────────────────────────────────── */
.album-del { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s, background .15s; }
.album-card2:hover .album-del { opacity: 1; }
.album-del:hover { background: var(--danger); }
.album-del .material-symbols-outlined { font-size: 19px; }
@media (hover: none) { .album-del { opacity: 1; } }
