/* ==========================================================================
   MELISPORT OPEN 2026 — Meta Design System
   Pill buttons · Cobalt accents · 32px rounded cards · White canvas

   Font: Montserrat (Optimistic VF substitute) + system-ui fallback

   Table of Contents
   --------------------------------------------------------------------------
    1.  Google Fonts Import
    2.  CSS Custom Properties
    3.  Reset & Base
    4.  Typography
    5.  Layout
    6.  Buttons (all pills)
    7.  Navigation
    8.  Cards
    9.  Tables
   10.  Forms
   11.  Badges & Status
   12.  Score Display
   13.  Bracket
   14.  Round Robin
   15.  Admin Sidebar
   16.  Score Input
   17.  Hero
   18.  Animations
   19.  Utilities
   20.  Responsive
   21.  Footer
   22.  Skeleton / Empty State
   23.  Toast
   24.  Modal
   25.  Login
   ========================================================================== */


/* ==========================================================================
   1. GOOGLE FONTS IMPORT
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');


/* ==========================================================================
   2. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* Brand */
  --primary: #0064e0;
  --primary-deep: #0457cb;
  --primary-rgb: 0, 100, 224;
  --ink-button: #000000;
  --on-ink-button: #ffffff;
  --on-primary: #ffffff;

  /* Canvas */
  --canvas: #ffffff;
  --surface-soft: #f1f4f7;

  /* Ink / Text */
  --ink-deep: #0a1317;
  --ink: #1c1e21;
  --charcoal: #444950;
  --slate: #4b4c4f;
  --steel: #5d6c7b;
  --stone: #8595a4;
  --disabled-text: #bcc0c4;

  /* Hairlines */
  --hairline: #ced0d4;
  --hairline-soft: #dee3e9;

  /* Semantic */
  --success: #31a24c;
  --success-rgb: 49, 162, 76;
  --attention: #f2a918;
  --attention-rgb: 242, 169, 24;
  --critical: #e41e3f;
  --critical-rgb: 228, 30, 63;
  --warning: #f7b928;

  /* Typography */
  --font-display: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Spacing (4px base, 8px primary step) */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 10px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 40px;
  --space-section: 64px;
  --space-section-lg: 80px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 16px;
  --radius-xxl: 24px;
  --radius-xxxl: 32px;
  --radius-full: 100px;

  /* Shadows (subtle — Meta is flat) */
  --shadow-subtle: rgba(20, 22, 26, 0.08) 0px 1px 2px 0px;
  --shadow-sticky: rgba(20, 22, 26, 0.15) 0px 1px 4px 0px;

  /* Transitions */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-nav: 500;
  --z-overlay: 900;
  --z-modal: 1000;
  --z-toast: 1100;

  /* Admin panel — modern floating */
  --admin-sidebar-bg: #2563eb; /* Vibrant blue */
  --admin-sidebar-hover: rgba(255, 255, 255, 0.15);
  --admin-sidebar-active: #ffffff; /* White active background */
  --admin-sidebar-text: rgba(255, 255, 255, 0.7);
  --admin-sidebar-heading: rgba(255, 255, 255, 0.5);
  --admin-sidebar-width: 260px;
  --admin-sidebar-collapsed: 80px;
  --admin-content-bg: #f1f5f9;
  --admin-surface: #ffffff;
  --admin-border: #e2e8f0;
  --admin-border-light: #f1f5f9;
  --admin-accent: #3b82f6;
  --admin-accent-hover: #2563eb;
  --admin-accent-subtle: #eff6ff;
  --admin-text: #1e293b;
  --admin-text-secondary: #64748b;
  --admin-text-muted: #94a3b8;
  --admin-danger: #ef4444;
  --admin-danger-hover: #dc2626;
  --admin-success: #10b981;
  --admin-success-hover: #059669;
  --admin-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --admin-shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --admin-shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --admin-radius-sm: 8px;
  --admin-radius-md: 10px;
  --admin-radius-lg: 12px;
  --admin-radius-xl: 16px;
  --admin-transition: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}


/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.16px;
  color: var(--ink);
  background-color: var(--canvas);
  min-height: 100vh;
}

a {
  color: var(--ink-deep);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
a:hover { color: var(--primary); }

img, video { max-width: 100%; height: auto; display: block; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  background: transparent;
}

ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

::selection {
  background: rgba(var(--primary-rgb), .15);
  color: var(--ink-deep);
}


/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

.text-hero {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 500;
  line-height: 1.16;
  color: var(--ink-deep);
}

.text-display-lg {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.17;
  color: var(--ink-deep);
}

.text-display-md {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.28;
  color: var(--ink-deep);
}

.text-display-sm {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.21;
  color: var(--ink);
}

.text-title-lg {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink-deep);
}

.text-title-md {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.44;
  color: var(--ink-deep);
}

.text-title-sm {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.44;
  color: var(--ink);
}

.text-body-md {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.16px;
  color: var(--ink);
}

.text-body-sm {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.14px;
  color: var(--charcoal);
}

.text-caption {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  color: var(--steel);
}

.text-caption-bold {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.33;
  color: var(--ink);
}

.text-number-display {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.16;
  color: var(--ink-deep);
}

.text-number {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.44;
  color: var(--ink);
}

.text-number-sm {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.43;
  letter-spacing: -0.14px;
  color: var(--charcoal);
}


/* ==========================================================================
   5. LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-xxl);
  padding-right: var(--space-xxl);
}

.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-start    { display: flex; align-items: flex-start; }
.flex-end      { display: flex; align-items: center; justify-content: flex-end; }
.items-center  { align-items: center; }
.justify-center { justify-content: center; }
.flex-1        { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-base { gap: var(--space-base); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-xxl { gap: var(--space-xxl); }

.section-padding    { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-padding-lg { padding-top: var(--space-section-lg); padding-bottom: var(--space-section-lg); }
.section-padding-sm { padding-top: var(--space-xxl); padding-bottom: var(--space-xxl); }

.main-content { min-height: calc(100vh - 64px); }


/* ==========================================================================
   6. BUTTONS (all pill-shaped — rounded.full)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.43;
  letter-spacing: -0.14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--duration-fast) ease,
              color var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              transform var(--duration-fast) ease;
  border: 2px solid transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { pointer-events: none; opacity: .45; }

/* Black pill — marketing primary */
.btn-primary {
  background-color: var(--ink-button);
  color: var(--on-ink-button);
  border-color: var(--ink-button);
}
.btn-primary:hover { background-color: var(--charcoal); border-color: var(--charcoal); }
.btn-primary:active { background-color: var(--charcoal); }

/* Cobalt pill — action CTAs (input skor, set pemenang) */
.btn-action {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.btn-action:hover { background-color: var(--primary-deep); border-color: var(--primary-deep); }

/* Outlined ghost */
.btn-secondary {
  background-color: transparent;
  color: var(--ink-deep);
  border: 2px solid var(--ink-deep);
}
.btn-secondary:hover { background-color: rgba(10, 19, 23, .04); }

/* Quiet ghost */
.btn-ghost {
  background-color: transparent;
  color: var(--ink-deep);
  border: 2px solid rgba(10, 19, 23, .12);
}
.btn-ghost:hover { background-color: rgba(10, 19, 23, .04); border-color: rgba(10, 19, 23, .25); }

/* Danger */
.btn-danger {
  background-color: var(--critical);
  color: var(--on-primary);
  border-color: var(--critical);
}
.btn-danger:hover { background-color: #c91a33; border-color: #c91a33; }

/* Success */
.btn-success {
  background-color: var(--success);
  color: var(--on-primary);
  border-color: var(--success);
}
.btn-success:hover { background-color: #288a3e; border-color: #288a3e; }

/* Sizes */
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }


/* ==========================================================================
   7. NAVIGATION
   ========================================================================== */

.top-nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  height: 56px;
  background-color: var(--canvas);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06),
              0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  max-width: calc(100% - 32px);
  width: auto;
  border: 1px solid var(--hairline-soft);
}

.top-nav .nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 100%;
}

.top-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-deep);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}
.top-nav .nav-logo .nav-logo-img { height: 32px; width: auto; }
.top-nav .nav-logo .logo-accent { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
  white-space: nowrap;
  letter-spacing: -0.14px;
}
.nav-links a:hover { color: var(--ink-deep); background-color: var(--surface-soft); }
.nav-links a.active {
  background-color: #d5f0e4;
  color: #0d5c34;
  font-weight: 700;
}

