/*
 * Shared dashboard styles. Imported by sportspsykolog.html, traenere.html, ledelse.html.
 * Each dashboard provides its own page-specific tweaks via inline <style> AFTER this link.
 * No coloured left-border accents — never add them.
 */

:root {
  --primary-color: #7c3aed;
  --primary: #7c3aed;
  --primary-soft: #ede9fe;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e9eaee;
  --border: #e9eaee;
  --bg: #f5f5f5;
  --card: #ffffff;
  --green: #10b981;
  --green-soft: #d1fae5;
  --green-text: #065f46;
  --yellow: #f59e0b;
  --red: #ef4444;
  --orange: #f97316;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; color: var(--text); }

/* ---------- Sidebar (psykolog / akademi class names) ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
  background: #fff; border-right: 1px solid var(--line);
  padding: 22px 14px; overflow-y: auto; z-index: 10;
}
.sidebar-header, .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.club-logo-box, .brand .shield {
  width: 40px; height: 40px; border-radius: 8px;
  background: #dc2626; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.club-logo-box img, .brand .shield img { width: 100%; height: 100%; object-fit: contain; }
.brand .shield-fallback { color: #fff; font-weight: 900; font-size: 14px; letter-spacing: 0.5px; }
.club-meta h2, .brand h2 { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.2; }
.club-meta .subtitle, .club-meta .sub, .brand .sub {
  font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.3;
}

.nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: #374151; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.nav-item:hover { background: #f3f4f6; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-color); }
.nav-item svg, .nav-item .ico svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .label { flex: 1; }
.nav-item .ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-badge {
  background: #fce7f3; color: #be123c;
  font-size: 11px; font-weight: 700; padding: 1px 8px;
  border-radius: 99px; margin-left: auto;
}
.nav-group-label {
  font-size: 10px; font-weight: 700; color: var(--muted-2);
  letter-spacing: 0.5px; text-transform: uppercase; padding: 14px 14px 6px;
}

/* Træner-specific nav (markup uses nav.menu — keep working) */
.club-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 6px; }
.shield {
  width: 40px; height: 40px; border-radius: 8px; background: #dc2626;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 14px; flex-shrink: 0;
  letter-spacing: -0.5px; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18); overflow: hidden;
}
.shield img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.team-card {
  display: flex; align-items: center; gap: 10px;
  background: #f9fafb; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin: 16px 0;
}
.team-card .ic {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary-color);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.team-card .lbl { font-weight: 800; font-size: 13px; line-height: 1.1; }
.team-card .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
nav.menu { display: flex; flex-direction: column; gap: 2px; }
nav.menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #374151;
}
nav.menu a:hover { background: #f3f4f6; }
nav.menu a.active { background: var(--primary-soft); color: var(--primary-color); }
nav.menu a svg { width: 18px; height: 18px; flex-shrink: 0; }
nav.menu a .badge {
  margin-left: auto; background: #fce7f3; color: #be123c;
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px;
}

.side-cta {
  margin-top: 22px; padding: 16px 14px;
  background: #fafafa; border: 1px solid var(--line); border-radius: 12px;
}
.side-cta h4 { font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.side-cta p { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 0 0 12px; }

/* ---------- Main + top row ---------- */
.main, main { margin-left: 240px; padding: 30px 36px 60px; max-width: 1400px; }
.top-row, .topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 22px; flex-wrap: wrap;
}
.top-row h1, h1#greeting { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -0.3px; }
.top-row .sub, .greet-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.top-row-right, .topbar-right, .top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Week pill ---------- */
.week-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; font-weight: 600;
}
.week-pill button {
  background: none; border: 0; color: var(--muted);
  font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 6px;
  display: inline-flex; align-items: center;
}
.week-pill button:hover { background: #f3f4f6; color: var(--text); }
.week-pill button:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }

/* ---------- Card base ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px;
}
.card-title, .card-head h3, .card h3 {
  font-size: 15px; font-weight: 800; margin: 0; letter-spacing: -0.1px;
}
.card-sub, .card .csub { font-size: 12.5px; color: var(--muted); margin-top: 2px; margin-bottom: 14px; }
.card-footer, .card-foot { margin-top: 14px; display: flex; justify-content: flex-end; }
.card-foot a { color: var(--primary-color); font-size: 13px; font-weight: 600; }
.card-link {
  font-size: 12px; font-weight: 700; color: var(--primary-color);
  margin-top: auto; padding-top: 14px; align-self: flex-end;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Pills + selects ---------- */
