.root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --card: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #0ea5e9;
  --primary-strong: #0284c7;
  --accent: #22d3ee;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #1f2937;
  min-height: 100vh;
}

.stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
}

.stat-card h3 {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.stat-card .stat-label {
  margin: 0 0 4px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #6b7280;
}

#loginCard{
  max-width:400px;
}

code{
  font-size:.85em;
  word-break:break-all;
}

.navbar {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 16px rgba(14,165,233,0.15);
}

.navbar .navbar-brand {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.navbar .navbar-text {
  color: #f0f9ff;
}

.club-logo {
  height: 50px;
  max-width: 60px;
  object-fit: contain;
}

.navbar .btn-light {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid rgba(0,0,0,0.1);
}

#appRoot {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  padding: 1.5rem;
}

.nav-tabs {
  border-color: #e5e7eb;
}

.nav-tabs .nav-link {
  color: #6b7280;
  border: none;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 12px 12px 0 0;
  transition: all 0.15s ease;
}

.nav-tabs .nav-link:hover {
  color: #1f2937;
  background: #f3f4f6;
}

.nav-tabs .nav-link.active {
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom-color: transparent;
}

.tab-content {
  border: 1px solid #e5e7eb !important;
  border-radius: 0 12px 12px 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
}

h4 {
  color: #1f2937;
  letter-spacing: 0.2px;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
}

.table {
  color: #1f2937;
  border-collapse: collapse;
}

.table thead {
  background: #f9fafb;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.table th, .table td {
  border-color: #e5e7eb;
}

.table-hover tbody tr:hover {
  background: #f9fafb;
}

.table-group-row {
  background: #f3f4f6;
}

.table-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.table-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-group-caret {
  display: inline-block;
  transition: transform 0.15s ease;
}

.table-group-row.collapsed .table-group-caret {
  transform: rotate(-90deg);
}

.table-group-divider {
  height: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.table-group-divider td {
  border: none !important;
  padding: 0 !important;
  height: 0 !important;
}

.table-group-divider + tr > td {
  border-top: none !important;
}

.badge.bg-secondary {
  background: #e5e7eb !important;
  color: #374151;
}

.badge.bg-warning {
  background: #fcd34d !important;
  color: #78350f;
}

/* Dark mode -------------------------------------------------- */
.dark-mode body {
  background: #1a1a1a;
  color: #ffffff;
}

.dark-mode #appRoot {
  background: #1e1e1e;
  color: #ffffff;
}