.nav-links a .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  background: var(--ink-deep);
  color: var(--canvas);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  margin-left: 6px;
  padding: 0 5px;
  line-height: 1;
}

/* Hamburger — hidden on desktop, shown on mobile inside the floating bar */
.top-nav .hamburger {
  display: none;
  margin-right: 4px;
}

/* Nav spacer for floating nav */
.nav-spacer { height: 88px; }


/* ==========================================================================
   8. CARDS
   ========================================================================== */

.card {
  background-color: var(--canvas);
  border-radius: var(--radius-xxxl);
  padding: var(--space-xxl);
  border: 1px solid var(--hairline-soft);
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.card:hover { border-color: var(--hairline); }

/* Match card */
.card-match {
  background-color: var(--canvas);
  border-radius: var(--radius-xxxl);
  padding: var(--space-xxl);
  border: 1px solid var(--hairline-soft);
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.card-match:hover { border-color: var(--hairline); }

/* Live match */
.card-match.live {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .06);
}

/* Finished match */
.card-match.finished { opacity: .8; }
.card-match.finished:hover { opacity: 1; }

/* Match card internals */
.card-match .match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.card-match .match-body {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.card-match .match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-md);
  border-radius: var(--radius-xl);
  transition: background-color var(--duration-fast) ease;
}
.card-match .match-team.winner {
  background-color: rgba(var(--success-rgb), .06);
}
.card-match .match-team .team-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-deep);
  text-align: center;
  letter-spacing: -0.16px;
}
.card-match .match-team .team-club {
  display: block;
  margin-top: 2px;
}

.match-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  font-size: 14px;
  font-weight: 700;
  color: var(--stone);
  flex-shrink: 0;
}

.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Match select item (scoreboard sidebar) */
.match-select-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-base);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  transition: background-color var(--duration-fast) ease;
  margin-bottom: 4px;
}
.match-select-item:hover { background-color: var(--surface-soft); color: var(--ink-deep); }
.match-select-item.active {
  background-color: var(--ink-deep);
  color: var(--canvas);
  font-weight: 600;
}


/* ==========================================================================
   9. TABLES
   ========================================================================== */

.table-dark {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-dark thead th {
  background-color: var(--surface-soft);
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  padding: var(--space-md) var(--space-base);
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.table-dark tbody tr {
  border-bottom: 1px solid var(--hairline-soft);
  transition: background-color var(--duration-fast) ease;
}
.table-dark tbody tr:hover { background-color: var(--surface-soft); }
.table-dark tbody tr:last-child { border-bottom: none; }

.table-dark td {
  padding: var(--space-md) var(--space-base);
  color: var(--charcoal);
  vertical-align: middle;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xl);
  border: 1px solid var(--hairline-soft);
}


/* ==========================================================================
   10. FORMS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-base);
}
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-deep);
  letter-spacing: -0.14px;
}
.form-label .required { color: var(--critical); margin-left: 2px; }

.form-input {
  width: 100%;
  padding: 12px var(--space-base);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  outline: none;
  height: 44px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  letter-spacing: -0.16px;
}
.form-input::placeholder { color: var(--stone); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.form-input:disabled { opacity: .5; cursor: not-allowed; background-color: var(--surface-soft); }
.form-input.error { border-color: var(--critical); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(var(--critical-rgb), .12); }

.form-select {
  width: 100%;
  padding: 12px var(--space-base);
  padding-right: 40px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  outline: none;
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238595a4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  letter-spacing: -0.16px;
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.form-select option { background-color: var(--canvas); color: var(--ink); }

.form-textarea {
  width: 100%;
  padding: var(--space-md) var(--space-base);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
  letter-spacing: -0.16px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  flex-shrink: 0;
}
.form-check input[type="radio"] { border-radius: 50%; }
.form-check input[type="checkbox"]:checked,
.form-check input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.form-check label { font-size: 14px; color: var(--charcoal); cursor: pointer; }


/* ==========================================================================
   11. BADGES & STATUS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.33;
}

.badge-pending {
  background-color: var(--surface-soft);
  color: var(--steel);
}

.badge-live {
  background-color: rgba(var(--primary-rgb), .08);
  color: var(--primary);
}
.badge-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.badge-finished {
  background-color: rgba(var(--success-rgb), .08);
  color: var(--success);
}

.badge-info {
  background-color: rgba(var(--primary-rgb), .06);
  color: var(--primary);
}

.badge-danger {
  background-color: rgba(var(--critical-rgb), .08);
  color: var(--critical);
}

.badge-primary {
  background-color: var(--ink-button);
  color: var(--on-ink-button);
}

.badge-default {
  background-color: var(--surface-soft);
  color: var(--charcoal);
}

.badge-warning {
  background-color: var(--warning);
  color: var(--ink-deep);
}


/* ==========================================================================
   12. SCORE DISPLAY
   ========================================================================== */

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxl);
}

.score-display .score-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.score-display .score-team .team-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-deep);
  text-align: center;
  max-width: 200px;
}

.score-sets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-base);
}

.score-set {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) var(--space-base);
  background-color: var(--surface-soft);
  border-radius: var(--radius-xl);
  min-width: 52px;
}
.score-set .set-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--steel);
  text-transform: uppercase;
}
.score-set .set-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-deep);
}

.score-card { margin-bottom: var(--space-xl); }

.score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.score-set-display {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  padding: var(--space-sm) var(--space-base);
  background-color: var(--surface-soft);
  border-radius: var(--radius-xl);
}
.score-set-display.current {
  background-color: rgba(var(--primary-rgb), .06);
  border: 2px solid rgba(var(--primary-rgb), .15);
}

.score-value {
  font-size: 48px;
  font-weight: 500;
  color: var(--ink-deep);
  line-height: 1;
  min-width: 64px;
  text-align: center;
  user-select: none;
}

.score-vs {
  font-size: 14px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 2px;
}


/* ==========================================================================
   13. BRACKET
   ========================================================================== */

.bracket-container {
  display: flex;
  gap: 80px;
  overflow-x: auto;
  padding: var(--space-xxl) var(--space-base);
  -webkit-overflow-scrolling: touch;
  min-height: 400px;
  position: relative;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 240px;
  flex-shrink: 0;
  position: relative;
  gap: 0;
}

.bracket-round-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 8px 16px;
  margin-bottom: var(--space-lg);
  background: rgba(var(--primary-rgb), .06);
  border-radius: var(--radius-full);
  align-self: center;
  white-space: nowrap;
}

/* ── Bracket match card ─────────────────────── */
.bracket-match {
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: visible;
  position: relative;
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
  margin: 8px 0;
}
.bracket-match:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .05); }
.bracket-match.live { border-color: var(--primary); }

.bracket-match .bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.14px;
  transition: background-color var(--duration-fast) ease;
  min-height: 40px;
  position: relative;
}
.bracket-match .bracket-team + .bracket-team { border-top: 1px solid var(--hairline-soft); }

.bracket-team.winner {
  background-color: rgba(var(--success-rgb), .06);
  color: var(--ink-deep);
  font-weight: 700;
}
.bracket-team.winner .bracket-score { color: var(--success); font-weight: 700; }
.bracket-team.loser { opacity: .4; }

.bracket-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-score {
  font-size: 13px;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.bracket-seed {
  font-size: 10px;
  font-weight: 700;
  color: var(--stone);
  min-width: 22px;
  flex-shrink: 0;
}

.bracket-bye {
  font-style: italic;
  color: var(--stone);
  font-size: 12px;
}

/* ── Bracket wrapper ────────────────────────── */
.bracket-wrapper {
  background: var(--surface-soft);
  border-radius: var(--radius-xxl);
  border: 1px solid var(--hairline-soft);
  overflow: hidden;
}

/* ── BRACKET CONNECTOR LINES ────────────────── */
/* Horizontal line from match right edge */
.bracket-match::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  width: 40px;
  height: 2px;
  background: var(--hairline-strong);
  pointer-events: none;
}

/* Last round (Final) — no connector */
.bracket-round:last-child .bracket-match::after {
  display: none;
}

/* Vertical connector between two adjacent matches going to the next round */
.bracket-round:not(:last-child) .bracket-match:nth-child(odd)::before {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  width: 2px;
  height: calc(100% + 16px);
  background: var(--hairline-strong);
  pointer-events: none;
}

