/* =====================================================================
   POLAIR | Pole & Aerial Competition System
   Shared stylesheet - minden oldal ezt linkeli (polair_head() helper)
   ===================================================================== */

/* ---------- 1. Változók (LUXURY GOLD-BLACK fallback — theme.php felülírja) ---------- */
:root {
  --bg:      #000000;
  --bg2:     #0a0a0a;
  --bg3:     #1a1a1a;
  --bg4:     #262626;
  --accent:  #D4AF37;            /* gold primary */
  --accent2: #FFD96B;            /* gold-light (gradient end) */
  --accent-deep: #B8862E;        /* gold-deep (hover/active) */
  --accent-soft: rgba(212,175,55,0.10);   /* gold-soft (subtle bg) */
  --accent-soft-strong: rgba(212,175,55,0.18);
  --text:    #F5E9C8;            /* warm cream */
  --muted:   #8A8A8A;
  --border:  #2A261A;            /* warm gold-tinted dark */
  --green:   #22c55e;
  --red:     #ef4444;
  --gold:    #FFD700;            /* medal gold */
  --silver:  #D9D9D9;
  --bronze:  #CD7F32;
  --blue:    #4FB3FF;
  --orange:  #FF8C00;

  /* Subtle accents — keep purple/pink only for athlete portal decorative use */
  --accent-purple: #6C5CE7;
  --accent-pink:   #FF5EC8;

  --brand-grad:         linear-gradient(135deg, #D4AF37, #FFD96B);
  --brand-grad-reverse: linear-gradient(135deg, #FFD96B, #D4AF37);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.4);

  --r-btn: 8px;
  --r-card: 12px;
  --r-badge: 6px;
  --r-input: 8px;

  --sidebar-w: 240px;

  /* Transition tokens (C5) */
  --t-fast: 120ms ease-out;
  --t-med:  180ms ease-out;
  --t-slow: 260ms ease-out;

  /* Focus ring (C4) */
  --focus-ring: 0 0 0 4px rgba(212,175,55,0.25);
}

/* ---------- 2. Reset & alapok ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }

p { margin: 0 0 0.75rem; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent2); }

hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

small, .text-sm { font-size: 0.88rem; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; letter-spacing: 1.5px; }
.text-brand {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gold   { color: var(--gold); }
.text-silver { color: var(--silver); }
.text-bronze { color: var(--bronze); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-purple { color: var(--accent); }

.mono { font-family: 'Inter', sans-serif; letter-spacing: 1px; }

/* ---------- 3. Brand fejléc (logo + szöveg) ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 1px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.brand-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.25rem;
}

/* ---------- 4. App shell (sidebar + main) ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.app-main {
  padding: 1.5rem 2rem;
  min-width: 0;
}

/* ---------- 5. Sidebar ---------- */
.sidebar {
  background: var(--bg2);
  border-right: 2px solid var(--accent);
  padding: 1.5rem 0 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-head {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}
.sidebar-section {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent2);
  padding: 0.85rem 1.25rem 0.3rem;
  font-weight: 700;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 0.3rem;
}
.sidebar-section:first-child { border-top: none; margin-top: 0; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.25rem;
  color: #c9cbd4;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.sidebar-item:hover {
  background: rgba(212,175,55,0.10);
  color: #fff;
}
.sidebar-item.active {
  background: rgba(212,175,55,0.14);
  color: #fff;
  border-left: 3px solid;
  border-image: var(--brand-grad) 1;
}
.sidebar-item .icon, .sidebar-item svg.icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.sidebar-item.active { color: var(--accent); }
.sidebar-item.active .icon { stroke: var(--accent); }
.sidebar-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- 6. Topbar (oldalon belüli fejléc) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; }
.topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- 7. Kártyák ---------- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.card.card-accent { border-top: 3px solid var(--accent); }
.card.card-pink   { border-top: 3px solid var(--accent2); }
.card.card-green  { border-top: 3px solid var(--green); }
.card.card-red    { border-top: 3px solid var(--red); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}
.card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}
.card-body { padding: 1.25rem 1.5rem; }
.card-body.p-tight { padding: 0.75rem 1rem; }
.card-foot {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

/* ---------- 8. Gombok ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-btn);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:not(:disabled):hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-primary    { background: var(--brand-grad); color: #fff; }
.btn-success    { background: var(--green); color: #000; }
.btn-danger     { background: var(--red); color: #fff; }
.btn-warning    { background: var(--orange); color: #000; }
.btn-secondary  { background: transparent; border: 1px solid var(--border); color: #9ca3af; }
.btn-secondary:not(:disabled):hover { color: var(--text); border-color: var(--accent); }
.btn-live       { background: var(--brand-grad-reverse); color: #fff; }
.btn-ghost      { background: transparent; color: #9ca3af; }
.btn-ghost:not(:disabled):hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-sm   { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-lg   { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-xl   { padding: 1.1rem 2rem; font-size: 1.2rem; min-height: 60px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; aspect-ratio: 1; }

.btn-group { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }

/* ---------- 9. Táblázatok ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  background: var(--bg2);
}
table.tbl thead { background: var(--bg3); }
table.tbl th {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.tbl td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background 0.15s ease; }
table.tbl tbody tr:hover { background: rgba(212,175,55,0.05); }
table.tbl.tbl-compact th, table.tbl.tbl-compact td { padding: 0.5rem 0.75rem; }

.table-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* ---------- 10. Badge-k ---------- */
.badge {
  display: inline-block;
  border-radius: var(--r-badge);
  padding: 0.25rem 0.65rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-green  { background: rgba(34,197,94,0.10);  color: #86efac; border-color: rgba(34,197,94,0.30); }
.badge-yellow { background: rgba(245,158,11,0.10); color: #fcd34d; border-color: rgba(245,158,11,0.30); }
.badge-red    { background: rgba(239,68,68,0.10);  color: #fca5a5; border-color: rgba(239,68,68,0.30); }
.badge-blue   { background: rgba(59,130,246,0.10); color: #93c5fd; border-color: rgba(59,130,246,0.30); }
.badge-gray   { background: rgba(255,255,255,0.05); color: #9ca3af; border-color: var(--border); }
.badge-purple { background: rgba(212,175,55,0.18); color: #FFD96B; border-color: rgba(212,175,55,0.32); }
.badge-pink   { background: rgba(255,217,107,0.14); color: #FFD96B; border-color: rgba(255,217,107,0.32); }
.badge-gold   { background: rgba(245,200,66,0.12); color: #fde68a; border-color: rgba(245,200,66,0.30); }

.badge-reserve {
  background: rgba(245,158,11,0.15);
  color: #fcd34d;
  border-color: rgba(245,158,11,0.4);
}

/* ---------- 11. Form ---------- */
.form-row { margin-bottom: 1rem; }
.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) {
  .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
}

label, .form-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}
label.required::after { content: ' *'; color: var(--accent2); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="number"],
input[type="url"], input[type="tel"], input[type="file"],
select, textarea {
  display: block;
  width: 100%;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}
textarea { min-height: 5rem; resize: vertical; font-family: 'Inter', sans-serif; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 50%, calc(100% - 0.7rem) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin-bottom: 0;
}

.form-help {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-family: 'Inter', sans-serif;
}
.form-error {
  font-size: 0.78rem;
  color: #fca5a5;
  margin-top: 0.35rem;
}

/* File drop zone */
.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--r-card);
  background: rgba(20,21,37,0.5);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.file-drop:hover, .file-drop.dragging {
  border-color: var(--accent);
  background: rgba(212,175,55,0.07);
}
.file-drop input[type="file"] { display: none; }
.file-drop .file-icon { font-size: 1.5rem; color: var(--accent); }
.file-drop .file-hint { color: var(--muted); font-size: 0.85rem; }

/* ---------- 12. Stat blokkok ---------- */
.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1.25rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad);
  opacity: 0.35;
}
.stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
  font-weight: 600;
}

/* ---------- 13. Status pill (bíró) ---------- */
.spill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.s-waiting  { background: rgba(75,85,99,0.15);  color: #9ca3af; }
.s-active   { background: rgba(239,68,68,0.12); color: #fca5a5; }
.s-saved    { background: rgba(34,197,94,0.12); color: #86efac; }
.s-approved { background: rgba(212,175,55,0.18);color: #FFD96B; }
.s-locked   { background: rgba(212,175,55,0.28);color: #FFE99B; }

/* ---------- 14. Judge score input ---------- */
.score-input {
  font-family: 'Inter', sans-serif !important;
  font-size: 3.5rem !important;
  letter-spacing: 3px;
  text-align: center;
  border: 2px solid var(--border) !important;
  padding: 0.5rem 1rem !important;
  background: var(--bg3);
  color: var(--text);
  border-radius: var(--r-card);
}
.score-input:focus { border-color: var(--accent) !important; }
.score-input.locked { opacity: 0.55; pointer-events: none; }

/* ---------- 15. Live kivetítő ---------- */
.live-screen {
  background:
    radial-gradient(circle at 15% 30%, rgba(212,175,55,0.20), transparent 55%),
    radial-gradient(circle at 85% 70%, rgba(255,217,107,0.16), transparent 55%),
    var(--bg);
  min-height: 100vh;
  color: var(--text);
  padding: 4vh 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.live-name {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3rem, 9vw, 12rem);
  letter-spacing: 4px;
  line-height: 0.95;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.live-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9rem, 1.6vw, 1.6rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
}
.live-score {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 18rem);
  color: var(--accent);
  line-height: 1;
}
.live-rank {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 18vw, 22rem);
  line-height: 1;
}
.live-rank.gold   { color: var(--gold); }
.live-rank.silver { color: var(--silver); }
.live-rank.bronze { color: var(--bronze); }
.live-msg {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 5rem);
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.2;
}

/* ---------- 16. Check-in (tablet) ---------- */
.checkin-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  margin-bottom: 0.65rem;
  transition: all 0.2s ease;
}
.checkin-row.is-in     { border-left: 4px solid var(--green); }
.checkin-row.is-out    { border-left: 4px solid var(--red);   opacity: 0.65; }
.checkin-row.is-wait   { border-left: 4px solid var(--muted); }
.checkin-row .ci-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.checkin-row .ci-main { flex: 1; min-width: 0; }
.checkin-row .ci-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.checkin-row .ci-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.checkin-search {
  font-size: 1.1rem !important;
  padding: 1rem 1.25rem !important;
}
.checkin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.checkin-tab {
  flex: 1;
  padding: 0.85rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  text-align: center;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.2s ease;
  color: var(--muted);
}
.checkin-tab.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
}

/* ---------- 17. Entry wizard ---------- */
.wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.wizard-step {
  flex: 1;
  padding: 0.6rem 0.5rem;
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.wizard-step.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
}
.wizard-step.done { color: var(--green); border-color: rgba(34,197,94,0.3); }

.progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--brand-grad);
  border-radius: 100px;
  transition: width 0.4s ease;
}

/* ---------- 18. Flash üzenetek ---------- */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--r-card);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border: 1px solid;
}
.flash.flash-success { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.35); color: #86efac; }
.flash.flash-error   { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.35); color: #fca5a5; }
.flash.flash-info    { background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.35); color: #93c5fd; }
.flash.flash-warning { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.35); color: #fcd34d; }

