/* ═══════════════════════════════════════════════════
   SAHITYOTSAV 2.0 — style.css
   Modern dark app — Syne + DM Sans — Indigo/Cyan accent
   ═══════════════════════════════════════════════════ */

:root {
  --bg:         #07071a;
  --bg2:        #0e0e2a;
  --bg3:        #13132e;
  --surface:    #191935;
  --surface2:   #1f1f42;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);
  --primary:    #6366f1;
  --primary2:   #818cf8;
  --cyan:       #22d3ee;
  --cyan2:      #67e8f9;
  --green:      #34d399;
  --orange:     #fb923c;
  --red:        #f87171;
  --amber:      #fbbf24;
  --text:       #f1f1f8;
  --text2:      #9999cc;
  --text3:      #55558a;
  --radius:     16px;
  --radius-sm:  10px;
  --radius-xs:  7px;
  --bnav-h:     72px;
  --header-h:   58px;
  --tr:         0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }

/* ══════════════════════════════════════
   GATE SCREEN
══════════════════════════════════════ */
#gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34,211,238,0.1) 0%, transparent 55%),
    var(--bg);
}

.gate-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 75%);
  pointer-events: none;
}

.gate-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes fadeUp {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}

.gate-brand { text-align: center; }

.gate-logo-ring {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  animation: spinSlow 16s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.gate-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f1f1f8 30%, var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-sub {
  font-size: 0.82rem;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.gate-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.1) inset;
}

.gate-prompt {
  font-size: 0.9rem;
  color: var(--text2);
}

.gate-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--tr);
}
.gate-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.gate-field svg { width:18px; height:18px; color: var(--text3); flex-shrink:0; }
.gate-field input {
  flex:1; background:none; border:none; outline:none;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size:0.95rem;
}
.gate-field input::placeholder { color: var(--text3); }

.gate-err { color: var(--red); font-size:0.8rem; min-height:1em; }

.gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--tr);
}
.gate-btn svg { width:18px; height:18px; }
.gate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.gate-btn:active { transform: translateY(0); }
.gate-btn:disabled { opacity:0.6; cursor:not-allowed; transform:none; }

.gate-hint {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text3);
}

/* ══════════════════════════════════════
   APP SHELL
══════════════════════════════════════ */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── HEADER ── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(7,7,26,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.hd-left, .hd-right { width: 72px; display:flex; align-items:center; }
.hd-right { justify-content: flex-end; }

.hd-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex; align-items:center; justify-content:center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  transition: transform var(--tr);
  user-select: none;
}
.hd-avatar:hover { transform: scale(1.08); }

.hd-mid {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text) 40%, var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hd-icon-btn {
  width:36px; height:36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color: var(--text2);
  cursor:pointer;
  transition: all var(--tr);
}
.hd-icon-btn svg { width:16px; height:16px; }
.hd-icon-btn:hover { background: var(--surface2); color: var(--text); }
.hd-icon-btn.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MAIN PANES ── */
#mainPanes {
  flex: 1;
  margin-top: var(--header-h);
  margin-bottom: var(--bnav-h);
  overflow: hidden;
}

.pane {
  display: none;
  height: calc(100vh - var(--header-h) - var(--bnav-h));
  height: calc(100dvh - var(--header-h) - var(--bnav-h));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.pane.active { display: block; animation: paneIn 0.22s ease both; }
@keyframes paneIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:translateY(0); } }

.pane-body { padding: 16px 16px 20px; max-width: 640px; margin: 0 auto; }

/* ── BOTTOM NAV ── */
.bnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: rgba(9,9,28,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}

.bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: color var(--tr);
  position: relative;
}
.bnav-btn .bnav-ico {
  width:40px; height:32px;
  border-radius: var(--radius-xs);
  display:flex; align-items:center; justify-content:center;
  transition: all var(--tr);
}
.bnav-btn svg { width:20px; height:20px; }
.bnav-btn span { font-size: 0.68rem; font-weight:500; letter-spacing:0.02em; }
.bnav-btn.active { color: var(--primary2); }
.bnav-btn.active .bnav-ico {
  background: rgba(99,102,241,0.15);
}
.bnav-btn .badge {
  position:absolute; top:4px; right: calc(50% - 22px);
  width:8px; height:8px;
  background: var(--red);
  border-radius:50%;
  border: 2px solid var(--bg);
}

/* ══════════════════════════════════════
   HOME TAB
══════════════════════════════════════ */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.hero-orbs {
  position:absolute;
  top:-40px; right:-40px;
  width:180px; height:180px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 65%);
  pointer-events:none;
}
.hero-hi { font-size:0.82rem; color: var(--text2); margin-bottom:4px; }
.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.hero-tag { font-size:0.78rem; color: var(--text3); }

.stats-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stats-strip::-webkit-scrollbar { display: none; }

.stat-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  white-space: nowrap;
}
.stat-pill strong { color: var(--primary2); font-family: 'Syne', sans-serif; font-size:0.92rem; }
.stat-pill span { color: var(--text2); }

.home-block { margin-bottom: 24px; }
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.block-head span {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.block-head button {
  background:none; border:none;
  color: var(--primary2); font-size:0.78rem; cursor:pointer;
  font-family: 'DM Sans', sans-serif;
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skeleton-card {
  height: 72px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* ══════════════════════════════════════
   CARDS — REUSABLE
══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--tr);
  position: relative;
  overflow: hidden;
}
.card::before {
  content:'';
  position:absolute; left:0; top:0; bottom:0; width:3px;
  background: linear-gradient(180deg, var(--primary), var(--cyan));
  border-radius: 2px;
  opacity:0;
  transition: opacity var(--tr);
}
.card:hover { border-color: var(--border2); transform:translateX(2px); }
.card:hover::before { opacity:1; }
.card:active { transform:scale(0.99); }

.card-top {
  display:flex; align-items:flex-start;
  justify-content: space-between;
  gap:10px; margin-bottom:8px;
}
.card-event {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.cat-tag {
  flex-shrink:0;
  font-size:0.65rem;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  padding: 3px 9px;
  border-radius: 50px;
  background: rgba(99,102,241,0.15);
  color: var(--primary2);
  border: 1px solid rgba(99,102,241,0.2);
}
.cat-tag.Arts    { background:rgba(251,146,60,0.12); color:var(--orange); border-color:rgba(251,146,60,0.2); }
.cat-tag.Music   { background:rgba(52,211,153,0.12); color:var(--green);  border-color:rgba(52,211,153,0.2); }
.cat-tag.Dance   { background:rgba(251,191,36,0.12); color:var(--amber);  border-color:rgba(251,191,36,0.2); }
.cat-tag.Science { background:rgba(34,211,238,0.12); color:var(--cyan);   border-color:rgba(34,211,238,0.2); }
.cat-tag.Sports  { background:rgba(248,113,113,0.12);color:var(--red);    border-color:rgba(248,113,113,0.2); }

.card-podium {
  display:flex; gap:8px; margin-top:6px; flex-wrap:wrap;
}
.podium-item {
  display:flex; align-items:center; gap:5px;
  font-size:0.78rem; color: var(--text2);
}
.medal { font-size:0.9rem; }
.podium-name { color: var(--text); font-weight:500; }
.podium-school { color: var(--text3); font-size:0.72rem; }

.card-meta {
  display:flex; gap:12px; margin-top:8px; flex-wrap:wrap;
}
.meta-item {
  display:flex; align-items:center; gap:4px;
  font-size:0.74rem; color: var(--text3);
}
.meta-item svg { width:12px; height:12px; flex-shrink:0; }

/* ── STATUS PILLS ── */
.status { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:50px; font-size:0.7rem; font-weight:600; letter-spacing:0.04em; }
.status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status.Upcoming  { background:rgba(34,211,238,0.12);  color:var(--cyan);  }
.status.Ongoing   { background:rgba(52,211,153,0.15);  color:var(--green); }
.status.Completed { background:rgba(255,255,255,0.06); color:var(--text3); }

/* ── SCHED CARD ── */
.sched-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
  transition: all var(--tr);
}
.sched-card:hover { border-color: var(--border2); }
.sched-date-col { flex-shrink:0; text-align:center; min-width:44px; }
.sched-day { font-family:'Syne',sans-serif; font-size:1.6rem; font-weight:800; color:var(--primary2); line-height:1; }
.sched-mon { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.1em; color:var(--text3); }
.sched-time-val { font-size:0.72rem; color:var(--text3); margin-top:4px; }
.sched-vline { width:1px; background:var(--border); flex-shrink:0; }
.sched-body { flex:1; min-width:0; }
.sched-event { font-family:'Syne',sans-serif; font-size:0.92rem; font-weight:700; color:var(--text); margin-bottom:4px; }
.sched-row { display:flex; align-items:center; gap:10px; justify-content:space-between; flex-wrap:wrap; }

/* ── ANNOUNCE CARD ── */
.ann-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.ann-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.ann-title { font-family:'Syne',sans-serif; font-size:0.92rem; font-weight:700; color:var(--text); }
.ann-msg { font-size:0.85rem; color:var(--text2); line-height:1.6; }
.ann-time { font-size:0.7rem; color:var(--text3); margin-top:8px; }

.priority { padding:2px 8px; border-radius:4px; font-size:0.65rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; }
.priority.Normal    { background:rgba(255,255,255,0.06); color:var(--text3); }
.priority.Important { background:rgba(251,191,36,0.15);  color:var(--amber); }
.priority.Urgent    { background:rgba(248,113,113,0.15); color:var(--red); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align:center;
  padding: 48px 20px;
  color: var(--text3);
}
.empty-state svg { width:48px; height:48px; opacity:0.3; margin-bottom:12px; }
.empty-state p { font-size:0.88rem; }

/* ══════════════════════════════════════
   SEARCH / FILTER
══════════════════════════════════════ */
.search-area { margin-bottom: 16px; display:flex; flex-direction:column; gap:10px; }

.search-box {
  display:flex; align-items:center; gap:10px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color var(--tr);
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.search-box svg { width:18px; height:18px; color:var(--text3); flex-shrink:0; }
.search-box input { flex:1; background:none; border:none; outline:none; color:var(--text); font-family:'DM Sans',sans-serif; font-size:0.9rem; }
.search-box input::placeholder { color:var(--text3); }
.search-box button { background:none; border:none; color:var(--text3); cursor:pointer; padding:2px; line-height:1; display:flex; }
.search-box button svg { width:16px; height:16px; }

.chip-row { display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
.chip-row::-webkit-scrollbar { display:none; }
.chip {
  flex-shrink:0;
  padding: 6px 14px;
  border-radius:50px;
  font-size:0.75rem;
  font-weight:600;
  letter-spacing:0.03em;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor:pointer;
  transition: all var(--tr);
  white-space:nowrap;
}
.chip:hover { border-color:var(--border2); color:var(--text); }
.chip.active { background: rgba(99,102,241,0.18); border-color: var(--primary); color: var(--primary2); }

/* schedule filter tabs */
.ftabs { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; margin-bottom:14px; }
.ftabs::-webkit-scrollbar { display:none; }
.ftab {
  flex-shrink:0; padding:7px 16px; border-radius:50px;
  background:var(--surface); border:1px solid var(--border);
  color:var(--text2); font-size:0.8rem; font-weight:600; cursor:pointer;
  transition: all var(--tr);
}
.ftab.active { background:rgba(99,102,241,0.18); border-color:var(--primary); color:var(--primary2); }

/* ══════════════════════════════════════
   ADMIN OVERLAY
══════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.admin-screen { display:flex; flex-direction:column; flex:1; overflow:hidden; }

.ov-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(9,9,28,0.98);
  flex-shrink: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.ov-back {
  width:36px; height:36px;
  border-radius:50%; background:var(--surface);
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--text); cursor:pointer;
  transition: all var(--tr);
}
.ov-back svg { width:18px; height:18px; }
.ov-back:hover { background:var(--surface2); }

.ov-logout {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius-xs);
  color: var(--red);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight:600;
  cursor:pointer;
  transition: all var(--tr);
}
.ov-logout:hover { background:rgba(248,113,113,0.2); }

/* login body */
.login-body {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding: 32px 24px; gap:14px; max-width:380px; margin:0 auto; width:100%;
}
.login-icon {
  width:64px; height:64px;
  border-radius:50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display:flex; align-items:center; justify-content:center;
  color: var(--primary2);
  margin-bottom:4px;
}
.login-icon svg { width:28px; height:28px; }
.login-title { font-family:'Syne',sans-serif; font-size:1.3rem; font-weight:800; text-align:center; }
.login-sub { font-size:0.82rem; color:var(--text2); text-align:center; }

/* form elements */
.fg { display:flex; flex-direction:column; gap:6px; width:100%; }
.fg label { font-size:0.78rem; font-weight:600; color:var(--text2); letter-spacing:0.03em; text-transform:uppercase; }
.fg input, .fg textarea, .fg select {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--tr);
  width:100%;
}
.fg textarea { resize:vertical; min-height:88px; }
.fg select { cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239999cc' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:16px; padding-right:36px; }
.fg input:focus, .fg textarea:focus, .fg select:focus { border-color:var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.fg input::placeholder, .fg textarea::placeholder { color:var(--text3); }
.fg option { background: var(--bg2); }

.pw-row { display:flex; gap:8px; align-items:center; }
.pw-row .fg input { flex:1; }
.pw-toggle {
  width:42px; height:42px; flex-shrink:0;
  border-radius:var(--radius-sm);
  background:var(--surface); border:1px solid var(--border2);
  color:var(--text2); cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition: all var(--tr);
}
.pw-toggle svg { width:18px; height:18px; }
.pw-toggle:hover { background:var(--surface2); color:var(--text); }

.frow { display:flex; gap:10px; }
.frow .fg { flex:1; min-width:0; }

.ferr { color:var(--red); font-size:0.8rem; min-height:1em; width:100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color:#fff; border:none; border-radius:var(--radius-sm);
  padding: 12px 24px;
  font-family:'Syne',sans-serif; font-size:0.88rem; font-weight:700; letter-spacing:0.03em;
  cursor:pointer; transition:all var(--tr); display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-primary.wide { width:100%; }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(99,102,241,0.35); }
.btn-primary:active { transform:translateY(0); }
.btn-primary:disabled { opacity:0.55; cursor:not-allowed; transform:none; box-shadow:none; }

/* admin tabs */
.atab-bar {
  display:flex; gap:0;
  border-bottom:1px solid var(--border);
  background: var(--bg2);
  flex-shrink:0;
  overflow-x:auto; scrollbar-width:none;
}
.atab-bar::-webkit-scrollbar { display:none; }
.atab {
  flex:1; padding:12px 10px;
  background:none; border:none;
  border-bottom:2px solid transparent;
  color:var(--text3); font-size:0.8rem; font-weight:600;
  cursor:pointer; transition:all var(--tr); white-space:nowrap;
  font-family:'Syne',sans-serif;
}
.atab.active { color:var(--primary2); border-bottom-color:var(--primary); }

.apanes { flex:1; overflow:hidden; }
.apane { display:none; height:100%; overflow-y:auto; }
.apane.active { display:block; }
.apane-body { padding:16px; max-width:600px; margin:0 auto; display:flex; flex-direction:column; gap:16px; }

/* form card */
.form-card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  padding:20px;
  display:flex; flex-direction:column; gap:14px;
}
.fc-title { font-family:'Syne',sans-serif; font-size:1rem; font-weight:700; }

/* positions table */
.pos-section { display:flex; flex-direction:column; gap:8px; }
.pos-hd { display:flex; align-items:center; justify-content:space-between; }
.pos-hd span { font-size:0.78rem; font-weight:600; color:var(--text2); text-transform:uppercase; letter-spacing:0.04em; }
.add-row-btn {
  background:rgba(99,102,241,0.15); border:1px solid rgba(99,102,241,0.25);
  color:var(--primary2); border-radius:var(--radius-xs);
  padding:4px 12px; font-size:0.75rem; font-weight:600; cursor:pointer;
  transition:all var(--tr);
}
.add-row-btn:hover { background:rgba(99,102,241,0.25); }

.pos-thead { display:grid; grid-template-columns:52px 1fr 1fr 70px 28px; gap:6px; padding:0 2px; }
.pos-thead span { font-size:0.68rem; color:var(--text3); text-transform:uppercase; letter-spacing:0.06em; }

.pos-row { display:grid; grid-template-columns:52px 1fr 1fr 70px 28px; gap:6px; align-items:center; }
.pos-row input {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius-xs); padding:7px 8px;
  color:var(--text); font-family:'DM Sans',sans-serif; font-size:0.82rem;
  outline:none; width:100%;
  transition:border-color var(--tr);
}
.pos-row input:focus { border-color:var(--primary); }
.pos-row input::placeholder { color:var(--text3); font-size:0.75rem; }
.del-pos-btn {
  width:28px; height:28px;
  background:rgba(248,113,113,0.1); border:1px solid rgba(248,113,113,0.2);
  border-radius:var(--radius-xs); color:var(--red);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all var(--tr);
}
.del-pos-btn:hover { background:rgba(248,113,113,0.2); }
.del-pos-btn svg { width:14px; height:14px; }

/* list block */
.list-block { display:flex; flex-direction:column; gap:10px; }
.lb-title { font-family:'Syne',sans-serif; font-size:0.88rem; font-weight:700; color:var(--text2); }

.admin-item {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  display:flex; align-items:center; gap:10px;
}
.admin-item-info { flex:1; min-width:0; }
.admin-item-name { font-size:0.85rem; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admin-item-sub { font-size:0.74rem; color:var(--text3); margin-top:2px; }
.del-item-btn {
  width:32px; height:32px; flex-shrink:0;
  background:rgba(248,113,113,0.08); border:1px solid rgba(248,113,113,0.15);
  border-radius:var(--radius-xs); color:var(--red);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all var(--tr);
}
.del-item-btn:hover { background:rgba(248,113,113,0.18); }
.del-item-btn svg { width:15px; height:15px; }

/* visitors */
.vis-hd { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.vis-hd h3 { font-family:'Syne',sans-serif; font-size:1rem; font-weight:700; }
.vis-badge {
  background:rgba(99,102,241,0.15); color:var(--primary2);
  border:1px solid rgba(99,102,241,0.2); border-radius:50px;
  padding:2px 10px; font-size:0.75rem; font-weight:600;
}
.vis-row {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:12px 14px; display:flex; align-items:center; gap:10px; margin-bottom:8px;
}
.vis-avatar {
  width:34px; height:34px; border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--cyan));
  display:flex; align-items:center; justify-content:center;
  font-family:'Syne',sans-serif; font-weight:700; font-size:0.82rem; color:#fff; flex-shrink:0;
}
.vis-name { font-size:0.88rem; font-weight:600; color:var(--text); }
.vis-time { font-size:0.72rem; color:var(--text3); }
.vis-info { flex:1; }

/* admin nudge */
.admin-nudge {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 16px; margin-top:8px;
}
.nudge-txt { font-size:0.82rem; color:var(--text2); }
.nudge-btn {
  display:flex; align-items:center; gap:7px;
  background: var(--surface2);
  border:1px solid var(--border2);
  border-radius:var(--radius-xs);
  color:var(--text); font-size:0.8rem; font-weight:600;
  padding:8px 14px; cursor:pointer; transition:all var(--tr);
}
.nudge-btn svg { width:15px; height:15px; }
.nudge-btn:hover { border-color:var(--primary); color:var(--primary2); }

/* ══════════════════════════════════════
   DETAIL MODAL
══════════════════════════════════════ */
.modal-bg {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.7);
  backdrop-filter:blur(6px);
  z-index:300;
  display:flex; align-items:flex-end; justify-content:center;
}
.modal-sheet {
  background:var(--bg2);
  border:1px solid var(--border2);
  border-radius:24px 24px 0 0;
  padding: 0 0 env(safe-area-inset-bottom,16px);
  max-width:480px; width:100%;
  max-height:88vh;
  overflow-y:auto;
  animation: sheetUp 0.28s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes sheetUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-drag { width:40px; height:4px; background:var(--border2); border-radius:2px; margin:12px auto 0; }
#modalBody { padding:20px 20px 20px; }

.modal-event { font-family:'Syne',sans-serif; font-size:1.2rem; font-weight:800; margin-bottom:4px; }
.modal-cat { margin-bottom:16px; }

.modal-table { width:100%; border-collapse:collapse; margin-top:12px; }
.modal-table th { text-align:left; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.08em; color:var(--text3); padding:6px 8px; border-bottom:1px solid var(--border); font-weight:600; }
.modal-table td { padding:10px 8px; font-size:0.85rem; color:var(--text); border-bottom:1px solid rgba(255,255,255,0.04); vertical-align:middle; }
.modal-table tr:last-child td { border-bottom:none; }
.modal-table tr:hover td { background:rgba(255,255,255,0.02); }
.modal-medal { font-size:1rem; }
.modal-marks { color:var(--cyan); font-weight:600; font-family:'Syne',sans-serif; font-size:0.9rem; }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position:fixed; bottom:calc(var(--bnav-h) + 12px); left:50%;
  transform:translateX(-50%) translateY(12px);
  background:var(--surface2);
  border:1px solid var(--border2);
  color:var(--text);
  padding:10px 20px; border-radius:50px;
  font-size:0.83rem; font-weight:500;
  z-index:9999;
  opacity:0; pointer-events:none;
  transition:all 0.25s ease;
  white-space:nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (min-width:600px) {
  .bnav-btn span { font-size:0.72rem; }
  .pane-body { padding:20px; }
}
@media (max-width:380px) {
  .pos-thead, .pos-row { grid-template-columns:44px 1fr 1fr 60px 28px; }
  .frow { flex-direction:column; }
}