/* Even matches don't need the vertical connector going down */
.bracket-round:not(:last-child) .bracket-match:nth-child(even)::before {
  display: none;
}

/* ── Match spacing adjusts for bracket depth ── */
.bracket-round[data-round="1"] .bracket-match { margin: 4px 0; }
.bracket-round[data-round="2"] .bracket-match { margin: 20px 0; }
.bracket-round[data-round="3"] .bracket-match { margin: 52px 0; }
.bracket-round[data-round="4"] .bracket-match { margin: 116px 0; }
.bracket-round[data-round="5"] .bracket-match { margin: 244px 0; }

/* ── Match status indicator ─────────────────── */
.bracket-match.live {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .08);
}
.bracket-match.finished { border-color: var(--hairline-soft); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .bracket-container { gap: 50px; padding: var(--space-base) 0; }
  .bracket-round { min-width: 200px; }
  .bracket-match .bracket-team { padding: 8px 10px; font-size: 12px; min-height: 36px; }
  .bracket-match::after { right: -25px; width: 25px; }
  .bracket-round:not(:last-child) .bracket-match:nth-child(odd)::before {
    right: -25px;
    height: calc(100% + 12px);
  }
  .bracket-round-title { font-size: 11px; padding: 6px 12px; }
  .bracket-score { font-size: 11px; min-width: 22px; }
  .bracket-name { font-size: 11px; }
}

@media (max-width: 480px) {
  .bracket-container { gap: 36px; }
  .bracket-round { min-width: 170px; }
  .bracket-match::after { right: -18px; width: 18px; }
  .bracket-round:not(:last-child) .bracket-match:nth-child(odd)::before {
    right: -18px;
    height: calc(100% + 10px);
  }
}

/* Category tabs (pill tabs) */
.category-tabs {
  display: flex;
  gap: 8px;
  margin: var(--space-xl) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-xs);
}

.tab-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.14px;
  color: var(--charcoal);
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast) ease;
}
.tab-item:hover { background-color: var(--surface-soft); }
.tab-item.active {
  background-color: var(--ink-deep);
  color: var(--canvas);
  border-color: var(--ink-deep);
}


/* ==========================================================================
   14. ROUND ROBIN
   ========================================================================== */

.round-robin-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.rr-group {
  background-color: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xxxl);
  overflow: hidden;
}

.rr-group-title {
  padding: var(--space-lg) var(--space-xxl);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-deep);
  background-color: var(--surface-soft);
  border-bottom: 1px solid var(--hairline-soft);
  letter-spacing: -0.16px;
}

.rr-standings { width: 100%; border-collapse: collapse; }
.rr-standings thead th {
  padding: var(--space-md) var(--space-base);
  font-size: 12px;
  font-weight: 700;
  color: var(--steel);
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}
.rr-standings thead th:not(:first-child) { text-align: center; }
.rr-standings tbody tr { border-bottom: 1px solid var(--hairline-soft); transition: background-color var(--duration-fast) ease; }
.rr-standings tbody tr:last-child { border-bottom: none; }
.rr-standings tbody tr:hover { background-color: var(--surface-soft); }
.rr-standings td {
  padding: var(--space-md) var(--space-base);
  font-size: 14px;
  color: var(--charcoal);
}
.rr-standings td:not(:first-child) { text-align: center; font-weight: 600; }

.rr-rank-1 { background-color: rgba(var(--primary-rgb), .04) !important; border-left: 3px solid var(--primary); }
.rr-rank-2 { background-color: rgba(var(--success-rgb), .04) !important; border-left: 3px solid var(--success); }

.rr-match-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-base);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-fast) ease;
}
.rr-match-row:hover { background-color: var(--surface-soft); }


/* ==========================================================================
   15. ADMIN PANEL — Edge-to-Edge Modern
   ========================================================================== */

/* ── Layout container ─────────────────────────── */
.admin-layout { 
    display: flex; 
    min-height: calc(100vh / 0.9); 
    zoom: 0.9;
}

/* ── Sidebar (vibrant blue, floating) ──────── */
.admin-sidebar {
  position: fixed; top: 16px; left: 16px; bottom: 16px;
  width: var(--admin-sidebar-width);
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  display: flex; flex-direction: column;
  z-index: 40;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
  overflow-y: auto; overflow-x: hidden;
  transition: width var(--admin-transition);
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* Sidebar brand */
.sidebar-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo-text {
  font-size: 20px; font-weight: 800; color: #ffffff;
  letter-spacing: -0.3px; white-space: nowrap; overflow: hidden;
}
.sidebar-logo-accent { color: rgba(255,255,255,0.7); font-weight: 400; }
.sidebar-brand-icon { display: none; font-size: 22px; font-weight: 800; color: #fff; }

/* Sidebar collapse toggle button */
.sidebar-collapse-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: var(--admin-sidebar-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 200ms ease; flex-shrink: 0; margin-left: 8px;
  animation: sidebarBtnPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  position: relative;
}
@keyframes sidebarBtnPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255,255,255,0);
  }
}
.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,0.25); color: #fff;
  border-color: rgba(255,255,255,0.4);
  animation: none;
  box-shadow: 0 0 12px rgba(255,255,255,0.3);
}
.sidebar-collapse-btn svg {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-layout.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

/* Sidebar sections */
.sidebar-menu-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--admin-sidebar-heading);
  padding: 16px 20px 6px;
  transition: opacity 200ms ease, max-height 200ms ease;
  overflow: hidden; white-space: nowrap;
}
.sidebar-divider {
  height: 1px; background: rgba(255,255,255,0.06);
  margin: 12px 16px;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px;
}
.admin-sidebar .nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 99px;
  font-size: 13.5px; font-weight: 500; color: var(--admin-sidebar-text);
  text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: all 150ms ease;
  position: relative;
}
.admin-sidebar .nav-item:hover {
  background: var(--admin-sidebar-hover);
  color: #ffffff;
}
.admin-sidebar .nav-item.active {
  background: var(--admin-sidebar-active);
  color: var(--admin-sidebar-bg); font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.admin-sidebar .nav-item .nav-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  opacity: 0.65;
}
.admin-sidebar .nav-item:hover .nav-icon { opacity: 0.9; }
.admin-sidebar .nav-item.active .nav-icon { opacity: 1; }
.admin-sidebar .nav-item .nav-label { transition: opacity 180ms ease, max-width 180ms ease; white-space: nowrap; overflow: hidden; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 8px;
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--admin-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.sidebar-user-role { font-size: 11px; color: var(--admin-sidebar-text); }

/* ── Collapsed sidebar (icon-only) ───────────── */
.admin-layout.sidebar-collapsed .admin-sidebar {
  width: var(--admin-sidebar-collapsed);
}
.admin-layout.sidebar-collapsed .sidebar-logo-text,
.admin-layout.sidebar-collapsed .sidebar-menu-label,
.admin-layout.sidebar-collapsed .nav-label,
.admin-layout.sidebar-collapsed .sidebar-user-name,
.admin-layout.sidebar-collapsed .sidebar-user-role,
.admin-layout.sidebar-collapsed .sidebar-divider {
  opacity: 0; max-width: 0; max-height: 0;
  overflow: hidden; pointer-events: none;
  transition: opacity 180ms ease, max-width 180ms ease, max-height 180ms ease;
}
.admin-layout.sidebar-collapsed .sidebar-brand-icon { display: block; }
.admin-layout.sidebar-collapsed .sidebar-brand { justify-content: center; }
.admin-layout.sidebar-collapsed .sidebar-collapse-btn { margin-left: 0; }
.admin-layout.sidebar-collapsed .nav-item { justify-content: center; padding: 10px; }
.admin-layout.sidebar-collapsed .sidebar-footer { padding: 12px 8px; }
.admin-layout.sidebar-collapsed .sidebar-user-info { justify-content: center; padding: 4px; }

/* Tooltip on collapsed nav items */
.admin-layout.sidebar-collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute; left: calc(100% + 8px); top: 50%;
  transform: translateY(-50%);
  background: #1e293b; color: #f1f5f9;
  font-size: 12px; font-weight: 500; padding: 5px 10px;
  border-radius: 6px; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 120ms;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.admin-layout.sidebar-collapsed .nav-item:hover::after { opacity: 1; }

/* ── Main content area ────────────────────────── */
.admin-main {
  flex: 1; margin-left: calc(var(--admin-sidebar-width) + 32px);
  min-height: calc(100vh / 0.9);
  background: var(--admin-content-bg);
  transition: margin-left var(--admin-transition);
  display: flex; flex-direction: column;
}
.admin-layout.sidebar-collapsed .admin-main {
  margin-left: calc(var(--admin-sidebar-collapsed) + 32px);
}

/* ── Top bar ──────────────────────────────────── */
.admin-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 24px;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  flex-shrink: 0;
}
.admin-mobile-toggle {
  display: none; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--admin-radius-sm); cursor: pointer;
  color: var(--admin-text-secondary); flex-shrink: 0;
}
.admin-mobile-toggle:hover { background: var(--admin-border-light); }
.admin-page-title {
  font-size: 18px; font-weight: 700; color: var(--admin-text);
  letter-spacing: -0.2px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Desktop sidebar collapse button (in topbar) */
.sidebar-collapse-btn-desktop {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--admin-border); background: transparent;
  color: var(--admin-text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 180ms ease; flex-shrink: 0;
  animation: sidebarBtnPulseLight 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  position: relative;
}
@keyframes sidebarBtnPulseLight {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99,102,241,0.4);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(99,102,241,0);
  }
}
.sidebar-collapse-btn-desktop:hover {
  background: #f1f5f9; color: var(--admin-text-secondary);
  border-color: #6366f1;
  animation: none;
  box-shadow: 0 0 10px rgba(99,102,241,0.25);
}
.sidebar-collapse-btn-desktop svg {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-layout.sidebar-collapsed .sidebar-collapse-btn-desktop svg {
  transform: rotate(180deg);
}

/* ── Content area ─────────────────────────────── */
.admin-content { flex: 1; padding: 24px; }
.admin-content > :first-child { margin-top: 0; }

/* ── Overlay (mobile) ─────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(2px);
  z-index: 35; cursor: pointer;
}
.sidebar-overlay.visible { display: block; }

/* ── Admin cards ──────────────────────────────── */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-xl);
  padding: 24px;
  box-shadow: var(--admin-shadow-sm);
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.admin-card-title {
  font-size: 16px; font-weight: 700; color: var(--admin-text);
}

