/* ─────────────────────────────────────────────
   FIF Håndbold – Afregningssystem
   Design: Pleo-inspireret (2026)
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --fif-primary:    #1a4a8a;
  --fif-primary-dk: #153d72;
  --fif-primary-lt: #e8f0fc;
  --fif-accent:     #f5a623;
  --fif-green:      #16a34a;
  --fif-red:        #dc2626;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-pill:100px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.09), 0 4px 8px rgba(0,0,0,.04);
}

/* ── Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f4f6f9;
  color: #1a1f2e;
  font-size: .9375rem;
  line-height: 1.6;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
  background: #fff !important;
  border-bottom: 1px solid #e9ecef;
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fif-primary) !important;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.navbar-brand .brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--fif-accent);
  border-radius: 50%;
  margin-left: 2px;
}

.navbar-brand .brand-logo {
  height: 30px;
  width: auto;
  margin-right: 6px;
  flex-shrink: 0;
}

.navbar .nav-link {
  color: #4b5563 !important;
  font-weight: 500;
  font-size: .875rem;
  padding: .4rem .75rem !important;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background: #f1f5f9;
  color: var(--fif-primary) !important;
}

.navbar .dropdown-menu {
  border: 1px solid #e9ecef;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  min-width: 220px;
}

.navbar .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: .875rem;
  padding: .45rem .75rem;
  color: #374151;
  transition: background .12s;
}

.navbar .dropdown-item:hover {
  background: #f1f5f9;
  color: var(--fif-primary);
}

.navbar .dropdown-divider { border-color: #e9ecef; margin: .4rem .5rem; }

/* Avatar chip (bruger-dropdown trigger) */
.navbar .user-chip {
  display: flex; align-items: center; gap: .5rem;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  padding: .3rem .75rem .3rem .4rem;
  font-size: .875rem;
  font-weight: 500;
  color: #1a1f2e !important;
  border: 1px solid #e5e7eb;
  transition: background .15s;
}
.navbar .user-chip:hover { background: #e5e7eb !important; }

.navbar .user-avatar {
  width: 28px; height: 28px;
  background: var(--fif-primary-lt);
  color: var(--fif-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}

/* ── Main layout ────────────────────────── */
main { padding-top: 2rem !important; padding-bottom: 3rem !important; }

/* Tal i tabeller må ikke bryde over flere linjer */
.table td, .table th { white-space: nowrap; }

/* mine-afregninger tabeller */
.mine-tabel { table-layout: auto; width: 100%; }
.mine-tabel td { white-space: normal !important; }
.mine-tabel th:first-child,
.mine-tabel td:first-child { min-width: 110px; white-space: nowrap !important; }
.mine-tabel th:nth-last-child(1),
.mine-tabel td:nth-last-child(1) { min-width: 90px; width: 90px; }
.mine-tabel th:nth-last-child(2),
.mine-tabel td:nth-last-child(2) { min-width: 110px; width: 110px; white-space: nowrap !important; }
.mine-tabel th:nth-last-child(3),
.mine-tabel td:nth-last-child(3) { min-width: 120px; width: 120px; text-align: right; font-weight: 600; white-space: nowrap !important; }

/* ── Page title ─────────────────────────── */
h2.h4 { font-weight: 700; letter-spacing: -.01em; }

/* ── Cards ──────────────────────────────── */
.card {
  border: 1px solid #e9ecef !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow .2s, transform .2s;
  background: #fff;
}
.card:hover { box-shadow: var(--shadow-md) !important; }

.card-header {
  background: #fff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 1rem 1.25rem !important;
}

/* ── Buttons ────────────────────────────── */
.btn {
  border-radius: var(--radius-sm) !important;
  font-weight: 500;
  font-size: .875rem;
  padding: .5rem 1.1rem;
  transition: all .15s;
  letter-spacing: -.01em;
}

.btn-fif {
  background: var(--fif-primary);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(26,74,138,.3);
}
.btn-fif:hover, .btn-fif:focus {
  background: var(--fif-primary-dk);
  color: #fff;
  box-shadow: 0 3px 8px rgba(26,74,138,.35);
  transform: translateY(-1px);
}

.btn-outline-fif {
  color: var(--fif-primary);
  border: 1.5px solid var(--fif-primary);
  background: transparent;
}
.btn-outline-fif:hover {
  background: var(--fif-primary);
  color: #fff;
}

.btn-outline-secondary {
  color: #6b7280;
  border-color: #d1d5db;
  background: #fff;
}
.btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #374151;
  border-color: #9ca3af;
}

.btn-group .btn { border-radius: 6px !important; }
.btn-group > .btn:not(:last-child) { border-radius: 6px 0 0 6px !important; }
.btn-group > .btn:not(:first-child) { border-radius: 0 6px 6px 0 !important; }

/* ── Form controls ──────────────────────── */
.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-control, .form-select {
  border-radius: var(--radius-sm) !important;
  border: 1.5px solid #e5e7eb;
  font-size: .9rem;
  padding: .55rem .85rem;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}

.form-control:focus, .form-select:focus {
  border-color: var(--fif-primary);
  box-shadow: 0 0 0 3px rgba(26,74,138,.12);
  outline: none;
}

.form-control.bg-light {
  background: #f9fafb !important;
  border-color: #e5e7eb;
}

.input-group-text {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  color: #6b7280;
  font-size: .875rem;
}

.form-text { font-size: .775rem; color: #9ca3af; margin-top: .3rem; }

.form-check-input:checked {
  background-color: var(--fif-primary);
  border-color: var(--fif-primary);
}

textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Tables ─────────────────────────────── */
.table {
  font-size: .875rem;
}

.table > thead > tr > th {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: .75rem 1rem;
  background: #fafbfc;
}

.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: .85rem 1rem;
  vertical-align: middle;
  border-color: #f1f5f9;
  color: #374151;
}

.table-hover > tbody > tr:hover > td {
  background: #fafbfc;
}

/* ── Badges / status ────────────────────── */
.badge {
  border-radius: var(--radius-pill) !important;
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .04em;
  padding: .3em .75em;
}

.badge.bg-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}
.badge.bg-success {
  background: #dcfce7 !important;
  color: #166534 !important;
}
.badge.bg-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.badge.bg-secondary {
  background: #f1f5f9 !important;
  color: #4b5563 !important;
}
.badge.bg-udbetalt {
  background: #dbeafe !important;
  color: #1e40af !important;
}

