/* ============================================================
   ITN SOCCER — site.css
   Tabler LIGHT theme + ITN brand palette
   Palette: red #b91715 | Open Sans body | Oswald headings
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --itn-red:         #b91715;
  --itn-red-dark:    #8f0f0e;
  --itn-red-lt:      rgba(185, 23, 21, 0.08);
  --itn-red-border:  rgba(185, 23, 21, 0.25);
  --itn-font-head:   'Oswald', sans-serif;
  --itn-font-body:   'Open Sans', Arial, sans-serif;

  /* Override Tabler primary colour */
  --tblr-primary:        #b91715;
  --tblr-primary-rgb:    185, 23, 21;
  --tblr-primary-lt:     rgba(185, 23, 21, 0.08);
  --tblr-link-color:     #b91715;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--itn-font-body);
  font-weight: 400;
  font-size: 0.9rem;
}

a { color: var(--itn-red); }
a:hover { color: var(--itn-red-dark); }

/* ── Tabler primary overrides ───────────────────────────────── */
.btn-primary {
  background-color: var(--itn-red) !important;
  border-color: var(--itn-red) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--itn-red-dark) !important;
  border-color: var(--itn-red-dark) !important;
}
.btn-red {
  background-color: var(--itn-red);
  border-color: var(--itn-red);
  color: #fff;
}
.btn-red:hover {
  background-color: var(--itn-red-dark);
  border-color: var(--itn-red-dark);
  color: #fff;
}
.btn-outline-primary {
  color: var(--itn-red) !important;
  border-color: var(--itn-red) !important;
}
.btn-outline-primary:hover {
  background-color: var(--itn-red) !important;
  color: #fff !important;
}

/* ── Sidebar ITN ────────────────────────────────────────────── */
.sidebar-itn {
  background-color: #f8f8f8 !important;
  border-right: 1px solid #e5e7eb !important;
  overflow: visible !important;
}
.sidebar-itn .navbar-collapse,
.sidebar-itn .navbar-nav,
.sidebar-itn .nav-item {
  overflow: visible !important;
}

.sidebar-itn .navbar-brand-itn {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.5rem;
  width: 100%;
}

.sidebar-itn .nav-link {
  color: #4b5563;
  font-size: 0.855rem;
  font-weight: 400;
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  overflow: visible;
}
.sidebar-itn .nav-link .badge {
  position: static !important;
  transform: none !important;
  margin-left: 4px;
  flex-shrink: 0;
}
.sidebar-itn .nav-link:hover {
  background-color: #f0f0f0;
  color: #111827;
}
.sidebar-itn .nav-item.active > .nav-link,
.sidebar-itn .nav-link.active {
  background-color: var(--itn-red-lt) !important;
  color: var(--itn-red) !important;
  font-weight: 600;
}
.sidebar-itn .nav-link .nav-link-icon {
  color: #9ca3af;
}
.sidebar-itn .nav-item.active > .nav-link .nav-link-icon,
.sidebar-itn .nav-link.active .nav-link-icon {
  color: var(--itn-red);
}

/* ── Brand logo ─────────────────────────────────────────────── */
.navbar-brand-itn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.navbar-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-main {
  font-family: var(--itn-font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.04em;
}
.brand-sub {
  font-family: var(--itn-font-head);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--itn-red);
  letter-spacing: 0.28em;
  margin-top: 1px;
}

/* ── Avatar ITN ─────────────────────────────────────────────── */
.avatar-itn {
  background-color: var(--itn-red) !important;
  color: #fff !important;
  font-family: var(--itn-font-head);
  font-weight: 700;
}

/* ── Matchday badge ─────────────────────────────────────────── */
.badge-itn-md {
  background-color: var(--itn-red-lt);
  color: var(--itn-red);
  border: 1px solid var(--itn-red-border);
  font-family: var(--itn-font-head);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ── Welcome card ───────────────────────────────────────────── */
.card-welcome-itn {
  border-top: 3px solid var(--itn-red) !important;
  background-color: #fff !important;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.card-header {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.card-title {
  font-family: var(--itn-font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111827;
  margin-bottom: 0;
}
.card-itn-accent {
  border-top: 2px solid var(--itn-red) !important;
}

/* ── Page header fix (Tabler sets flex-direction:column + justify-content:center) */
.page-header {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
.page-header.justify-content-between {
  justify-content: space-between !important;
}

/* ── Page title ─────────────────────────────────────────────── */
.page-title {
  font-family: var(--itn-font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: #111827;
}
.page-title-itn {
  font-family: var(--itn-font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: #111827;
  padding-left: 0.8rem;
  border-left: 3px solid var(--itn-red);
  line-height: 1.2;
}

/* ── Tables ─────────────────────────────────────────────────── */
.table {
  font-size: 0.875rem;
}
.table thead th {
  font-family: var(--itn-font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb !important;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}
.table tbody tr:hover td {
  background-color: #fafafa !important;
}
.table-itn-highlight tbody tr.highlighted td {
  background-color: var(--itn-red-lt) !important;
}

/* ── Rating badges ──────────────────────────────────────────── */
.badge-rating {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
}
.badge-leg  { background: rgba(255,215,0,0.15);  color: #b8860b; }
.badge-out  { background: rgba(40,167,69,0.12);  color: #155724; }
.badge-exc  { background: rgba(40,167,69,0.08);  color: #1e7e34; }
.badge-good { background: rgba(0,123,255,0.1);   color: #004085; }
.badge-avg  { background: rgba(0,0,0,0.06);      color: #495057; }
.badge-poor { background: rgba(255,140,0,0.12);  color: #7d4e00; }
.badge-bad  { background: rgba(185,23,21,0.1);   color: #b91715; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--itn-red) !important;
  box-shadow: 0 0 0 0.2rem rgba(185, 23, 21, 0.15) !important;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.02em;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-success { border-left: 3px solid #28a745; }
.alert-danger  { border-left: 3px solid var(--itn-red); }
.alert-warning { border-left: 3px solid #fd7e14; }
.alert-info    { border-left: 3px solid #17a2b8; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb-item a { color: #6b7280; font-size: 0.8rem; }
.breadcrumb-item a:hover { color: var(--itn-red); }
.breadcrumb-item.active { color: #9ca3af; font-size: 0.8rem; }
.breadcrumb-item + .breadcrumb-item::before { color: #d1d5db; }

/* ── Footer ITN ─────────────────────────────────────────────── */
.footer-itn {
  background-color: #f9fafb !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 1.5rem 0;
}
.footer-brand-itn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--itn-font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280 !important;
  text-decoration: none;
  margin-bottom: 0.25rem;
  transition: color .2s;
}
.footer-brand-itn:hover { color: #374151 !important; }
.footer-copy {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
}
.footer-links-itn {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: flex-end;
}
.footer-links-itn a {
  font-size: 0.78rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color .2s;
}
.footer-links-itn a:hover { color: #374151; }

/* ── Utilities ──────────────────────────────────────────────── */
.text-itn-red   { color: var(--itn-red) !important; }
.bg-itn-red-lt  { background-color: var(--itn-red-lt) !important; }
.border-itn-red { border-color: var(--itn-red) !important; }
.text-red       { color: var(--itn-red) !important; }
.bg-red-lt      { background-color: var(--itn-red-lt) !important; }

.divider-itn {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--itn-red), transparent);
  margin: 1.5rem 0;
}

/* Stat numbers */
.itn-stat-val {
  font-family: var(--itn-font-head);
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}
.itn-stat-lbl {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-top: 0.2rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-links-itn { justify-content: flex-start; }
  .page-title-itn   { font-size: 1rem; }
}