/* ── Stat cards (dashboard) ───────────────────── */
.admin-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.admin-stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--admin-shadow-sm);
  transition: box-shadow 200ms ease, transform 200ms ease;
  text-align: center;
}
.admin-stat-card:hover {
  box-shadow: var(--admin-shadow-md);
  transform: translateY(-2px);
}
.admin-stat-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--admin-text-muted);
  margin-bottom: 8px; display: block;
}
.admin-stat-value {
  font-size: 32px; font-weight: 800; color: var(--admin-text);
  line-height: 1.2;
}
.admin-stat-card--accent {
  border-top: 3px solid var(--admin-accent);
}
.admin-stat-card--accent .admin-stat-label { color: var(--admin-accent); }
.admin-stat-card--accent .admin-stat-value { color: var(--admin-accent); }
.admin-stat-sub { font-size: 20px; color: var(--admin-text-muted); font-weight: 600; }

/* ── Admin tables ─────────────────────────────── */
.table-admin {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--admin-surface);
  border-radius: var(--admin-radius-lg);
  overflow: hidden;
  box-shadow: var(--admin-shadow-sm);
  border: 1px solid var(--admin-border);
}
.table-admin th {
  background: #f8fafc; color: var(--admin-text-secondary);
  font-weight: 700; text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.5px;
  padding: 14px 18px; border-bottom: 1px solid var(--admin-border);
  text-align: left;
}
.table-admin td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border-light);
  color: var(--admin-text); font-size: 14px;
}
.table-admin tr:last-child td { border-bottom: none; }
.table-admin tr:hover td { background: #f8fafc; }

/* ── Admin badges ─────────────────────────────── */
.badge-admin-success { background: #dcfce7; color: #166534; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-admin-warning { background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-admin-neutral { background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-admin-danger  { background: #fef2f2; color: #dc2626; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-admin-info    { background: #eff6ff; color: #2563eb; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-admin-live    { background: #fdf2f8; color: #db2777; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ── Admin buttons ────────────────────────────── */
.btn-admin-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--admin-accent); color: #fff;
  border: none; border-radius: var(--admin-radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.btn-admin-primary:hover { background: var(--admin-accent-hover); color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-admin-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--admin-surface); color: var(--admin-text-secondary);
  border: 1px solid var(--admin-border); border-radius: var(--admin-radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all 150ms ease;
}
.btn-admin-outline:hover { background: #f8fafc; border-color: #cbd5e1; color: var(--admin-text); }
.btn-admin-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--admin-danger); color: #fff;
  border: none; border-radius: var(--admin-radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 150ms ease;
}
.btn-admin-danger:hover { background: var(--admin-danger-hover); color: #fff; }
.btn-admin-success {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--admin-success); color: #fff;
  border: none; border-radius: var(--admin-radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 150ms ease;
}
.btn-admin-success:hover { background: var(--admin-success-hover); color: #fff; }
.btn-admin-sm { padding: 6px 12px; font-size: 12px; }
.btn-admin-xs  { padding: 3px 10px; font-size: 11px; border-radius: 6px; }

/* ── Admin filter bar ─────────────────────────── */
.admin-filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--admin-shadow-sm);
}
.admin-filter-bar select {
  height: 38px; border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm); padding: 0 12px;
  font-size: 13px; font-weight: 600; color: var(--admin-text-secondary);
  background: #fff; cursor: pointer; min-width: 200px;
}
.admin-filter-bar select:focus { border-color: var(--admin-accent); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* ── Admin page header ────────────────────────── */
.admin-page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.admin-page-header h2 {
  font-size: 18px; font-weight: 800; color: var(--admin-text);
}

/* ── Admin empty state ────────────────────────── */
.admin-empty-state {
  text-align: center; padding: 64px 24px;
  border: 2px dashed var(--admin-border);
  border-radius: var(--admin-radius-xl);
  background: transparent;
}
.admin-empty-state p { color: var(--admin-text-muted); font-weight: 500; margin-bottom: 16px; }

/* ── Admin form card ──────────────────────────── */
.admin-form-card {
  max-width: 640px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-xl);
  padding: 32px;
  box-shadow: var(--admin-shadow-sm);
}
.admin-form-card .form-group { margin-bottom: 20px; }
.admin-form-card .form-label { font-weight: 600; color: var(--admin-text); margin-bottom: 4px; }
.admin-form-card .form-input,
.admin-form-card .form-select {
  height: 44px; border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm); padding: 0 14px;
  font-size: 14px; color: var(--admin-text); width: 100%;
  transition: border-color 150ms, box-shadow 150ms;
}
.admin-form-card .form-input:focus,
.admin-form-card .form-select:focus {
  border-color: var(--admin-accent);
  outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.admin-form-actions {
  display: flex; gap: 12px; margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--admin-border-light);
}

/* ── Scoreboard specific ──────────────────────── */
.scoreboard-layout { display: flex; gap: 24px; align-items: flex-start; }
.scoreboard-sidebar { width: 320px; flex-shrink: 0; }
.scoreboard-sidebar .admin-card { margin-bottom: 16px; }
.scoreboard-main { flex: 1; min-width: 0; }