/* Kompakte ikonknapper i tabeller */
.btn-xs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: .875rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.btn-xs-icon:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}
.btn-xs-danger {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}
.btn-xs-danger:hover {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.btn-xs-success {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}
.btn-xs-success:hover {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
}
.btn-xs-primary {
  color: #fff;
  background: var(--fif-primary);
  border-color: var(--fif-primary);
}
.btn-xs-primary:hover {
  background: var(--fif-primary-dk);
  color: #fff;
  border-color: var(--fif-primary-dk);
}
.btn-xs-warning {
  color: #fff;
  background: #d97706;
  border-color: #d97706;
}
.btn-xs-warning:hover {
  background: #b45309;
  color: #fff;
  border-color: #b45309;
}
.btn-xs-success {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}
.btn-xs-success:hover {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
}

/* Admin-afregningsoversigt (fast kolonnebredde) */
.admin-tabel { table-layout: fixed; width: 100%; }
.admin-tabel td { overflow: hidden; }
.admin-tabel th:first-child  { width: 175px; }
.admin-tabel th:nth-child(2) { width: 105px; }
.admin-tabel th:nth-last-child(3) { width: 120px; text-align: right; }
.admin-tabel td:nth-last-child(3) { text-align: right; font-weight: 600; }
.admin-tabel th:nth-last-child(2) { width: 140px; }
.admin-tabel th:nth-last-child(1) { width: 130px; }

/* Status-pills i overblikstabel */
.stat-pill { display:inline-block; padding:3px 10px; border-radius:6px; font-weight:600; font-size:.8rem; white-space:nowrap; }
.pill-blue   { background:#dbeafe; color:#1e40af; }
.pill-yellow { background:#fef3c7; color:#92400e; }
.pill-green  { background:#dcfce7; color:#166534; }
.pill-orange { background:#f59e0b; color:#fff; }
.pill-red    { background:#fee2e2; color:#991b1b; }

/* ── Alerts ─────────────────────────────── */
.alert {
  border-radius: var(--radius-md) !important;
  border: none;
  font-size: .875rem;
}
.alert-info    { background: #eff6ff; color: #1e40af; }
.alert-danger  { background: #fef2f2; color: #991b1b; }
.alert-success { background: #f0fdf4; color: #166534; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-light   { background: #f9fafb; color: #4b5563; border: 1px solid #e9ecef !important; }

/* ── Flash messages ─────────────────────── */
.alert-dismissible .btn-close { padding: .8rem; }

/* ── Stat cards (dashboard) ─────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid #e9ecef;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

/* ── Rute-kort ──────────────────────────── */
.rute-kort {
  cursor: pointer;
  transition: all .15s;
  background: #fff;
  border-radius: var(--radius-md) !important;
}
.rute-kort:hover {
  border-color: var(--fif-primary) !important;
  background: #f0f5ff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.rute-kort.valgt {
  border-color: var(--fif-primary) !important;
  background: var(--fif-primary-lt);
}

/* ── Login page ─────────────────────────── */
.fif-logo-circle {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: var(--fif-primary);
  display: flex; align-items: center; justify-content: center;
}

/* ── Misc ───────────────────────────────── */
.text-fif    { color: var(--fif-primary) !important; }
.bg-fif      { background-color: var(--fif-primary) !important; }

hr { border-color: #f1f5f9; opacity: 1; }

.rounded { border-radius: var(--radius-md) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

/* Kompakt overblikstabel (mange kolonner) */
.overblik-tabel > thead > tr > th,
.overblik-tabel > tbody > tr > td,
.overblik-tabel > tfoot > tr > td {
  padding: .5rem .6rem;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
