/* ============================================================
   SEB SPORDIKLUBI – Merged Stylesheet (v1 base + v2 design)
   v1 rules form the base; v2 rules follow and override by cascade.
   body.v2 prefix has been removed — this is now the sole stylesheet.
   ============================================================ */

/* ============================================================
   SEB SPORDIKLUBI – Main Stylesheet
   Mirrors seb.ee design: white topbar + dark navbar + clean content
   ============================================================ */

/* ── Google Font ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* SEB exact brand palette */
  --seb-green:       #60B244;
  --seb-green-dark:  #3D8C1E;
  --seb-green-light: #EBF6E3;
  --seb-navy:        #002D72;     /* SEB dark navy – top bar, dark nav */
  --seb-navy-mid:    #003A92;
  --seb-charcoal:    #1C1C2E;     /* Dark nav bar bg */
  --seb-nav-hover:   rgba(255,255,255,.12);
  --seb-nav-active:  rgba(255,255,255,.18);

  --primary:         var(--seb-green);
  --primary-dark:    var(--seb-green-dark);
  --primary-light:   var(--seb-green-light);
  --primary-xlight:  #F5FBF0;
  --secondary:       var(--seb-navy);

  --accent:          #E8561A;
  --accent-light:    #FFF0EB;
  --warning:         #D4860A;
  --warning-light:   #FFF8E6;
  --danger:          #C62828;
  --danger-light:    #FDEAEA;
  --success:         #1A8740;
  --success-light:   #E5F5EC;
  --info:            #0060A9;
  --info-light:      #E0EFFA;

  --bg:              #F0F2F5;   /* SEB page background */
  --surface:         #FFFFFF;
  --surface-2:       #F7F9FB;
  --border:          #D8DDE4;
  --border-strong:   #B0BAC6;

  --text-1:          #0D1724;
  --text-2:          #4A5568;
  --text-3:          #96A2B3;

  /* Layout */
  --topbar-h:        52px;      /* white top bar */
  --navbar-h:        48px;      /* dark nav bar */
  --total-header:    100px;     /* topbar + navbar */
  --bottom-nav-h:    64px;
  --radius:          4px;       /* SEB uses tight radii */
  --radius-sm:       3px;
  --radius-lg:       6px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.08);
  --shadow:          0 3px 10px rgba(0,0,0,.10);
  --shadow-lg:       0 8px 28px rgba(0,0,0,.15);

  --font:            'Inter', 'Segoe UI', system-ui, sans-serif;
  --transition:      0.15s ease;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
.prose ul, .prose ol { list-style: revert; padding-left: 1.5rem; margin: .5rem 0; }
.prose li { margin: .2rem 0; }

/* ══════════════════════════════════════════════════════════
   AUTH PAGE – mirrors seb.ee login layout
   ══════════════════════════════════════════════════════════ */
.auth-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: flex; overflow-y: auto; }
.auth-page { display: flex; flex-direction: column; width: 100%; min-height: 100vh; }

/* Auth top bar – white, same as main app */
.auth-topbar {
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: var(--shadow-sm);
}
.auth-topbar-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between;
}
.auth-brand { display: flex; align-items: center; gap: .75rem; }
.auth-brand-name { display: flex; flex-direction: column; }
.auth-brand-main { font-weight: 800; font-size: .95rem; color: var(--text-1); }
.auth-brand-sub  { font-size: .7rem; color: var(--text-3); line-height: 1; margin-top: .1rem; }
.auth-brand-sep  { width: 1px; height: 28px; background: var(--border); }
.auth-topbar-links { display: flex; gap: .25rem; }

/* Auth main area */
.auth-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 4rem; padding: 3rem 1.5rem; flex-wrap: wrap;
}
@media (max-width: 700px) {
  .auth-main { align-items: flex-start; padding: 1.5rem 1rem 3rem; }
  .auth-card { max-width: 100%; }
}
.auth-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2.25rem; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); border-top: 3px solid var(--seb-green);
}
.auth-card-header { margin-bottom: 1.5rem; }
.auth-card-header h1 { font-size: 1.35rem; font-weight: 800; color: var(--text-1); }
.auth-card-header p  { color: var(--text-2); font-size: .875rem; margin-top: .25rem; }

.auth-side-info { max-width: 320px; }
.auth-side-info h2 { font-size: 1.5rem; font-weight: 800; color: var(--seb-navy); margin-bottom: .75rem; }
.auth-side-info p  { color: var(--text-2); margin-bottom: 1.25rem; line-height: 1.7; }
.auth-features { display: flex; flex-direction: column; gap: .6rem; }
.auth-features li { display: flex; align-items: center; gap: .6rem; font-size: .875rem; color: var(--text-2); }
.auth-features li i { color: var(--seb-green); font-size: .9rem; }
.auth-footer { text-align: center; padding: 1rem; font-size: .75rem; color: var(--text-3); border-top: 1px solid var(--border); display: flex; justify-content: center; gap: .75rem; }
.app-footer { text-align: center; padding: 1.25rem 1rem 5rem; font-size: .75rem; color: var(--text-3); display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.app-footer a { color: var(--text-3); }
.app-footer a:hover { color: var(--text-2); }
@media (max-width: 700px) { .auth-side-info { display: none; } }

/* ── Auth tabs ──────────────────────────────────────────── */
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.auth-tab {
  flex: 1; padding: .6rem; font-weight: 600; font-size: .875rem;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); text-align: center;
}
.auth-tab:hover:not(.active) { color: var(--text-1); }

/* ══════════════════════════════════════════════════════════
   MAIN APP LAYOUT
   ══════════════════════════════════════════════════════════ */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.hidden { display: none !important; }

/* ── WHITE TOP BAR (seb.ee style) ──────────────────────── */
.seb-topbar-inner {
  max-width: 1400px; width: 100%; height: 100%; margin: 0 auto;
  padding: 0 1.5rem; display: flex; align-items: center; gap: 1rem;
}

/* ── SEB Logo mark – S|E|B with vertical bars ──────────────
   seb.ee uses ~2px gap each side of the bar, 1px bar width,
   very tight tracking on the letters, bold weight.            */
.seb-mark {
  display: inline-flex; align-items: center;
  gap: 0; flex-shrink: 0; line-height: 1;
}
/* SEB logo image */
.seb-logo {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
/* Inverted (white) variant for dark backgrounds */
.seb-logo-inv {
  filter: brightness(0) invert(1);
}
.seb-logo-text { font-weight: 900; font-size: 1.15rem; color: #000; letter-spacing: -.02em; flex-shrink: 0; line-height: 1; font-family: Arial, Helvetica, sans-serif; }
.seb-brand { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.seb-brand-sep { width: 1px; height: 28px; background: var(--border); }
.seb-brand-text { display: flex; flex-direction: column; }

.seb-topbar-right {
  margin-left: auto; display: flex; align-items: center; gap: .35rem;
}
.seb-topbar-sep { width: 1px; height: 22px; background: var(--border); margin: 0 .3rem; }
.seb-topbar-user {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; color: var(--text-2); padding: 0 .5rem;
}
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--seb-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .72rem; flex-shrink: 0;
}
.topbar-icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: .95rem; transition: var(--transition); position: relative;
}
.lang-btn {
  padding: .3rem .55rem; font-size: .75rem; font-weight: 600; color: var(--text-3);
  border-radius: var(--radius-sm); transition: var(--transition);
}
.lang-btn:hover, .lang-btn.active { color: var(--text-1); background: var(--bg); }
.lang-btn.active { color: var(--seb-navy); font-weight: 700; }

/* Hamburger – mobile only */
.hamburger {
  display: none; font-size: 1.1rem;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  color: var(--text-2); border-radius: var(--radius-sm);
}
.hamburger:hover { background: var(--bg); }
/* Mobile quick-action icons next to hamburger */
.mobile-topbar-actions {
  display: none; align-items: center; gap: .15rem; margin-left: auto;
}
@media (max-width: 767px) {
  .hamburger { display: flex; }
  .seb-topbar-right { display: none; }
  .mobile-topbar-actions { display: flex; }
}

/* ── DARK NAV BAR (seb.ee style) ───────────────────────── */
.seb-navbar {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 190;
  height: var(--navbar-h); background: var(--seb-charcoal);
  border-bottom: 2px solid var(--seb-green); /* green accent line under nav */
}
.seb-navbar-inner {
  max-width: 1400px; width: 100%; height: 100%; margin: 0 auto;
  padding: 0 1.5rem; display: flex; align-items: center;
}
.seb-nav-items { display: flex; align-items: center; height: 100%; gap: 2px; }
.seb-nav-item {
  display: flex; align-items: center; gap: .4rem;
  height: 100%; padding: 0 .9rem;
  color: rgba(255,255,255,.72); font-size: .83rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); white-space: nowrap;
}
.seb-nav-item i { font-size: .8rem; }
.seb-nav-item:hover { color: #fff; background: var(--seb-nav-hover); }
.seb-nav-item.active { color: #fff; border-bottom-color: var(--seb-green); background: var(--seb-nav-active); font-weight: 600; }

@media (max-width: 767px) { .seb-navbar { display: none; } }

/* ── MOBILE DRAWER ──────────────────────────────────────── */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: 280px; background: var(--seb-charcoal);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-overlay { position: fixed; inset: 0; z-index: 299; background: rgba(0,0,0,.5); }
.drawer-header {
  display: flex; align-items: center; padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.drawer-close { margin-left: auto; color: rgba(255,255,255,.5); font-size: 1rem; transition: var(--transition); }
.drawer-close:hover { color: #fff; }
.drawer-nav { flex: 1; padding: .5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.drawer-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem; border-radius: var(--radius-sm);
  font-size: var(--dr-item-font);
  color: rgba(255,255,255,.7); font-weight: 500;
  transition: var(--transition);
}
.drawer-item i { width: 18px; text-align: center; font-size: var(--dr-item-icon); flex-shrink: 0; }
.drawer-item:hover { background: var(--seb-nav-hover); color: #fff; }
.drawer-item.active { background: var(--seb-green); color: #fff; }
.drawer-footer {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem; border-top: 1px solid rgba(255,255,255,.1);
}

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  margin-top: var(--total-header);
  flex: 1; min-height: calc(100vh - var(--total-header));
}
@media (max-width: 767px) { .main-content { margin-top: var(--topbar-h); } }

.page-content {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  overflow-x: hidden;
}
@media (max-width: 767px) {
  .page-content {
    padding: 1rem 1rem calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  }
}

/* ── BOTTOM NAV (mobile) ───────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 180;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none; align-items: center; justify-content: space-around;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
@media (max-width: 767px) { .bottom-nav { display: flex; } }
.bottom-nav-item {
  flex: 0 0 auto; min-width: 56px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--text-3);
  font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: .5rem .6rem; transition: var(--transition);
}
.bottom-nav-item i { font-size: 1.1rem; }
.bottom-nav-a11y { background: none; border: none; cursor: pointer; }
.bottom-nav-a11y .a11y-icon { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.bottom-nav-a11y.active { color: var(--primary); }



/* ══════════════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════════════ */

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.form-hint  { font-size: .73rem; color: var(--text-3); margin-top: .3rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-1);
  transition: var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--seb-navy); box-shadow: 0 0 0 3px rgba(0,45,114,.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: .8rem; background: var(--danger-light); padding: .5rem .75rem; border-radius: var(--radius-sm); margin-bottom: .75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Searchable Select ───────────────────────────────────── */
.ss-list { position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 2px); background: var(--surface); border: 1.5px solid var(--seb-navy); border-radius: var(--radius-sm); max-height: 220px; overflow-y: auto; box-shadow: var(--shadow-md); }
.ss-list.hidden { display: none; }
.ss-item { padding: .5rem .85rem; font-size: .875rem; cursor: pointer; }
.ss-item:hover, .ss-item.ss-active { background: var(--primary-light); color: var(--primary); }
.ss-no-results { padding: .5rem .85rem; font-size: .85rem; color: var(--text-3); }
@media(max-width:480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .58rem 1.2rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .875rem; transition: var(--transition); white-space: nowrap;
}
/* Primary SEB green button */
.btn-seb      { background: var(--seb-green); color: #fff; }
.btn-seb:hover{ background: var(--seb-green-dark); }
.btn-primary  { background: var(--seb-green); color: #fff; }
.btn-primary:hover { background: var(--seb-green-dark); }
/* Outlined secondary */
/* Navy dark button */
.btn-navy     { background: var(--seb-navy); color: #fff; }
.btn-navy:hover { background: var(--seb-navy-mid); }
/* Danger */
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A32020; }
/* Ghost */
.link-btn { color: var(--seb-green); font-size: .8rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.link-btn:hover { text-decoration: underline; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .18rem .6rem; border-radius: 2px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-primary  { background: var(--seb-green-light); color: var(--seb-green-dark); }
.badge-neutral  { background: var(--bg);              color: var(--text-2); border: 1px solid var(--border); }
.badge-secondary{ background: #EEF2FF;                color: #3730A3; }
.badge-dot {
  position: absolute; top: 4px; right: 3px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--danger); border: 2px solid var(--surface);
  font-size: .65rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); }
  50%       { box-shadow: 0 0 0 4px rgba(220,38,38,0); }
}

/* ── Cards ──────────────────────────────────────────────── */
.card-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.card-title  { font-size: .95rem; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: .5rem; }
.card-title i { color: var(--seb-green); }
.card-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.card-accent { border-left: 3px solid var(--seb-green); }
.card-hover  { transition: var(--transition); cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* ── Page header ────────────────────────────────────────── */
.section-title{ font-size: .95rem; font-weight: 700; color: var(--text-1); margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; overflow: hidden; }
.section-title i { color: var(--seb-green); }

/* ── Notification panel ─────────────────────────────────── */
.notification-panel {
  position: fixed; top: calc(var(--topbar-h) + var(--navbar-h) + 8px);
  right: 1rem; z-index: 250;
  width: 340px; max-height: 460px; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden;
}
@media (max-width: 400px) { .notification-panel { left: 1rem; right: 1rem; width: auto; } }
.notif-panel-header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .875rem; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item { display: flex; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--bg); }
.notif-icon { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.notif-icon.event      { background: var(--info-light);    color: var(--info); }
.notif-icon.tournament { background: var(--warning-light); color: var(--warning); }
.notif-icon.news       { background: var(--seb-green-light); color: var(--seb-green-dark); }
.notif-icon.system     { background: var(--bg);            color: var(--text-2); }
.notif-content .notif-title { font-weight: 600; font-size: .83rem; }
.notif-content .notif-desc  { color: var(--text-2); font-size: .78rem; }
.notif-content .notif-time  { color: var(--text-3); font-size: .72rem; margin-top: .2rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--text-3); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); margin: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-close { color: var(--text-3); transition: var(--transition); }
.modal-close:hover { color: var(--text-1); }
.modal-body   { padding: 1.5rem; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer { padding: .9rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 5rem; right: 1.5rem; z-index: 600; display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 767px) { .toast-container { bottom: calc(var(--bottom-nav-h) + .75rem); left: 1rem; right: 1rem; } }
.toast { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .875rem; font-weight: 500; max-width: 360px; animation: slideUp .3s ease; }
@media(max-width:767px) { .toast { max-width: 100%; } }
.toast-success { background: var(--success); color: #fff; }
.toast-error   { background: var(--danger);  color: #fff; }
.toast-info    { background: var(--info);    color: #fff; }
.toast-warning { background: var(--warning); color: #fff; }
@keyframes slideUp   { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut   { to   { opacity: 0; transform: scale(.92); } }
.toast.fade-out { animation: fadeOut .3s ease forwards; }

/* ── Cookie banner ─────────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
  background: #1a2e1a; color: #e0f0e8; font-size: .83rem;
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem;
  flex-wrap: wrap;
}
@media (max-width: 767px) { #cookie-banner { bottom: var(--bottom-nav-h); } }

/* ── Stats grid ─────────────────────────────────────────── */
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .3rem; border-left: 3px solid transparent; }
.stat-card.primary { border-left-color: var(--seb-green); }
.stat-card.navy    { border-left-color: var(--seb-navy); }
.stat-icon  { font-size: 1.2rem; color: var(--seb-green); }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; color: var(--text-1); }
.stat-label { font-size: .72rem; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ── Welcome banner ─────────────────────────────────────── */
/* Exact seb.ee hero: dark green gradient with spark icon */
.welcome-banner {
  background: linear-gradient(130deg, #1B3D2F 0%, #2D6A3F 50%, #3A8A50 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 2rem 2rem 2rem 2.5rem;
  position: relative; overflow: hidden; margin-bottom: 1.5rem;
  min-height: 120px; display: flex; align-items: center;
}
.welcome-banner-content { position: relative; z-index: 1; flex: 1; }
.welcome-banner h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .35rem; }
.welcome-banner p  { opacity: .85; font-size: .9rem; }
.welcome-banner-decoration {
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  font-size: 5rem; opacity: .12; line-height: 1;
}
.welcome-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.welcome-actions .btn { font-size: .8rem; padding: .45rem 1rem; }

/* ── Dashboard layout ───────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; column-gap: 1.5rem; row-gap: 0.5rem; align-items: start; max-width: 100%; }
@media(max-width:960px) { .dashboard-grid { grid-template-columns: minmax(0,1fr); } }

/* ── Event cards ────────────────────────────────────────── */
.event-list   { display: flex; flex-direction: column; gap: .65rem; }
.event-card   { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; align-items: stretch; transition: var(--transition); cursor: pointer; overflow: hidden; }
.event-card-today { box-shadow: 0 0 0 2px #1a1a1a, var(--shadow-sm); }
.event-stripe { width: 4px; flex-shrink: 0; }
.stripe-padel      { background: var(--seb-green); }
.stripe-badminton  { background: var(--seb-green); }
.stripe-volleyball { background: var(--accent); }
.stripe-tournament { background: var(--warning); }
.event-card-body { padding: .75rem 1rem; flex: 1; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.event-date-box { min-width: 46px; text-align: center; flex-shrink: 0; background: var(--bg); border-radius: var(--radius-sm); padding: .35rem .45rem; }
.event-date-day   { font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--seb-green); }
.event-date-month { font-size: .6rem; font-weight: 700; text-transform: uppercase; color: var(--text-2); }
.event-info { flex: 1; min-width: 0; overflow: hidden; }
.event-title { font-weight: 700; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-meta  { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.event-meta-item { display: flex; align-items: center; gap: .25rem; font-size: .72rem; color: var(--text-2); white-space: nowrap; }
.event-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .event-card-body { padding: .6rem .75rem; gap: .5rem; }
  .event-info { min-width: 0; flex: 1 1 0; }
  .event-actions { width: 100%; max-width: 100%; justify-content: flex-end; }
  .event-meta-item { font-size: .68rem; }
  .event-actions .btn { padding: .35rem .6rem; font-size: .75rem; }
}
.participants-bar { height: 3px; background: var(--bg); border-radius: 2px; margin-top: .45rem; overflow: hidden; }
.participants-fill { height: 100%; background: var(--seb-green); border-radius: 2px; transition: width .4s ease; }

/* ── Grid helpers ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.1rem; min-width: 0; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media(max-width:900px) { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; gap: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tab-btn { padding: .6rem 1.1rem; font-weight: 600; font-size: .83rem; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); white-space: nowrap; flex-shrink: 0; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Discipline builder (tournament form) ──────────────── */
.discipline-row {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.discipline-row .form-input { min-width: 0; }

/* ── Discipline schedule (tournament detail) ───────────── */
.disc-schedule { display: flex; flex-direction: column; gap: .35rem; }
.disc-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: .45rem .75rem;
}
.disc-name-badge {
  font-weight: 700; font-size: .85rem; flex: 1;
}
.disc-when { font-size: .78rem; color: var(--text-2); white-space: nowrap; }

/* ── Tournament cards ───────────────────────────────────── */
.tournament-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer; transition: var(--transition); }
.tournament-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tournament-card-banner { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; }
.tournament-card-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.08)); }
.banner-padel     { background: linear-gradient(135deg, #b7f0a0, #6cc84b); }
.banner-badminton { background: linear-gradient(135deg, #93C5FD, #3B82F6); }
.banner-volleyball{ background: linear-gradient(135deg, #FDBA74, #F97316); }
.banner-mixed     { background: linear-gradient(135deg, #C4B5FD, #8B5CF6); }
.tournament-card-body { padding: 1rem; }
.tournament-name { font-weight: 800; font-size: .92rem; margin-bottom: .4rem; line-height: 1.3; }
.tournament-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }

/* ── Tournament detail hero ─────────────────────────────── */
.tournament-hero {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.tournament-hero-banner {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; position: relative;
}
.tournament-hero-body {
  background: var(--surface); padding: 1.25rem 1.5rem;
}
@media (max-width: 767px) { .tournament-hero-body { padding: 1rem; } }

/* ── Rounds ──────────────────────────────────────────────── */
.rounds-list { display: flex; flex-direction: column; gap: .75rem; }
.round-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.round-num { width: 34px; height: 34px; border-radius: 50%; background: var(--seb-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.round-info { flex: 1; min-width: 0; }
.round-name { font-weight: 700; font-size: .9rem; }
.round-meta { font-size: .77rem; color: var(--text-2); margin-top: .2rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.round-participants { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.participant-chip.team { background: var(--seb-green-light); color: var(--seb-green-dark); border-color: transparent; }

/* ── Discipline schedule ─────────────────────────────────── */
.disc-schedule { display: flex; flex-direction: column; gap: .5rem; }
.disc-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .65rem .9rem;
  box-shadow: var(--shadow-sm);
}
.disc-row:hover { border-color: var(--seb-green); }
.disc-name-badge { font-weight: 700; font-size: .88rem; flex: 1; min-width: 100px; }
.disc-when { font-size: .78rem; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: .3rem; }

/* ── Filter chips ────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.filter-chip { padding: .32rem .85rem; border-radius: 999px; border: 1.5px solid var(--border); font-size: .78rem; font-weight: 600; color: var(--text-2); background: var(--surface); cursor: pointer; transition: var(--transition); }
.filter-chip.active { border-color: var(--seb-green); color: var(--seb-green-dark); background: var(--seb-green-light); }

/* ── Calendar ────────────────────────────────────────────── */
.cal-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 700px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-layout > * { min-width: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.calendar-day-label { text-align: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--text-3); padding: .45rem 0; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: .83rem; cursor: pointer; transition: var(--transition); position: relative; }
.calendar-day:hover { background: var(--bg); }
.calendar-day.today { background: var(--seb-green-light); color: var(--seb-green-dark); font-weight: 800; }
.calendar-day.selected { background: var(--seb-green); color: #fff; }
.calendar-day.other-month { color: var(--text-3); }
.calendar-day.has-event::after { content: ''; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--seb-green); }
.calendar-day.selected.has-event::after { background: rgba(255,255,255,.8); }
.calendar-day-events { margin-top: .65rem; display: flex; flex-direction: column; gap: .4rem; }
.calendar-event-pill { background: var(--seb-green-light); color: var(--seb-green-dark); border-radius: var(--radius-sm); padding: .45rem .7rem; font-size: .8rem; font-weight: 500; display: flex; align-items: center; gap: .45rem; cursor: pointer; }
.calendar-event-pill:hover { background: var(--seb-green); color: #fff; }
.calendar-event-pill.badminton { background: var(--info-light); color: #1D4ED8; }
.calendar-event-pill.tournament { background: var(--warning-light); color: #92400E; }
.calendar-nav-title { font-size: 1rem; font-weight: 700; }

/* ── News ────────────────────────────────────────────────── */
.news-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; border-top: 3px solid transparent; }
.news-card.pinned { border-top-color: var(--warning); }
.news-card-header { padding: 1.1rem 1.1rem .7rem; }
.news-card-meta { display: flex; align-items: center; gap: .7rem; margin-bottom: .65rem; }
.news-author-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--seb-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.news-author-info .author-name { font-weight: 600; font-size: .83rem; }
.news-author-info .post-date   { font-size: .73rem; color: var(--text-3); }
.news-title   { font-size: 1.05rem; font-weight: 800; margin-bottom: .4rem; }
.news-excerpt { color: var(--text-2); font-size: .85rem; line-height: 1.6; }
.news-card-footer { padding: .65rem 1.1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; background: var(--surface-2); }
.comment-count { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--text-2); }

/* ── Emoji picker ────────────────────────────────────────── */
.ep-preview-row {
  display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem;
}
.ep-preview {
  width: 52px; height: 52px; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 2px solid var(--seb-green);
  border-radius: var(--radius-sm); flex-shrink: 0;
  transition: var(--transition);
}
.ep-custom-input { flex-shrink: 0; }
.ep-container {
  max-height: 240px; overflow-y: auto;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .5rem .6rem; background: var(--surface-2);
}
.ep-group-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); margin: .5rem 0 .3rem;
}
.ep-group-label:first-child { margin-top: 0; }
.ep-group { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: .25rem; }
.ep-btn {
  width: 36px; height: 36px; font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: var(--transition);
  border: 2px solid transparent; background: none; cursor: pointer;
  line-height: 1;
}
.ep-btn:hover    { background: var(--bg); transform: scale(1.15); }
.ep-selected     { border-color: var(--seb-green); background: var(--seb-green-light); transform: scale(1.1); }

/* ── Comments ────────────────────────────────────────────── */
.comment-list { display: flex; flex-direction: column; gap: .75rem; }
.comment { display: flex; gap: .7rem; padding: .85rem; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--seb-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
.comment-content .comment-author { font-weight: 700; font-size: .82rem; }
.comment-content .comment-date   { font-size: .71rem; color: var(--text-3); margin-left: .5rem; }
.comment-content .comment-text   { font-size: .84rem; margin-top: .2rem; color: var(--text-2); }

/* ── Members grid ────────────────────────────────────────── */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .75rem; }
.member-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; text-align: center; transition: var(--transition); border-top: 3px solid transparent; }
.member-card:hover { box-shadow: var(--shadow); border-top-color: var(--seb-green); }
.sidebar-avatar { border-radius: 50%; background: var(--seb-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; line-height: 1; }
.member-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--seb-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 800; margin: 0 auto .7rem; }
.member-name { font-weight: 700; font-size: .88rem; }
.member-role { font-size: .73rem; color: var(--text-2); margin-top: .2rem; }
.member-stats { display: flex; justify-content: center; gap: 1rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.member-stat-val { font-weight: 800; font-size: .9rem; display: block; }
.member-stat-lbl { font-size: .62rem; text-transform: uppercase; color: var(--text-3); }

/* ── Admin table ──────────────────────────────────────────── */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 480px; }
.data-table th { text-align: left; padding: .6rem 1rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: var(--primary-xlight, #F5FBF0); }
.table-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 640px) {
  .data-table { font-size: .78rem; }
  .data-table th, .data-table td { padding: .5rem .65rem; }
}

/* ── Profile ──────────────────────────────────────────────── */
.profile-header { background: linear-gradient(130deg, #1B3D2F 0%, #2D6A3F 50%, #3A8A50 100%); border-radius: var(--radius-lg); padding: 2rem; color: #fff; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; flex-shrink: 0; border: 3px solid rgba(255,255,255,.35); }
.profile-info h2 { font-size: 1.35rem; font-weight: 800; }
.profile-info p  { opacity: .8; font-size: .875rem; }
.profile-sport-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.sport-tag { background: rgba(255,255,255,.2); color: #fff; border-radius: 999px; padding: .22rem .65rem; font-size: .73rem; font-weight: 600; }

/* ── Back button ──────────────────────────────────────────── */
.back-btn { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-2); font-size: .84rem; font-weight: 600; margin-bottom: .9rem; transition: var(--transition); }
.back-btn:hover { color: var(--seb-green); }

/* ── Detail hero ──────────────────────────────────────────── */
.detail-hero { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; border-left: 4px solid var(--seb-green); }
.detail-hero-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .5rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .65rem; margin: .65rem 0; }
.detail-meta-item { display: flex; align-items: center; gap: .35rem; font-size: .83rem; color: var(--text-2); }
.detail-meta-item i { color: var(--seb-green); width: 15px; text-align: center; }
.detail-desc { color: var(--text-2); font-size: .875rem; line-height: 1.7; margin-top: .65rem; }

/* ── Equipment ────────────────────────────────────────────── */
.equipment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }
.equipment-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem; text-align: center; transition: var(--transition); cursor: pointer; }
.equipment-card:hover { box-shadow: var(--shadow); }
.equipment-icon  { font-size: 1.9rem; margin-bottom: .45rem; }
.equipment-name  { font-weight: 700; font-size: .85rem; }
.equipment-count { font-size: .73rem; color: var(--text-2); margin-top: .15rem; }
.equipment-available { color: var(--success); font-weight: 700; }
.equipment-booked    { color: var(--danger);  font-weight: 700; }

/* ── Achievement badges ───────────────────────────────────── */
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.achievement { display: flex; flex-direction: column; align-items: center; gap: .15rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .6rem .55rem; font-size: .76rem; font-weight: 600; color: var(--text-3); text-align: center; }
.achievement.earned { border-color: var(--warning); background: var(--warning-light); color: var(--text-1); }
.achievement-icon { font-size: 1.6rem; line-height: 1; }
.achievement-name { font-size: .75rem; font-weight: 700; margin-top: .15rem; }
.achievement-date { font-size: .65rem; color: var(--text-3); font-weight: 400; }
.achievement-lock { font-size: .8rem; opacity: .35; margin-top: .1rem; }

/* ── Activity feed ticker ─────────────────────────────────── */
.feed-ticker-wrap { overflow: hidden; height: 168px; position: relative; }
.feed-ticker-wrap::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 36px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; z-index: 1; }
.feed-ticker-wrap.static::after { display: none; }
.feed-ticker-inner { will-change: transform; width: 100%; overflow: hidden; }

/* ── Dashboard ticker layout ──────────────────────────────── */
/* Desktop right-col: Vabad kohad above news, hidden on mobile (shown via dash-spots-m) */
.dash-spots-d { display: contents; } /* transparent to layout — child section-title aligns with sibling columns */
.dash-spots-m { display: none; }

@media (max-width: 767px) {
  .dash-spots-d { display: none; }
  .dash-spots-m { display: block; }
}

/* ── Weather widget ───────────────────────────────────────── */
.weather-card { background: linear-gradient(130deg, #003366 0%, #005AA7 100%); color: #fff; border-radius: var(--radius); padding: .9rem 1.25rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.weather-icon { font-size: 2rem; }
.weather-temp { font-size: 1.6rem; font-weight: 800; }
.weather-outdoor-ok { background: rgba(255,255,255,.2); border-radius: 999px; padding: .22rem .65rem; font-size: .75rem; font-weight: 700; }
.weather-outdoor-no { background: rgba(231,76,60,.4); border-radius: 999px; padding: .22rem .65rem; font-size: .75rem; font-weight: 700; }

/* ── Invite code box ──────────────────────────────────────── */
.invite-code-box { background: var(--seb-green-light); border: 2px dashed var(--seb-green); border-radius: var(--radius-sm); padding: 1rem; text-align: center; margin: 1rem 0; }
.invite-code { font-size: 1.5rem; font-weight: 800; color: var(--seb-green-dark); letter-spacing: .15em; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-3); }
.empty-state i { font-size: 2.2rem; margin-bottom: .65rem; display: block; }
.empty-state p  { font-size: .875rem; }

/* ── Sport selection grid (profile page) ─────────────────── */
.sport-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
}
.sport-select-card {
  display: flex; flex-direction: column; align-items: center;
  gap: .35rem; padding: .85rem .5rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer;
  transition: var(--transition); position: relative;
}
.sport-select-card:hover {
  border-color: var(--seb-green); background: var(--seb-green-light);
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.sport-select-card.sport-selected {
  border-color: var(--seb-green); background: var(--seb-green-light);
}
.sport-select-emoji { font-size: 2rem; line-height: 1; }
.sport-select-name  { font-size: .75rem; font-weight: 700; color: var(--text-1); text-align: center; }
.sport-select-check {
  font-size: .85rem;
  color: var(--border-strong);
}
.sport-selected .sport-select-check { color: var(--seb-green); }

/* ── Sport type management ────────────────────────────────── */
.sport-type-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.sport-type-card:hover { box-shadow: var(--shadow); }
.sport-type-icon { font-size: 1.8rem; width: 44px; text-align: center; flex-shrink: 0; }
.sport-type-info { flex: 1; }
.sport-type-name { font-weight: 700; font-size: .95rem; }
.sport-type-desc { font-size: .78rem; color: var(--text-2); margin-top: .15rem; }
.sport-type-actions { display: flex; gap: .4rem; }

/* ── Bulk invite ──────────────────────────────────────────── */
.bulk-stats { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: .5rem; }
.bulk-stat { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; }
.bulk-stat.new  { background: var(--success-light); color: var(--success); }
.bulk-stat.skip { background: var(--bg); color: var(--text-3); }
.bulk-result-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; font-size: .9rem; font-weight: 600; }

/* ── Countdown badge ──────────────────────────────────────── */
.countdown-badge { display: inline-flex; align-items: center; gap: .25rem; background: var(--seb-navy); color: #fff; border-radius: 999px; padding: .18rem .6rem; font-size: .7rem; font-weight: 700; }
.countdown-badge.soon  { background: var(--accent); }
.countdown-badge.today { background: var(--success); }

/* ── Site-wide announcement banner ────────────────────────── */
.site-announcement {
  display: flex; align-items: flex-start; gap: .75rem;
  background: #fff8e1; border-bottom: 2px solid #f5c842;
  padding: .7rem 1.5rem; font-size: .875rem; color: #7a5900;
}
.site-announcement i { flex-shrink: 0; margin-top: .15rem; }

/* ── CMS language tabs ─────────────────────────────────────── */
.cms-lang-tabs { display: flex; gap: .25rem; margin-bottom: .75rem; border-bottom: 2px solid var(--border); }
.cms-lang-tab {
  background: none; border: none; padding: .45rem .9rem; font-size: .83rem;
  font-weight: 600; color: var(--text-2); cursor: pointer; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition);
}
.cms-lang-tab:hover { color: var(--text-1); }
.cms-lang-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Content block cards ───────────────────────────────────── */
.content-block-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.content-block-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.25rem;
}
.content-block-title { font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.content-block-desc  { font-size: .78rem; color: var(--text-2); }
.content-editor-wrap { border-top: 1px solid var(--border); padding: 1rem 1.25rem; }

/* ── HTML toolbar ──────────────────────────────────────────── */
.html-toolbar {
  display: flex; align-items: center; gap: .2rem; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: .35rem .5rem;
}
.html-tb-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: .2rem .45rem; cursor: pointer; font-size: .8rem; line-height: 1.4;
  color: var(--text-1); transition: background .12s;
}
.html-tb-btn:hover { background: var(--border); }
.html-tb-sep { width: 1px; height: 18px; background: var(--border); margin: 0 .2rem; }

/* ── Split editor body ─────────────────────────────────────── */
.html-editor-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 180px; overflow: hidden;
}
.html-editor-pane { display: flex; flex-direction: column; }
.html-editor-pane:first-child { border-right: 1px solid var(--border); }
.html-editor-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-3);
  padding: .3rem .6rem; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.html-editor-content {
  flex: 1; padding: .75rem; outline: none; font-size: .85rem;
  line-height: 1.6; min-height: 140px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text-1); background: var(--bg-1);
}
.html-editor-content:focus { background: var(--seb-green-light, #f0faf0); color: var(--text-1); }
.html-preview {
  flex: 1; padding: .75rem; font-size: .85rem; line-height: 1.6;
  overflow-y: auto; color: var(--text-1);
}
.html-preview h2, .html-preview h3 { margin: .5rem 0 .3rem; }
.html-preview ul { list-style: disc; padding-left: 1.25rem; }
.html-preview ol { list-style: decimal; padding-left: 1.25rem; }
.html-preview li { margin-bottom: .2rem; }
.html-preview a  { color: var(--seb-green); }

@media (max-width: 640px) {
  .html-editor-body { grid-template-columns: 1fr; }
  .html-editor-pane:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Annual cleanup member list ───────────────────────────── */
.cleanup-list {
  display: flex; flex-direction: column; gap: .25rem;
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}
.cleanup-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .75rem; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background .1s;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .cleanup-row .badge:not(.badge-success):not(.badge-warning):not(.badge-danger) { display: none; }
}
.cleanup-row:last-child { border-bottom: none; }
.cleanup-row:hover { background: var(--surface-2); }
.cleanup-row:has(.cleanup-cb:checked) { background: #fef2f2; }
.cleanup-row input[type="checkbox"] { width:15px;height:15px;accent-color:var(--danger);flex-shrink:0;cursor:pointer; }
.cleanup-actions {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding-top: .5rem; opacity: .5; pointer-events: none; transition: opacity .15s;
}
.cleanup-actions.has-selection { opacity: 1; pointer-events: auto; }
.cleanup-selected-count { font-size: .8rem; font-weight: 700; color: var(--text-2); margin-right: auto; }

/* ── Organizer checklist ──────────────────────────────────── */
.org-checklist { display: flex; flex-direction: column; gap: .35rem; max-height: 320px; overflow-y: auto; }
.org-check-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: background .12s;
}
.org-check-row:hover { background: var(--surface-2); }
.org-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--seb-green); flex-shrink: 0; cursor: pointer; }

/* ── Equipment admin overlay ──────────────────────────────── */
.equipment-card { position: relative; }
.equip-admin-actions {
  position: absolute; top: .5rem; right: .5rem;
  display: flex; gap: .25rem; z-index: 2;
}
.equip-admin-btn {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .25rem .4rem;
  cursor: pointer; font-size: .75rem; color: var(--text-2);
  line-height: 1; transition: var(--transition);
}
.equip-admin-btn:hover { background: var(--surface-2); color: var(--text-1); }
.equip-admin-btn.danger:hover { background: var(--danger-light,#fef2f2); color: var(--danger); border-color: var(--danger); }

/* ── Button extras ────────────────────────────────────────── */
.btn-xs { padding: .2rem .5rem; font-size: .7rem; border-radius: var(--radius-sm); }
.btn-success { background: var(--success,#22c55e); color: #fff; border: none; }
.btn-success:hover { background: #16a34a; }

/* ── Equipment renters ────────────────────────────────────── */
/* ── Equipment icon picker ────────────────────────────────── */
.icon-picker-preview {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: 1.6rem; cursor: pointer; padding: .35rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); user-select: none;
  transition: var(--transition);
}
.icon-picker-preview:hover { border-color: var(--primary); }
.icon-picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr));
  gap: .25rem; margin-top: .5rem; padding: .6rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); max-height: 220px; overflow-y: auto;
}
.icon-pick-btn {
  font-size: 1.35rem; padding: .3rem; border: 2px solid transparent;
  border-radius: var(--radius-sm); background: none; cursor: pointer;
  transition: var(--transition); line-height: 1; text-align: center;
}
.icon-pick-btn:hover { background: var(--surface-2); border-color: var(--border); }
.icon-pick-btn.selected { border-color: var(--primary); background: var(--primary-light, #dbeafe); }

/* ── Equipment renters ────────────────────────────────────── */
.equip-renters { margin-top: .75rem; border-top: 1px solid var(--border); padding-top: .6rem; text-align: left; }
.equip-renters-title { font-size: .7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.equip-renter-row { display: flex; align-items: center; gap: .4rem; padding: .2rem 0; font-size: .72rem; flex-wrap: wrap; }
.equip-renter-name { flex: 1; font-weight: 600; color: var(--text-1); }
.equip-renter-qty  { color: var(--text-2); }
.equip-renter-date { color: var(--text-3); font-size: .68rem; }

/* ── No-sports banner ─────────────────────────────────────── */
.no-sports-banner {
  display: flex; align-items: center; gap: .85rem;
  background: #fffbea; border: 1px solid #f5c842;
  border-radius: var(--radius-sm); padding: .8rem 1rem;
  margin-bottom: 1.1rem; font-size: .875rem; color: #7a5900;
}
.no-sports-banner i.fa-running { font-size: 1.1rem; color: #c49000; flex-shrink: 0; }
.no-sports-banner span { flex: 1; line-height: 1.45; }
.no-sports-banner a { color: var(--seb-navy); font-weight: 700; text-decoration: underline; }
.no-sports-banner a:hover { color: var(--seb-green); }
.no-sports-close {
  background: none; border: none; cursor: pointer;
  color: #c49000; padding: .2rem; line-height: 1;
  border-radius: var(--radius-sm); flex-shrink: 0;
  opacity: .7; transition: opacity .15s;
}
.no-sports-close:hover { opacity: 1; }

/* ── Sports onboarding overlay ────────────────────────────── */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.onboarding-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 2.5rem 2rem 2rem;
  max-width: 640px; width: 100%;
  text-align: center;
  max-height: 90vh; overflow-y: auto;
}
.onboarding-icon { font-size: 3rem; margin-bottom: .75rem; }
.onboarding-card h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.onboarding-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 1.5rem; line-height: 1.5; }
.onboarding-sport-grid {
  text-align: left; margin-bottom: 1.75rem;
}
.onboarding-actions {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.onboarding-actions .btn-seb { min-width: 180px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {

  .welcome-banner { padding: 1.25rem; }
  .welcome-banner h2 { font-size: 1.1rem; }
  .welcome-banner-decoration { display: none; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .event-card-body { gap: .65rem; }
}

/* ── Code editor (HTML textarea with syntax highlighting) ──── */
.ce-tabs { display:flex; gap:.25rem; margin-bottom:.4rem; }
.ce-tab { padding:.3rem .8rem; font-size:.78rem; font-weight:600; border:1.5px solid var(--border); border-radius:5px; background:var(--bg-2); color:var(--text-2); cursor:pointer; transition:all .15s; }
.ce-tab.active { background:#1e1e2e; color:#cdd6f4; border-color:#3b4261; }
.ce-preview { display:none; min-height:200px; padding:.85rem 1rem; border:1.5px solid var(--border); border-radius:6px; background:#fff; line-height:1.6; font-size:.9rem; overflow:auto; }
.ce-preview.visible { display:block; }
.code-wrap {
  position: relative;
  background: #1e1e2e;
  border: 1.5px solid #3b4261;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  font-size: .8rem;
  line-height: 1.6;
}
.code-pre {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: .75rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  color: #cdd6f4;
  pointer-events: none;
  border-radius: 6px;
}
.code-ta {
  position: relative;
  display: block;
  width: 100%;
  padding: .75rem;
  background: transparent;
  color: transparent;
  caret-color: #cdd6f4;
  border: none;
  outline: none;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  font: inherit;
  line-height: inherit;
  min-height: 200px;
}
.code-ta::selection { background: rgba(137,180,250,.25); }
.hl-tag  { color: #89b4fa; }
.hl-attr { color: #a6e3a1; }
.hl-str  { color: #fab387; }
.hl-cmt  { color: #6c7086; font-style: italic; }

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .seb-topbar, .seb-navbar, .bottom-nav, .toast-container, .notification-panel { display: none !important; }
  .main-content { margin-top: 0 !important; }
  .page-content { padding: 0 !important; }
}

/* ── Rich text editor (news) ──────────────────────────────── */
.rte-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: .2rem; padding: .4rem .5rem;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.rte-btn {
  padding: .25rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; font-size: .8rem; line-height: 1.4;
  color: var(--text-1); transition: background .15s;
}
.rte-btn:hover { background: var(--bg-2); }
.rte-sep { width: 1px; background: var(--border); margin: .2rem .15rem; align-self: stretch; }
.rte-body {
  min-height: 160px; max-height: 340px; overflow-y: auto;
  padding: .75rem 1rem; outline: none; font-size: .9rem; line-height: 1.65;
  color: var(--text-1); background: var(--surface);
}
.rte-body:empty::before { content: 'Kirjuta uudise sisu siia...'; color: var(--text-3); pointer-events: none; }
.rte-body h2 { font-size: 1.15rem; font-weight: 700; margin: .6rem 0 .3rem; }
.rte-body h3 { font-size: 1rem; font-weight: 700; margin: .5rem 0 .25rem; }
.rte-body ul { list-style: disc; padding-left: 1.4rem; margin: .4rem 0; }
.rte-body ol { list-style: decimal; padding-left: 1.4rem; margin: .4rem 0; }
.rte-body a { color: var(--primary); text-decoration: underline; }

@media (max-width: 700px) { .activity-detail-grid { grid-template-columns: 1fr !important; } }

/* ── Back FAB ─────────────────────────────────────────────── */
.back-fab {
  display: none;
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  left: 1rem;
  z-index: 900;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  color: var(--text-1);
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background .15s, box-shadow .15s;
}
@media (max-width: 767px) {
  .back-fab { display: flex; }
  .back-fab.hidden { display: none; }
}

/* ── Idea FAB ─────────────────────────────────────────────── */
.idea-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  right: 1rem;
  z-index: 900;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--seb-green);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, box-shadow .15s;
}
.idea-fab:hover { background: var(--primary-dark, #005a30); }

/* ── Update banner ───────────────────────────────────────────── */
.update-banner {
  position: fixed;
  bottom: calc(var(--bottom-nav-h, 60px) + .75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  background: var(--primary, #002D72);
  color: #fff;
  border-radius: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  font-size: .88rem;
  white-space: nowrap;
}
.update-banner.hidden { display: none; }
.update-banner .btn { background: #fff; color: var(--primary, #002D72); font-weight: 600; border: none; }
.update-banner .btn:hover { background: #e8edf5; }
.update-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: .85rem;
  padding: 0 .1rem;
  line-height: 1;
}
.update-banner-close:hover { color: #fff; }


/* ============================================================
   V2 DESIGN OVERRIDES
   (formerly scoped to body.v2 — now applied globally)
   ============================================================ */

/* ============================================================
   SEB Spordiklubi – v2 Design
   SEB internet bank minimalism: white header, white sidebar,
   flat cards, tight typography, darker green (#007B40)
   All rules scoped to — v1 is completely untouched.
   ============================================================ */

/* ── v2 Token Overrides ────────────────────────────────────── */
:root {
  --v2-green:         #007B40;
  --v2-green-dark:    #005f30;
  --v2-green-bg:      #f0f7f3;
  --v2-navy:          #001F5B;
  --v2-bg:            #f5f6f8;
  --v2-surface:       #ffffff;
  --v2-border:        #e8e9eb;
  --v2-border-strong: #d0d3d8;
  --v2-text-1:        #0d0e12;
  --v2-text-2:        #555b6b;
  --v2-text-3:        #9ba3b5;
  --v2-sidebar-w:     228px;
  --v2-header-h:      56px;
  --v2-radius:        8px;
  --v2-radius-sm:     6px;
  --v2-shadow-xs:     0 1px 2px rgba(0,0,0,.05);
  --v2-shadow-sm:     0 1px 4px rgba(0,0,0,.07);
  --v2-shadow:        0 2px 8px rgba(0,0,0,.08);

  /* A+ accessibility sidebar font sizes */
  --sb-nav-font:      .83rem;
  --sb-nav-icon:      .78rem;
  --sb-group-label:   .625rem;
  --sb-user-name:     .8rem;
  --sb-user-role:     .68rem;

  /* A+ accessibility drawer (mobile) font sizes */
  --dr-item-font:     1.15rem;
  --dr-item-icon:     1rem;

  /* Override v1 tokens */
  --seb-green:        var(--v2-green);
  --seb-green-dark:   var(--v2-green-dark);
  --seb-green-light:  var(--v2-green-bg);
  --seb-navy:         var(--v2-navy);
  --primary:          var(--v2-green);
  --primary-dark:     var(--v2-green-dark);
  --primary-light:    var(--v2-green-bg);
  --bg:               var(--v2-bg);
  --surface:          var(--v2-surface);
  --border:           var(--v2-border);
  --border-strong:    var(--v2-border-strong);
  --text-1:           var(--v2-text-1);
  --text-2:           var(--v2-text-2);
  --text-3:           var(--v2-text-3);
  --radius:           var(--v2-radius);
  --radius-sm:        var(--v2-radius-sm);
  --shadow-sm:        var(--v2-shadow-sm);
  --shadow:           var(--v2-shadow);
  --total-header:     var(--v2-header-h); /* no dark navbar in v2 */

  background: var(--v2-bg);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   HEADER — white, minimal, green dot brand
   ═══════════════════════════════════════════════════════════ */
.seb-topbar {
  height: var(--v2-header-h);
  background: var(--v2-surface);
  border-bottom: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-xs);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  --topbar-h: var(--v2-header-h);
}

/* Desktop: brand occupies exactly the sidebar width in the topbar */
@media (min-width: 900px) {
  .seb-topbar-inner {
    padding: 0;
    gap: 0;
    max-width: none;   /* prevent centering via margin:0 auto */
    margin: 0;
  }
  .seb-brand {
    width: var(--v2-sidebar-w);
    min-width: var(--v2-sidebar-w);
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 0 1.1rem;
    border-right: 1px solid var(--v2-border);
    height: 100%;
    display: flex !important;
    align-items: center;
    gap: .6rem;
  }
  .v2-sidebar-brand { display: none; }
  /* Restore right padding for topbar actions */
  .seb-topbar-right { padding-right: 1rem; }
}

/* Mobile: normal padding */
@media (max-width: 899px) {
  .seb-topbar-inner { padding-left: 1rem; }
  .v2-sidebar-brand { display: none; }
}

/* SEB wordmark: keep the bold black "SEB" text from v1.
   The user confirmed this is fine — we just can't use the
   official logo image. Black text on white header is clean. */
.seb-logo-text {
  color: #000;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -.02em;
}

.seb-brand-sep {
  background: var(--v2-border);
  height: 1.2rem;
}

.seb-logo-text {
  line-height: 1;
}

.seb-brand-main {
  color: var(--v2-text-1);
  font-size: .88rem;
  font-weight: 700 !important;
  letter-spacing: .01em;
  text-transform: none !important;
  line-height: 1;
}

.seb-brand-text {
  display: flex;
  align-items: center;
}

.topbar-icon-btn {
  color: var(--v2-text-2);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon-btn:hover {
  color: var(--v2-text-1);
  background: var(--v2-bg);
}

.seb-topbar-sep {
  background: var(--v2-border);
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--v2-green-bg);
  color: var(--v2-green);
  border: none;
  border-radius: 50%;
}

#topbar-username {
  color: var(--v2-text-1);
  font-size: .82rem;
  font-weight: 600;
}

.badge-dot {
  background: var(--v2-green);
}

/* ── Online presence pill in topbar ──────────────────────── */
.v2-online-pill {
  display: none;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--v2-text-2);
  background: var(--v2-bg);
  border: 1px solid var(--v2-border);
  border-radius: 99px;
  padding: .2rem .55rem;
  white-space: nowrap;
  line-height: 1;
}
.v2-online-pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v2-green);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR — white, section labels, left-border active
   ═══════════════════════════════════════════════════════════ */
.v2-sidebar {
  display: none;
  position: fixed;
  top: var(--v2-header-h);
  left: 0;
  bottom: 0;
  width: var(--v2-sidebar-w);
  background: var(--v2-surface);
  border-right: 1px solid var(--v2-border);
  z-index: 100;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.v2-sidebar::-webkit-scrollbar { display: none; }

.v2-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  height: var(--v2-header-h);
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--v2-border);
  flex-shrink: 0;
}

.v2-sidebar-nav {
  flex: 1;
  padding: .75rem 0;
  display: flex;
  flex-direction: column;
}

/* Section group labels injected by v2-layout.js */
.v2-nav-group-label {
  font-size: var(--sb-group-label);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--v2-text-3);
  padding: 1rem 1.1rem .3rem;
  margin-top: .25rem;
}
.v2-nav-group-label:first-child {
  margin-top: 0;
  padding-top: .75rem;
}

.v2-nav-divider {
  height: 1px;
  background: var(--v2-border);
  margin: .5rem 0;
}

.v2-nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.1rem;
  color: var(--v2-text-2);
  font-size: var(--sb-nav-font);
  font-weight: 500;
  transition: background .1s, color .1s;
  border-left: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.v2-nav-item i {
  width: 15px;
  text-align: center;
  font-size: var(--sb-nav-icon);
  flex-shrink: 0;
  opacity: .65;
}

.v2-nav-item:hover {
  background: var(--v2-bg);
  color: var(--v2-text-1);
}
.v2-nav-item:hover i { opacity: .9; }

.v2-nav-item.active {
  background: var(--v2-green-bg);
  color: var(--v2-green);
  font-weight: 600;
  border-left-color: var(--v2-green);
}
.v2-nav-item.active i { opacity: 1; }

/* Sidebar footer: user info */
.v2-sidebar-footer {
  padding: .75rem;
  border-top: 1px solid var(--v2-border);
}

.v2-sidebar-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .6rem;
  border-radius: var(--v2-radius-sm);
  cursor: pointer;
  transition: background .1s;
}
.v2-sidebar-user:hover { background: var(--v2-bg); }

.v2-sidebar-user .topbar-avatar {
  width: 32px;
  height: 32px;
  font-size: .75rem;
  flex-shrink: 0;
}

.v2-sidebar-user-info { overflow: hidden; }

.v2-sidebar-user-name {
  font-size: var(--sb-user-name);
  font-weight: 600;
  color: var(--v2-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-sidebar-user-role {
  font-size: var(--sb-user-role);
  color: var(--v2-text-3);
  margin-top: .05rem;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT OFFSETS
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  body { zoom: 1.25; }

  .v2-sidebar { display: flex; }

  .v2-sidebar-brand { display: none !important; }
  .seb-navbar { display: none !important; }
  .hamburger  { display: none !important; }

  .main-content {
    margin-top: var(--v2-header-h) !important;
    margin-left: var(--v2-sidebar-w) !important;
    padding-bottom: 3rem;
  }

  .bottom-nav { display: none !important; }

  .back-fab {
    left: calc(var(--v2-sidebar-w) + 1.25rem);
    bottom: 1.5rem;
  }

  .notification-panel {
    top: calc(var(--v2-header-h) + .5rem);
  }

  .update-banner {
    top: var(--v2-header-h);
  }

  #v2-online-pill-desktop { display: flex; }
  #v2-online-pill-mobile  { display: none !important; }
}

@media (max-width: 899px) {
  .v2-sidebar { display: none !important; }

  /* Switch topbar from desktop to mobile layout at v2 breakpoint */
  .seb-topbar-right    { display: none !important; }
  .mobile-topbar-actions { display: flex !important; }
  .hamburger            { display: flex !important; }

  #v2-online-pill-mobile  { display: flex; }
  #v2-online-pill-desktop { display: none !important; }

  .main-content {
    margin-top: var(--v2-header-h) !important;
    margin-left: 0 !important;
    overflow-x: hidden;
  }

  /* Keep mobile bottom nav */
  .bottom-nav {
    display: flex;
    background: var(--v2-surface);
    border-top: 1px solid var(--v2-border);
    box-shadow: none;
  }

  .bottom-nav-item { color: var(--v2-text-3); }
  .bottom-nav-item.active { color: var(--v2-green); }

  .seb-navbar { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════════════════════ */
.page-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
}

@media (max-width: 899px) {
  .page-content {
    padding: 1.25rem 1rem;
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════════════ */
.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-text-1);
  line-height: 1.2;
}

.page-subtitle {
  font-size: .8rem;
  color: var(--v2-text-3);
  margin-top: .2rem;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════
   SECTION TITLE
   ═══════════════════════════════════════════════════════════ */
.section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--v2-text-3);
  margin-bottom: .65rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.section-title:first-child,
.section-title[style*="margin-top:0"] { margin-top: 0; }
.section-title i { font-size: 9px; }

/* ═══════════════════════════════════════════════════════════
   WELCOME BANNER  →  simple greeting row
   ═══════════════════════════════════════════════════════════ */
.welcome-banner {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1.5rem;
  color: var(--v2-text-1);
}

.welcome-banner h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-text-1);
}

.welcome-banner p {
  font-size: .82rem;
  color: var(--v2-text-2);
  margin-top: .2rem;
}

.welcome-banner a { color: var(--v2-green); }

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
}

@media (max-width: 899px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 1.25rem;
  }
}

.stat-card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--v2-shadow-xs);
  transition: border-color .12s, box-shadow .12s;
}

.stat-card:hover {
  border-color: var(--v2-border-strong);
  box-shadow: var(--v2-shadow-sm);
}

/* Icon: move beside number */
.stat-card .stat-icon {
  display: none; /* hide icon, let numbers speak */
}

.stat-card .stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--v2-text-3);
  margin-bottom: .4rem;
}

.stat-card .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--v2-text-1);
  line-height: 1;
}

.stat-card.primary .stat-value {
  color: var(--v2-green);
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD GRID
   ═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  column-gap: 1.75rem;
  row-gap: 0.5rem;
  align-items: start;
}

@media (max-width: 899px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-xs);
  overflow: visible;
}
.card .table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.card-hover:hover,
.card.card-hover:hover {
  border-color: var(--v2-border-strong);
  box-shadow: var(--v2-shadow-sm);
}

.card-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--v2-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--v2-text-1);
}

.card-body {
  padding: 1rem 1.1rem;
}

/* ═══════════════════════════════════════════════════════════
   EVENT CARDS
   ═══════════════════════════════════════════════════════════ */
.event-card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-xs);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}

.event-card:hover {
  border-color: var(--v2-border);
  box-shadow: var(--v2-shadow-xs);
  background: var(--v2-surface) !important;
}

/* Wipe the sport-colour background tint */
.event-card[style*="background"] {
  background: var(--v2-surface) !important;
}

.event-card.event-card-today {
  border-color: var(--v2-green);
  border-left-width: 3px;
}

/* Thinner stripe */
.event-stripe {
  width: 3px !important;
  border-radius: 0;
}

.event-card-body {
  padding: .8rem 1rem;
  overflow: hidden;
}

.event-actions {
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.event-date-box {
  background: var(--v2-bg);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  min-width: 42px;
}

.event-date-weekday {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--v2-text-3);
  line-height: 1;
  margin-bottom: .1rem;
}

.event-date-day {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--v2-text-1);
}

.event-date-month {
  font-size: .6rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--v2-text-3);
}

.event-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--v2-text-1);
  margin-bottom: .25rem;
}

.event-meta {
  font-size: .75rem;
  color: var(--v2-text-2);
  gap: .65rem;
}

.participants-bar {
  height: 2px;
  background: var(--v2-border);
  border-radius: 99px;
  margin-top: .5rem;
}

.participants-fill {
  background: var(--v2-green);
  border-radius: 99px;
}

/* ═══════════════════════════════════════════════════════════
   NEWS CARDS
   ═══════════════════════════════════════════════════════════ */
.news-card,
.card.card-hover {
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-xs);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  border-radius: var(--v2-radius-sm);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .9rem;
  transition: background .12s, border-color .12s, box-shadow .12s;
}

.btn-primary,
.btn-seb {
  background: var(--v2-green);
  border-color: var(--v2-green);
  color: #fff;
}
.btn-primary:hover,
.btn-seb:hover {
  background: var(--v2-green-dark);
  border-color: var(--v2-green-dark);
}

.btn-secondary {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border-strong);
  color: var(--v2-text-1);
}
.btn-secondary:hover {
  background: var(--v2-bg);
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--v2-text-2);
}
.btn-ghost:hover {
  background: var(--v2-bg);
  color: var(--v2-text-1);
}

.btn-sm {
  font-size: .75rem;
  padding: .3rem .7rem;
}
.btn-xs {
  font-size: .7rem;
  padding: .18rem .5rem;
}

.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 99px;
  padding: .18rem .55rem;
}

.badge-success  { background: var(--v2-green-bg); color: var(--v2-green); }
.badge-danger   { background: #fdeaea; color: #b91c1c; }
.badge-warning  { background: #fff8e6; color: #92600a; }
.badge-neutral  { background: var(--v2-bg); color: var(--v2-text-2); }
.badge-info     { background: #e0effa; color: #005a99; }

.countdown-badge {
  background: var(--v2-bg);
  color: var(--v2-text-2);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  padding: .1rem .45rem;
}
.countdown-badge.today,
.countdown-badge.soon {
  background: var(--v2-green-bg);
  color: var(--v2-green);
}

/* ═══════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════ */
.form-input,
.form-textarea,
.form-select {
  border-radius: var(--v2-radius-sm);
  border-color: var(--v2-border-strong);
  font-size: .85rem;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--v2-green);
  box-shadow: 0 0 0 3px rgba(0,123,64,.1);
  outline: none;
}

.form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--v2-text-2);
}

.form-hint {
  font-size: .72rem;
  color: var(--v2-text-3);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon .form-input {
  padding-right: 2.5rem;
  width: 100%;
}
.pw-toggle-btn {
  position: absolute;
  right: .65rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--v2-text-3);
  padding: 0;
  font-size: .85rem;
  line-height: 1;
  display: flex;
  align-items: center;
}
.pw-toggle-btn:hover { color: var(--v2-text-1); }

/* ═══════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════ */
.tabs {
  border-bottom: 1px solid var(--v2-border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  font-size: .78rem;
  font-weight: 600;
  padding: .6rem .75rem;
  color: var(--v2-text-2);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
}
.tab-btn.active {
  color: var(--v2-green);
  border-bottom-color: var(--v2-green);
}
.tab-btn:hover:not(.active) {
  color: var(--v2-text-1);
  background: var(--v2-bg);
}

/* ═══════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════ */
.table-container,
.table-wrap {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  overflow: hidden;
}

.data-table {
  font-size: .8rem;
}

.data-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--v2-text-3);
  background: var(--v2-bg);
  border-bottom: 1px solid var(--v2-border);
  padding: .65rem 1rem;
}

.data-table td {
  border-bottom: 1px solid var(--v2-border);
  padding: .6rem 1rem;
  color: var(--v2-text-1);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--v2-bg); }

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal {
  border-radius: var(--v2-radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.modal-header {
  border-bottom: 1px solid var(--v2-border);
  padding: 1rem 1.25rem;
}

.modal-header h3 {
  font-size: .95rem;
  font-weight: 700;
}

.modal-footer {
  border-top: 1px solid var(--v2-border);
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  color: var(--v2-text-3);
  background: var(--v2-bg);
  border: 1px dashed var(--v2-border-strong);
  border-radius: var(--v2-radius);
}

.empty-state i {
  color: var(--v2-text-3);
  opacity: .5;
}

/* ═══════════════════════════════════════════════════════════
   GRIDS
   ═══════════════════════════════════════════════════════════ */
.grid-3,
.grid-2 {
  gap: 10px;
}

/* Tournament card in grid */
.tournament-card {
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-xs);
}

/* ═══════════════════════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════════════════════ */
.calendar-grid {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  background: var(--v2-surface);
}

.calendar-day {
  font-size: .8rem;
  border-radius: var(--v2-radius-sm);
}

.calendar-day.today {
  background: var(--v2-green);
  color: #fff;
}

.calendar-day.has-event::after {
  background: var(--v2-green);
  width: 4px;
  height: 4px;
}
.calendar-day.avail-yellow::after { background: #f59e0b; }
.calendar-day.avail-red::after { background: #c62828; }
.calendar-day.avail-grey::after { background: var(--v2-text-3, #9ca3af); }

.calendar-day.selected {
  outline: 2px solid var(--v2-green);
}

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENTS & BANNERS
   ═══════════════════════════════════════════════════════════ */
.site-announcement {
  border-radius: var(--v2-radius-sm);
  font-size: .82rem;
  margin-bottom: 1rem;
}

.no-sports-banner {
  border-radius: var(--v2-radius-sm);
  font-size: .82rem;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION PANEL
   ═══════════════════════════════════════════════════════════ */
.notification-panel {
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow);
}

.notif-panel-header {
  border-bottom: 1px solid var(--v2-border);
  font-size: .82rem;
  font-weight: 700;
}

.notif-item {
  font-size: .8rem;
  border-bottom: 1px solid var(--v2-border);
}
.notif-item.unread { background: rgba(0,123,64,.07); }
.notif-content .notif-title { color: var(--v2-text-1); }
.notif-content .notif-desc  { color: var(--v2-text-2); }
.notif-content .notif-time  { color: var(--v2-text-3); }

.dark .notif-item.unread,
html.dark .notif-item.unread { background: rgba(0,168,85,.1); }
.dark .notif-content .notif-title,
html.dark .notif-content .notif-title { color: var(--v2-text-1); }
.dark .notif-content .notif-desc,
html.dark .notif-content .notif-desc  { color: var(--v2-text-2); }
.dark .notif-content .notif-time,
html.dark .notif-content .notif-time  { color: var(--v2-text-2); }

.notif-item:last-child { border-bottom: none; }

.notif-panel-footer {
  border-top: 1px solid var(--v2-border);
  padding: .4rem .5rem;
}

/* Idea FAB — desktop only: sidebar layout, no bottom nav */
@media (min-width: 900px) {
  .idea-fab {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   LEADERBOARD
   ═══════════════════════════════════════════════════════════ */
.leaderboard-row {
  font-size: .82rem;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR AVATAR (member chips, leaderboard etc)
   ═══════════════════════════════════════════════════════════ */
.sidebar-avatar {
  background: var(--v2-text-2);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  font-size: .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   PARTICIPANT CHIP
   ═══════════════════════════════════════════════════════════ */
.participant-chip {
  background: var(--v2-bg);
  border: 1px solid var(--v2-border);
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 500;
  padding: .15rem .55rem;
  color: var(--v2-text-1);
}

/* ═══════════════════════════════════════════════════════════
   FEED TICKER
   ═══════════════════════════════════════════════════════════ */
.feed-ticker-wrap {
  border-radius: 0 0 var(--v2-radius) var(--v2-radius);
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  border-radius: var(--v2-radius-sm);
  font-size: .82rem;
  box-shadow: var(--v2-shadow);
}

/* ═══════════════════════════════════════════════════════════
   BACK FAB
   ═══════════════════════════════════════════════════════════ */
.back-fab {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  color: var(--v2-text-1);
  box-shadow: var(--v2-shadow);
  border-radius: 50%;
}
.back-fab:hover {
  background: var(--v2-bg);
}

/* ═══════════════════════════════════════════════════════════
   UPDATE BANNER
   ═══════════════════════════════════════════════════════════ */
.update-banner {
  font-size: .82rem;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE — subtle tweaks only
   ═══════════════════════════════════════════════════════════ */
.auth-topbar {
  height: var(--v2-header-h);
}

.auth-card {
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
}

.auth-tab.active {
  color: var(--v2-green);
  border-bottom-color: var(--v2-green);
}

/* ═══════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════ */
#install-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--v2-radius, 12px);
  box-shadow: var(--v2-shadow, 0 8px 32px rgba(0,0,0,.15));
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 8000;
  white-space: nowrap;
}
@media (max-width: 480px) {
  #install-banner { bottom: 5rem; left: 1rem; right: 1rem; transform: none; white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════
   SESSION EXPIRED MODAL
   ═══════════════════════════════════════════════════════════ */
#session-expired-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}
.session-expired-box {
  background: var(--surface, #fff);
  border-radius: var(--v2-radius, 12px);
  box-shadow: var(--v2-shadow, 0 8px 32px rgba(0,0,0,.18));
  padding: 2.5rem 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
.session-expired-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.4rem;
  color: var(--v2-green, #007B40);
}
.session-expired-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-1, #111);
  margin-bottom: .5rem;
}
.session-expired-msg {
  font-size: .875rem;
  color: var(--text-2, #555);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* Hide side-info panel when there isn't room for it next to the card */
@media (max-width: 860px) {
  .auth-side-info { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PROFILE — stat cards row
   ═══════════════════════════════════════════════════════════ */
.profile-stats .stat-card {
  padding: .9rem 1rem;
}

/* ═══════════════════════════════════════════════════════════
   MISC OVERRIDES
   ═══════════════════════════════════════════════════════════ */
/* Remove blue top bar from v1 seb-navbar (already hidden but belt+braces) */
.seb-navbar { display: none !important; }

/* Hamburger: only on mobile */
@media (min-width: 900px) {
  .hamburger { display: none !important; }
}
.hamburger {
  color: var(--v2-text-1);
}

/* Drawer stays unchanged — it's the mobile fallback */

/* ═══════════════════════════════════════════════════════════
   PERFECTIONIST FIXES
   ═══════════════════════════════════════════════════════════ */

/* 1. Brand separator: keep the 1px vert bar between "SEB" and
      "Spordiklubi" — it matches the v1 header look the user wants. */

/* 2. Profile button was orange (#e8620a) in v1 — jarring on the
      white v2 header. Revert to neutral gray. */
#profile-btn,
#profile-btn-m {
  color: var(--v2-text-2);
}
#profile-btn:hover,
#profile-btn-m:hover {
  color: var(--v2-text-1);
  background: var(--v2-bg);
}

/* 3. Welcome banner: v1 layout is display:flex (row) which puts h2
      and p side-by-side. Switch to column so they stack properly.
      Also clear the min-height ghost and add a bottom separator. */
.welcome-banner {
  flex-direction: column;
  align-items: flex-start;
  min-height: auto;
  padding: 0 0 1.25rem 0;
  margin-bottom: 1.25rem;
  overflow: visible;
  border-bottom: 1px solid var(--v2-border);
}

/* Online counter moved to topbar — hide it from the welcome banner */
.welcome-banner > div:not(.dash-countdown-pill):not(.welcome-date) {
  display: none !important;
}
.welcome-banner .dash-countdown-pill {
  display: inline-flex !important;
  background: var(--v2-surface) !important;
  border-color: var(--v2-border) !important;
  color: var(--v2-text-1);
}
.welcome-banner .dash-countdown-pill i,
.welcome-banner .dash-countdown-pill span[style*="opacity"] {
  color: var(--v2-text-3) !important;
  opacity: 1 !important;
}

/* 4. Profile header gradient is completely off-brand for v2.
      Replace with clean white surface card. */
.profile-header {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-xs);
  color: var(--v2-text-1);
}
.profile-header h2 { color: var(--v2-text-1); }
.profile-header p  { color: var(--v2-text-2); opacity: 1; }
.profile-avatar-lg {
  background: var(--v2-green-bg);
  color: var(--v2-green);
  border-color: var(--v2-border);
}
.sport-tag {
  background: var(--v2-bg);
  color: var(--v2-text-2);
}

/* 5. Tournament card/hero colorful gradient banners are inconsistent
      with the minimal design. Flatten to neutral. */
.tournament-card-banner,
.tournament-hero-banner {
  background: var(--v2-bg) !important;
  border-bottom: 1px solid var(--v2-border);
}
.tournament-card-banner::after,
.tournament-hero-banner::after {
  display: none;
}

/* 6. Remove hover lift transforms — flat design signals hover via
      border/shadow only, not physical lift. */
.event-card:hover,
.card.card-hover:hover,
.card-hover:hover,
.tournament-card:hover,
.news-card:hover,
.equipment-card:hover,
.sport-type-card:hover,
.sport-select-card:hover {
  transform: none !important;
}

/* 7. Notification panel: v1 anchors at topbar+navbar=108px.
      Override unconditionally for the 56px v2 header. */
.notification-panel {
  top: calc(var(--v2-header-h) + .5rem);
}

/* 8. Mobile page-content: add safe-area-inset-bottom so content
      is never hidden behind the iPhone home indicator. */
@media (max-width: 899px) {
  .page-content {
    padding-bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 0px) + 1rem);
  }
}

/* 9. Member card hover: v1 reveals a top border on hover.
      Remove the dated animation. */
.member-card:hover {
  border-top: none;
}
.member-card {
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-xs);
  border-radius: var(--v2-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 480px) {
  .member-card { padding: .75rem .5rem; }
  .member-avatar { width: 42px; height: 42px; font-size: 1rem; }
}

/* 10. App footer: v1 has 5rem bottom padding designed for the
       mobile bottom-nav. On v2 desktop (sidebar) that's dead space. */
@media (min-width: 900px) {
  .app-footer {
    padding-bottom: 1.5rem;
  }
}

/* 11. Surface-2 token: v1 value is #F7F9FB. Set explicitly so
       card-footer, modal-footer etc. get a clean near-white. */
:root { --surface-2: #fafbfc; }

/* 12. Stat card: reset border-left from the v1 .primary variant. */
.stat-card { border-left-width: 1px; }

/* 13. Detail hero: ensure v2 green accent and consistent radius. */
.detail-hero {
  border-left-color: var(--v2-green);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow-xs);
}

/* 14. Calendar today cell: ensure white text on filled circle. */
.calendar-day.today { color: #fff; }

/* 15. Avatars: v1 uses navy. Switch to green-bg for v2 coherence. */
.member-avatar,
.news-author-avatar,
.comment-avatar,
.round-num {
  background: var(--v2-green-bg);
  color: var(--v2-green);
  line-height: 1;
}

/* 16. Filter chips: pill shape for v2. */
.filter-chip {
  border-radius: 999px;
  font-size: .77rem;
}

/* 17. Drawer active item: ensure darker green matches v2. */
.drawer-item.active {
  background: var(--v2-green);
}

@media (max-width: 767px) {
  .desktop-only { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   TOURNAMENT ROW (dashboard — full-width card, banner on top)
   ═══════════════════════════════════════════════════════════ */
.tourn-row {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  margin-bottom: .75rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.tourn-row:hover {
  box-shadow: var(--v2-shadow);
  transform: translateY(-1px);
}
.tourn-row-banner {
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}
.tourn-row-body {
  padding: .5rem .75rem;
}

/* Tournament discipline rows: fix mobile overflow clipping.
   disc-when uses white-space:nowrap which causes long date+location text to
   escape the tournament-hero card boundary (overflow:hidden clips it). */
.disc-when {
  white-space: normal;
  word-break: break-word;
}
.disc-row {
  overflow-wrap: break-word;
  word-break: break-word;
}
.disc-row .participant-chip {
  max-width: 100%;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════ */
.dark,
html.dark {
  --v2-bg:            #111318;
  --v2-surface:       #1c1f2a;
  --v2-border:        #2c2f3e;
  --v2-border-strong: #3d4155;
  --v2-text-1:        #e8eaf0;
  --v2-text-2:        #9ba3b5;
  --v2-text-3:        #5a6075;
  --v2-green:         #00a855;
  --v2-green-dark:    #007B40;
  --v2-green-bg:      #0d2318;
  --v2-shadow-xs:     0 1px 2px rgba(0,0,0,.3);
  --v2-shadow-sm:     0 1px 4px rgba(0,0,0,.4);
  --v2-shadow:        0 2px 8px rgba(0,0,0,.5);
  --surface-2:        #191c24;
  --bg-2:             #191c24;
  /* Also override v1 tokens so auth-overlay and body bg are dark before JS runs */
  --bg:               #111318;
  --surface:          #1c1f2a;
  --border:           #2c2f3e;
  --border-strong:    #3d4155;
  --text-1:           #e8eaf0;
  --text-2:           #9ba3b5;
  --text-3:           #5a6075;
  color-scheme: dark;
}

/* Hardcoded color fixes in dark mode */
.dark .seb-logo-text,
html.dark .seb-logo-text { color: #e8eaf0; }
.dark .pyr-card.pyr-top,
html.dark .pyr-card.pyr-top { background: rgba(230,81,0,.18); color: var(--text-1); }
.dark .pyr-card.pyr-me,
html.dark .pyr-card.pyr-me { background: rgba(26,135,64,.18); color: var(--text-1); }
.dark .form-input,
.dark .form-select,
.dark .form-textarea,
html.dark .form-input,
html.dark .form-select,
html.dark .form-textarea { background: var(--v2-bg); color: var(--v2-text-1); border-color: var(--v2-border); }
.dark .form-input::placeholder,
.dark .form-textarea::placeholder,
html.dark .form-input::placeholder,
html.dark .form-textarea::placeholder { color: var(--v2-text-3); }
.dark .modal-bg,
html.dark .modal-bg { background: rgba(0,0,0,.75); }
.dark .modal,
html.dark .modal { background: var(--v2-surface); }
.dark .data-table tr:nth-child(even),
html.dark .data-table tr:nth-child(even) { background: rgba(255,255,255,.03); }
.dark .data-table tr:hover,
html.dark .data-table tr:hover { background: rgba(255,255,255,.05); }
.dark .card,
html.dark .card { background: var(--v2-surface); }
.dark .dropdown, .dark .dropdown-menu,
html.dark .dropdown, html.dark .dropdown-menu { background: var(--v2-surface); border-color: var(--v2-border); }
.dark .auth-card,
html.dark .auth-card { background: var(--v2-surface); }

/* Earned achievements — keep text readable on dark bg */
.dark .achievement.earned,
html.dark .achievement.earned {
  background: rgba(212,134,10,.15);
  border-color: #d4860a;
  color: #fcd34d;
}
.dark .achievement.earned .achievement-name,
html.dark .achievement.earned .achievement-name { color: #fde68a; }
.dark .achievement.earned .achievement-date,
html.dark .achievement.earned .achievement-date { color: #a3a3a3; }

/* Participant chips in dark mode: lift above card surface so they read as chips */
html.dark .participant-chip {
  background: var(--v2-border);
  border-color: var(--v2-border-strong);
  color: var(--v2-text-1);
}

/* seb-navy links — invisible on dark bg, lighten to a readable blue */
.dark a[style*="seb-navy"],
html.dark a[style*="seb-navy"] { color: #7eb3ff !important; }

/* Dark mode toggle button */
#theme-toggle-btn, #theme-toggle-btn-m {
  transition: color .2s;
}

/* Code editor preview pane in dark mode */
.dark .ce-preview,
html.dark .ce-preview {
  background: var(--v2-surface);
  color: var(--v2-text-1);
  border-color: var(--v2-border);
}

/* HTML content editor + email preview in dark mode */
.dark .html-editor-content,
html.dark .html-editor-content {
  background: var(--v2-surface);
  color: var(--v2-text-1);
}
.dark .html-editor-content:focus,
html.dark .html-editor-content:focus {
  background: var(--v2-bg);
  color: var(--v2-text-1);
}
.dark .html-editor-content::selection,
html.dark .html-editor-content::selection,
.dark .html-editor-content *::selection,
html.dark .html-editor-content *::selection {
  background: rgba(0, 168, 85, 0.35);
  color: var(--v2-text-1);
}
/* Content block preview pane in dark mode */
.dark .html-preview,
html.dark .html-preview {
  background: var(--v2-surface);
  color: var(--v2-text-1);
}

/* ── Rich text editor ───────────────────────────────────── */
.rte-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.rte-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: .3rem .4rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.rte-btn:hover { background: var(--border); color: var(--text-1); }
.rte-btn.active { background: var(--primary-light); color: var(--primary); }
.rte-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.rte-body {
  min-height: 90px;
  max-height: 240px;
  overflow-y: auto;
  padding: .5rem .65rem;
  font-size: .875rem;
  line-height: 1.6;
  outline: none;
  color: var(--text-1);
}
.rte-body:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  pointer-events: none;
}
.rte-body ul { list-style: disc; padding-left: 1.4rem; margin: .25rem 0; }
.rte-body ol { list-style: decimal; padding-left: 1.4rem; margin: .25rem 0; }
.rte-body b, .rte-body strong { font-weight: 700; }

/* ── Activities add dropdown ─────────────────────────────── */
.act-add-wrap {
  position: relative;
}
.act-add-summary {
  list-style: none;
  user-select: none;
}
.act-add-summary::-webkit-details-marker { display: none; }
.act-add-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 210px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.act-add-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  background: none;
  border: none;
  font-size: .875rem;
  color: var(--text-1);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition);
}
.act-add-item:hover { background: var(--surface-2); }
.act-add-item i { width: 16px; color: var(--text-3); }

/* ── Pyramid Challenge ───────────────────────────────────── */
.pyr-card {
  width: 90px;
  min-height: 62px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  text-align: center;
  padding: .3rem .25rem;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.3;
}
.pyr-card.pyr-empty {
  border-style: dashed;
  color: var(--text-3);
  background: var(--surface-2);
}
.pyr-card.pyr-top {
  border-color: #E65100;
  border-width: 2px;
  background: #FFF3E0;
  box-shadow: 0 0 0 3px rgba(230,81,0,.18);
}
.pyr-card.pyr-me {
  border-color: var(--success);
  background: var(--success-light);
}
.pyr-card:not(.pyr-target) {
  cursor: default;
}
.pyr-card.pyr-target {
  border-color: var(--warning);
  border-width: 2px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.pyr-card.pyr-target:hover {
  border-color: #d97706;
  border-width: 2px;
  background: rgba(245,158,11,.1);
  box-shadow: 0 0 0 3px rgba(245,158,11,.3);
}
.pyr-card.pyr-target:active {
  background: rgba(245,158,11,.18);
  box-shadow: 0 0 0 3px rgba(245,158,11,.45);
}
.pyr-card.pyr-cooldown {
  border-color: var(--text-3);
  opacity: .6;
}
.pyr-card .pyr-name {
  font-weight: 600;
  font-size: .72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 82px;
}
.pyr-card .pyr-record {
  font-size: .65rem;
  color: var(--text-3);
  margin-top: .1rem;
}
.pyr-card .pyr-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: .75rem;
  line-height: 1;
}
.pyr-card .pyr-vs {
  font-size: .58rem;
  font-weight: 600;
  margin-top: .2rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 82px;
}
.pyr-vs-atk { color: #b45309; }
.pyr-vs-def { color: #1d4ed8; }
.pyr-badge-fire { font-size: .65rem; line-height: 1.2; }
.pyr-card .pyr-cooldown-days {
  font-size: .6rem;
  color: var(--text-3);
  margin-top: .05rem;
  line-height: 1;
}
@keyframes pyrGlowUp   { from{box-shadow:0 0 0 3px var(--success,#16a34a)} to{box-shadow:0 0 0 3px transparent} }
@keyframes pyrGlowDown { from{box-shadow:0 0 0 3px var(--danger,#dc2626)}  to{box-shadow:0 0 0 3px transparent} }
@keyframes pyrGlowPlay { from{box-shadow:0 0 0 3px #d97706}                to{box-shadow:0 0 0 3px transparent} }
.pyr-card.pyr-moved-up   { animation: pyrGlowUp   5s ease-out forwards; }
.pyr-card.pyr-moved-down { animation: pyrGlowDown 5s ease-out forwards; }
.pyr-card.pyr-played     { animation: pyrGlowPlay 5s ease-out forwards; }
.pyr-crown {
  font-size: .9rem;
  line-height: 1;
  margin-bottom: .1rem;
}
.pyr-grid-wrap {
  overflow-x: auto;
  padding: .5rem .25rem .5rem;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}
.pyr-grid-inner {
  display: inline-block;
  text-align: left;
  min-width: 100%;
}
.pyr-row {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-bottom: .4rem;
  padding: 6px 6px 0;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .pyr-card {
    width: 72px;
    min-height: 54px;
    font-size: .66rem;
  }
  .pyr-card .pyr-name { max-width: 66px; font-size: .66rem; }
  .pyr-card .pyr-record { font-size: .6rem; }
}
.pyr-status-active   { color: var(--success); }
.pyr-status-frozen   { color: var(--text-3); }
.pyr-status-finished { color: var(--info); }
.pyr-challenge-card {
  border-left: 3px solid var(--warning);
  padding: .7rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  font-size: .875rem;
}