.match-select-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 8px;
  background: #f8fafc; border: 1px solid var(--admin-border);
  text-decoration: none; transition: all 150ms ease;
}
.match-select-item:hover { background: #f1f5f9; border-color: #cbd5e1; }
.match-select-item.active {
  background: var(--admin-accent-subtle);
  border-color: var(--admin-accent);
  box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}
.match-select-item .team-name { flex: 1; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--admin-text-secondary); }
.match-select-item.active .team-name { color: #1e3a8a; }
.match-select-item .vs-badge {
  margin: 0 8px; background: var(--admin-border); color: var(--admin-text-muted);
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
}
.match-select-item.active .vs-badge { background: var(--admin-accent); color: #fff; }

.score-input-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px; width: 100%;
}
.score-team-panel { text-align: center; padding: 16px; }
.score-team-panel-name { font-size: 18px; font-weight: 800; color: var(--admin-text); }
.score-team-panel-club { font-size: 12px; color: var(--admin-text-muted); font-weight: 600; margin-top: 4px; }
.score-sets-panel { min-width: 200px; display: flex; flex-direction: column; gap: 10px; }
.score-set-row {
  background: #f8fafc; border: 1px solid var(--admin-border);
  border-radius: 12px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.score-input-num {
  width: 56px; height: 44px; text-align: center; font-size: 22px; font-weight: 800;
  color: var(--admin-text); background: #fff;
  border: 2px solid var(--admin-border); border-radius: 10px;
  transition: border-color 150ms, box-shadow 150ms;
}
.score-input-num:focus { border-color: var(--admin-accent); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.score-input-num::-webkit-outer-spin-button,
.score-input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input-num[type=number] { -moz-appearance: textfield; }
.score-btn-adjust {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; border: 1px solid var(--admin-border);
  background: #fff; color: var(--admin-text); cursor: pointer;
  transition: all 120ms ease;
}
.score-btn-adjust:hover { background: #f1f5f9; border-color: #cbd5e1; }
.score-btn-adjust:active { transform: scale(0.95); }


/* ==========================================================================
   16. SCORE INPUT
   ========================================================================== */

.score-input-panel {
  background-color: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xxxl);
  padding: var(--space-xxl);
}

.score-input-area {
  display: flex;
  align-items: center;
  gap: var(--space-xxl);
}

.score-team-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
}

.score-team-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-deep);
  text-align: center;
  word-break: break-word;
  letter-spacing: -0.16px;
}

.score-set-input {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.score-buttons { display: flex; align-items: center; gap: var(--space-sm); }

.score-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid var(--hairline);
  border-radius: var(--radius-full);
  color: var(--ink-deep);
  background-color: var(--canvas);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.score-btn:hover { background-color: var(--surface-soft); border-color: var(--charcoal); }
.score-btn:active { transform: scale(.92); }

.score-btn.plus {
  color: var(--success);
  border-color: rgba(var(--success-rgb), .25);
}
.score-btn.plus:hover { background-color: rgba(var(--success-rgb), .06); border-color: var(--success); }

.score-btn.minus {
  color: var(--critical);
  border-color: rgba(var(--critical-rgb), .25);
}
.score-btn.minus:hover { background-color: rgba(var(--critical-rgb), .06); border-color: var(--critical); }


/* ==========================================================================
   17. HERO
   ========================================================================== */

.hero-section {
  padding-top: var(--space-section-lg);
  padding-bottom: var(--space-section-lg);
  text-align: center;
  background: linear-gradient(180deg,
    rgba(0, 100, 224, 0.08) 0%,
    rgba(0, 100, 224, 0.03) 30%,
    rgba(0, 100, 224, 0.00) 60%,
    rgba(241, 244, 247, 0.4) 85%,
    var(--canvas) 100%
  );
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 300px;
  background: radial-gradient(ellipse 70% 80% at 50% 0%,
    rgba(0, 100, 224, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-logo {
  max-width: 260px;
  margin: 0 auto 32px;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.12))
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.08));
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxxl);
  margin-top: var(--space-xxl);
  flex-wrap: wrap;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-base);
  margin-top: var(--space-xxl);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}

/* Filter bar */
.filter-bar { margin: var(--space-xl) 0; }

/* Schedule */
.schedule-list { margin-top: var(--space-xl); }

.schedule-date-header {
  padding: var(--space-md) 0;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--hairline-soft);
}


/* ==========================================================================
   18. ANIMATIONS
   ========================================================================== */

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.animate-fadeIn  { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.animate-slideIn { animation: slideIn var(--duration-slow) var(--ease-out) both; }
.animate-scaleIn { animation: scaleIn var(--duration-normal) var(--ease-out) both; }


/* ==========================================================================
   19. UTILITIES
   ========================================================================== */

.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--critical) !important; }
.text-info      { color: var(--primary) !important; }
.text-muted     { color: var(--steel) !important; }
.text-dark      { color: var(--ink-deep) !important; }
.text-white     { color: var(--on-primary) !important; }

.bg-dark        { background-color: var(--ink-deep) !important; }
.bg-card        { background-color: var(--canvas) !important; }
.bg-primary     { background-color: var(--primary) !important; }
.bg-success     { background-color: var(--success) !important; }
.bg-danger      { background-color: var(--critical) !important; }
.bg-info        { background-color: var(--primary) !important; }
.bg-light       { background-color: var(--surface-soft) !important; }

.text-left   { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }

.fw-400 { font-weight: 400 !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

.mt-0   { margin-top: 0 !important; }
.mt-xs  { margin-top: var(--space-xs) !important; }
.mt-sm  { margin-top: var(--space-sm) !important; }
.mt-md  { margin-top: var(--space-md) !important; }
.mt-base { margin-top: var(--space-base) !important; }
.mt-lg  { margin-top: var(--space-lg) !important; }
.mt-xl  { margin-top: var(--space-xl) !important; }
.mt-xxl { margin-top: var(--space-xxl) !important; }

.mb-0   { margin-bottom: 0 !important; }
.mb-xs  { margin-bottom: var(--space-xs) !important; }
.mb-sm  { margin-bottom: var(--space-sm) !important; }
.mb-md  { margin-bottom: var(--space-md) !important; }
.mb-base { margin-bottom: var(--space-base) !important; }
.mb-lg  { margin-bottom: var(--space-lg) !important; }
.mb-xl  { margin-bottom: var(--space-xl) !important; }
.mb-xxl { margin-bottom: var(--space-xxl) !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.p-0   { padding: 0 !important; }
.p-xs  { padding: var(--space-xs) !important; }
.p-sm  { padding: var(--space-sm) !important; }
.p-md  { padding: var(--space-md) !important; }
.p-base { padding: var(--space-base) !important; }
.p-lg  { padding: var(--space-lg) !important; }
.p-xl  { padding: var(--space-xl) !important; }
.p-xxl { padding: var(--space-xxl) !important; }

.rounded-sm   { border-radius: var(--radius-sm) !important; }
.rounded-md   { border-radius: var(--radius-md) !important; }
.rounded-lg   { border-radius: var(--radius-lg) !important; }
.rounded-xl   { border-radius: var(--radius-xl) !important; }
.rounded-xxl  { border-radius: var(--radius-xxl) !important; }
.rounded-xxxl { border-radius: var(--radius-xxxl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.hidden     { display: none !important; }
.show       { display: block !important; }
.show-flex  { display: flex !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-x-auto { overflow-x: auto !important; }

.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.min-h-screen { min-height: 100vh !important; }

.relative { position: relative !important; }
.absolute { position: absolute !important; }

.cursor-pointer { cursor: pointer !important; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.divider { height: 1px; background-color: var(--hairline-soft); border: none; margin: var(--space-base) 0; }


/* ==========================================================================
   20. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .admin-sidebar { width: 280px; } /* Keep full width on medium desktops */
  .admin-main { margin-left: 280px; padding: var(--space-xl); }

  .text-hero { font-size: 52px; }
  .text-display-lg { font-size: 40px; }

  .score-input-area { flex-direction: column; align-items: center; gap: var(--space-xl); }
}

@media (max-width: 768px) {
  :root {
    --space-section: 48px;
    --space-section-lg: 56px;
  }

  .container { padding-left: 24px; padding-right: 24px; }

  /* Typography */
  .text-hero { font-size: 36px; line-height: 1.15; }
  .text-display-lg { font-size: 28px; }
  .text-display-md { font-size: 24px; }
  .text-display-sm { font-size: 22px; }
  .text-title-lg { font-size: 21px; }
  .text-title-md { font-size: 17px; }
  .text-number-display { font-size: 28px; }

  /* Grid */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--space-base); }

  /* Section */
  .section-padding { padding-top: var(--space-xxl); padding-bottom: var(--space-xxl); }

  /* ── Floating nav stays pill on mobile ── */
  .top-nav {
    top: 10px; left: 10px; right: 10px;
    transform: none;
    height: 50px;
    max-width: calc(100% - 20px);
    border-radius: var(--radius-full);
  }
  .top-nav .nav-logo { padding: 0 8px; }
  .top-nav .nav-logo .nav-logo-img { height: 28px; }
  .top-nav .nav-logo span { display: none; }
  .nav-links { display: flex; }
  .nav-links a { font-size: 12px; padding: 7px 10px; }
  .top-nav .hamburger { display: none; }

  /* ── Mobile tab bar ── */
  .mobile-tab-bar { display: flex; }
  .main-content { padding-bottom: 80px; }
  .nav-spacer { height: 74px; }

  /* Cards */
  .card, .card-match { padding: var(--space-xl); border-radius: var(--radius-xxl); }

  /* Match card — vertical stack */
  .card-match .match-body { flex-direction: column; gap: var(--space-md); }
  .card-match .match-team {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: var(--space-sm);
  }
  .card-match .match-team .team-name { font-size: 15px; flex: 1; }
  .card-match .match-score { flex-direction: row; gap: 8px; padding: 4px 0; }
  .match-vs { min-width: auto; font-size: 12px; }

  /* Score display */
  .score-display { flex-direction: column; gap: var(--space-base); }
  .score-display .score-team {
    flex-direction: row;
    gap: var(--space-sm);
    width: 100%;
    align-items: center;
  }
  .score-display .score-team .team-name { font-size: 15px; max-width: 140px; }
  .score-center { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .score-sets { gap: 8px; margin-top: 0; }
  .score-value { font-size: 32px; min-width: 50px; }
  .text-number-display { font-size: 24px; }

  /* Hero */
  .hero-section { padding-top: 48px; padding-bottom: 48px; }
  .hero-logo { max-width: 180px; margin-bottom: 24px; }
  .hero-stats { gap: var(--space-xl); margin-top: var(--space-xl); }
  .stat-item { min-width: 90px; }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    margin-left: auto; margin-right: auto;
    gap: 10px;
  }
  .hero-actions .btn { width: 100%; justify-content: center; padding: 15px 24px; font-size: 15px; }

  /* Category tabs */
  .category-tabs { gap: 6px; margin: var(--space-base) 0; padding-bottom: 8px; }
  .tab-item { padding: 8px 16px; font-size: 13px; flex-shrink: 0; }

  /* Schedule */
  .schedule-date-header { margin-top: var(--space-lg); }
  .schedule-date-header h3 { font-size: 15px; }

  /* Filter */
  .filter-bar select, .filter-bar .form-select { width: 100%; min-width: 0; }

  /* Admin */
  .admin-sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 280ms var(--ease-out), box-shadow 0ms 280ms;
    width: 280px;
    z-index: var(--z-overlay);
    box-shadow: none;
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vw rgba(10, 19, 23, .4);
    transition: transform 280ms var(--ease-out), box-shadow 0ms 0ms;
  }
  .admin-main { margin-left: 0; padding: 16px; }
  .admin-header {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 12px; padding-bottom: 14px; margin-bottom: 18px;
  }
  .admin-header h1 { font-size: 19px; }
  .admin-content { width: 100%; }

  /* Score input */
  .score-input-area { flex-direction: column; align-items: center; gap: 20px; }
  .score-team-col { max-width: 100%; width: 100%; }
  .score-set-input { flex-wrap: wrap; justify-content: center; }
  .score-input-panel { padding: var(--space-xl); }

  /* Scoreboard sidebar */
  .scoreboard-sidebar { width: 100% !important; margin-bottom: 16px; }

  /* Tables */
  .table-responsive {
    margin-left: -24px; margin-right: -24px;
    border-radius: 0; border-left: none; border-right: none;
  }
  .table-dark thead th, .table-dark td { padding: 10px 14px; font-size: 13px; }

  /* Round robin */
  .rr-group { border-radius: var(--radius-xxl); }
  .rr-group-title { padding: 14px 16px; font-size: 16px; }
  .rr-match-row { flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
  .rr-standings td { padding: 8px 10px; font-size: 13px; }

  /* Forms */
  .form-input, .form-select { font-size: 16px; padding: 12px 14px; min-height: 46px; }

  /* Buttons */
  .btn-lg { padding: 14px 24px; font-size: 15px; }

  /* Footer */
  .footer { padding: var(--space-xxl) 24px var(--space-xl); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }

  /* Login */
  .login-container { padding: 20px; align-items: flex-start; padding-top: 60px; }
  .login-card { padding: 28px 24px; }
}

/* Small mobile (<480px) */
@media (max-width: 480px) {
  .text-hero { font-size: 28px; }
  .text-display-lg { font-size: 24px; }
  .text-display-md { font-size: 20px; }
  .text-title-md { font-size: 16px; }
  .text-number-display { font-size: 22px; }

  .container { padding-left: 16px; padding-right: 16px; }
  .card, .card-match { padding: var(--space-lg); border-radius: var(--radius-xl); }

  .nav-links a { font-size: 11px; padding: 6px 8px; }

  .hero-section { padding-top: 40px; padding-bottom: 36px; }
  .hero-stats { gap: var(--space-base); }
  .hero-actions { max-width: 100%; }
  .hero-actions .btn { padding: 12px 18px; font-size: 14px; }

  .score-value { font-size: 28px; }
  .score-set-display { padding: 6px 10px; }
  .score-set-display .text-number-display { font-size: 20px; }

  .score-btn { width: 48px; height: 48px; font-size: 20px; }

  .btn-lg { padding: 12px 20px; font-size: 14px; }

  .admin-main { padding: 12px; }
  .admin-header h1 { font-size: 17px; }

  .footer-grid { grid-template-columns: 1fr; }

  .card-match .match-header { flex-direction: column; align-items: flex-start; }

  .table-responsive {
    margin-left: -16px; margin-right: -16px;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 98%);
    mask-image: linear-gradient(to right, black 85%, transparent 98%);
  }

}


/* ==========================================================================
   20B. MOBILE TAB BAR (public pages)
   ========================================================================== */

.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background-color: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--hairline-soft);
  z-index: var(--z-nav);
  padding: 4px 8px;
  padding-bottom: env(safe-area-inset-bottom, 4px);
}

.mobile-tab-bar .tab-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-tab-bar .tab-item-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--stone);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.1px;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease;
  min-width: 56px;
  position: relative;
}

.mobile-tab-bar .tab-item-icon .tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--duration-fast) ease;
}

.mobile-tab-bar .tab-item-icon.active {
  color: var(--primary);
}

.mobile-tab-bar .tab-item-icon.active::before {
  content: '';
  position: absolute;
  top: -4px;
  width: 20px; height: 3px;
  background-color: var(--primary);
  border-radius: 0 0 3px 3px;
}

.mobile-tab-bar .tab-item-icon:active .tab-icon {
  transform: scale(.85);
}


/* ==========================================================================
   20C. MOBILE SCOREBOARD (full-screen)
   ========================================================================== */

/* Hide sidebar, show mobile selector */
.mobile-match-selector {
  display: none;
}

@media (max-width: 768px) {
  .scoreboard-sidebar {
    display: none !important;
  }

  .mobile-match-selector {
    display: block;
    margin-bottom: 16px;
  }

  .mobile-match-selector .form-select {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    height: 48px;
    border-radius: var(--radius-full);
    padding: 0 20px;
  }

  /* Full-screen score panel */
  .score-input-panel {
    border-radius: var(--radius-xxl);
    padding: 20px;
    border: none;
    box-shadow: none;
  }

  .score-input-panel .match-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }

  /* Score input area — vertical with big numbers */
  .score-input-area {
    flex-direction: column;
    gap: 20px;
  }

  .score-team-col {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .score-team-name {
    font-size: 18px;
    padding: 12px 0;
  }

  /* Set row — big touch targets */
  .score-set-input {
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--hairline-soft);
    width: 100%;
  }

  .score-set-input .text-caption {
    font-size: 14px;
    font-weight: 700;
  }

  .score-buttons {
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .score-btn {
    width: 64px; height: 64px;
    font-size: 28px;
    border-radius: var(--radius-full);
  }

  .score-value {
    font-size: 42px;
    min-width: 60px;
  }

  /* Action buttons full-width */
  .score-input-panel .flex .btn-action,
  .score-input-panel .flex .btn-success {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
  }

  /* Winner buttons */
  .score-input-panel .flex .btn-action.btn-lg {
    flex: 1;
    font-size: 14px;
    padding: 14px 10px;
    white-space: normal;
    line-height: 1.3;
  }
}


/* ==========================================================================
   20D. LIVE SCORE CARDS (BWF-style)
   ========================================================================== */

.live-card {
  background: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xxl);
  margin-bottom: var(--space-xl);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

/* ── Header ──────────────────────────────────── */
.live-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-base) var(--space-xl);
  background: linear-gradient(135deg, rgba(0,100,224,0.04) 0%, rgba(0,100,224,0.01) 100%);
  border-bottom: 1px solid var(--hairline-soft);
  flex-wrap: wrap;
  gap: 8px;
}

.live-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-deep);
  letter-spacing: -0.16px;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.live-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  font-size: 13px;
  font-weight: 500;
  color: var(--steel);
}

.live-round {
  background: var(--surface-soft);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ── Score Table ─────────────────────────────── */
.live-score-table {
  padding: var(--space-lg) var(--space-xl);
  position: relative;
}

.live-team-row {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  padding: 14px 0;
  transition: background-color var(--duration-fast) ease;
}

.live-team-row.winning .live-point-value {
  color: var(--primary);
  font-weight: 700;
}

.live-team-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}

.live-team-flag {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.live-team-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.live-player-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-deep);
  letter-spacing: -0.16px;
  line-height: 1.3;
}

.live-club-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--stone);
}

/* ── Points (big score) ──────────────────────── */
.live-points {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  flex-shrink: 0;
}

.live-point-value {
  font-size: 36px;
  font-weight: 500;
  color: var(--ink-deep);
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

/* ── Games won badge ─────────────────────────── */
.live-games {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  flex-shrink: 0;
}

.live-game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
}
.live-game-badge.won {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
}

/* ── VS divider ──────────────────────────────── */
.live-vs-divider {
  display: flex;
  align-items: center;
  padding: 2px 0 2px 54px;
}

.live-vs-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--stone);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Set scores row ──────────────────────────── */
.live-set-scores {
  display: flex;
  gap: 8px;
  padding: 0 var(--space-xl) var(--space-lg);
  flex-wrap: wrap;
}

.live-set-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--surface-soft);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.live-set-bubble.current {
  background: rgba(var(--primary-rgb), .08);
  border: 1.5px solid rgba(var(--primary-rgb), .2);
}

.live-set-label {
  color: var(--stone);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-set-nums {
  color: var(--ink-deep);
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  .live-card { border-radius: var(--radius-xl); }
  .live-card-header { padding: 14px 18px; }
  .live-score-table { padding: 14px 18px; }
  .live-set-scores { padding: 0 18px 14px; }

  .live-player-name { font-size: 15px; }
  .live-point-value { font-size: 30px; min-width: 48px; }
  .live-team-flag { width: 36px; height: 36px; font-size: 12px; }
  .live-game-badge { width: 32px; height: 32px; font-size: 13px; }
}

@media (max-width: 480px) {
  .live-card-header { flex-direction: column; align-items: flex-start; }
  .live-player-name { font-size: 14px; }
  .live-point-value { font-size: 26px; }
  .live-team-flag { width: 32px; height: 32px; font-size: 11px; }
  .live-set-bubble { padding: 4px 10px; font-size: 12px; }
}


/* ==========================================================================
   21. FOOTER
   ========================================================================== */

.footer {
  background-color: var(--canvas);
  border-top: 1px solid var(--hairline-soft);
  padding: var(--space-section) var(--space-xxl);
}

.footer .container { max-width: 1280px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xxl);
  margin-bottom: var(--space-xxl);
}

.footer-col { display: flex; flex-direction: column; }
.footer-col a {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--steel);
  text-decoration: none;
  padding: 6px 0;
  letter-spacing: -0.14px;
  transition: color var(--duration-fast) ease;
}
.footer-col a:hover { color: var(--ink-deep); }

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-base);
  letter-spacing: -0.14px;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--hairline-soft);
  text-align: center;
}


/* ==========================================================================
   22. SKELETON / EMPTY STATE
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--surface-soft) 25%, var(--canvas) 50%, var(--surface-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
}
.skeleton-text { height: 14px; margin-bottom: var(--space-xs); }
.skeleton-text:last-child { width: 60%; }
.skeleton-title { height: 24px; width: 40%; margin-bottom: var(--space-base); }
.skeleton-card { height: 160px; border-radius: var(--radius-xxxl); }
.skeleton-btn { height: 44px; width: 120px; border-radius: var(--radius-full); }

.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--hairline-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-section) var(--space-xl);
  text-align: center;
}


/* ==========================================================================
   23. TOAST
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-base) var(--space-xl);
  background-color: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sticky);
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastSlideIn var(--duration-normal) var(--ease-out);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-deep);
  letter-spacing: -0.14px;
}
.toast.hiding { animation: toastSlideOut var(--duration-normal) ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--critical); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--primary); }

@media (max-width: 480px) {
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: auto; max-width: 100%; }
}


/* ==========================================================================
   24. MODAL
   ========================================================================== */

.modal-overlay {
  position: fixed; inset: 0;
  background-color: rgba(10, 19, 23, .4);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center; justify-content: center;
  padding: var(--space-xl);
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-content {
  background-color: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xxxl);
  width: 100%;
  max-width: 540px; max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-out);
}
.modal-overlay.open .modal-content { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--hairline-soft);
}
.modal-header .modal-title { font-size: 18px; font-weight: 700; color: var(--ink-deep); }
.modal-body { padding: var(--space-xl); }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-base) var(--space-xl);
  border-top: 1px solid var(--hairline-soft);
}

@media (max-width: 768px) {
  .modal-overlay { padding: var(--space-base); align-items: flex-end; }
  .modal-content {
    max-width: 100%;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    max-height: 85vh;
  }
  .modal-header, .modal-body, .modal-footer { padding: var(--space-base); }
}


/* ==========================================================================
   25. LOGIN
   ========================================================================== */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  background-color: var(--surface-soft);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: var(--space-xxxl);
  background-color: var(--canvas);
  border-radius: var(--radius-xxxl);
  border: 1px solid var(--hairline-soft);
}

.alert {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-base);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.14px;
  margin-bottom: var(--space-base);
}

.alert-danger {
  background-color: rgba(var(--critical-rgb), .06);
  color: var(--critical);
  border: 1px solid rgba(var(--critical-rgb), .15);
}

.alert-info {
  background-color: rgba(var(--primary-rgb), .06);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), .15);
}


/* ==========================================================================
   END OF DESIGN SYSTEM
   Melisport Open 2026 - Meta-inspired, pill-perfect.
   ========================================================================== */

/* ==========================================================================
   MOBILE APP LAYOUT OVERRIDES (Global) & MODERN NAVBAR
   ========================================================================== */
.top-nav { display: none !important; }
.nav-spacer { display: none !important; }
.footer { display: none !important; }

/* Modern Floating Bottom Nav - Pop-out Active Icon Style */
.mobile-tab-bar { 
    display: flex !important;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
    height: 70px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 0 8px;
}

/* iOS Home Indicator mock */
.mobile-tab-bar::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
}

.mobile-tab-bar .tab-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}
.mobile-tab-bar .tab-item-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #94a3b8; /* slate-400 */
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    height: 100%;
}
.mobile-tab-bar .tab-item-icon .tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%) opacity(0.7);
}
.mobile-tab-bar .tab-item-icon.active {
    color: var(--primary, #8b5cf6); /* Uses primary color, fallback to purple */
    font-weight: 700;
}
.mobile-tab-bar .tab-item-icon.active .tab-icon {
    position: absolute;
    top: -24px; /* Protrudes outside the navbar */
    width: 56px;
    height: 56px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.06); /* Subtle shadow on top to pop out */
    margin-bottom: 0;
    filter: grayscale(0%) opacity(1);
}
.mobile-tab-bar .tab-item-icon.active span:not(.tab-icon) {
    position: absolute;
    bottom: 16px;
    transition: all 0.3s ease;
}

/* Add extra padding to main content to account for the floating navbar */
.main-content { padding-bottom: 120px !important; }
/* ==========================================================================
   26. MOBILE REDESIGN (OVERRIDE)
   ========================================================================== */

/* Background */
.app-background {
  animation: dimToBright 3s ease-in-out forwards;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  background-image: url('../picture/background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  background-color: #f0f4f9; /* Fallback */
}
.app-overlay {
  position: fixed;
  bottom: 0; left: 0; width: 100%; height: 60vh;
  background: linear-gradient(to bottom, rgba(240,244,249,0) 0%, rgba(240,244,249,1) 40%);
  z-index: -1;
  pointer-events: none;
}
.app-gradient-background {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2;
  background: linear-gradient(180deg, #ffe4e6 0%, #ffffff 30%, #ffffff 100%);
}

/* Base modifications for Redesign */
body {
  background-color: transparent; /* Let app-background show */
}
.main-content.is-home {
  padding-top: 280px;
  padding-bottom: 100px;
  padding-left: 16px;
  padding-right: 16px;
}
.main-content.is-inner {
  padding-top: 32px;
  padding-bottom: 100px;
}


/* Custom Bottom Nav */
.custom-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: #ffffff;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
}
.custom-bottom-nav .nav-items-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px 12px 24px;
  position: relative;
}
.custom-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #a0a0a0;
  flex: 1;
  transition: all 0.2s ease;
}
.custom-bottom-nav .nav-item span {
  font-size: 11px;
  font-weight: 600;
}
.custom-bottom-nav .nav-item.active {
  color: #e51e54; /* Pink */
}

/* Center FAB */
.custom-bottom-nav .nav-item-center {
  position: relative;
  top: -24px;
}
.custom-bottom-nav .nav-item-center .fab-wrapper {
  background: linear-gradient(135deg, #f72c68 0%, #d4144b 100%);
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(229, 30, 84, 0.4);
  border: 4px solid #ffffff;
  margin-bottom: 6px;
}
.custom-bottom-nav .nav-item-center.active .fab-wrapper {
  transform: scale(1.05);
}

/* Quick Menu Grid */
.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  justify-items: center;
  text-align: center;
}
.quick-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-decoration: none;
}
.quick-menu-icon {
  background: #f3f4f6;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}
.quick-menu-icon svg {
  width: 20px;
  height: 20px;
}
.quick-menu-label {
  font-size: 10px;
  font-weight: 700;
  color: #374151;
  line-height: 1.2;
}

/* Redesigned Live Card */
.card-live-redesign {
  background: white;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.live-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.badge-live-pink {
  background: #e51e54;
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.court-info {
  background: #f3f4f6;
  padding: 3px 12px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #4b5563;
}
.live-match-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.team-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 80px;
}
.team-avatar-stack {
  display: flex;
  justify-content: center;
}
.team-avatar-stack .avatar-img {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  background: #1e3a8a;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
}
.team-avatar-stack .avatar-img:nth-child(2) {
  margin-left: -12px;
  background: #0457cb;
}
.team-name-redesign {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #111827;
  line-height: 1.2;
}
.team-club-redesign {
  font-size: 9px;
  color: #6b7280;
  text-align: center;
  margin-top: 2px;
}
.score-redesign {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-number {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}
.score-set-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.shuttlecock-icon {
  color: #9ca3af;
  width: 14px;
  height: 14px;
}
.set-text {
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
}
.set-detail {
  font-size: 10px;
  color: #e51e54;
  font-weight: 800;
}

/* Pagination Dots */
.live-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.pagination-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d1d5db;
}
.pagination-dot.active {
  background: #e51e54;
}

/* Section Header */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-title {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  text-transform: uppercase;
}
.see-all-link {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* News List */
.news-item {
  display: flex;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.news-img {
  width: 110px;
  background-color: #1e3a8a;
  background-image: url('../picture/background.webp');
  background-size: cover;
  background-position: center;
}
.news-content {
  padding: 12px 16px;
  flex: 1;
}
.news-title {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.3;
}
.news-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
}
.news-time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 8px;
  font-weight: 600;
}

/* Additional Overrides */
.footer { display: none !important; }



/* ==========================================================================
   27. TRANSITIONS & SKELETON LOADING
   ========================================================================== */

/* Slide In Right Animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.page-transition {
  animation: fadeInContent 0.4s ease forwards;
}

/* Skeleton Loader */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: #e2e8f0;
  background-image: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-title {
  height: 20px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  padding: 16px;
  border-radius: 20px;
  background: white;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: flex;
  gap: 12px;
  align-items: center;
}


/* Desktop / Tablet Layout */
@media (min-width: 769px) {
    .custom-bottom-nav { display: none !important; }
    .top-nav {
        display: flex;
        position: fixed; top: 0; left: 0; width: 100%;
        background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
        height: 70px; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .main-content.is-home { padding-top: 120px; }
    .main-content.is-inner { padding-top: 100px; }
    .page-transition { animation: none; } /* Disable mobile slide on desktop */
}

/* Mobile Layout */
@media (max-width: 768px) {
    .app-background {
        background-size: 100% auto; /* Fit width perfectly on mobile */
        background-position: top center;
    }
    .main-content.is-home {
        padding-top: calc(100vw * 1.3); /* Push content down dynamically based on image ratio */
    }
}


/* ==========================================================================
   27. ADMIN RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 1024px) {
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .scoreboard-layout { flex-direction: column; }
  .scoreboard-sidebar { width: 100%; }
  .score-input-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-150%);
    transition: transform 280ms var(--ease-out);
    z-index: 50;
    /* Reset floating to edge-to-edge on mobile for better space utilization */
    top: 0; left: 0; bottom: 0;
    border-radius: 0;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vw rgba(15,23,42,0.45);
  }
  .admin-main { margin-left: 0 !important; }
  .admin-topbar { padding: 0 16px; }
  .admin-mobile-toggle { display: flex; }
  .admin-content { padding: 16px; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-stat-card { padding: 16px; }
  .admin-stat-value { font-size: 26px; }
  .score-input-grid { grid-template-columns: 1fr; }
  .scoreboard-sidebar { width: 100% !important; }
  .admin-form-card { padding: 20px; }
  .admin-page-header { flex-direction: column; align-items: flex-start; }
  .admin-filter-bar { flex-direction: column; align-items: stretch; }
  .admin-filter-bar select { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .admin-main { margin-left: 0 !important; }
  .admin-content { padding: 12px; }
  .admin-topbar { padding: 0 12px; }
  .admin-page-title { font-size: 16px; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-stat-card { padding: 12px 14px; }
  .admin-stat-value { font-size: 22px; }
  .admin-stat-label { font-size: 10px; }
  .table-admin th, .table-admin td { padding: 10px 12px; font-size: 12px; }
  .admin-form-card { padding: 16px; max-width: 100%; }
}
  0%   { opacity: 0; filter: brightness(0.05) blur(4px); }
  15%  { opacity: 0.2; filter: brightness(0.2) blur(3px); }
  35%  { opacity: 0.5; filter: brightness(0.5) blur(1.5px); }
  60%  { opacity: 0.8; filter: brightness(0.8) blur(0.5px); }
  80%  { opacity: 0.95; filter: brightness(0.95) blur(0); }
  100% { opacity: 1; filter: brightness(1) blur(0); }
}

@keyframes fadeInContent { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== MP Toast popups (system / data-saved notifications) ===== */
.mp-toast-container {
  position: fixed; top: 18px; right: 18px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.mp-toast {
  pointer-events: auto; position: relative;
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 12px 38px 12px 12px;
  background: #ffffff; border-radius: 14px;
  box-shadow: 0 10px 34px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.08);
  overflow: hidden;
  animation: mpToastIn 0.28s cubic-bezier(0.21, 1.02, 0.55, 1.01);
}
.mp-toast.hiding { animation: mpToastOut 0.25s ease forwards; }
@keyframes mpToastIn { from { opacity: 0; transform: translateY(-14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes mpToastOut { to { opacity: 0; transform: translateY(-10px) scale(0.97); } }
.mp-toast-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #fff;
}
.mp-toast-success .mp-toast-icon { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 3px 10px rgba(34,197,94,0.45); }
.mp-toast-error   .mp-toast-icon { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 3px 10px rgba(244,63,94,0.45); }
.mp-toast-info    .mp-toast-icon { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.mp-toast-warning .mp-toast-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }
.mp-toast-msg { font-size: 12.5px; font-weight: 700; color: #0f172a; line-height: 1.45; }
.mp-toast-close {
  position: absolute; top: 6px; right: 8px;
  background: none; border: none; font-size: 16px; color: #94a3b8;
  cursor: pointer; line-height: 1; padding: 4px;
}
.mp-toast-close:hover { color: #475569; }
.mp-toast-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  transform-origin: left;
  animation-name: mpToastBar; animation-timing-function: linear; animation-fill-mode: forwards;
}
.mp-toast-success .mp-toast-bar { background: linear-gradient(90deg, #22c55e, #16a34a); }
.mp-toast-error   .mp-toast-bar { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.mp-toast-info    .mp-toast-bar { background: #38bdf8; }
.mp-toast-warning .mp-toast-bar { background: #f59e0b; }
@keyframes mpToastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .mp-toast-container { left: 14px; right: 14px; }
  .mp-toast { max-width: none; width: 100%; }
}