.dark-mode .tab-content,
.dark-mode .table,
.dark-mode .stat-card,
.dark-mode .modal-content,
.dark-mode .modal-footer {
  background: #242424;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.dark-mode .navbar {
  background: linear-gradient(90deg, #0ea5e9, #075985);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .nav-tabs .nav-link,
.dark-mode h4,
.dark-mode .stat-card h3,
.dark-mode .stat-card .stat-label,
.dark-mode .table,
.dark-mode .table thead,
.dark-mode .table td,
.dark-mode .table th {
  color: #f8fafc;
}

.dark-mode .nav-tabs .nav-link.active,
.dark-mode .tab-content {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff;
}

.dark-mode .tab-pane {
  color: #ffffff !important;
}

.dark-mode .tab-pane * {
  color: #ffffff !important;
}

.dark-mode .tab-pane p,
.dark-mode .tab-pane label,
.dark-mode .tab-pane a,
.dark-mode .tab-pane h1,
.dark-mode .tab-pane h2,
.dark-mode .tab-pane h3,
.dark-mode .tab-pane h4,
.dark-mode .tab-pane h5,
.dark-mode .tab-pane h6,
.dark-mode .tab-pane span,
.dark-mode .tab-pane div {
  color: #ffffff !important;
}

.dark-mode .bg-white {
  background-color: #242424 !important;
  color: #ffffff !important;
}

.dark-mode .table tbody tr,
.dark-mode .table tbody td {
  background-color: #242424 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .table-hover tbody tr:hover {
  background-color: #2a2a2a !important;
}

.dark-mode .table thead,
.dark-mode .table tbody tr,
.dark-mode .table th,
.dark-mode .table td,
.dark-mode .nav-tabs,
.dark-mode .nav-tabs .nav-link.active,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .input-group-text,
.dark-mode .modal-footer {
  border-color: rgba(248, 250, 252, 0.12) !important;
}

.dark-mode .table-light {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode .table-light th,
.dark-mode .table-light td {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.dark-mode .table-hover tbody tr:hover {
  background: rgba(248, 250, 252, 0.06);
}

.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .input-group-text,
.dark-mode .modal-content,
.dark-mode .modal-footer,
.dark-mode .stat-card {
  background-color: #242424;
  color: #f8fafc;
}

.dark-mode .btn-light {
  background: #1f2937;
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.2);
}

.dark-mode .btn-outline-primary,
.dark-mode .btn-outline-secondary,
.dark-mode .btn-outline-danger {
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.25);
}

.dark-mode .btn-outline-primary:hover,
.dark-mode .btn-outline-secondary:hover,
.dark-mode .btn-outline-danger:hover {
  background: rgba(248, 250, 252, 0.08);
  color: #f8fafc;
}

.dark-mode .badge.bg-secondary {
  background: rgba(248, 250, 252, 0.15) !important;
  color: #f8fafc;
}

.dark-mode .toast-notification {
  background: #0b1220;
  color: #f8fafc;
}

/* Print styles ---------------------------------------------- */
@media print {
  nav, .nav, .btn, .no-print { display: none !important; }
  body { background: #ffffff; color: #111827; }
  #appRoot { box-shadow: none; border: none; }
  .table { font-size: 11pt; }
  .table th, .table td { border-color: #e5e7eb !important; }
  .stat-card { page-break-inside: avoid; }
}

.btn-success {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: none;
  box-shadow: 0 4px 12px rgba(14,165,233,0.25);
  color: #ffffff;
  font-weight: 600;
}

.btn-outline-primary {
  border-color: #bfdbfe;
  color: #0284c7;
  line-height: 1;
  padding: 0.5rem 0.7rem;
}

.btn-outline-primary:hover {
  background: #dbeafe;
  color: #0284c7;
}

.btn-outline-danger {
  border-color: #fecaca;
  color: #dc2626;
  line-height: 1;
  padding: 0.5rem 0.7rem;
}

.btn-outline-danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.btn-outline-danger i.material-icons,
.btn-outline-primary i.material-icons {
  font-size: 1rem;
  vertical-align: middle;
}

.btn-outline-secondary {
  border-color: #d1d5db;
  color: #374151;
}

.btn-light {
  background: #ffffff;
  color: #0ea5e9;
  border: 1px solid #d1d5db;
}

.btn-outline-secondary:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.form-control, .form-select, .input-group-text {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
  border-color: #0ea5e9;
}

.modal-content {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.12);
}

.modal-dialog {
  max-width: 800px;
}

.modal-body {
  max-height: 70vh;   
  overflow-y: auto;     
  padding-bottom: 4.5rem !important;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  z-index: 5;
}

/* Flag buttons */
.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-inline: 0.6rem;
  color: #ffffff;
}

.flag-btn.active {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.flag-icon {
  width: 20px;
  height: 14px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 2px;
  display: inline-block;
  background-size: cover;
  background-position: center;
}

.flag-uk {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="42" viewBox="0 0 60 42"><rect width="60" height="42" fill="%23005BBB"/><path d="M0 0l60 42m0-42L0 42" stroke="%23fff" stroke-width="8"/><path d="M0 0l60 42m0-42L0 42" stroke="%23D7141A" stroke-width="4"/><rect x="24" width="12" height="42" fill="%23fff"/><rect y="15" width="60" height="12" fill="%23fff"/><rect x="26" width="8" height="42" fill="%23D7141A"/><rect y="17" width="60" height="8" fill="%23D7141A"/></svg>');
}

.flag-dk {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="42" viewBox="0 0 60 42"><rect width="60" height="42" fill="%23C60C30"/><rect x="18" width="8" height="42" fill="%23fff"/><rect y="17" width="60" height="8" fill="%23fff"/></svg>');
}

/* Dark mode -------------------------------------------- */
.dark-mode body {
  background: #0b1220;
  color: #e5e7eb;
}

.dark-mode #appRoot,
.dark-mode .tab-content,
.dark-mode .table,
.dark-mode .stat-card,
.dark-mode .modal-content,
.dark-mode .modal-footer {
  background: #0f172a;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-mode .navbar {
  background: linear-gradient(90deg, #0ea5e9, #075985);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.dark-mode .nav-tabs .nav-link,
.dark-mode h4,
.dark-mode .stat-card h3,
.dark-mode .stat-card .stat-label {
  color: #ffffff !important;
}

.dark-mode .table thead,
.dark-mode .table tbody tr,
.dark-mode .table th,
.dark-mode .table td,
.dark-mode .nav-tabs,
.dark-mode .nav-tabs .nav-link.active,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .input-group-text,
.dark-mode .modal-footer {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .input-group-text,
.dark-mode .modal-content,
.dark-mode .modal-footer,
.dark-mode .stat-card {
  background-color: #0f172a;
}

.dark-mode .table-hover tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dark-mode .btn-light {
  background: #1f2937;
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.2);
}

.dark-mode .badge.bg-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb;
}

.dark-mode .toast-notification {
  background: #111827;
  color: #e5e7eb;
}

/* Print styles ----------------------------------------- */
@media print {
  nav, .nav, .btn, .no-print { display: none !important; }
  body { background: #ffffff; color: #111827; }
  #appRoot { box-shadow: none; border: none; }
  .table { font-size: 11pt; }
  .table th, .table td { border-color: #e5e7eb !important; }
  .stat-card { page-break-inside: avoid; }
}