.pill-select, .sel, .select-mini {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; color: #374151; font-family: inherit;
}
.count-pill {
  background: #fce7f3; color: #be123c;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
}
.link-primary { color: var(--primary-color); font-weight: 700; font-size: 13px; }
.link-primary:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s;
}
.btn:hover { background: #f9fafb; }
.btn.primary, .btn-primary {
  background: var(--primary-color); color: #fff;
  border: 0; border-radius: 8px; font-weight: 700;
}
.btn-primary { padding: 12px 22px; font-size: 14px; }
.btn.primary { padding: 9px 14px; font-size: 13px; border: 1px solid var(--primary-color); }
.btn.primary:hover, .btn-primary:hover { filter: brightness(0.95); }
.btn.full { width: 100%; }
.btn-outline {
  background: transparent; color: var(--primary-color);
  border: 1.5px solid var(--primary-color); border-radius: 8px;
  padding: 9px 18px; font-weight: 700; font-size: 13px;
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-outline-block, .btn-primary-block {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 700; margin-top: auto;
}
.btn-outline-block { border: 1px solid var(--primary-color); color: var(--primary-color); background: transparent; }
.btn-outline-block:hover { background: var(--primary-color); color: #fff; }
.btn-primary-block { background: var(--primary-color); color: #fff; border: 0; padding: 11px 12px; margin-top: 14px; }
.btn-primary-block:hover { filter: brightness(0.95); }

/* ---------- Grids ---------- */
.grid-2, .grid-3, .grid-4, .grid-results { display: grid; gap: 18px; margin-bottom: 18px; }
.grid-2 { grid-template-columns: 1fr 1.2fr; }
.grid-3 { grid-template-columns: 1.4fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-results { grid-template-columns: 7fr 3fr; }

/* ---------- Day chips ---------- */
.day-chips {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 18px;
}
.day-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 6px; text-align: center; cursor: pointer; transition: border-color .15s;
}
.day-chip:hover { border-color: #d1d5db; }
.day-chip:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.day-chip.today { background: var(--primary-soft); border-color: var(--primary-color); }
.day-chip .dow { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.day-chip.today .dow { color: var(--primary-color); }
.day-chip .date { font-size: 18px; font-weight: 800; margin-top: 2px; }

/* ---------- Schedule rows ---------- */
.schedule { display: flex; flex-direction: column; gap: 8px; }
.schedule-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  cursor: pointer; transition: background .15s;
}
.schedule-row:hover { background: #fafafa; }
.schedule-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.schedule-icon svg { width: 16px; height: 16px; }
.si-purple { background: #ede9fe; color: #7c3aed; }
.si-green  { background: #d1fae5; color: #065f46; }
.si-orange { background: #ffedd5; color: #c2410c; }
.si-blue   { background: #dbeafe; color: #1d4ed8; }
.schedule-time { font-size: 12px; color: var(--muted); font-weight: 600; width: 50px; flex-shrink: 0; }
.schedule-body { flex: 1; min-width: 0; }
.schedule-title { font-size: 13px; font-weight: 700; }
.schedule-meta  { font-size: 12px; color: var(--muted); margin-top: 1px; }
.schedule-chev  { color: #9ca3af; font-size: 18px; }

/* ---------- Stat grid / stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: flex; align-items: center; gap: 14px;
}
.stat-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-ico svg { width: 18px; height: 18px; }
.stat-card .label, .stat-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.stat-card .value, .stat-value { font-size: 28px; font-weight: 900; line-height: 1; color: var(--text); }
.stat-card .delta, .stat-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; font-weight: 500; }

/* ---------- Donut + legend ---------- */
.donut-wrap { position: relative; width: 180px; height: 180px; flex-shrink: 0; }
.donut-wrap svg { flex-shrink: 0; }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.donut-center .big   { font-size: 28px; font-weight: 800; line-height: 1; }
.donut-center .small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.legend-row, .legend .lr { display: flex; align-items: center; gap: 10px; }
.legend-dot, .legend .sw { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label, .legend .lbl { flex: 1; color: #374151; font-weight: 600; }
.legend-value, .legend .pct { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Empty state + status pills ---------- */
.empty { padding: 18px 6px; text-align: center; color: #9ca3af; font-size: 12.5px; }
.status-pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px;
}
.status-pill.active, .status-pill.submitted, .pill-new { background: #d1fae5; color: #065f46; }
.status-pill.planned, .status-pill.not-started { background: #f3f4f6; color: #6b7280; }
.status-pill.in-progress, .pill-planned { background: #fef3c7; color: #92400e; }
.pill-done { background: #ecfccb; color: #4d7c0f; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .grid-3, .grid-4, .grid-results { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { position: relative; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .main, main { margin-left: 0; padding: 18px; }
  .day-chips { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: 1fr; }
}
