/* Krakeroyhb Informasjonstavle — app.css v8 */

:root {
  --bg:          #0d0d0d;
  --card-bg:     #141414;
  --accent:      #ffffff;
  --accent-dim:  #d0d0d0;
  --text:        #f0f0f0;
  --text-muted:  #888;
  --border:      #2a2a2a;
  --success:     #22c55e;
  --warning:     #eab308;
  --danger:      #ef4444;
  --blue:        #3b82f6;
  --cyan:        #06b6d4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  font-size: 15px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADER ───────────────────────────────── */
.app-header {
  background: var(--card-bg);
  border-bottom: 2px solid var(--accent);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.app-header .logo { height: 48px; width: auto; }
.app-header .title h1 { font-size: 1.2rem; color: var(--accent); font-weight: 700; line-height: 1.2; }
.app-header .title p  { font-size: 0.75rem; color: var(--text-muted); }
.app-header .header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-pill {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3px;
  color: var(--text);
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  display: inline-flex; align-items: center;
  cursor: default;
}
.user-pill:hover { border-color: var(--accent); }

/* Dedikert logout-knapp ved siden av initial-pillen */
.user-logout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: none; border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; padding: 0;
}
.user-logout-btn:hover {
  border-color: #f87171; color: #f87171;
  background: rgba(248,113,113,0.08);
}

/* ── NAV TABS ─────────────────────────────── */
.app-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.app-nav a {
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}
.app-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.app-nav a:hover  { color: var(--text); text-decoration: none; }

/* ── MAIN ─────────────────────────────────── */
.app-main { padding: 20px; max-width: 1400px; margin: 0 auto; }

/* Tab content */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary   { background: var(--accent); color: #0d0d0d; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dim); }
.btn-secondary { background: #1e1e1e; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: #2a2a2a; }
.btn-danger    { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.3); }
.btn-success   { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.btn-success:hover:not(:disabled) { background: rgba(34,197,94,0.3); }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; }

/* ── STATS ROW ────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-top: 4px; }
.stat-sub   { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* ── TRENER-BRIEF (auto fra Spond — kun coach/team_leader/admin) ── */
/* Bruker <details>+<summary> som «Slik bruker du klubb-felles»-mønsteret. */
.trener-brief {
  background: rgba(6,182,212,0.05);
  border: 1px solid rgba(6,182,212,0.25);
  border-radius: 8px;
  margin-bottom: 16px;
}
.trener-brief[open] {
  background: linear-gradient(180deg, #131a22 0%, #10161c 100%);
  border-color: var(--border);
  border-left: 3px solid #06b6d4;
}
.tb-summary {
  cursor: pointer;
  padding: 9px 14px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #67e8f9;
  flex-wrap: wrap;
}
.tb-summary::-webkit-details-marker { display: none; }
.tb-summary::before {
  content: '▸';
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.15s;
}
.trener-brief[open] .tb-summary { color: #67e8f9; padding-bottom: 4px; }
.trener-brief[open] .tb-summary::before { transform: rotate(90deg); }
.tb-summary .tb-bot { font-size: 0.95rem; }
.tb-summary-main { flex: 1; min-width: 0; color: var(--text); font-weight: 400; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tb-summary-main strong { color: #67e8f9; font-weight: 700; }
.tb-s-countdown { font-size: 0.72rem; color: var(--text-muted); }
.tb-s-nums { color: var(--text-muted); font-size: 0.78rem; }
.tb-s-bad { color: #f87171; font-weight: 600; }
.tb-s-fresh { color: #fca5a5; font-weight: 600; }
.tb-summary-hint { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.tb-body { padding: 8px 18px 14px; border-top: 1px solid rgba(6,182,212,0.15); margin-top: 4px; }
.tb-head { display:flex; align-items:flex-start; gap:12px; margin: 10px 0 14px; flex-wrap:wrap; }
.tb-head-meta { flex:1; min-width:0; }
.tb-eyebrow { display:flex; align-items:center; gap:6px; font-size:0.66rem; text-transform:uppercase; letter-spacing:0.6px; color:#06b6d4; font-weight:600; margin-bottom:3px; }
.tb-eyebrow .tb-bot { font-size:0.82rem; }
.tb-title-sub { font-size: 0.82rem; color: var(--text-muted); }
.tb-head-actions { display:flex; gap:6px; align-items:center; flex-shrink:0; }
.tb-sync {
  background:rgba(6,182,212,0.08); border:1px solid rgba(6,182,212,0.25);
  color:#67e8f9; font-size:0.7rem; padding:4px 10px; border-radius:6px;
  cursor:pointer; display:inline-flex; align-items:center; gap:5px;
  font-variant-numeric:tabular-nums;
}
.tb-sync:hover { background:rgba(6,182,212,0.15); }
.tb-sync:disabled { cursor:wait; opacity:0.7; }
.tb-role-note { font-size:0.66rem; color:var(--text-muted); padding:3px 8px; border:1px dashed var(--border); border-radius:6px; }

.tb-stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin-bottom:14px; }
.tb-stat {
  background:rgba(255,255,255,0.025); border:1px solid var(--border);
  border-radius:8px; padding:10px 12px; text-align:center;
}
.tb-stat-val { font-size:1.5rem; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.tb-stat-lab { font-size:0.66rem; text-transform:uppercase; letter-spacing:0.4px; color:var(--text-muted); margin-top:5px; }
.tb-stat.good  .tb-stat-val { color:#22c55e; }
.tb-stat.bad   .tb-stat-val { color:#f87171; }
.tb-stat.muted .tb-stat-val { color:#cbd5e1; }
.tb-stat.info  .tb-stat-val { color:#fbbf24; }

.tb-insights { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.tb-ins {
  display:flex; gap:8px; align-items:flex-start;
  background:rgba(255,255,255,0.02); border:1px solid var(--border);
  border-radius:8px; padding:8px 12px; font-size:0.82rem; line-height:1.4;
}
.tb-ins strong { font-weight:700; }
.tb-ins.alert { background:rgba(248,113,113,0.07); border-color:rgba(248,113,113,0.25); color:#fecaca; }
.tb-ins.alert strong { color:#fca5a5; }
.tb-ins.warn  { background:rgba(251,191,36,0.06); border-color:rgba(251,191,36,0.22); }
.tb-ins .tb-ins-ico { flex-shrink:0; font-size:0.95rem; line-height:1.3; }

.tb-foot { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tb-foot .btn { font-size:0.78rem; padding:6px 14px; }
.tb-foot .tb-spacer { flex:1; }
.tb-foot .tb-last { font-size:0.7rem; color:var(--text-muted); }

.tb-empty-state {
  text-align:center; padding:24px 16px; color:var(--text-muted); font-size:0.85rem;
}
.tb-empty-state .tb-empty-ico { font-size:1.8rem; margin-bottom:6px; }

/* Detalj-modal: faner + spiller-rader */
.tb-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:14px; overflow-x:auto; }
.tb-tab {
  padding:9px 14px; font-size:0.78rem; font-weight:500;
  color:var(--text-muted); cursor:pointer; border:none;
  border-bottom:2px solid transparent; background:none; transition:all 0.15s;
  white-space:nowrap; display:flex; align-items:center; gap:6px;
}
.tb-tab.active { color:#06b6d4; border-bottom-color:#06b6d4; }
.tb-tab .tb-tab-count {
  background:rgba(255,255,255,0.06); color:var(--text); padding:1px 7px;
  border-radius:8px; font-size:0.68rem; font-weight:700; font-variant-numeric:tabular-nums;
}
.tb-tab.active .tb-tab-count { background:rgba(6,182,212,0.18); color:#67e8f9; }

.tb-rows { display:flex; flex-direction:column; gap:5px; max-height:55vh; overflow-y:auto; }
.tb-row {
  display:flex; align-items:center; gap:10px; padding:9px 12px;
  background:rgba(255,255,255,0.025); border:1px solid var(--border);
  border-radius:8px;
}
.tb-row-num {
  width:32px; flex-shrink:0; text-align:center; font-size:0.74rem; font-weight:700;
  color:var(--text-muted); font-variant-numeric:tabular-nums;
}
.tb-row-main { flex:1; min-width:0; }
.tb-row-name { font-size:0.88rem; font-weight:600; }
.tb-row-meta { font-size:0.72rem; color:var(--text-muted); margin-top:2px; }
.tb-row-meta.warn { color:#fca5a5; }
.tb-row-time {
  font-size:0.72rem; color:var(--text-muted); font-variant-numeric:tabular-nums;
  flex-shrink:0; text-align:right;
}
.tb-row-time.fresh { color:#fca5a5; font-weight:600; }
.tb-empty-list { text-align:center; padding:30px 10px; color:var(--text-muted); font-size:0.85rem; }

@media (max-width: 640px) {
  .tb-stats { grid-template-columns:repeat(2, 1fr); }
  .tb-body { padding: 8px 12px 12px; }
  .tb-head-actions { width:100%; justify-content:space-between; margin-top:4px; }
  .tb-summary-hint { display: none; } /* spar plass på telefon */
}

/* ── ARCHIVE TOGGLE ──────────────────────── */
.archive-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: 4px;
}
.archive-toggle.active {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(96,165,250,0.08);
}
.archive-toggle .toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}
.archive-toggle.active .toggle-dot { background: #60a5fa; }

/* ── PINNED BANNER ────────────────────────── */
.pinned-banner {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 12px;
}
.pinned-banner .pin-icon { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.pinned-banner h4 { font-size: 0.9rem; margin-bottom: 3px; }
.pinned-banner p  { font-size: 0.8rem; color: #bbb; line-height: 1.4; }

.announcement-banner {
  background: rgba(249,115,22,0.07);
  border: 1px solid rgba(249,115,22,0.35);
  border-left: 4px solid #f97316;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 12px;
  position: relative;
}
.announcement-icon { font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }
.announcement-body { flex: 1; }
.announcement-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: #f97316; margin-bottom: 4px;
}
.announcement-body h4 { font-size: 0.9rem; color: var(--accent); margin-bottom: 3px; }
.announcement-body p  { font-size: 0.8rem; color: #bbb; line-height: 1.4; }
.announcement-actions { display: flex; gap: 6px; flex-shrink: 0; margin-top: 2px; }
.announcement-actions button {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-muted); font-size: 0.72rem; padding: 3px 10px;
  cursor: pointer; transition: all 0.15s;
}
.announcement-actions button:hover { border-color: var(--accent); color: var(--accent); }
.announcement-actions .btn-remove:hover { border-color: var(--danger); color: #f87171; }

/* ── AUDIENCE TABS ────────────────────────── */
.audience-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.aud-tab {
  background: none; border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted); font-size: 0.95rem; font-weight: 600;
  padding: 10px 20px; cursor: pointer; transition: all 0.15s;
}
.aud-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.aud-tab:hover  { color: var(--text); }

/* ── FILTER BAR ───────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 0 6px;
}
.filter-chip {
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: none;
  color: var(--text-muted); font-size: 0.75rem; cursor: pointer;
  transition: all 0.15s;
}
.filter-chip.active,
.filter-chip:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(255,255,255,0.06);
}

/* ── EGENDEFINERT LAG-VELGER ───────────────── */
.team-picker { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.team-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.team-picker-head .label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.team-count { font-weight: 400; color: var(--text-muted); font-size: 0.72rem; margin-left: 6px; }
.team-count.has-sel { color: var(--success); }
.linkbtn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.74rem; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.team-picker-actions .sep { color: var(--text-muted); margin: 0 7px; font-size: 0.72rem; }
.team-group { margin-top: 10px; }
.team-group-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 6px; }
.team-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.team-chip {
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: none; color: var(--text-muted); font-size: 0.78rem; cursor: pointer; transition: all 0.15s;
}
.team-chip:hover { border-color: var(--accent); color: var(--text); }
.team-chip.selected { border-color: var(--accent); color: var(--accent); background: rgba(255,255,255,0.08); }
.team-chip.selected::before { content: '\2713\00a0'; font-weight: 700; }

/* ── POST-IT GRID ─────────────────────────── */
.postit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.postit {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.postit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

.postit-accent-white  { border-top: 3px solid var(--accent); }
.postit-accent-green  { border-top: 3px solid var(--success); }
.postit-accent-yellow { border-top: 3px solid var(--warning); }
.postit-accent-red    { border-top: 3px solid var(--danger); }
.postit-accent-blue   { border-top: 3px solid var(--blue); }
.postit-accent-cyan   { border-top: 3px solid var(--cyan); }

.postit-category {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: 5px;
}
.postit h3 { font-size: 0.95rem; margin-bottom: 8px; line-height: 1.3; }
.postit .short-text {
  font-size: 0.82rem; color: #bbb; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.postit-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; flex-wrap: wrap;
}
.postit-date   { font-size: 0.7rem; color: var(--text-muted); }
.postit-author { font-size: 0.7rem; background: #1e1e1e; color: var(--text-muted); padding: 2px 8px; border-radius: 20px; }

.role-badge { font-size: 0.63rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; }
.role-master_admin { background: rgba(239,68,68,0.2);   color: #f87171; }
.role-admin        { background: rgba(255,255,255,0.12); color: #ddd; }
.role-coach        { background: rgba(34,197,94,0.2);   color: var(--success); }
.role-team_leader  { background: rgba(59,130,246,0.2);  color: #60a5fa; }
.role-parent       { background: rgba(234,179,8,0.2);   color: var(--warning); }

.postit-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s;
}
.postit:hover .postit-actions { opacity: 1; }
.action-btn {
  background: #1e1e1e; border: 1px solid var(--border);
  color: var(--text-muted); width: 26px; height: 26px;
  border-radius: 6px; cursor: pointer; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.action-btn:hover { background: #2a2a2a; color: var(--text); }

/* Attachments */
.attachments { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.attachment-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  font-size: 0.7rem; color: #aaa; cursor: pointer;
}
.attachment-pill:hover { border-color: var(--accent); color: var(--accent); }

/* Bildevedlegg: thumbnail på kortet, større i pop-up */
.msg-image {
  flex: 0 0 100%;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  cursor: pointer;
}
#detail-attachments .msg-image {
  max-height: 380px;
  object-fit: contain;
  object-position: center;
  background: #0a0a0a;
}
.comment .msg-image { max-height: 120px; }

/* Empty state */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted); font-size: 0.9rem;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }

/* ── TRAINING CALENDAR ────────────────────── */
.training-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.training-header h2 { font-size: 1.05rem; }

.training-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; }

.training-grid {
  display: grid;
  grid-template-columns: 110px repeat(7, 1fr);
  gap: 2px;
  font-size: 0.75rem;
  overflow-x: auto;
}
.tg-header {
  background: #1a1a1a; padding: 8px 4px;
  text-align: center; color: var(--text-muted);
  font-weight: 600; border-radius: 4px;
}
.tg-label {
  background: #1a1a1a; padding: 8px 10px;
  color: var(--text-muted); border-radius: 4px;
  display: flex; align-items: center; font-weight: 500;
}
.tg-cell {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px; min-height: 54px;
}
.tg-event {
  border-radius: 3px; padding: 3px 5px;
  margin-bottom: 3px; font-size: 0.68rem; color: #ddd; line-height: 1.3;
}
.tg-event.orange { background: rgba(255,255,255,0.08); border-left: 2px solid var(--accent); }
.tg-event.green  { background: rgba(34,197,94,0.15);  border-left: 2px solid var(--success); }
.tg-event.blue   { background: rgba(59,130,246,0.15); border-left: 2px solid var(--blue); }
.tg-event.yellow { background: rgba(234,179,8,0.15);  border-left: 2px solid var(--warning); }
.tg-event.released { background: rgba(239,68,68,0.1); border-left: 2px solid var(--danger); opacity: 0.6; }
.tg-event.match { background: rgba(239,68,68,0.18); border-left: 3px solid #ef4444; color: #fecaca; font-weight: 600; }
.tg-event.match strong { color: #fff; }
.tg-event .tg-match-loc { font-weight: 400; color: var(--text-muted); font-size: 0.62rem; }
.tg-ha { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 0.62rem; font-weight: 700; margin-left: 2px; }
.tg-ha.home { background: rgba(34,197,94,0.28); color: #4ade80; }
.tg-ha.away { background: rgba(59,130,246,0.28); color: #60a5fa; }
.tg-event.clickable { cursor: pointer; }
.tg-event.clickable:hover { filter: brightness(1.3); }

/* Treningsplan: eget lag øverst, andre lag skjult bak en knapp */
.training-grid:not(.show-others) .tg-other { display: none; }
.tg-toggle-row { grid-column: 1 / -1; padding: 14px 4px 4px; }

/* Time slot modal table */
.ts-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.ts-table th { text-align: left; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.ts-table td { padding: 10px; border-bottom: 1px solid #1e1e1e; font-size: 0.85rem; vertical-align: middle; }
.ts-table tr:last-child td { border-bottom: none; }
.ts-mine td { background: rgba(255,255,255,0.03); }

/* Balance indicator */
.balance-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  font-size: 0.8rem; color: var(--text-muted);
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px; margin-bottom: 16px;
}
.balance-team { font-weight: 700; color: var(--text); }
.balance-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.bstat { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.bstat .bs-label { color: var(--text-muted); }
.bstat .bs-val { font-weight: 700; color: var(--text); }
.balance-hint { font-size: 0.75rem; color: var(--text-muted); }
.balance-value { font-weight: 700; font-size: 1rem; }
.balance-value.positive { color: var(--danger); }
.balance-value.zero     { color: var(--success); }
.balance-value.negative { color: var(--success); }

/* ── MODALS ───────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 16px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 580px; width: 100%;
  position: relative;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal h2 { font-size: 1.1rem; margin-bottom: 4px; }
.modal-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 18px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.modal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* ── DETAIL MODAL + KOMMENTARER ───────────────── */
.detail-modal { display: flex; flex-direction: column; overflow: hidden; }
.detail-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; margin-right: -8px; padding-right: 8px; }
.comments-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.comments-header { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.comment-empty { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 10px; }
.comment-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: #2a2a2a; color: #ddd; font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.comment-name { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.comment-time { font-size: 0.68rem; color: var(--text-muted); }
.comment-text { font-size: 0.82rem; color: #ccc; line-height: 1.5; word-wrap: break-word; white-space: pre-line; }
.comment-actions { display: flex; gap: 16px; margin-top: 6px; }
.comment-action {
  background: none; border: none; color: var(--text-muted); font-size: 0.72rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0;
  transition: color 0.12s;
}
.comment-action:hover { color: var(--text); }
.comment-action.liked { color: #f87171; }
.comment-replies {
  margin-top: 16px; padding-left: 14px; border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.comment-composer { flex: 0 0 auto; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.reply-context {
  display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-muted);
  background: #1a1a1a; border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; margin-bottom: 8px;
}
.reply-context strong { color: var(--text); font-weight: 600; }
.reply-context button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; margin-left: auto; }
.reply-context button:hover { color: var(--text); }
.composer-input {
  width: 100%; background: #0a0a0a; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-size: 0.83rem; outline: none; resize: vertical;
  min-height: 44px; font-family: inherit; line-height: 1.5;
}
.composer-input:focus { border-color: var(--accent); }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.composer-attach {
  background: #1a1a1a; border: 1px solid var(--border); color: #aaa;
  border-radius: 8px; padding: 6px 11px; cursor: pointer; font-size: 0.8rem; transition: border-color 0.15s, color 0.15s;
}
.composer-attach:hover { border-color: var(--accent); color: var(--accent); }
.composer-filename { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }

/* ── FORMS ────────────────────────────────── */
.form-row   { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.form-group { flex: 1; min-width: 180px; }
.form-group label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.form-control {
  width: 100%; background: #0a0a0a; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px 12px;
  font-size: 0.85rem; outline: none; transition: border-color 0.15s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control   { cursor: pointer; }

.file-drop {
  border: 2px dashed var(--border); border-radius: 8px;
  padding: 16px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; margin-bottom: 10px;
}
.file-drop:hover { border-color: var(--accent); background: rgba(255,255,255,0.03); }
.file-drop p { font-size: 0.8rem; color: var(--text-muted); }
.file-drop p span { color: var(--accent); }

.file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.file-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 0.75rem; color: #bbb;
}
.file-remove { color: var(--text-muted); cursor: pointer; }
.file-remove:hover { color: var(--danger); }

/* ── ADMIN PANEL ──────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin-top: 16px;
}
.admin-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
}
.admin-card h3 { font-size: 0.9rem; margin-bottom: 14px; color: var(--text-muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.5px; }

.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #1a1a1a;
}
.member-row:last-child { border-bottom: none; }
.member-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #2a2a2a; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-email { font-size: 0.72rem; color: var(--text-muted); }

/* ── TOAST ────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #1e1e1e; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px;
  font-size: 0.85rem; color: var(--text);
  animation: slideUp 0.2s ease;
  max-width: 320px;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); color: #f87171; }

/* ── LOGIN PAGE ───────────────────────────── */
.login-page {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 20px;
}
.login-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; width: 100%; max-width: 380px;
}
.login-logo { height: 64px; margin: 0 auto 20px; display: block; }
.login-box h1 { font-size: 1.1rem; text-align: center; margin-bottom: 4px; }
.login-box p  { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-bottom: 24px; }

/* SUB-TABS */
.sub-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:20px; }
.sub-tab { padding:10px 16px; font-size:0.82rem; font-weight:500; color:var(--text-muted); cursor:pointer; border-bottom:3px solid transparent; background:none; border-top:none; border-left:none; border-right:none; transition:all 0.15s; }
.sub-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.sub-tab:hover { color:var(--text); }

/* PLAYER CARDS */
.player-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; margin-top:4px; }
.player-card { background:#1a1a1a; border:1px solid var(--border); border-radius:10px; padding:14px 10px; text-align:center; cursor:pointer; transition:all 0.15s; overflow:hidden; min-width:0; }
.player-card:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(0,0,0,0.3); }
.player-card.s-active  { border-top:3px solid var(--success); }
.player-card.s-injured { border-top:3px solid var(--warning); }
.player-card.s-out     { border-top:3px solid var(--danger); }
.player-number { font-size:1.7rem; font-weight:800; color:var(--accent); line-height:1; margin-bottom:6px; }
.player-name { font-size:0.8rem; font-weight:600; margin-bottom:3px; overflow-wrap:anywhere; }
.player-pos  { font-size:0.7rem; color:var(--text-muted); margin-bottom:8px; overflow-wrap:anywhere; }
.player-badge { font-size:0.62rem; font-weight:700; text-transform:uppercase; padding:2px 8px; border-radius:10px; display:inline-block; }
.player-badge.active  { background:rgba(34,197,94,0.15);  color:var(--success); }
.player-badge.injured { background:rgba(234,179,8,0.15);   color:var(--warning); }
.player-badge.out     { background:rgba(239,68,68,0.15);   color:var(--danger);  }

/* MATCH TABLE */
.match-table { width:100%; border-collapse:collapse; }
.match-table th { text-align:left; font-size:0.68rem; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--text-muted); padding:6px 10px; border-bottom:1px solid var(--border); }
.match-table td { padding:10px; font-size:0.83rem; border-bottom:1px solid #1a1a1a; vertical-align:middle; }
.match-table tr:last-child td { border-bottom:none; }
.result-w { color:var(--success); font-weight:700; }
.result-l { color:var(--danger);  font-weight:700; }
.result-pending { color:var(--text-muted); font-style:italic; }
.home-badge  { font-size:0.65rem; background:rgba(255,255,255,0.08); padding:2px 7px; border-radius:4px; color:var(--text-muted); }
.away-badge  { font-size:0.65rem; background:rgba(249,115,22,0.1);   padding:2px 7px; border-radius:4px; color:#f97316; }
/* Mobil: kamp-kort i stedet for tabell */
.match-cards { display:none; flex-direction:column; gap:8px; margin-top:4px; }
.match-card { display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--card-bg); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.match-card .mc-opp { font-size:0.9rem; font-weight:600; color:var(--text); }
.match-card .mc-meta { font-size:0.74rem; color:var(--text-muted); margin-top:3px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.match-card .mc-result { font-size:0.95rem; font-weight:700; white-space:nowrap; }
@media (max-width:640px) {
  #om-kamper .kamp-table-wrap { display:none; }
  #om-kamper .match-cards { display:flex; }
}

/* ── RESPONSIVE ───────────────────────────── */
.title-short { display: none; }
@media (max-width: 540px) {
  .title-full  { display: none; }
  .title-short { display: inline; }
}

@media (max-width: 768px) {
  .app-header { padding: 10px 14px; }
  .app-header .logo { height: 38px; }
  .app-header .title h1 { font-size: 1rem; }
  .app-main { padding: 14px; }
  .postit-grid { grid-template-columns: 1fr; }
  .training-grid { font-size: 0.62rem; grid-template-columns: 72px repeat(7,1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── TRENING: dag-for-dag liste (mobil) ── */
.training-daylist { display: none; }
.dl-toggle-row { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.dl-toggle { background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; cursor: pointer; }
.dl-toggle.active { border-color: var(--accent); color: var(--accent); background: rgba(255,255,255,0.06); }
.day-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.day-head { background: #1a1a1a; padding: 10px 14px; font-weight: 700; font-size: 0.9rem; display: flex; justify-content: space-between; align-items: center; }
.day-head .dh-count { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.day-events { display: flex; flex-direction: column; }
.day-event { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
.day-event:first-child { border-top: none; }
.day-event .de-time { font-weight: 700; font-size: 0.85rem; color: var(--text); white-space: nowrap; min-width: 92px; }
.day-event .de-body { flex: 1; min-width: 0; }
.day-event .de-team { font-size: 0.84rem; font-weight: 600; }
.day-event .de-loc { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.day-event.mine { background: rgba(255,255,255,0.04); }
.day-event.mine .de-team { color: var(--accent); }
.day-event.match { border-left: 3px solid #ef4444; background: rgba(239,68,68,0.08); }
.day-event.match .de-time { color: #fca5a5; }
.day-event.match.mine .de-team { color: #fff; }
.day-event.clickable { cursor: pointer; }
.day-empty { padding: 12px 14px; color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.de-moved { display: inline-block; margin-left: 6px; background: rgba(34,177,76,0.18); color: #22B14C; padding: 0 6px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; vertical-align: middle; }
@media (max-width: 640px) {
  #tab-treningsplan .training-grid { display: none; }
  .training-daylist { display: block; }
  .balance-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .balance-stats { width: 100%; justify-content: space-between; gap: 6px; }
}

/* ── MEDLEMSREGISTER mobil: kort + sammenleggbare filtre ── */
.reg-cardlist { display: none; flex-direction: column; gap: 8px; }
.reg-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.reg-card.reg-row-warn { border-left: 3px solid #eab308; }
.reg-card.reg-row-err { border-left: 3px solid #ef4444; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rc-types { margin-bottom: 4px; }
.rc-meta { font-size: 0.8rem; color: var(--text-muted); }
.rc-contact { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; word-break: break-word; }
.rc-flags { margin-top: 6px; }
.reg-filter-toggle { display: none; }
.reg-collapse { display: block; }
@media (max-width: 640px) {
  #klubb-medlemmer .mem-table-wrap { display: none; }
  #klubb-medlemmer .reg-cardlist { display: flex; }
  #klubb-medlemmer .reg-filter-toggle { display: inline-flex; }
  #klubb-medlemmer .reg-collapse { display: none; }
  #klubb-medlemmer .reg-collapse.open { display: block; }
}

/* ── MOBIL-LAG: bunnmeny, slank topp, FAB, bunn-ark ── */
.bottom-nav, .fab, .safe-top { display: none; }
.safe-top { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--card-bg); z-index: 140; }
.more-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 320; display: none; align-items: flex-end; }
.more-sheet-overlay.open { display: flex; }
.more-sheet { width: 100%; background: var(--card-bg); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); }
.more-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border); margin: 8px auto 12px; }
.more-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 0.95rem; padding: 13px 8px; cursor: pointer; border-radius: 8px; }
.more-item:hover { background: rgba(255,255,255,0.05); }
.more-item .mi-ico { font-size: 1.2rem; width: 24px; text-align: center; }

@media (max-width: 640px) {
  .app-nav { display: none; }
  .app-header .header-right { display: none; }
  #team-subtitle { display: none; }
  body { padding-top: env(safe-area-inset-top); }
  .safe-top { display: block; }
  .app-main { padding-bottom: 88px; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
    background: var(--card-bg); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.62rem; font-weight: 600; padding: 4px 2px; }
  .bn-item .bn-ico { font-size: 1.25rem; line-height: 1; }
  .bn-item.active { color: var(--accent); }

  .fab { display: flex; align-items: center; justify-content: center; position: fixed; right: 16px; bottom: 76px; z-index: 121; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: #0d0d0d; font-size: 1.8rem; line-height: 1; box-shadow: 0 6px 18px rgba(0,0,0,0.45); }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100% !important; max-height: 92vh; border-radius: 16px 16px 0 0; }

  .sub-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
}

@media (min-width: 1200px) {
  .postit-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ── SPOND-IMPORT ─────────────────────────── */
.spond-step {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 14px 0 8px;
}
.spond-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.spond-map-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.spond-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.spond-summary span {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
}
.spond-summary strong { color: var(--blue); }
.spond-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.spond-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.spond-table th,
.spond-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.spond-table th {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.spond-table tr:last-child td { border-bottom: none; }
.spond-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.spond-insert { background: rgba(34,197,94,0.18);  color: #4ade80; }
.spond-update { background: rgba(59,130,246,0.18); color: #60a5fa; }
.spond-warn {
  list-style: none;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: 8px;
  font-size: 0.74rem;
  color: var(--warning);
}
.spond-warn li { margin: 2px 0; }
.spond-invite-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
}

/* ── MEDLEMSREGISTER (Klubb) ── */
.klubb-pane { margin-top: 4px; }
.mem-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.mem-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: top; }
.reg-badge { display: inline-block; font-size: 0.68rem; padding: 2px 7px; border-radius: 999px; background: #1e1e1e; border: 1px solid var(--border); color: var(--text-muted); margin: 1px 2px; white-space: nowrap; }
.reg-badge.super { background: rgba(249,115,22,0.16); color: var(--accent); border-color: transparent; }
.reg-badge.plat  { background: rgba(168,85,247,0.18); color: #c084fc; border-color: transparent; }
.reg-badge.play  { background: rgba(59,130,246,0.16); color: #60a5fa; border-color: transparent; }
.reg-flag { display: inline-block; font-size: 0.65rem; padding: 1px 7px; border-radius: 999px; margin: 2px 3px 0 0; white-space: nowrap; }
.reg-flag.err  { background: rgba(239,68,68,0.16); color: #f87171; }
.reg-flag.warn { background: rgba(234,179,8,0.16); color: #eab308; }
.reg-flag.info { background: #1e1e1e; color: var(--text-muted); }
.reg-row-warn td { background: rgba(234,179,8,0.05); }
.reg-row-err td  { background: rgba(239,68,68,0.06); }
.reg-name { font-weight: 600; color: var(--text); }
.reg-link { cursor: pointer; }
.reg-link:hover .reg-name { color: var(--accent); }
.acct { display: inline-block; font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; }
.acct.on  { background: rgba(34,197,94,0.16); color: #4ade80; }
.acct.inv { background: rgba(234,179,8,0.16); color: #eab308; }
.acct.off { background: #1e1e1e; color: var(--text-muted); }
.reg-muted { color: var(--text-muted); font-size: 0.8rem; }
.reg-drow { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.reg-drow .k { color: var(--text-muted); width: 120px; flex-shrink: 0; }
.reg-role-edit { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.mem-chk { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.reg-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--text-muted); color: var(--text-muted); font-size: 0.62rem; font-style: italic; font-weight: 700; cursor: pointer; line-height: 1; flex-shrink: 0; }
.reg-info:hover { border-color: var(--accent); color: var(--accent); }
.reg-tip { position: fixed; max-width: 280px; background: #1e1e1e; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 0.76rem; color: var(--text); line-height: 1.5; z-index: 9999; box-shadow: 0 6px 24px rgba(0,0,0,0.5); display: none; }

/* ── BOOKING-KALENDER ──────────────────────────────────────────────────────── */
.bk-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
}
.bk-view-btn {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
}
.bk-view-btn.active { background: #fff; color: #0d0d0d; border-color: #fff; }
.bk-view-btn:hover:not(.active) { border-color: var(--accent); color: var(--text); }

.bk-nav-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  min-width: 150px;
  text-align: center;
}

.bk-res-selectors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.bk-res-selectors select {
  flex: 1;
  min-width: 140px;
  max-width: 240px;
}

/* ── UKE-KALENDER ───────────────────────────── */
.bk-week-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bk-week-header {
  display: grid;
  grid-template-columns: 48px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 10;
}
.bk-week-head {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 4px;
  border-left: 1px solid var(--border);
}
.bk-today-head { color: var(--accent); background: rgba(255,255,255,0.04); }
.bk-day-num { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.bk-today-head .bk-day-num { color: var(--accent); }

.bk-week-body {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
}

.bk-time-col {
  position: relative;
  width: 48px;
  flex-shrink: 0;
}
.bk-time-label {
  position: absolute;
  right: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
  transform: translateY(-50%);
}
.bk-grid-lines {
  position: absolute;
  left: 48px;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}
.bk-hline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.bk-hline-half { background: rgba(255,255,255,0.04); }

.bk-events-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  position: relative;
  min-width: 420px;
}
.bk-day-col {
  position: relative;
  border-left: 1px solid var(--border);
  cursor: pointer;
}
.bk-day-col:hover { background: rgba(255,255,255,0.015); }

.bk-event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  overflow: hidden;
  z-index: 5;
  font-size: 0.7rem;
  transition: opacity 0.15s;
}
.bk-event:hover { opacity: 0.85; }
.bk-event-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-event-time  { font-size: 0.65rem; color: rgba(255,255,255,0.6); }
.bk-event-badge { font-size: 0.6rem; margin-top: 2px; }
.bk-event-pending { opacity: 0.65; }

/* ── DAG-HEADER ─────────────────────────────── */
.bk-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 0 14px;
  color: var(--text);
}

/* ── MÅNED-KALENDER ─────────────────────────── */
.bk-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.bk-month-head {
  background: var(--card-bg);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 6px 4px;
  font-weight: 600;
}
.bk-month-cell {
  background: var(--bg);
  min-height: 80px;
  padding: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}
.bk-month-cell:hover { background: var(--card-bg); }
.bk-month-empty { background: var(--bg); opacity: 0.4; }
.bk-today-cell { background: rgba(255,255,255,0.04); }
.bk-today-cell .bk-month-date { color: var(--accent); font-weight: 700; }
.bk-month-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.bk-month-evt {
  font-size: 0.67rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.bk-month-more { font-size: 0.65rem; color: var(--text-muted); padding-left: 4px; }

/* ── LISTE-VISNING ─────────────────────────── */
.bk-list-item {
  padding: 12px 14px;
  background: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.bk-list-item:hover { opacity: 0.85; }
.bk-list-meta  { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.bk-list-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.bk-list-sub   { font-size: 0.78rem; color: var(--text-muted); }

/* ── BOOKING ADMIN ─────────────────────────── */
.bk-res-node { margin-bottom: 4px; }
.bk-res-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bk-res-name { font-weight: 600; font-size: 0.88rem; flex: 1; min-width: 80px; }
.bk-res-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.bk-kind-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.bk-kind-rom  { background: rgba(167,139,250,0.12); color: #c084fc; border-color: transparent; }
.bk-kind-bane { background: rgba(59,130,246,0.12);  color: #60a5fa; border-color: transparent; }
.bk-badge-approval {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(234,179,8,0.12);
  color: var(--warning);
  white-space: nowrap;
}
.bk-type-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── MODALER ───────────────────────────────── */
.bk-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* La form-felt krympe under sin intrinsic min-width (clock-ikon etc) i grid/flex.
   Uten dette stikker time-/date-inputs ut av container på smale skjermer. */
.bk-modal-grid .form-group,
.bk-modal-grid .form-control { min-width: 0; }
@media (max-width: 480px) {
  .bk-modal-grid { grid-template-columns: 1fr; }
  .bk-events-grid { min-width: 360px; }
  .bk-week-header { grid-template-columns: 36px repeat(7, 1fr); }
  .bk-time-col { width: 36px; }
  .bk-time-label { font-size: 0.58rem; right: 3px; }
}

/* ── KJØREGODTGJØRELSE ──────────────────────────────────────────────────────── */

.km-list-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.km-list-item:hover { border-color: var(--accent); background: #1a1a1a; }

/* Status-badges */
.km-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.km-status-draft     { background: #2a2a2a; color: #aaa; border: 1px solid #444; }
.km-status-submitted { background: #1e3a5f; color: #60a5fa; border: 1px solid #3b82f6; }
.km-status-approved  { background: #14532d; color: #4ade80; border: 1px solid #22c55e; }
.km-status-rejected  { background: #450a0a; color: #f87171; border: 1px solid #ef4444; }
.km-status-paid      { background: #2e1065; color: #c4b5fd; border: 1px solid #8b5cf6; }

/* Turtabell */
.km-trip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
}
.km-trip-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 7px 5px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.km-trip-table td {
  padding: 4px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.km-trip-table tfoot td {
  border-bottom: none;
  border-top: 1px solid var(--border);
}
.km-cell-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 4px 5px;
  width: 70px;
  transition: border-color .15s, background .15s;
}
.km-cell-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #1a1a1a;
}
.km-cell-input[type="date"] { width: 120px; }
.km-num { width: 60px; text-align: right; }
.km-calc {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  padding-right: 8px;
}
.km-total-cell { color: var(--text); font-weight: 600; }
.km-del-row {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.km-del-row:hover { background: rgba(248,113,113,.15); }

/* Signatur-canvas */
#km-sig-canvas {
  display: block;
  border-radius: 6px;
  touch-action: none;
}

/* ── PRINT-STIL ───────────────────────────────────────────────────────────── */
#km-print-area { display: none; }

@media print {
  /* Skjul alt unntatt print-området */
  body > *:not(#km-print-area) { display: none !important; }
  #km-print-area {
    display: block !important;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    color: #000;
    background: #fff;
    padding: 0;
    margin: 0;
  }

  .km-print-doc { padding: 16mm 12mm; }

  .km-print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 14px;
  }

  .km-print-info {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 10pt;
  }
  .km-print-info td {
    padding: 3px 8px 3px 0;
    vertical-align: top;
  }
  .km-print-info td:nth-child(odd) {
    color: #555;
    white-space: nowrap;
    width: 110px;
  }

  .km-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    margin-bottom: 14px;
  }
  .km-print-table th {
    background: #eee;
    border: 1px solid #999;
    padding: 4px 5px;
    text-align: left;
    font-weight: 700;
  }
  .km-print-table td {
    border: 1px solid #ccc;
    padding: 3px 5px;
    vertical-align: middle;
  }
  .km-print-table tfoot td {
    border-top: 2px solid #000;
    background: #f8f8f8;
  }

  .km-print-footer {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 20px;
  }
}

/* ── STATISTIKK-TAB ──────────────────────────────────────────── */

/* Sub-tab-bar med sesongvelger */
.stat-tab-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.stat-tab-bar #stat-subtabs {
  flex: 1;
  min-width: 0;
}
.stat-season-sel {
  flex-shrink: 0;
  width: 90px !important;
  font-size: 0.82rem;
  padding: 5px 8px;
  /* Midtstill loddrett mot fane-TEKSTEN. Fanene har 10px topp/bunn-
     padding + 3px aktiv-underkant, så boksens senter må løftes for å
     ligge på linje med tekstens senter (ikke fane-boksens senter). */
  align-self: center;
  position: relative;
  top: -7px;
}

/* Sesong-oversikt: summary-kort */
.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.ssc-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  white-space: nowrap;
}
.ssc-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Høydepunkt-rad */
.stat-highlight-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.stat-highlight-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
}
.shc-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  font-weight: 700;
}
.shc-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shc-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}
.shc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── SESONG-FANEN: form-stripe, sesongproduksjon-bar, skuddtype-stack ── */
.ses-twoup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.ses-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.ses-panel-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 10px;
}
.form-row { display: flex; gap: 6px; flex-wrap: wrap; }
.form-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  font-size: 0.74rem; font-weight: 700;
}
.form-w { background: rgba(34,197,94,0.14);  color: #22c55e; border: 1px solid rgba(34,197,94,0.32); }
.form-d { background: rgba(148,163,184,0.10); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.28); }
.form-l { background: rgba(248,113,113,0.10); color: #f87171; border: 1px solid rgba(248,113,113,0.32); }

.prod-bars { display: flex; flex-direction: column; gap: 9px; }
.prod-bar-head {
  display: flex; justify-content: space-between;
  font-size: 0.74rem; margin-bottom: 3px;
}
.prod-bar-head > :first-child { color: var(--text-muted); }
.prod-bar-head > :last-child  { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.prod-bar-track { height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.prod-bar-fill  { height: 100%; }

.shot-stack {
  display: flex; height: 24px;
  border-radius: 6px; overflow: hidden;
  background: #1a1a1a; margin-bottom: 12px;
}
.shot-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 0.72rem; color: var(--text-muted);
}
.shot-legend strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.shot-leg-dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 2px; margin-right: 5px; vertical-align: middle;
}

/* Generell statistikk-tabell */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.stat-table thead th {
  background: #1a1a1a;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stat-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.stat-table tbody tr:last-child td { border-bottom: none; }
.stat-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.stat-rank-col { width: 32px; }
.stat-num-col  { width: 52px; }
.stat-rank     { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-align: center; }
.stat-player-name { font-weight: 600; }
.stat-num      { text-align: right; font-variant-numeric: tabular-nums; }
.stat-goals    { font-weight: 700; color: var(--accent); }
.stat-saves    { font-weight: 700; color: #3b82f6; }
.stat-pos      { color: #22c55e; font-weight: 600; }
.stat-neg      { color: #f87171; font-weight: 600; }
.stat-muted    { color: var(--text-muted); }
.stat-section-head {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.stat-empty-note { font-size: 0.82rem; color: var(--text-muted); padding: 8px 0; }

/* Kampiste */
.stat-match-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-match-row {
  display: grid;
  grid-template-columns: 72px 26px 1fr 68px 28px;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
}
.stat-match-row.smr-win  { border-left-color: #22c55e; }
.stat-match-row.smr-loss { border-left-color: #f87171; }
.stat-match-row.smr-draw { border-left-color: #eab308; }
.smr-date     { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }
.smr-ha       { font-size: 0.68rem; font-weight: 700; border-radius: 4px;
                 padding: 2px 5px; text-align: center; }
.smr-ha-home  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.smr-ha-away  { background: rgba(59,130,246,0.15); color: #3b82f6; }
.smr-opponent { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smr-score    { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.smr-result   { text-align: center; font-size: 0.7rem; font-weight: 700; }
.smr-res-W    { color: #22c55e; }
.smr-res-L    { color: #f87171; }
.smr-res-D    { color: #eab308; }

/* ── MEP LEADERBOARD ──────────────────────────────────────────── */
.mep-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.mep-title    { font-size: 1rem; font-weight: 700; margin: 0 0 2px; }
.mep-subtitle { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.mep-recalc-btn { margin-left: auto; white-space: nowrap; }
.mep-cached-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.mep-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.mep-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.mep-row:hover {
  border-color: rgba(255,255,255,0.15);
  background: #1a1a1a;
}
.mep-rank {
  width: 24px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}
.mep-info    { flex: 1; min-width: 0; }
.mep-name    { font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mep-num     { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.mep-meta    { font-size: 0.72rem; color: var(--text-muted); margin: 2px 0 5px; }
.mep-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.mep-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.mep-score-badge {
  font-size: 1.1rem;
  font-weight: 800;
  min-width: 44px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.mep-tier-badge {
  font-size: 0.64rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(234,179,8,0.15);
  color: #eab308;
  border: 1px solid rgba(234,179,8,0.25);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ── MEP PLAYER DETAIL (i modal) ─────────────────────────────── */
.mep-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mep-detail-name { font-size: 1.15rem; font-weight: 800; margin: 0 0 2px; }
.mep-detail-meta { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.mep-detail-score-badge {
  flex-shrink: 0;
  border: 1px solid;
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
  min-width: 60px;
}
.mdsb-num   { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.mdsb-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; opacity: 0.7; }

/* Sparkline */
.mep-sparkline-section {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.mss-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 6px; }
.mep-sparkline { display: block; }

/* Faktorkort */
.mep-factors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.mf-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  min-width: 80px;
  flex: 1;
}
.mf-val  { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.mf-unit { font-size: 0.7rem; font-weight: 400; }
.mf-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px;
            text-transform: uppercase; letter-spacing: 0.3px; }

/* Clutch-liste */
.clutch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.clutch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.clutch-pos { border-left: 3px solid #22c55e; }
.clutch-neg { border-left: 3px solid #f87171; }
.ci-icon  { font-size: 1rem; flex-shrink: 0; }
.ci-body  { flex: 1; min-width: 0; }
.ci-event { font-size: 0.82rem; font-weight: 600; }
.ci-meta  { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.ci-val   { font-size: 0.9rem; font-weight: 700; flex-shrink: 0; min-width: 36px; text-align: right; }
.ci-pos   { color: #22c55e; }
.ci-neg   { color: #f87171; }
}

/* ── BESTE LAG ───────────────────────────────────────────────── */

.bl-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bl-banner-v2 { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.2); }
.bl-banner-v1 { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }

.bl-method-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(34,197,94,0.2);
  color: #22c55e;
  flex-shrink: 0;
}
.bl-method-est {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
}

.bl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.bl-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.bl-card-top {
  border-color: rgba(255,255,255,0.14);
  background: #1a1a1a;
}
.bl-card-top:first-child {
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.04);
}

.bl-rank {
  font-size: 1.3rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.2;
  padding-top: 2px;
}

.bl-card-body { flex: 1; min-width: 0; }

.bl-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.bl-player {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--input-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.78rem;
}
.bl-gk-badge {
  font-size: 0.64rem;
  font-weight: 700;
  background: rgba(99,102,241,0.25);
  color: #a5b4fc;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.bl-pnum  { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bl-pname { font-weight: 600; }

.bl-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.bl-stat-val {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.bl-stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1px;
  white-space: nowrap;
}

.bl-footnote {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
   FILER-FANEN — dropzone, forhåndsvisning, papirkurv
   Portert fra design/mockup.html
   ════════════════════════════════════════════════════════════════════════ */

.space-slider { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; -webkit-overflow-scrolling: touch; }
.space-card {
  flex: 0 0 auto; min-width: 130px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all 0.15s; text-align: left;
}
.space-card:hover { border-color: var(--accent); }
.space-card.active { border-color: var(--accent); background: rgba(249,115,22,0.08); }
.space-card .space-icon { font-size: 1.4rem; }
.space-card .space-name { font-weight: 700; font-size: 0.9rem; margin-top: 4px; color: var(--text); }
.space-card .space-role { font-size: 0.66rem; color: var(--text-muted); margin-top: 2px; }

.files-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 14px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); cursor: pointer; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

.files-actions { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color 0.12s; position: relative;
}
.file-row:hover { border-color: var(--accent); }
.file-row .fr-icon { font-size: 1.3rem; flex: 0 0 auto; }
.file-row .fr-main { flex: 1; min-width: 0; }
.file-row .fr-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.file-row .fr-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.file-row .fr-chev { color: var(--text-muted); font-size: 1rem; }
.file-row .fr-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.file-row .fr-action-btn {
  background: none; border: 1px solid transparent; color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; transition: all 0.12s; opacity: 0;
}
.file-row:hover .fr-action-btn { opacity: 1; }
.file-row .fr-action-btn:hover { border-color: var(--border); background: rgba(255,255,255,0.04); color: var(--text); }
.file-row .fr-action-btn.danger:hover { color: #f87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
@media (max-width: 640px) { .file-row .fr-action-btn { opacity: 1; } }
.badge-office { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #c084fc; background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.3); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.badge-new { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #22c55e; background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.files-empty { font-size: 0.85rem; color: var(--text-muted); padding: 16px 2px; }

.dropzone { position: relative; min-height: 80px; border-radius: 12px; transition: background 0.15s; }
.dropzone.dragging { background: rgba(59,130,246,0.06); outline: 2px dashed #60a5fa; outline-offset: 4px; }
.drop-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(13,13,13,0.85); border-radius: 12px; pointer-events: none; z-index: 4; border: 2px dashed #60a5fa; }
.dropzone.dragging .drop-overlay { display: flex; }
.drop-overlay-inner { text-align: center; pointer-events: none; }
.drop-overlay-icon { font-size: 2.4rem; margin-bottom: 6px; }
.drop-overlay-text { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.drop-overlay-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

.upload-panel { position: fixed; right: 20px; bottom: 20px; width: 320px; max-width: calc(100vw - 40px); background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: 0 12px 36px rgba(0,0,0,0.5); z-index: 50; display: none; flex-direction: column; gap: 10px; }
.upload-panel.show { display: flex; }
.upload-panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 700; color: var(--text); }
.upload-panel-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0; }
.upload-item { display: flex; flex-direction: column; gap: 4px; font-size: 0.76rem; }
.upload-item-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-item-sub { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.7rem; }
.upload-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.upload-bar-fill { height: 100%; background: #60a5fa; transition: width 0.3s; }
.upload-bar-fill.done { background: #22c55e; }
.upload-bar-fill.error { background: #f87171; }

.preview-modal { position: fixed; inset: 0; display: none; z-index: 100; background: rgba(0,0,0,0.85); padding: 30px; align-items: center; justify-content: center; }
.preview-modal.show { display: flex; }
.preview-content { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; max-width: 1100px; width: 100%; max-height: calc(100vh - 60px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.preview-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.preview-head-icon { font-size: 1.4rem; flex-shrink: 0; }
.preview-head-main { flex: 1; min-width: 0; }
.preview-head-name { font-size: 0.95rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-head-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.preview-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.preview-body { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; background: #0a0a0a; }
.preview-body img, .preview-body video { max-width: 100%; max-height: calc(100vh - 200px); display: block; border-radius: 6px; }
.preview-body iframe { width: 100%; height: calc(100vh - 200px); border: 0; background: #fff; }
.preview-office-placeholder { padding: 50px; text-align: center; color: var(--text-muted); }
.preview-office-placeholder .poff-icon { font-size: 3.4rem; margin-bottom: 12px; }
.preview-office-placeholder .poff-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.preview-office-placeholder .poff-sub { font-size: 0.88rem; max-width: 380px; line-height: 1.5; margin: 0 auto 18px; }
.preview-office-placeholder .poff-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.trash-modal { position: fixed; inset: 0; display: none; z-index: 100; background: rgba(0,0,0,0.7); padding: 30px; align-items: center; justify-content: center; }
.trash-modal.show { display: flex; }
.trash-content { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; max-width: 640px; width: 100%; max-height: calc(100vh - 60px); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.trash-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.trash-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.trash-sub { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; }
.trash-body { flex: 1; overflow-y: auto; padding: 8px 14px 14px; }
.trash-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.trash-item:last-child { border-bottom: none; }
.trash-empty { text-align: center; color: var(--text-muted); padding: 30px 14px; font-size: 0.88rem; }

.trash-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: 8px; padding: 5px 11px; font-size: 0.78rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.12s; }
.trash-btn:hover { border-color: var(--accent); color: var(--accent); }
.trash-btn .trash-count { background: rgba(248,113,113,0.15); color: #f87171; border-radius: 99px; padding: 0 6px; font-weight: 700; font-size: 0.7rem; }

@media (max-width: 640px) {
  .preview-modal, .trash-modal { padding: 10px; }
  .preview-head, .trash-head { padding: 12px 14px; }
  .preview-head-actions .btn { padding: 6px 9px; font-size: 0.78rem; }
  .upload-panel { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}

/* ── SPOND-INTEGRASJON (Klubb → Spond) ─────────────────────────────────────── */
.sp-pill {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: inline-block;
}
.sp-pill-on  { background: rgba(34,177,76,0.15);  color: #22B14C; }
.sp-pill-off { background: rgba(148,163,184,0.18); color: var(--text-muted); }

/* Toggle-switch (master + dry-run) */
.sp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.sp-toggle input { display: none; }
.sp-slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(148,163,184,0.4);
  border-radius: 99px;
  transition: background 0.18s;
  flex-shrink: 0;
}
.sp-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.18s, transform 0.18s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.sp-toggle input:checked + .sp-slider              { background: rgba(34,177,76,0.6); }
.sp-toggle input:checked + .sp-slider .sp-knob     { left: 25px; }
.sp-toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.sp-mapping-row select.form-control { padding: 5px 8px; }
.sp-mapping-row { transition: background 0.12s; }

/* ══════════════════════════════════════════════════════════════════════════
   TRENING → DELE INN I LAG  (mobil-først trener-verktøy)
   ══════════════════════════════════════════════════════════════════════════ */
.ld-subtabs { display:flex; gap:4px; margin-bottom:16px; border-bottom:1px solid var(--border); }
.ld-subtab { flex:1; text-align:center; padding:10px 6px; font-size:0.85rem; font-weight:600;
  color:var(--text-muted); background:none; border:none; border-bottom:2px solid transparent;
  cursor:pointer; }
.ld-subtab.active { color:var(--accent); border-bottom-color:var(--accent); }
.ld-hidden { display:none !important; }

.ld-card { background:var(--card-bg); border:1px solid var(--border); border-radius:14px;
  padding:14px; margin-bottom:12px; }
.ld-card h3 { margin:0 0 12px; font-size:0.98rem; display:flex; align-items:center; gap:8px; }
.ld-step { display:inline-flex; width:21px; height:21px; border-radius:50%; background:var(--accent);
  color:#0d0d0d; font-size:0.74rem; font-weight:800; align-items:center; justify-content:center; flex-shrink:0; }
.ld-hint { font-size:0.74rem; color:var(--text-muted); line-height:1.45; }

/* Spond-status */
.ld-spond-bar { display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:rgba(6,182,212,0.08); border:1px solid var(--border); border-radius:10px;
  padding:10px 12px; margin-bottom:12px; }
.ld-spond-meta { font-size:0.68rem; color:var(--cyan); font-weight:700; letter-spacing:0.04em; }
.ld-spond-sub { font-size:0.74rem; color:var(--text-muted); margin-top:2px; }
.ld-btn-sync { background:var(--cyan); color:#04121a; border:none; border-radius:8px;
  padding:8px 13px; font-size:0.78rem; font-weight:700; cursor:pointer; white-space:nowrap; }

.ld-present-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.ld-present-head .cnt { font-size:0.82rem; color:var(--text-muted); }
.ld-present-head .cnt b { color:var(--accent); font-size:1.05rem; }
.ld-link { background:none; border:none; color:var(--accent); font-size:0.78rem; font-weight:600;
  cursor:pointer; padding:0; text-decoration:underline; }

.ld-legend { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.ld-legend span { font-size:0.62rem; color:var(--text-muted); display:inline-flex; align-items:center; gap:4px; }
.ld-legend i { width:9px; height:9px; border-radius:3px; display:inline-block; }

/* Spillerliste (oppmøte) */
.ld-plist { display:flex; flex-direction:column; gap:6px; }
.ld-prow { display:flex; align-items:center; gap:10px; background:var(--bg);
  border:1px solid var(--border); border-radius:10px; padding:8px 10px; cursor:pointer;
  transition:opacity 0.15s; }
.ld-prow.off { opacity:0.42; }
.ld-pcheck { width:21px; height:21px; border-radius:6px; border:2px solid var(--border); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:0.72rem; color:#0d0d0d; }
.ld-prow:not(.off) .ld-pcheck { background:var(--success); border-color:var(--success); }
.ld-pname { flex:1; font-size:0.86rem; font-weight:600; display:flex; align-items:center; gap:6px; }
.ld-inj { font-size:0.78rem; }
.ld-mep { font-size:0.64rem; font-weight:800; color:var(--text); background:#262626; border-radius:5px;
  padding:2px 6px; min-width:30px; text-align:center; }
.ld-mep.no { color:var(--text-muted); font-weight:600; }
.ld-lvl { font-size:0.62rem; font-weight:700; color:var(--text-muted); border:1px solid var(--border);
  border-radius:5px; padding:1px 5px; }

/* Posisjonsmerke (farget) */
.ld-pos { font-size:0.6rem; font-weight:800; padding:2px 7px; border-radius:20px; color:#04121a;
  text-transform:uppercase; letter-spacing:0.02em; }
.ld-pos.pos-Målvakt { background:#f59e0b; }
.ld-pos.pos-Kant    { background:#06b6d4; }
.ld-pos.pos-Back    { background:#8b5cf6; color:#fff; }
.ld-pos.pos-Linje   { background:#22c55e; }
.ld-pos.pos-Ukjent  { background:#3a3a3a; color:var(--text-muted); }

/* Oppsett */
.ld-field { margin-bottom:14px; }
.ld-field > label { display:block; font-size:0.78rem; font-weight:700; margin-bottom:7px; }
.ld-stepper { display:flex; align-items:center; gap:14px; }
.ld-stepper button { width:42px; height:42px; border-radius:11px; border:1px solid var(--border);
  background:var(--bg); color:var(--text); font-size:1.4rem; font-weight:700; cursor:pointer; }
.ld-stepper .val { font-size:1.7rem; font-weight:800; min-width:34px; text-align:center; }
.ld-stepper .per { font-size:0.74rem; color:var(--text-muted); line-height:1.3; }
.ld-seg { display:flex; background:var(--bg); border:1px solid var(--border); border-radius:11px;
  padding:3px; gap:3px; }
.ld-seg button { flex:1; padding:9px 4px; border:none; background:none; color:var(--text-muted);
  font-size:0.76rem; font-weight:700; border-radius:8px; cursor:pointer; }
.ld-seg button.active { background:var(--accent); color:#0d0d0d; }
.ld-method-desc { font-size:0.72rem; color:var(--text-muted); margin-top:8px; line-height:1.5;
  background:var(--bg); border-radius:8px; padding:9px 11px; border-left:3px solid var(--accent); }

.ld-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 0; border-top:1px solid var(--border); }
.ld-toggle-row .tl { font-size:0.82rem; font-weight:700; }
.ld-toggle-row .ts { font-size:0.7rem; color:var(--text-muted); margin-top:2px; }
.ld-switch { width:46px; height:27px; border-radius:20px; background:#333; position:relative;
  flex-shrink:0; cursor:pointer; transition:background 0.2s; border:none; }
.ld-switch.on { background:var(--success); }
.ld-switch::after { content:""; position:absolute; top:3px; left:3px; width:21px; height:21px;
  border-radius:50%; background:#fff; transition:transform 0.2s; }
.ld-switch.on::after { transform:translateX(19px); }
.ld-switch.locked { opacity:0.35; cursor:not-allowed; }
.ld-locked-note { font-size:0.72rem; color:var(--warning, #f59e0b); line-height:1.5;
  background:var(--bg); border-radius:8px; padding:9px 11px; border-left:3px solid var(--warning, #f59e0b);
  margin-top:6px; }
.ld-sub-opt { margin-top:4px; padding:4px 0 2px; }

.ld-lock-list { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.ld-lock-row { display:flex; align-items:center; gap:8px; background:var(--bg);
  border:1px solid var(--border); border-radius:9px; padding:7px 10px; }
.ld-lock-row .ln { flex:1; font-size:0.8rem; font-weight:600; display:flex; align-items:center; }
.ld-lock-row select { background:var(--card-bg); color:var(--text); border:1px solid var(--border);
  border-radius:7px; padding:6px 8px; font-size:0.76rem; }

.ld-genrow { display:flex; gap:8px; margin-top:6px; }
.ld-genrow .btn-primary { flex:1; }
.ld-genrow .btn-secondary { flex:0 0 auto; }

/* Resultat */
.ld-result-head { display:flex; align-items:center; justify-content:space-between; margin:18px 2px 12px; }
.ld-result-head h2 { margin:0; font-size:1.1rem; }
.ld-result-head .meta { font-size:0.72rem; color:var(--text-muted); }
.ld-team-card { background:var(--card-bg); border:1px solid var(--border); border-radius:14px;
  margin-bottom:11px; overflow:hidden; }
.ld-team-head { display:flex; align-items:center; gap:9px; padding:11px 13px;
  background:linear-gradient(90deg,rgba(255,255,255,0.06),transparent); border-bottom:1px solid var(--border); }
.ld-team-dot { width:26px; height:26px; border-radius:8px; background:var(--accent); color:#0d0d0d;
  font-weight:800; font-size:0.85rem; display:flex; align-items:center; justify-content:center; }
.ld-team-name { font-weight:800; font-size:0.95rem; flex:1; }
.ld-tier { font-size:0.6rem; font-weight:800; padding:2px 7px; border-radius:20px; text-transform:uppercase; }
.ld-tier.tier-1 { background:rgba(34,197,94,0.18); color:var(--success); border:1px solid rgba(34,197,94,0.4); }
.ld-tier.tier-2 { background:rgba(139,92,246,0.18); color:#a78bfa; border:1px solid rgba(139,92,246,0.4); }
.ld-team-strength { font-size:0.66rem; color:var(--text-muted); text-align:right; line-height:1.3; }
.ld-team-strength b { color:var(--text); font-size:0.78rem; }
.ld-team-players { padding:6px 8px 9px; display:flex; flex-direction:column; gap:5px; }
.ld-tp { display:flex; align-items:center; gap:9px; padding:7px 8px; border-radius:9px; cursor:pointer; }
.ld-tp:active { background:var(--bg); }
.ld-tp-name { flex:1; font-size:0.84rem; font-weight:600; }
.ld-lockic { font-size:0.72rem; }
.ld-pos-mini { display:flex; gap:3px; padding:6px 13px 11px; flex-wrap:wrap; }
.ld-pos-mini span { font-size:0.58rem; color:var(--text-muted); background:var(--bg);
  border:1px solid var(--border); border-radius:6px; padding:2px 6px; }

/* Bottom sheet (flytt spiller) */
.ld-sheet-bg { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:200; display:none; }
.ld-sheet-bg.show { display:block; }
.ld-sheet { position:fixed; bottom:0; left:0; right:0; max-width:560px; margin:0 auto;
  background:var(--card-bg); border-radius:18px 18px 0 0; border-top:1px solid var(--border);
  padding:8px 16px calc(22px + env(safe-area-inset-bottom)); transform:translateY(100%);
  transition:transform 0.22s; }
.ld-sheet-bg.show .ld-sheet { transform:translateY(0); }
.ld-sheet-grab { width:38px; height:4px; border-radius:3px; background:#444; margin:6px auto 12px; }
.ld-sheet h4 { margin:0 0 10px; font-size:0.92rem; }
.ld-opt { display:block; width:100%; text-align:left; background:var(--bg); border:1px solid var(--border);
  border-radius:10px; padding:13px 14px; margin-bottom:7px; color:var(--text); font-size:0.86rem;
  font-weight:600; cursor:pointer; }
.ld-opt.cur { border-color:var(--accent); color:var(--accent); }

/* Treningsplanlegger placeholder */
.ld-placeholder { text-align:center; padding:60px 20px; color:var(--text-muted); }
.ld-ph-big { font-size:2.6rem; margin-bottom:12px; }
.ld-placeholder p { line-height:1.6; font-size:0.9rem; }
