/* Golden Strikers Academy — Design System */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --gold-dark: #8b6914;
  --pitch: #0a2e22;
  --pitch-mid: #134332;
  --pitch-light: #1e5c44;
  --cream: #f7f4ed;
  --cream-dark: #e8e2d4;
  --ink: #1a1612;
  --ink-muted: #5c564c;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #1e8449;
  --warning: #d68910;
  --info: #2874a6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(10, 46, 34, 0.12);
  --shadow-lg: 0 20px 60px rgba(10, 46, 34, 0.18);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --sidebar-w: 280px;
  --header-h: 72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(212, 168, 83, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(19, 67, 50, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }

a { color: var(--pitch-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }

/* ========== LOGIN PAGE ========== */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.login-hero {
  background: var(--pitch);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 5vw, 4rem);
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, transparent 30%, rgba(0,0,0,0.4)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a853' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.login-hero-ball {
  position: absolute;
  top: 15%;
  right: 10%;
  width: clamp(120px, 20vw, 200px);
  height: clamp(120px, 20vw, 200px);
  border: 3px solid rgba(212, 168, 83, 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.login-hero-ball::after {
  content: '⚽';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.9;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(8deg); }
}

.login-hero-content {
  position: relative;
  z-index: 1;
  color: var(--cream);
  animation: fadeUp 0.8s ease-out;
}

.login-hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.login-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 400px;
}

.login-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.login-hero-tags span {
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cream);
  animation: fadeUp 0.8s ease-out 0.15s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card h2 {
  color: var(--pitch);
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: var(--ink-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ========== LAYOUT ========== */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--pitch);
  color: var(--cream);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
}

.sidebar-brand {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.sidebar-brand .logo-sub {
  font-size: 0.7rem;
  opacity: 0.6;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(247, 244, 237, 0.5);
  padding: 1.25rem 1rem 0.6rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: rgba(247, 244, 237, 0.88);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  margin-bottom: 3px;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--cream);
}

.nav-link:hover .nav-icon {
  color: var(--gold-light);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(212,168,83,0.22), rgba(212,168,83,0.04));
  color: var(--gold-light);
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-link.active .nav-icon {
  color: var(--gold-light);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: rgba(247, 244, 237, 0.65);
  transition: color var(--transition);
}

.nav-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.nav-label {
  line-height: 1.3;
}

.nav-link-logout {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(247, 244, 237, 0.7);
}

.sidebar-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--pitch);
}

.user-chip .name { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; }
.user-chip .role { font-size: 0.8rem; opacity: 0.65; font-weight: 500; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: rgba(247, 244, 237, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h1 {
  color: var(--pitch);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--pitch);
  color: var(--cream);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}

.menu-toggle .nav-icon {
  color: var(--cream);
  width: 1.5rem;
  height: 1.5rem;
}

.menu-toggle .nav-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.page-body {
  padding: clamp(1.25rem, 3vw, 2rem);
  flex: 1;
}

/* ========== COMPONENTS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pitch-light), var(--pitch));
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(10, 46, 34, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 46, 34, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--pitch);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--pitch-light);
  color: var(--pitch);
}

.btn-outline:hover { background: var(--pitch); color: var(--cream); border-color: var(--pitch); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
.btn-danger { background: var(--danger); color: white; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--pitch-light);
  box-shadow: 0 0 0 4px rgba(30, 92, 68, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

select.form-control { cursor: pointer; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s ease-out both;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(19, 67, 50, 0.08);
  color: var(--pitch-light);
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.stat-card.gold-accent .stat-card-icon {
  background: rgba(212, 168, 83, 0.18);
  color: var(--gold-dark);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(212,168,83,0.15), transparent);
  border-radius: 0 0 0 100%;
}

.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.16s; }
.stat-card:nth-child(4) { animation-delay: 0.24s; }
.stat-card:nth-child(5) { animation-delay: 0.32s; }

.stat-card .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 600;
  line-height: 1.35;
}

.stat-card .value {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pitch);
  line-height: 1.1;
}

.stat-card.gold-accent .value { color: var(--gold-dark); }

.stat-card-icon .nav-icon {
  width: 100%;
  height: 100%;
  color: inherit;
}

.stat-card-icon .nav-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.stat-card-icon .currency-ksh-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

.stat-card.gold-accent .stat-card-icon .currency-ksh-label {
  color: var(--gold-dark);
  font-size: 0.85rem;
}

/* Cards & panels */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
}

