/* =============================================================
   DanceWear Competition Portal — Master Stylesheet
   Version: 2.1
   ============================================================= */

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg1:#0f172a; --bg2:#1e293b;
  --primary:#8b5cf6; --primary2:#ec4899; --accent:#06b6d4;
  --glass:rgba(255,255,255,0.07); --glass-brd:rgba(255,255,255,0.14);
  --text:#e5e7eb; --muted:#94a3b8; --radius:16px;

  /* semantic */
  --success:#10b981; --success-2:#059669;
  --danger:#ef4444;  --danger-2:#b91c1c;
  --warn:#f59e0b;    --warn-2:#fbbf24;
  --info:#3b82f6;
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --shadow-sm:0 8px 24px rgba(0,0,0,.25);
}

html, body { min-height: 100%; }

body {
  font-family: 'Outfit', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1a1035 40%, #221040 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   BACKGROUND ORBS
   ============================================================ */
.bg-orbs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-orbs span {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
}
.bg-orbs span:nth-child(1){ width:420px;height:420px;background:#8b5cf6;top:-120px;left:-100px }
.bg-orbs span:nth-child(2){ width:380px;height:380px;background:#ec4899;bottom:-100px;right:-80px }
.bg-orbs span:nth-child(3){ width:340px;height:340px;background:#06b6d4;top:40%;left:55% }

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(15,23,42,.6);
  border-bottom: 1px solid var(--glass-brd);
}
.nav-inner {
  max-width: 1280px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
}
.brand {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; gap: 10px; letter-spacing: .3px;
}
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 0 14px var(--primary);
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text); text-decoration: none;
  padding: 8px 14px; border-radius: 10px;
  font-size: .92rem; transition: .2s; white-space: nowrap;
}
.nav-links a:hover { background: var(--glass); color: #fff; }
.btn-logout {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff !important;
}
.nav-toggle {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.5rem; cursor: pointer;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1280px; margin: auto;
  padding: 32px 22px 80px;
}
.sitefoot {
  text-align: center; padding: 26px;
  color: var(--muted); font-size: .82rem;
  border-top: 1px solid var(--glass-brd);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;               /* prevents content leaking out */
  min-width: 0;
}
.card h2, .card h3 { margin-bottom: 14px; font-weight: 700; }
.card h2 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   GRID
   ============================================================ */
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }        /* CRITICAL: allows children to shrink */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat {
  padding: 22px; border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  position: relative; overflow: hidden;
  min-width: 0;
}
.stat::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(236,72,153,.05));
  opacity: .7; z-index: 0;
}
.stat > * { position: relative; z-index: 1; }
.stat-num {
  font-size: 2.4rem; font-weight: 800; line-height: 1.15;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}
.stat-lbl {
  color: var(--muted); font-size: .9rem; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .5px;
}
/* Utility colour overrides for stat numbers */
.stat-num.success {
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-num.warning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-num.danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   FORMS
   ============================================================ */
label {
  display: block;
  margin: 12px 0 6px;
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 500;
}
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=number],
input[type=tel], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(15,23,42,.55);
  border: 1px solid var(--glass-brd);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  transition: .2s;
  outline: none;
  min-width: 0;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,92,246,.25);
}
input::placeholder, textarea::placeholder { color: rgba(148,163,184,.6); }
select option { background: #0f172a; color: #fff; }
textarea { resize: vertical; min-height: 60px; }

/* Checkbox rows */
.check-line {
  display: flex; align-items: center; gap: 10px;
  text-transform: none; letter-spacing: 0;
  color: var(--text); font-size: .9rem; margin: 0; cursor: pointer;
}
.check-line input { width: auto; accent-color: #8b5cf6; }

/* Checkbox panel used on user forms */
.settings-row {
  margin-top: 14px; padding: 12px 14px;
  border: 1px solid var(--glass-brd); border-radius: 10px;
  background: rgba(0,0,0,.18);
  display: flex; flex-direction: column; gap: 10px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: none;
  cursor: pointer; font-family: inherit;
  font-size: .92rem; font-weight: 600;
  text-decoration: none; transition: .25s;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(139,92,246,.35);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(139,92,246,.5); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.13); box-shadow: none; }

.btn-sm { padding: 7px 14px; font-size: .82rem; }

.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn-danger:hover { box-shadow: 0 12px 30px rgba(239,68,68,.45); }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-success:hover { box-shadow: 0 12px 30px rgba(16,185,129,.45); }

/* ============================================================
   TABLES (fully redesigned to prevent card overflow)
   ============================================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  padding-bottom: 2px; /* room for scrollbar */
}
.table-wrap > table.tbl { min-width: 100%; }

