/* ============================================================
   NSBM EventHub - global stylesheet
   ============================================================ */
:root {
  --primary: #1e6fd9;
  --primary-dark: #155ab0;
  --accent: #18b07a;
  --danger: #dc3545;
  --warning: #f0ad4e;
  --ink: #22314a;
  --muted: #6b7890;
  --line: #e3e8f0;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(30, 47, 80, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* ---------- Navbar ---------- */
.navbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.navbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-size: 1.3rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.4rem; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.nav-user { color: var(--muted); font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600;
  border: none; cursor: pointer; font-size: .95rem; transition: .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.85); }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-success { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: #eef2f8; color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { display: block; width: 100%; }

.form-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 460px; margin: 40px auto; padding: 32px;
}
.form-card.wide { max-width: 720px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-control {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; background: #fff;
}
.form-control:focus { outline: 2px solid var(--primary); border-color: transparent; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.role-note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 14px 0; font-weight: 500; }
.alert-success { background: #e6f7ef; color: #0e7c4f; border: 1px solid #b7e6d0; }
.alert-danger  { background: #fdeaea; color: #b02a32; border: 1px solid #f5c6c6; }
.alert-info    { background: #e8f1fd; color: #155ab0; border: 1px solid #c3dcf7; }
.alert-warning { background: #fdf3e0; color: #9c6b12; border: 1px solid #f0d9a8; }

/* ---------- Hero (image) ---------- */
.hero {
  position: relative;
  color: #fff;
  border-radius: var(--radius);
  padding: 70px 40px;
  margin-bottom: 30px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18,49,92,.86) 0%, rgba(30,111,217,.66) 55%, rgba(18,49,92,.35) 100%);
}
.hero > * { position: relative; z-index: 2; }
.hero h1 { margin: 0 0 12px; font-size: 2.4rem; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero p { margin: 0; max-width: 620px; font-size: 1.1rem; opacity: .97; }
.hero .actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Feature strip ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin-bottom: 30px; }
.feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.feature .ico { font-size: 1.7rem; }
.feature h4 { margin: 0 0 4px; }
.feature span { color: var(--muted); font-size: .85rem; }

/* ---------- Category card image ---------- */
.card-img { height: 150px; border-radius: 10px; background-size: cover; background-position: center; }

/* ---------- Section headings ---------- */
.section-title { font-size: 1.5rem; margin: 30px 0 16px; border-left: 5px solid var(--primary); padding-left: 12px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.card .badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.badge-cat { background: #eef2f8; color: #3b4a63; }
.badge-upcoming { background: #e6f7ef; color: #0e7c4f; }
.badge-past { background: #eee; color: #666; }
.badge-cancelled { background: #fdeaea; color: #b02a32; }
.card .meta { color: var(--muted); font-size: .88rem; }
.card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: #f0f4fa; font-weight: 700; color: #3b4a63; }
tr:hover td { background: #f8fafd; }

/* ---------- Utility ---------- */
.mt-2 { margin-top: 12px; } .mt-4 { margin-top: 28px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pill { background: #eef2f8; border: none; border-radius: 20px; padding: 8px 16px; font-size: .9rem; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.search-box { flex: 1; min-width: 200px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 26px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding: 6px 0 12px; }
  .nav.open { display: flex; }
  .navbar-inner { flex-wrap: wrap; }
  .hero { padding: 30px 22px; }
}


/* ============================================================
   REDESIGN PACK (appended — safe to drop after your old rules)
   NSBM green / white / blue wash + 3D buttons + extra options
   ============================================================ */

/* ---- 1) page background: blue → white → green wash ---- */
body {
  background:
    radial-gradient(1000px 620px at -12% -6%, rgba(30,111,217,.16), transparent 62%),
    radial-gradient(760px 520px at 108% -10%, rgba(24,176,122,.14), transparent 60%),
    radial-gradient(760px 560px at -10% 110%, rgba(30,111,217,.12), transparent 60%),
    radial-gradient(1000px 700px at 112% 108%, rgba(24,176,122,.16), transparent 62%),
    linear-gradient(180deg,#e9f1fb 0%,#f8fbfd 46%,#eaf6ee 100%);
  background-attachment: fixed;
}

/* ---- 2) thin green→blue brand bar (no HTML change needed) ---- */
body::before {
  content:""; position:fixed; top:0; left:0; right:0; height:4px; z-index:99;
  background:linear-gradient(90deg,var(--accent) 0%,#0e9d8a 40%,var(--primary) 100%);
}
.navbar { background:rgba(255,255,255,.92); backdrop-filter:blur(10px); }
.nav a:hover { color:#0e7c4f; }

/* ---- 3) hero overlay blends blue into NSBM green ---- */
.hero::before {
  background:linear-gradient(115deg,rgba(11,46,99,.88) 0%,rgba(30,111,217,.72) 45%,rgba(14,124,79,.62) 100%);
}

/* ---- 4) section title bar goes gradient ---- */
.section-title { border-left:none; position:relative; padding-left:16px; }
.section-title::before {
  content:""; position:absolute; left:0; top:4px; bottom:4px; width:6px; border-radius:3px;
  background:linear-gradient(180deg,var(--primary),var(--accent));
}

/* ---- 5) 3-D BUTTONS (raised face + hard edge + press effect) ---- */
.btn { border-radius:12px; transition:transform .12s ease,box-shadow .12s ease,filter .12s ease; }
.btn:hover { transform:translateY(-2px); filter:saturate(1.06); }
.btn:active { transform:translateY(3px); }
.btn:disabled, .btn[disabled] {
  opacity:.55; cursor:not-allowed; transform:none; filter:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 2px 0 rgba(0,0,0,.08);
}
.btn:focus-visible { outline:3px solid rgba(24,176,122,.4); }

.btn-primary {
  background-image:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,0) 46%,rgba(0,0,0,.14)),
    linear-gradient(180deg,#4a90e8,var(--primary) 55%,#1550a8);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(0,0,0,.2),
    0 4px 0 #0e3f7d,0 10px 18px rgba(14,63,125,.35);
}
.btn-primary:hover {
  background-image:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,0) 46%,rgba(0,0,0,.14)),
    linear-gradient(180deg,#4a90e8,var(--primary) 55%,#1550a8);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(0,0,0,.2),
    0 6px 0 #0e3f7d,0 14px 24px rgba(14,63,125,.4);
}
.btn-primary:active {
  box-shadow:inset 0 2px 5px rgba(0,0,0,.3),0 1px 0 #0e3f7d,0 3px 8px rgba(14,63,125,.3);
}

.btn-success {
  background-image:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,0) 46%,rgba(0,0,0,.14)),
    linear-gradient(180deg,#3ecf95,var(--accent) 55%,#0e8f60);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(0,0,0,.2),
    0 4px 0 #0a6444,0 10px 18px rgba(10,100,68,.35);
}
.btn-success:hover {
  background-image:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,0) 46%,rgba(0,0,0,.14)),
    linear-gradient(180deg,#3ecf95,var(--accent) 55%,#0e8f60);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(0,0,0,.2),
    0 6px 0 #0a6444,0 14px 24px rgba(10,100,68,.4);
}
.btn-success:active {
  box-shadow:inset 0 2px 5px rgba(0,0,0,.3),0 1px 0 #0a6444,0 3px 8px rgba(10,100,68,.3);
}

.btn-danger {
  background-image:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,0) 46%,rgba(0,0,0,.16)),
    linear-gradient(180deg,#e4606d,var(--danger) 55%,#b02a37);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.22),
    0 4px 0 #8f1f2c,0 10px 18px rgba(143,31,44,.35);
}
.btn-danger:active { box-shadow:inset 0 2px 5px rgba(0,0,0,.3),0 1px 0 #8f1f2c,0 3px 8px rgba(143,31,44,.3); }

.btn-light {
  color:#17325e;
  background-image:linear-gradient(180deg,#ffffff,#e9eef6);
  box-shadow:inset 0 1px 0 #fff,inset 0 -2px 0 rgba(18,63,140,.14),
    0 4px 0 #c6d2e2,0 10px 16px rgba(16,58,120,.18);
}
.btn-light:hover {
  background-image:linear-gradient(180deg,#ffffff,#e9eef6);
  box-shadow:inset 0 1px 0 #fff,inset 0 -2px 0 rgba(18,63,140,.14),
    0 6px 0 #c6d2e2,0 14px 22px rgba(16,58,120,.22);
}
.btn-light:active { box-shadow:inset 0 2px 5px rgba(18,63,140,.18),0 1px 0 #c6d2e2,0 3px 8px rgba(16,58,120,.15); }

.btn-outline {
  background-image:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.06));
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.85),inset 0 -2px 0 rgba(0,0,0,.2),
    0 4px 0 rgba(6,32,74,.55),0 10px 18px rgba(0,20,50,.35);
}
.btn-outline:hover {
  background-image:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,.08));
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.95),inset 0 -2px 0 rgba(0,0,0,.2),
    0 6px 0 rgba(6,32,74,.55),0 14px 24px rgba(0,20,50,.4);
}
.btn-outline:active {
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8),inset 0 2px 5px rgba(0,0,0,.3),
    0 1px 0 rgba(6,32,74,.55),0 3px 8px rgba(0,20,50,.3);
}

/* ---- 6) filter/toolbar controls look pressed-in ---- */
.toolbar select, .toolbar input, .search-box .form-control {
  box-shadow:inset 0 2px 3px rgba(16,58,120,.07),0 2px 6px rgba(16,58,120,.05);
}
/* the two extra selects injected by script.js */
.toolbar select#xSort, .toolbar select#xLoc { width:auto; }

/* ---- 7) cards & features: gentle lift + tinted icons ---- */
.card { transition:transform .2s ease; }
.card:hover { transform:translateY(-4px); }
.feature { transition:transform .2s ease; }
.feature:hover { transform:translateY(-3px); }
.feature .ico {
  width:46px; height:46px; border-radius:12px; display:grid; place-items:center;
  background:rgba(30,111,217,.13); font-size:1.4rem;
}
.feature:nth-child(even) .ico { background:rgba(24,176,122,.15); }

/* ---- 8) badges & footer in brand colours ---- */
.badge-cat { background:rgba(30,111,217,.12); color:#155ab0; }
.footer {
  background:linear-gradient(120deg,#0b2e63 0%,#0a3f52 55%,#06482f 100%);
  color:#c4d8cc; border-top:none;
}


/* ============================================================
   FRONT-PAGE POLISH v2 (appended after the redesign pack)
   ============================================================ */

/* ---- staggered entrance animation (doesn't fight hover) ---- */
@keyframes cardIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
.grid .card { animation: cardIn .45s ease backwards; }
.grid .card:nth-child(2) { animation-delay:.06s; }
.grid .card:nth-child(3) { animation-delay:.12s; }
.grid .card:nth-child(4) { animation-delay:.18s; }
.grid .card:nth-child(5) { animation-delay:.24s; }
.grid .card:nth-child(6) { animation-delay:.30s; }
.feature { animation: cardIn .5s ease backwards; }
.feature:nth-child(2) { animation-delay:.08s; }
.feature:nth-child(3) { animation-delay:.16s; }
.feature:nth-child(4) { animation-delay:.24s; }

/* ---- pulsing live dot on "Upcoming" badges ---- */
.badge-upcoming::before {
  content:""; display:inline-block; width:7px; height:7px; border-radius:50%;
  background:var(--accent); margin-right:6px; vertical-align:1px;
  box-shadow:0 0 0 0 rgba(24,176,122,.5); animation:pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow:0 0 0 6px rgba(24,176,122,0); } 100% { box-shadow:0 0 0 0 rgba(24,176,122,0); } }

/* ---- event card image glow on hover ---- */
.card-img { transition:filter .25s ease, box-shadow .25s ease; }
.card:hover .card-img { filter:saturate(1.12) brightness(1.05); box-shadow:0 10px 22px rgba(16,58,120,.2); }

/* ---- hero glass stat chips (injected by script.js) ---- */
.xstats { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.xstats .chip {
  display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.35); backdrop-filter:blur(6px);
  color:#fff; font-size:.85rem; font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px rgba(0,20,50,.25);
}
.xstats .chip b { font-size:.95rem; }

/* ---- navbar shadow once you scroll ---- */
.navbar { transition:box-shadow .2s ease; }
.navbar.scrolled { box-shadow:0 6px 18px rgba(16,58,120,.14); }

/* ---- 3D back-to-top button ---- */
#xTop {
  position:fixed; right:22px; bottom:22px; z-index:98; width:46px; height:46px;
  border-radius:12px; border:none; cursor:pointer; color:#fff; font-size:1.1rem;
  display:grid; place-items:center;
  background-image:linear-gradient(180deg,rgba(255,255,255,.3),rgba(255,255,255,0) 46%,rgba(0,0,0,.15)),
    linear-gradient(135deg,var(--primary),var(--accent));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.22),
    0 4px 0 #0a4f3f, 0 10px 18px rgba(0,110,70,.35);
  opacity:0; pointer-events:none; transform:translateY(10px); transition:.25s ease;
}
#xTop.show { opacity:1; pointer-events:auto; transform:none; }
#xTop:active { transform:translateY(3px); box-shadow:inset 0 2px 5px rgba(0,0,0,.3), 0 1px 0 #0a4f3f; }

/* ---- accessibility: honour reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
  html { scroll-behavior:auto; }
}


/* ============================================================
   v3 — dark mode, skip link, print stylesheet
   ============================================================ */

/* ---- dark theme (toggled by the floating 🌙 button) ---- */
html[data-theme="dark"] {
  --bg:#0f1626; --card:#182238; --ink:#e7edf8; --muted:#9daac2;
  --line:#2b3a5c; --shadow:0 6px 20px rgba(0,0,0,.4);
}
html[data-theme="dark"] body {
  background:
    radial-gradient(1000px 620px at -12% -6%, rgba(30,111,217,.22), transparent 62%),
    radial-gradient(1000px 700px at 112% 108%, rgba(24,176,122,.16), transparent 62%),
    linear-gradient(180deg,#0d1424 0%,#101a2e 50%,#0d2018 100%);
  background-attachment:fixed;
}
html[data-theme="dark"] .navbar { background:rgba(13,20,36,.92); }
html[data-theme="dark"] .nav a { color:var(--ink); }
html[data-theme="dark"] .form-control { background:#121a2e; color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .form-card { background:var(--card); }
html[data-theme="dark"] .table-wrap { background:var(--card); }
html[data-theme="dark"] th { background:#1e2b4b; color:#cfdaf1; }
html[data-theme="dark"] tr:hover td { background:#1c2946; }
html[data-theme="dark"] .badge-cat { background:rgba(74,144,232,.22); color:#a6c8f2; }
html[data-theme="dark"] .badge-past { background:rgba(255,255,255,.09); color:#9daac2; }
html[data-theme="dark"] .pill { background:#223052; color:#dbe4f5; }
html[data-theme="dark"] .btn-light, html[data-theme="dark"] .btn-ghost {
  color:#e7edf8;
  background-image:linear-gradient(180deg,#2b3a5f,#1d2a49);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 -2px 0 rgba(0,0,0,.35),
    0 4px 0 #0c1526,0 10px 16px rgba(0,0,0,.4);
}
html[data-theme="dark"] .feature .ico { background:rgba(74,144,232,.18); }
html[data-theme="dark"] .feature:nth-child(even) .ico { background:rgba(24,176,122,.2); }
html[data-theme="dark"] .footer { background:linear-gradient(120deg,#081c3f,#0a2a38 55%,#04301f); }

/* floating theme toggle (bottom-left, 3D like the others) */
#xTheme { position:fixed; left:22px; bottom:22px; z-index:98; }

/* ---- skip link for keyboard users ---- */
.skip-link {
  position:absolute; left:-9999px; top:0; z-index:300;
  background:var(--primary); color:#fff; padding:10px 16px;
  border-radius:0 0 10px 10px; font-weight:700;
}
.skip-link:focus { left:0; }

/* ---- print stylesheet (participant lists, reports) ---- */
@media print {
  .navbar, .footer, .toolbar, #xTop, #xTheme, .xstats, .skip-link,
  .card .actions, .hero .actions { display:none !important; }
  body { background:#fff !important; }
  .card, .feature, .table-wrap {
    box-shadow:none !important; border:1px solid #bbb; animation:none !important;
  }
  .table-wrap { border-radius:0; }
  a { color:#000; }
}