.panel-header h2,
.panel-header h3 {
  color: var(--pitch);
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.panel-title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.panel-title-with-icon .nav-icon {
  color: var(--warning);
  width: 1.2rem;
  height: 1.2rem;
}

.panel-title-with-icon .nav-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.panel-body { padding: 1.5rem; }

/* Table */
.table-wrap { overflow-x: auto; }

/* Allow row action menus to escape scroll clipping when using fixed positioning */
.panel-table-actions {
  overflow: visible;
}

.panel-table-actions .panel-body {
  overflow: visible;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--cream);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover { background: rgba(247, 244, 237, 0.6); }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success { background: rgba(30, 132, 73, 0.12); color: var(--success); }
.badge-danger { background: rgba(192, 57, 43, 0.12); color: var(--danger); }
.badge-warning { background: rgba(214, 137, 16, 0.15); color: var(--warning); }
.badge-info { background: rgba(40, 116, 166, 0.12); color: var(--info); }
.badge-gold { background: rgba(212, 168, 83, 0.2); color: var(--gold-dark); }
.badge-muted { background: var(--cream-dark); color: var(--ink-muted); }

.age-badge {
  background: var(--pitch);
  color: var(--gold-light);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.col-actions { width: 5rem; text-align: right; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--pitch);
  cursor: pointer;
  text-align: left;
}

.link-btn:hover { color: var(--gold-dark); text-decoration: underline; }

.guardian-link {
  color: var(--pitch);
  font-weight: 600;
  text-decoration: none;
}

.guardian-link:hover { text-decoration: underline; }

.action-menu-wrap {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.action-menu-btn {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
}

.action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 11.5rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  padding: 0.35rem 0;
  text-align: left;
}

.action-menu.open,
.action-menu.action-menu-fixed {
  display: block;
}

.action-menu.action-menu-fixed {
  position: fixed;
  right: auto;
  top: auto;
}

.action-menu-item {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.action-menu-item:hover:not(.disabled) {
  background: var(--cream);
  color: var(--pitch);
}

.action-menu-item.danger { color: var(--danger); }

.action-menu-item.danger:hover { background: rgba(192, 57, 43, 0.08); }

.action-menu-item.disabled {
  color: var(--ink-muted);
  cursor: not-allowed;
  font-size: 0.8rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 18, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s ease-out;
}

.modal-lg { max-width: 800px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { color: var(--pitch); }

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-muted);
  line-height: 1;
}

.modal-body { padding: 1.5rem; }

.modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 400;
}

/* Player register / edit form */
.player-modal .modal-header.player-modal-header {
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, var(--pitch) 0%, var(--pitch-light, #2d6b52) 100%);
  border-bottom: none;
}

.player-modal-header h3 {
  color: var(--cream);
  margin: 0;
  font-size: 1.35rem;
}

.player-modal-header .modal-subtitle {
  color: rgba(255, 255, 255, 0.82);
}

.player-modal-header .modal-close {
  color: var(--cream);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.player-modal-header .modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.player-form-body {
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--cream, #f8f5f0);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(26, 22, 18, 0.04);
}

.form-section-muted {
  background: var(--white);
  border-style: dashed;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cream-dark);
  background: linear-gradient(180deg, var(--white) 0%, var(--cream, #faf8f5) 100%);
}

.form-section-icon {
  font-size: 1.35rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.form-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pitch);
}

.form-section-desc {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.form-section-body {
  padding: 1.25rem;
}

.player-form .form-group {
  margin-bottom: 1rem;
}

.player-form .form-group:last-child {
  margin-bottom: 0;
}

.player-form label .req {
  color: var(--gold, #c9a227);
  font-weight: 700;
}

.player-form .form-control {
  border-radius: 10px;
  border: 1.5px solid var(--cream-dark);
  padding: 0.7rem 0.95rem;
  background: var(--white);
}

.player-form .form-control:hover {
  border-color: #c5bdb0;
}

.player-form textarea.form-control {
  min-height: 4.5rem;
  resize: vertical;
}

.player-form-footer {
  padding: 1rem 1.5rem 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  justify-content: flex-end;
}

.player-form-footer .btn-save-player {
  min-width: 9rem;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(30, 92, 68, 0.25);
}

.package-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.3;
}

.package-cell-name {
  font-weight: 600;
  color: var(--ink);
}

.package-cell-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.package-cell-empty {
  color: var(--ink-muted);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Filters bar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.toolbar .form-control { max-width: 220px; }

/* Status buttons */
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.status-btn.arrived {
  background: rgba(30, 132, 73, 0.1);
  color: var(--success);
  border-color: var(--success);
}

.status-btn.departed {
  background: rgba(40, 116, 166, 0.1);
  color: var(--info);
  border-color: var(--info);
}

.status-btn.finished {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold-dark);
  border-color: var(--gold);
}

.status-btn:hover { transform: scale(1.03); }

/* Attendance grid */
.attendance-grid {
  display: grid;
  gap: 0.75rem;
}

.attendance-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
}

.attendance-row .player-name { font-weight: 600; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--pitch);
  color: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.4s ease-out;
  max-width: 360px;
  border-left: 4px solid var(--gold);
}

.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }

.empty-state-hint {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--danger, #b42318);
}

.form-control.is-invalid {
  border-color: var(--danger, #b42318);
}

.table-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-muted);
}

/* Age group pills on dashboard */
.group-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.group-pill {
  flex: 1;
  min-width: 120px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform var(--transition);
}

.group-pill:hover { transform: translateY(-4px); }

.group-pill .code {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--pitch);
}

.group-pill .count {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

/* Install page */
.install-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.install-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 480px;
}

.install-icon { font-size: 4rem; margin-bottom: 1rem; }
.install-credentials { background: var(--cream); padding: 1rem; border-radius: var(--radius-sm); margin: 1.5rem 0; }
.install-warning { font-size: 0.8rem; color: var(--ink-muted); margin-top: 1.5rem; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error { background: rgba(192,57,43,0.1); color: var(--danger); border: 1px solid rgba(192,57,43,0.2); }

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--cream-dark);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-btn.active {
  color: var(--pitch);
  border-bottom-color: var(--gold);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.data-table small { display: block; color: var(--ink-muted); font-size: 0.75rem; margin-top: 2px; }

.alert-banner {
  background: linear-gradient(90deg, rgba(214,137,16,0.15), transparent);
  border: 1px solid rgba(214,137,16,0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { min-height: 280px; }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }
  .sidebar-backdrop.active { display: block; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .attendance-row { grid-template-columns: 1fr; }
  .toolbar .form-control { max-width: 100%; flex: 1; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}