table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: .9rem;
  table-layout: auto;
}
table.tbl th {
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .75rem;
  white-space: nowrap;
}
table.tbl td {
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border-top: 1px solid var(--glass-brd);
  border-bottom: 1px solid var(--glass-brd);
  word-break: break-word;
  vertical-align: middle;
}
table.tbl tr td:first-child {
  border-left: 1px solid var(--glass-brd);
  border-radius: 10px 0 0 10px;
}
table.tbl tr td:last-child {
  border-right: 1px solid var(--glass-brd);
  border-radius: 0 10px 10px 0;
}
table.tbl tr:hover td { background: rgba(139,92,246,.10); }

/* Compact variant */
table.tbl.compact th,
table.tbl.compact td { padding: 10px 12px; }
table.tbl.compact td { white-space: nowrap; max-width: none; }

/* Non-compact: allow wrapping up to a limit */
table.tbl:not(.compact) td { max-width: 320px; }

/* User cell (stacked) used in users table */
.user-cell { display: flex; flex-direction: column; line-height: 1.25; }
.user-cell .u-name { font-weight: 600; color: #fff; }
.user-cell .u-meta { font-size: .78rem; color: var(--muted); }

/* Actions column — keep buttons inline & tight */
.act-col { width: 1%; white-space: nowrap; text-align: right; }
.actions { display: inline-flex; gap: 6px; flex-wrap: nowrap; align-items: center; }
.actions .btn { padding: 6px 10px; font-size: .78rem; }
.actions form { display: inline-flex; margin: 0; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-Standard { background: rgba(239,68,68,.2);  color:#fca5a5; border:1px solid rgba(239,68,68,.4) }
.badge-Latin    { background: rgba(16,185,129,.2); color:#6ee7b7; border:1px solid rgba(16,185,129,.4) }
.badge-Street   { background: rgba(168,85,247,.2); color:#d8b4fe; border:1px solid rgba(168,85,247,.4) }
.badge-solo     { background: rgba(6,182,212,.2);  color:#67e8f9; border:1px solid rgba(6,182,212,.4) }
.badge-couple   { background: rgba(236,72,153,.2); color:#f9a8d4; border:1px solid rgba(236,72,153,.4) }
.badge-green    { background: rgba(16,185,129,.2); color:#6ee7b7; border:1px solid rgba(16,185,129,.4) }
.badge-red      { background: rgba(239,68,68,.2);  color:#fca5a5; border:1px solid rgba(239,68,68,.4) }

/* ============================================================
   LOGIN / AUTH PAGES
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-brd);
  border-radius: 22px;
  padding: 44px 36px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  text-align: center;
}
.login-card h1 {
  font-size: 1.7rem; margin-bottom: 6px;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-card p { color: var(--muted); margin-bottom: 26px; font-size: .9rem; }
.login-card .btn {
  width: 100%; justify-content: center;
  margin-top: 18px; padding: 13px;
}
.login-card a:not(.btn) {
  color: #94a3b8; font-size: .85rem;
  text-decoration: none; transition: .2s;
}
.login-card a:not(.btn):hover { color: #c4b5fd; }

/* 2FA input */
input.otp-input,
input[name="code"][inputmode="numeric"] {
  letter-spacing: 12px;
  font-size: 1.4rem;
  text-align: center;
  font-weight: 700;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 500;
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(12px);
}
.flash-success { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.4); color: #a7f3d0 }
.flash-error   { background: rgba(239,68,68,.15);  border-color: rgba(239,68,68,.4);  color: #fecaca }
.flash-info    { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.4); color: #bfdbfe }

/* ============================================================
   CATEGORY PICKER
   ============================================================ */
.cat-picker {
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
  background: rgba(0,0,0,.15);
  max-height: 360px;
  overflow-y: auto;
}
.cat-picker::-webkit-scrollbar { width: 8px; }
.cat-picker::-webkit-scrollbar-track { background: rgba(0,0,0,.2); border-radius: 4px; }
.cat-picker::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.5); border-radius: 4px;
}
.cat-picker::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.8); }

.cat-section-title {
  font-weight: 700;
  color: #c4b5fd;
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .78rem;
  display: flex; align-items: center; gap: 8px;
}
.cat-section-title:first-child { margin-top: 0; }

.cat-chk {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  cursor: pointer; transition: .15s;
  font-size: .9rem;
}
.cat-chk:hover { background: rgba(255,255,255,.05); }
.cat-chk input {
  width: auto; accent-color: #8b5cf6;
  cursor: pointer; flex-shrink: 0;
}
.cat-chk span { flex-shrink: 0; }
.cat-chk .type {
  margin-left: auto;
  font-size: .7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ============================================================
   PAYMENT — Summary block on entry form
   ============================================================ */
.pay-summary {
  margin-top: 12px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(236,72,153,.08));
  border: 1px solid rgba(139,92,246,.28);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.pay-summary .p-item { text-align: center; min-width: 0; }
.pay-summary .p-lbl {
  font-size: .72rem; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted);
}
.pay-summary .p-val {
  font-size: 1.3rem; font-weight: 700; margin-top: 4px;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}
.pay-summary .p-val.due {
  background: linear-gradient(135deg, #f87171, #fb923c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pay-summary .p-val.balance {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pay-summary .p-val.clear {
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Payment table cells (school/entries.php, admin/entries.php) */
.pay-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-due  { color: #fca5a5; font-weight: 600; }
.pay-paid { color: #6ee7b7; font-weight: 600; }
.pay-balance { color: #fcd34d; font-weight: 700; }
.pay-clear { color: #6ee7b7; font-weight: 700; }
.pay-owed  { color: #fca5a5; font-weight: 700; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-brd);
  margin-bottom: 22px;
}
.profile-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  font-weight: 700; font-size: 1.4rem; color: #fff;
  box-shadow: 0 8px 24px rgba(139,92,246,.4);
  flex-shrink: 0;
}
.profile-meta h2 { margin: 0 0 2px; font-size: 1.15rem; color: #fff; }
.profile-meta p  { color: var(--muted); font-size: .85rem; }

.info-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.3);
  font-size: .82rem; color: #c4b5fd;
  line-height: 1.5;
}

/* ============================================================
   SCROLLBARS (global)
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.5); border-radius: 5px;
  transition: .2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.75); }
::-webkit-scrollbar-track { background: rgba(0,0,0,.15); }

/* Firefox */
* { scrollbar-color: rgba(139,92,246,.5) rgba(0,0,0,.15); scrollbar-width: thin; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  /* Mobile nav */
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(15,23,42,.97);
    backdrop-filter: blur(20px);
    padding: 14px; gap: 4px;
    transform: translateY(-120%);
    transition: .3s;
    opacity: 0; pointer-events: none;
    border-bottom: 1px solid var(--glass-brd);
    max-height: 80vh; overflow-y: auto;
  }
  body.nav-open .nav-links {
    transform: translateY(0);
    opacity: 1; pointer-events: auto;
  }
  .nav-links a { width: 100%; padding: 12px; text-align: left; }

  /* Container & cards */
  .container { padding: 22px 14px 60px; }
  .card { padding: 18px; }
  .card h2 { font-size: 1.2rem; }

  /* Tables — let them scroll horizontally */
  table.tbl { font-size: .82rem; }
  table.tbl th,
  table.tbl td { padding: 8px 10px; }
  table.tbl:not(.compact) td { max-width: 200px; }

  /* Table wrap: break out of card padding to use full width */
  .table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 0;
  }

  /* Buttons */
  .btn { padding: 10px 16px; font-size: .88rem; }
  .actions { flex-wrap: wrap; }
  .actions .btn { padding: 6px 10px; font-size: .75rem; }

  /* Stats */
  .stat-num { font-size: 1.9rem; }

  /* Grid gaps tighter */
  .grid { gap: 14px; }

  /* Login card */
  .login-card { padding: 32px 22px; }
  .login-card h1 { font-size: 1.4rem; }

  /* Payment summary stacks */
  .pay-summary { grid-template-columns: 1fr; gap: 10px; }

  /* 2FA input */
  input.otp-input,
  input[name="code"][inputmode="numeric"] {
    letter-spacing: 8px;
    font-size: 1.2rem;
  }
}

/* Very small screens */
@media (max-width: 420px) {
  .container { padding: 16px 10px 50px; }
  .card { padding: 14px; }
  .btn { width: 100%; justify-content: center; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .stat-num { font-size: 1.6rem; }
  .stat-lbl { font-size: .75rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .bg-orbs,
  .topnav,
  .sitefoot,
  .btn,
  .actions,
  .nav-toggle,
  .flash {
    display: none !important;
  }
  .container { padding: 0; max-width: 100%; }
  .card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .card h2 { color: #000 !important; -webkit-text-fill-color: #000 !important; }
  table.tbl th,
  table.tbl td {
    color: #000 !important;
    background: #fff !important;
    border-color: #999 !important;
  }
  .stat-num { color: #000 !important; -webkit-text-fill-color: #000 !important; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted   { color: var(--muted); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 22px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 22px !important; }
.gap-1 { gap: 6px !important; }
.gap-2 { gap: 12px !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }




/* ============================================================
   USER LIST (Users page — no horizontal scroll)
   ============================================================ */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  transition: .2s;
  min-width: 0;
}
.user-row:hover { background: rgba(139,92,246,.08); }

.user-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(139,92,246,.35);
  flex-shrink: 0;
}
.user-info   { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.user-name   { font-weight: 600; color: #fff; font-size: .98rem;
               display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-sub    { font-size: .8rem; color: var(--muted); }
.user-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.user-badges .badge { font-size: .65rem; padding: 2px 8px; }

.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}
.user-actions .btn { padding: 6px 10px; font-size: .75rem; }

@media (max-width: 640px) {
  .user-row {
    grid-template-columns: 40px 1fr;
  }
  .user-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* ============================================================
   AUDIT LOG
   ============================================================ */
.audit-item {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
}
.audit-item:last-child { margin-bottom: 0; }

.audit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: .92rem;
}
.audit-head b { color: #fff; }

.audit-meta {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.audit-meta code {
  background: rgba(0,0,0,.3);
  padding: 1px 6px;
  border-radius: 4px;
  color: #67e8f9;
  font-size: .75rem;
}

.audit-changes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(0,0,0,.18);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.audit-change {
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ac-label {
  font-weight: 600;
  color: #c4b5fd;
  min-width: 130px;
  flex-shrink: 0;
}
.ac-from {
  color: #fca5a5;
  text-decoration: line-through;
  font-family: monospace;
}
.ac-arrow { color: var(--muted); }
.ac-to {
  color: #6ee7b7;
  font-weight: 600;
  font-family: monospace;
}

@media (max-width: 640px) {
  .ac-label { min-width: auto; }
}



/* ============================================================
   LOGO (header + login)
   ============================================================ */
.brand-logo {
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(139,92,246,.35));
  flex-shrink: 0;
}
.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
@media (max-width: 640px) {
  .brand-logo { height: 30px; max-width: 130px; }
  .brand-name { display: none; }
}

.login-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
  padding: 8px;
}
.login-logo img {
  max-height: 90px;
  max-width: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(139,92,246,.35));
}
@media (max-width: 480px) {
  .login-logo img { max-height: 70px; max-width: 200px; }
}

/* ============================================================
   TABS (Categories page + Competition edit)
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--glass-brd);
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 0;
}
.tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { color: #fff; }
.tab.active {
  color: #c4b5fd;
  border-bottom-color: var(--primary);
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(139,92,246,.25);
  color: #c4b5fd;
  border-radius: 20px;
  padding: 1px 9px;
  font-size: .72rem;
  font-weight: 700;
  min-width: 26px;
}
.tab.active .tab-count {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
}
.tab-pane { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   EXTRA BADGE VARIANTS
   ============================================================ */
.badge-warn { background: rgba(245,158,11,.22); color:#fcd34d; border:1px solid rgba(245,158,11,.45) }
.badge-info { background: rgba(59,130,246,.22); color:#93c5fd; border:1px solid rgba(59,130,246,.45) }