/* ---------- 19. Modal ---------- */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(7,5,15,0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-back.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-card);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--card-shadow);
}
.modal-head, .modal-foot { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-foot { border-bottom: none; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; justify-content: flex-end; }
.modal-body { padding: 1.25rem 1.5rem; }
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* ---------- 20. Login layout ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 15% 30%, rgba(212,175,55,0.20), transparent 55%),
    radial-gradient(circle at 85% 70%, rgba(255,217,107,0.16), transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-card);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--card-shadow);
}
.login-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ---------- 21. Avatar ---------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: inline-block;
  vertical-align: middle;
}
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.xl { width: 96px; height: 96px; }
.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  border: 1px solid var(--border);
  width: 40px; height: 40px;
  border-radius: 50%;
}

/* ---------- 22. Zászló ---------- */
.flag {
  display: inline-block;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

/* ---------- 23. Bíró pontszám sor (HJ view) ---------- */
.judge-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.judge-tile {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 1rem;
}
.judge-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.judge-tile-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.judge-tile-role {
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.judge-tile-score {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-align: center;
}
.judge-tile.locked { border-color: rgba(212,175,55,0.38); }

/* ---------- 24. Utility ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.mt-0 { margin-top: 0; }       .mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }    .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }    .mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 1rem 0; }
.tag-soft {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ---------- 25. Scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- 26. Mobil — sidebar + backdrop ---------- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 89;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.sidebar-backdrop.open { opacity: 1; }
.sidebar-close {
  display: none;
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.sidebar-close:hover { color: var(--text); background: rgba(255,255,255,.06); }
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--r-btn);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  margin-bottom: 1rem;
}
.sidebar-toggle .hamburger-icon { font-size: 1.2rem; }
.sidebar-toggle:hover { border-color: var(--accent); }

/* Mobil breakpointok */
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(85vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 90;
    box-shadow: var(--card-shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .sidebar-close { display: inline-flex; }
  .sidebar-toggle { display: inline-flex; }

  body.sidebar-open { overflow: hidden; }

  .app-main { padding: 0.85rem; }
  .topbar { margin-bottom: 1rem; gap: 0.5rem; }
  .topbar h1 { font-size: 1.4rem; line-height: 1.2; }

  /* Kártyák kisebbé teszik a paddingot */
  .card { margin-bottom: 0.85rem; border-radius: 12px; }
  .card-header, .card-head { padding: 0.85rem 1rem; }
  .card-body { padding: 0.85rem 1rem; }
  .card-body.p-tight { padding: 0.5rem 0.6rem; }

  /* Stat kártyák ─ 2 oszlopos mobilra */
  .grid-2 { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
  .stat { padding: 0.75rem; }
  .stat-value { font-size: 1.4rem; }

  /* Táblázatok ─ smaller text + better wrapping */
  table.tbl th, table.tbl td { padding: 0.5rem 0.6rem; font-size: 0.85rem; }
  table.tbl.tbl-compact th, table.tbl.tbl-compact td { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
  .table-wrap { border-radius: 10px; -webkit-overflow-scrolling: touch; }
  /* Scroll indicator */
  .table-wrap::after {
    content: '';
    position: sticky;
    right: 0; top: 0; bottom: 0;
    width: 12px;
    background: linear-gradient(to left, rgba(0,0,0,0.25), transparent);
    pointer-events: none;
  }

  /* A2 audit — biztonsági háló: a .table-wrap nélkül maradt táblák (pl. transfer-kérelmek,
     meghívottak, fee-tier) se feszítsék szét az oldalt — vízszintesen görgethetők legyenek.
     A .table-wrap-be csomagolt táblákat NEM érinti (ott a div az ős, nem a táblázat). */
  .card-body > table.tbl,
  details > table.tbl {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Gombok ─ touch-friendly minimum */
  .btn { min-height: 38px; padding: 0.55rem 0.95rem; }
  .btn-sm { min-height: 32px; padding: 0.35rem 0.7rem; font-size: 0.78rem; }
  .btn-lg, .btn-xl { min-height: 52px; }
  .topbar-actions .btn { font-size: 0.82rem; }

  /* Formulák */
  .form-row { margin-bottom: 0.75rem; }
  input[type="text"], input[type="email"], input[type="password"],
  input[type="search"], input[type="date"], input[type="datetime-local"],
  input[type="time"], input[type="number"], input[type="url"], input[type="tel"],
  select, textarea {
    font-size: 16px; /* prevent iOS zoom-on-focus */
    padding: 0.65rem 0.85rem;
    min-height: 44px;
  }

  /* Modal full-screen */
  .modal-back { padding: 0; align-items: stretch; }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  .modal-body { flex: 1; overflow-y: auto; padding: 1rem; }
  .modal-head, .modal-foot { padding: 0.85rem 1rem; }
  .modal-foot { gap: 0.5rem; }
  .modal-foot .btn { flex: 1; }

  /* Login page mobile */
  .login-card { padding: 1.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .app-main { padding: 0.6rem; }
  .topbar h1 { font-size: 1.2rem; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.7rem; }
  table.tbl th, table.tbl td { padding: 0.45rem 0.5rem; font-size: 0.78rem; }

  /* Form grids minden cols → 1 oszlop */
  .form-grid { grid-template-columns: 1fr !important; }

  /* Card header buttons drop below */
  .card-header { flex-direction: column; align-items: flex-start; }
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-actions { width: 100%; }
  .topbar-actions .btn { flex: 1; }
}

/* Touch eszközök ─ növelt tap targetek független a méretről */
@media (pointer: coarse) {
  .btn-sm { min-height: 36px; }
  .sidebar-item { padding: 0.85rem 1.25rem; }
  table.tbl tbody tr td:last-child .btn { min-width: 36px; }
}

@media (min-width: 921px) {
  .sidebar-toggle { display: none; }
  .sidebar-backdrop { display: none !important; }
  .sidebar-close { display: none; }
}

/* ---------- 27. Animációk ---------- */
@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(212,175,55,0); }
}
.pulse { animation: pulse-purple 1.8s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- 28. Print (eredmények nyomtatása) ---------- */
@media print {
  .sidebar, .topbar-actions, .btn { display: none !important; }
  body, html { background: #fff; color: #000; }
  .card, .stat, table.tbl { background: #fff; border-color: #ddd; box-shadow: none; }
  table.tbl th, table.tbl td { color: #000; border-color: #ddd; }
  .text-brand { -webkit-text-fill-color: initial; background: none; color: var(--accent); }
  .polair-loader { display: none !important; }
}

/* ---------- 29. Global loading overlay ---------- */
.polair-loader {
  position: fixed;
  inset: 0;
  background: rgba(7, 5, 15, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.polair-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.polair-loader-box {
  background: rgba(20, 16, 36, 0.92);
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  min-width: 200px;
}
.polair-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  animation: polair-spin 0.8s linear infinite;
}
.polair-loader-text {
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
@keyframes polair-spin {
  to { transform: rotate(360deg); }
}

/* Disabled / loading state for submit buttons */
.btn.is-loading,
button.is-loading,
input[type=submit].is-loading {
  opacity: 0.7;
  cursor: progress;
  position: relative;
}
.btn.is-loading::after,
button.is-loading::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.5em;
  vertical-align: -0.15em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: polair-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .polair-spinner,
  .btn.is-loading::after,
  button.is-loading::after { animation-duration: 2s; }
  .polair-loader { transition: none; }
}

/* ---------- D1.6: Light mode finomítások ---------- */
/* A theme.php CSS változókat felülírja a html[data-theme="light"] selector,
   de néhány hardcoded sötét-feltételezést itt korrigálunk. */

html[data-theme="light"] {
  /* Globális háttér-radiális (sötét helyett enyhe arany-tint) */
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(212,175,55,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(255,217,107,0.04) 0%, transparent 50%);
}
/* Loader backdrop világosabban */
html[data-theme="light"] .polair-loader { background: rgba(245, 245, 245, 0.85); }
html[data-theme="light"] .polair-loader-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.40);
  color: #1a1a1a;
}
html[data-theme="light"] .polair-loader-text { color: rgba(0, 0, 0, 0.85); }
html[data-theme="light"] .polair-spinner { border-color: rgba(0, 0, 0, 0.12); }
/* Badge color tweaks light mode-ban */
html[data-theme="light"] .badge-purple { background: rgba(212, 175, 55, 0.20); color: #806000; border: 1px solid rgba(212, 175, 55, 0.50); }
html[data-theme="light"] .badge-pink   { background: rgba(212, 175, 55, 0.15); color: #806000; border: 1px solid rgba(212, 175, 55, 0.40); }
html[data-theme="light"] .badge-blue   { background: rgba(59, 130, 246, 0.12); color: #1e40af; border: 1px solid rgba(59, 130, 246, 0.30); }
html[data-theme="light"] .badge-green  { background: rgba(34, 197, 94, 0.15);  color: #166534; border: 1px solid rgba(34, 197, 94, 0.30); }
html[data-theme="light"] .badge-red    { background: rgba(239, 68, 68, 0.12);  color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.30); }
html[data-theme="light"] .badge-orange { background: rgba(255, 140, 0, 0.15);  color: #9a3412; border: 1px solid rgba(255, 140, 0, 0.30); }
html[data-theme="light"] .badge-yellow { background: rgba(245, 200, 66, 0.18); color: #713f12; border: 1px solid rgba(245, 200, 66, 0.40); }
html[data-theme="light"] .badge-gray   { background: rgba(100, 116, 139, 0.12); color: #334155; border: 1px solid rgba(100, 116, 139, 0.30); }
/* Status badge színek a light mode-ban kontrasztosabbak */
html[data-theme="light"] .text-muted { color: var(--muted) !important; }
/* Card shadow finomítás */
html[data-theme="light"] .card,
html[data-theme="light"] .card-accent,
html[data-theme="light"] .card-pink { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
html[data-theme="light"] .topbar { background: var(--bg2); border-bottom: 1px solid var(--border); }
html[data-theme="light"] table.tbl { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); }
/* Inputok és select-ek világos mode-ban világosabb háttér */
html[data-theme="light"] input[type=text],
html[data-theme="light"] input[type=email],
html[data-theme="light"] input[type=password],
html[data-theme="light"] input[type=number],
html[data-theme="light"] input[type=date],
html[data-theme="light"] input[type=datetime-local],
html[data-theme="light"] input[type=tel],
html[data-theme="light"] input[type=search],
html[data-theme="light"] input[type=url],
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: #fff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  border-color: var(--accent) !important;
  outline-color: var(--accent);
}

/* =====================================================================
   C4 — ACCESSIBILITY (2026-05-31)
   ===================================================================== */

/* Keyboard-only focus ring — csak tab-bal aktiválódik, click-kel nem */
.btn:focus-visible,
.form-control:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.chosen-item:focus-visible,
.sidebar-item:focus-visible,
.el-card:focus-visible,
.judge-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

/* Removing default outline only when focus-visible is active (mouse click) */
.btn:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Icon-only buttons — minimális méret a tap target-hez (44x44px guidance) */
.btn-sm[aria-label]:not(.btn-block),
.btn-icon {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   C5 — TRANSITION + INTERAKCIÓ FINOMHANGOLÁS (2026-05-31)
   ===================================================================== */

.card {
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.card:hover {
  border-color: rgba(212,175,55,0.30);
}
.card.card-accent:hover,
.card.card-pink:hover,
.card.card-green:hover,
.card.card-red:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.sidebar-item     { transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.tbl tbody tr     { transition: background var(--t-fast); }
input, textarea, select {
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.btn              { transition: background var(--t-fast), transform var(--t-fast), filter var(--t-fast), border-color var(--t-fast); }
.badge            { transition: filter var(--t-fast); }
.flash            { transition: opacity var(--t-med); }
.chosen-item      { transition: opacity var(--t-fast), transform var(--t-fast), border-color var(--t-fast); }

/* =====================================================================
   C3 — UTILITY CLASSES (2026-05-31)
   Kis utility társ: a leggyakoribb inline-style minták helyett.
   ===================================================================== */

/* Display */
.d-none       { display: none !important; }
.d-block      { display: block; }
.d-inline     { display: inline; }
.d-inline-block { display: inline-block; }

/* Flex */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }

/* Grid */
.grid         { display: grid; }
.grid-cols-2  { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3  { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4  { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 768px) {
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}

/* Gap */
.gap-1        { gap: .25rem; }
.gap-2        { gap: .5rem; }
.gap-3        { gap: .75rem; }
.gap-4        { gap: 1rem; }
.gap-5        { gap: 1.5rem; }

/* Spacing */
.m-0          { margin: 0 !important; }
.m-1          { margin: .25rem; }
.m-2          { margin: .5rem; }
.m-3          { margin: .75rem; }
.m-4          { margin: 1rem; }
.mt-1         { margin-top: .25rem; }
.mt-2         { margin-top: .5rem; }
.mt-3         { margin-top: 1rem; }
.mt-4         { margin-top: 1.5rem; }
.mb-1         { margin-bottom: .25rem; }
.mb-2         { margin-bottom: .5rem; }
.mb-3         { margin-bottom: 1rem; }
.mb-4         { margin-bottom: 1.5rem; }
.ml-1         { margin-left: .25rem; }
.ml-2         { margin-left: .5rem; }
.ml-3         { margin-left: 1rem; }
.mr-1         { margin-right: .25rem; }
.mr-2         { margin-right: .5rem; }
.mr-3         { margin-right: 1rem; }
.mx-auto      { margin-left: auto; margin-right: auto; }

.p-0          { padding: 0 !important; }
.p-1          { padding: .25rem; }
.p-2          { padding: .5rem; }
.p-3          { padding: .75rem; }
.p-4          { padding: 1rem; }
.px-2         { padding-left: .5rem; padding-right: .5rem; }
.px-3         { padding-left: .75rem; padding-right: .75rem; }
.py-1         { padding-top: .25rem; padding-bottom: .25rem; }
.py-2         { padding-top: .5rem; padding-bottom: .5rem; }
.py-3         { padding-top: .75rem; padding-bottom: .75rem; }

/* Text */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-xs      { font-size: .72rem; }
.text-sm      { font-size: .85rem; }
.text-base    { font-size: 1rem; }
.text-lg      { font-size: 1.15rem; }
.text-xl      { font-size: 1.4rem; }
.text-2xl     { font-size: 1.8rem; }
.fw-300       { font-weight: 300; }
.fw-normal    { font-weight: 400; }
.fw-medium    { font-weight: 500; }
.fw-semibold  { font-weight: 600; }
.fw-bold      { font-weight: 700; }
.fw-extra     { font-weight: 800; }
.fw-black     { font-weight: 900; }
.text-muted   { color: var(--muted); }
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-success { color: var(--green); }
.text-error   { color: var(--red); }
.text-warning { color: var(--orange); }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.5px; }
.font-mono    { font-family: ui-monospace, SFMono-Regular, monospace; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap       { white-space: nowrap; }

/* Border accent */
.border-l-accent  { border-left: 3px solid var(--accent); }
.border-l-accent2 { border-left: 3px solid var(--accent2); }
.border-l-success { border-left: 3px solid var(--green); }
.border-l-error   { border-left: 3px solid var(--red); }
.border-l-warning { border-left: 3px solid var(--orange); }
.border-l-info    { border-left: 3px solid var(--blue); }

/* Background */
.bg-tight     { background: var(--bg3); border-radius: 8px; padding: .5rem .75rem; }
.bg-accent-soft { background: var(--accent-soft); }
.bg-accent-soft-strong { background: var(--accent-soft-strong); }

/* Decoration */
.rounded      { border-radius: var(--r-card); }
.rounded-sm   { border-radius: var(--r-badge); }
.rounded-lg   { border-radius: 16px; }
.rounded-full { border-radius: 999px; }
.shadow-sm    { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.shadow-md    { box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.shadow-lg    { box-shadow: var(--card-shadow); }

/* Width / position helpers */
.w-full       { width: 100%; }
.max-w-sm     { max-width: 32rem; }
.max-w-md     { max-width: 48rem; }
.max-w-lg     { max-width: 64rem; }
.relative     { position: relative; }
.absolute     { position: absolute; }
.cursor-pointer { cursor: pointer; }
.cursor-grab    { cursor: grab; }
.cursor-help    { cursor: help; }
.cursor-not-allowed { cursor: not-allowed; }
.opacity-50   { opacity: 0.5; }
.opacity-70   { opacity: 0.7; }
.user-select-none { user-select: none; }

/* =====================================================================
   C2 — SVG ICON STYLES
   ===================================================================== */
.icon, svg.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-sm { width: 0.9em; height: 0.9em; }
.icon-lg { width: 1.4em; height: 1.4em; }
.icon-xl { width: 1.8em; height: 1.8em; }
.btn .icon { margin-right: .25rem; }
.btn .icon:only-child { margin-right: 0; }

/* =====================================================================
   C6 — LIGHT MODE KONTRASZT (WCAG AA 4.5:1)
   ===================================================================== */
html[data-theme="light"] .badge-green   { color: #14532D; background: #D1FAE5; border-color: #6EE7B7; }
html[data-theme="light"] .badge-yellow  { color: #713F12; background: #FEF3C7; border-color: #FCD34D; }
html[data-theme="light"] .badge-red     { color: #7F1D1D; background: #FEE2E2; border-color: #FCA5A5; }
html[data-theme="light"] .badge-blue    { color: #1E3A8A; background: #DBEAFE; border-color: #93C5FD; }
html[data-theme="light"] .badge-purple  { color: #5B4A0E; background: #FEF9C3; border-color: #FDE68A; }
html[data-theme="light"] .badge-pink    { color: #5B4A0E; background: #FFF8DC; border-color: #FFE99B; }
html[data-theme="light"] .badge-gold    { color: #713F12; background: #FFF8DC; border-color: #FFD96B; }
html[data-theme="light"] .badge-gray    { color: #1F2937; background: #F3F4F6; border-color: #D1D5DB; }
html[data-theme="light"] .badge-orange  { color: #7C2D12; background: #FFEDD5; border-color: #FDBA74; }

html[data-theme="light"] .flash-info    { background: #DBEAFE; color: #1E3A8A; border-color: #93C5FD; }
html[data-theme="light"] .flash-success { background: #D1FAE5; color: #064E3B; border-color: #6EE7B7; }
html[data-theme="light"] .flash-warning { background: #FEF3C7; color: #78350F; border-color: #FCD34D; }
html[data-theme="light"] .flash-error,
html[data-theme="light"] .flash-danger  { background: #FEE2E2; color: #7F1D1D; border-color: #FCA5A5; }

/* Status-pillek light mode */
html[data-theme="light"] .s-pending     { background: #FEF3C7; color: #713F12; }
html[data-theme="light"] .s-approved    { background: #FFF8DC; color: #5B4A0E; }
html[data-theme="light"] .s-rejected    { background: #FEE2E2; color: #7F1D1D; }
html[data-theme="light"] .s-locked      { background: #FEF9C3; color: #5B4A0E; }

/* Card-accent light mode */
html[data-theme="light"] .card          { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
html[data-theme="light"] .card:hover    { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }

/* Sidebar items light */
html[data-theme="light"] .sidebar-item        { color: #374151; }
html[data-theme="light"] .sidebar-item:hover  { background: rgba(212,175,55,0.12); color: #1f2937; }
html[data-theme="light"] .sidebar-item.active { background: rgba(212,175,55,0.18); color: #92400E; }

/* =====================================================================
   C7 — KOMPONENS POLISH
   ===================================================================== */

/* Cursor-pointer minden clickable kártyán */
.comp-tile, .item-card, .judge-tile, .panel-tile, .athlete-card,
[role="button"], button:not(:disabled), .btn:not(:disabled),
label.check-inline, label.cb-row {
  cursor: pointer;
}

/* Disabled állapot egyértelmű */
.btn:disabled, .btn[disabled],
button:disabled, button[disabled],
input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Club history (athlete portal) */
.club-history { margin: 0; padding-left: 1.5rem; list-style: disc; }
.club-history li { padding: .35rem 0; }
.club-history li strong { color: var(--accent); }

/* Stat-kártyák egységesítve */
.stat {
  background: var(--bg2);
  border-radius: var(--r-card);
  padding: 1rem 1.25rem;
  border-left: 3px solid transparent;
  transition: border-color var(--t-med), transform var(--t-med);
}
.stat:hover { transform: translateY(-2px); }
.stat-label {
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: .4rem;
}
.stat-value { font-weight: 900; line-height: 1.1; color: var(--text); }

/* Skip-link (keyboard accessibility — láthatatlan, csak Tab-bal aktiválódik) */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--accent); color: #000;
  padding: 8px 16px; z-index: 1000;
  border-radius: 0 0 6px 0;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }
