/* ═══════════════════════════════════════════════════════════
   Vortex TV Admin — Design System v2
   Dark-first streaming control panel · RTL
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'AGCRegular';
  src: url('fonts/AGCRegular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: 'IBM Plex Sans Arabic', 'AGCRegular', 'Segoe UI', Tahoma, sans-serif;

  /* Brand — Vortex navy + electric blue */
  --brand-900: #060d18;
  --brand-800: #0a1628;
  --brand-700: #0f2137;
  --brand-600: #152a45;
  --accent: #2b6bff;
  --accent-hover: #4a82ff;
  --accent-soft: rgba(43, 107, 255, 0.14);
  --accent-glow: rgba(43, 107, 255, 0.35);

  /* Light theme surfaces */
  --bg: #eef2f8;
  --bg-alt: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #e8edf5;
  --text: #0a1628;
  --text-2: #334155;
  --muted: #64748b;
  --border: rgba(10, 22, 40, 0.08);
  --border-strong: rgba(10, 22, 40, 0.14);
  --shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 8px 24px rgba(10, 22, 40, 0.06);
  --shadow-lg: 0 4px 6px rgba(10, 22, 40, 0.04), 0 20px 48px rgba(10, 22, 40, 0.1);
  --sidebar-bg: linear-gradient(180deg, #0a1628 0%, #0f2137 100%);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --topbar-bg: rgba(247, 249, 252, 0.82);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --sidebar-width: 272px;
  --topbar-height: 76px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy aliases */
  --blue: var(--accent);
  --blue-bright: var(--accent-hover);
  --blue-dark: var(--brand-600);
  --blue-deep: var(--brand-800);
  --sidebar: var(--sidebar-bg);
}

[data-theme='dark'] {
  --bg: #060d18;
  --bg-alt: #0a1628;
  --surface: #0f2137;
  --surface-2: #152a45;
  --surface-3: #1a3352;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #7c93b0;
  --border: rgba(148, 163, 184, 0.1);
  --border-strong: rgba(148, 163, 184, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.2), 0 24px 56px rgba(0, 0, 0, 0.4);
  --topbar-bg: rgba(10, 22, 40, 0.88);
  --accent-soft: rgba(43, 107, 255, 0.18);
}

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ─── Login ─── */
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--brand-900);
}

.login-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-10);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(43, 107, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(43, 107, 255, 0.12), transparent 50%),
    linear-gradient(160deg, #0a1628 0%, #060d18 100%);
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  text-align: center;
  color: #fff;
}

.login-visual-inner img {
  width: 112px;
  height: 112px;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.login-visual-inner h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.login-visual-inner p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.7;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: var(--space-8);
  background: var(--surface);
  position: relative;
}

.login-theme-toggle {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
}

.login-card {
  width: min(100%, 400px);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.login-card > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-6);
}

/* ─── App shell ─── */
body.has-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100dvh;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
  backdrop-filter: blur(2px);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 100;
  background: var(--sidebar-bg);
  color: #e2e8f0;
  border-left: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-4);
  gap: var(--space-5);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
}

.sidebar-logo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #1e40af);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.sidebar-brand-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-brand-text span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-inline-end: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.nav-group {
  margin-bottom: var(--space-5);
}

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  padding: 0 var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-3);
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  opacity: 0.9;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--sidebar-border);
}

.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--accent-soft), transparent 50%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.sidebar-toggle {
  display: none;
}

.topbar-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.topbar h1 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.topbar-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.content-area {
  padding: var(--space-6);
  max-width: 1440px;
  width: 100%;
}

/* ─── Sections & grids ─── */
.section { margin-bottom: var(--space-8); }

.section-head {
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }

/* ─── Cards ─── */
.card,
.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.card-header p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.card-body { padding: var(--space-5); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.quick-link {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.quick-link:hover {
  border-color: rgba(43, 107, 255, 0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.quick-link .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
}

.quick-link h3 {
  font-size: 1rem;
  font-weight: 700;
}

.quick-link p {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ─── Forms ─── */
label {
  display: grid;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}

input[type='text'],
input[type='password'],
input[type='url'],
input[type='number'],
input[type='email'],
input[type='file'],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  min-height: 120px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-grid { display: grid; gap: var(--space-4); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}

.checkbox-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  background: var(--surface-2);
  transition: border-color var(--transition), background var(--transition);
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  color: var(--accent);
}

.upload-zone p {
  color: var(--muted);
  margin: var(--space-2) 0 var(--space-4);
  font-size: 0.875rem;
}

/* ─── Lists & tables ─── */
.list-stack { display: grid; gap: var(--space-3); }

.list-item,
.banner-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.list-item:hover,
.banner-list-item:hover {
  border-color: var(--border-strong);
}

.list-item.is-active {
  border-color: rgba(43, 107, 255, 0.4);
  background: var(--accent-soft);
}

.list-item strong,
.banner-list-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.list-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

.banner-list-item img {
  width: 120px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: var(--space-3) var(--space-4);
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table img { height: 48px; border-radius: var(--radius-sm); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover { background: var(--surface-2); }

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.16); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

button.btn { font-family: inherit; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Alerts & badges ─── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert > span:first-child {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-live 1.5s ease infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.empty-hint {
  text-align: center;
  color: var(--muted);
  padding: var(--space-8) var(--space-4);
  font-size: 0.875rem;
}

.hint { color: var(--muted); font-size: 0.82rem; }

.hint-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

code {
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
}

.preview-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.preview-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

.card-body-divider {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.subform-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

/* ─── Schedule ─── */
.schedule-list { display: grid; gap: var(--space-3); }

.schedule-match-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.schedule-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.schedule-match-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-edit-box,
.day-edit-box {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--surface);
}

.schedule-edit-box summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
}

.schedule-edit-box summary::-webkit-details-marker { display: none; }
.schedule-edit-box[open] summary { margin-bottom: var(--space-3); }

.schedule-flag-preview {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.schedule-match-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.schedule-team {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.schedule-team-home { justify-content: flex-start; }
.schedule-team-away { justify-content: flex-end; }

.schedule-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 700;
}

.schedule-time {
  flex-shrink: 0;
  min-width: 72px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.schedule-flag {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.schedule-flag-placeholder {
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.schedule-accordion { display: grid; gap: var(--space-3); margin-top: var(--space-4); }

.schedule-day-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.schedule-day-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
  color: #fff;
  user-select: none;
}

.schedule-day-summary::-webkit-details-marker { display: none; }

.schedule-day-summary-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.schedule-day-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.schedule-day-text { display: grid; gap: 2px; min-width: 0; }
.schedule-day-text strong { font-size: 0.9rem; font-weight: 700; }
.schedule-day-text span { font-size: 0.75rem; opacity: 0.8; }

.schedule-day-summary-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.schedule-chevron {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease;
}

.schedule-day-accordion[open] .schedule-chevron { transform: rotate(180deg); }
.schedule-day-panel { padding: var(--space-4); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  body.has-shell { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(var(--sidebar-width), 88vw);
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }

  .sidebar-toggle { display: inline-flex; }
}

@media (max-width: 768px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: var(--space-4);
  }

  .topbar-actions { width: 100%; }
  .topbar-actions .btn { flex: 1; }

  .content-area { padding: var(--space-4); }

  .schedule-match-row { flex-direction: column; align-items: stretch; }
  .schedule-match-line { flex-direction: column; align-items: stretch; }
  .schedule-team-away { justify-content: flex-start; }
  .schedule-time { align-self: center; }
}
