@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap");

body {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", "Aptos", "Segoe UI", sans-serif;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

/* Lerum Cup palette */
:root {
  --lerum-black: #050505;
  --lerum-red: #b50808;
  --lerum-red-dark: #8e0505;
  --lerum-pink: #e0004d;
  --lerum-blue: #006edb;
  --bs-primary: var(--lerum-red);
  --bs-primary-rgb: 181, 8, 8;
  --bs-link-color: var(--lerum-blue);
  --bs-link-hover-color: #0055aa;
}

.page {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 20px 30px 20px;
  box-sizing: border-box;
}

/* HEADER + NAV */

.site-header {
  margin-bottom: 16px;
}

.site-navbar {
  background: linear-gradient(90deg, var(--lerum-black) 0 20%, var(--lerum-red) 20% 100%);
}

.site-title-row {
  margin-bottom: 14px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.site-logo {
  display: block;
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

.site-brand-text {
  display: flex;
  align-items: center;
}

.site-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.top-nav .nav-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  background: #f1f1f1;
  transition: background 0.15s ease, transform 0.15s ease;
}

.top-nav .nav-link:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

.top-nav .nav-link.active {
  background: #d9e8ff;
  color: #0b3d91;
  font-weight: bold;
}

.top-nav .nav-link.disabled {
  background: #f5f5f5;
  color: #999;
  pointer-events: none;
}

.navbar .nav-link {
  border-radius: var(--bs-border-radius);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  padding: 0.45rem 0.75rem;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.navbar .nav-link.active {
  background: #000;
  color: #fff;
}

.admin-login-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
}

.admin-login-icon-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-year-tabs .btn-outline-secondary {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.5);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.16);
  --bs-btn-hover-border-color: #fff;
  --bs-btn-hover-color: #fff;
}

.nav-year-tabs .btn-primary {
  --bs-btn-bg: #000;
  --bs-btn-border-color: #000;
  --bs-btn-hover-bg: #1a1a1a;
  --bs-btn-hover-border-color: #1a1a1a;
}

.btn-primary {
  --bs-btn-bg: var(--lerum-red);
  --bs-btn-border-color: var(--lerum-red);
  --bs-btn-hover-bg: var(--lerum-red-dark);
  --bs-btn-hover-border-color: var(--lerum-red-dark);
  --bs-btn-active-bg: var(--lerum-red-dark);
  --bs-btn-active-border-color: var(--lerum-red-dark);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  padding: 0;
}

.theme-toggle:hover {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-toggle .theme-toggle__moon {
  display: inline;
}

.theme-toggle .theme-toggle__sun,
.theme-toggle.theme-toggle--dark .theme-toggle__moon {
  display: none;
}

.theme-toggle.theme-toggle--dark .theme-toggle__sun {
  display: inline;
}

.nav-logout-form {
  margin: 0;
}

/* HEADINGS */

h1 {
  margin-top: 0;
  margin-bottom: 14px;
}

h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

h1,
.site-title,
.home-info-card h1,
.home-news-card h2 {
  font-family: "Space Grotesk", "Aptos", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.ingress {
  margin-top: 0;
  margin-bottom: 20px;
}

.muted {
  color: #66788a;
}

.skytter-heading {
  line-height: 1.15;
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.02em;
}

.skytter-heading-name {
  font-weight: 800;
  color: #17324d;
}

.skytter-heading-lag {
  font-weight: 800;
  color: #17324d;
}

.skytter-subtitle {
  margin: 10px 0 0 0;
  color: #5e7082;
  font-size: 16px;
}

/* CARDS */

.card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  box-sizing: border-box;
}

.skytter-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.skytter-hero-text {
  flex: 1 1 auto;
}

.skytter-hero-actions {
  flex: 0 0 auto;
}

/* FILTER */

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.compact-filter {
  gap: 0;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  flex: 1 1 220px;
}

.field-wide {
  min-width: 320px;
  flex: 2 1 320px;
}

.compact-field {
  min-width: 180px;
}

.field label {
  margin-bottom: 6px;
  font-weight: bold;
}

.field select,
.field input,
.field button {
  padding: 10px;
  font-size: 14px;
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  color-scheme: light;
}

.field select:focus,
.field input:focus,
.field button:focus {
  border-color: var(--lerum-red);
  box-shadow: 0 0 0 0.2rem rgba(181, 8, 8, 0.18);
  outline: 0;
}

[data-bs-theme="dark"] .field select,
[data-bs-theme="dark"] .field input,
[data-bs-theme="dark"] .field button {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
  color-scheme: dark;
}

[data-bs-theme="dark"] .field select option {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}

.submit-field {
  min-width: auto;
  flex: 0 0 auto;
}

/* TABLES */

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  min-width: 720px;
}

thead th {
  background: #eef3f7;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #d7e0e7;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #e7edf2;
  white-space: nowrap;
}

.mobile-club {
  display: none;
}

.shooter-cell {
  min-width: 0;
}

tbody tr:hover td {
  background: #fafcff;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .class-card,
[data-bs-theme="dark"] .mini-stat {
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] thead th,
[data-bs-theme="dark"] .panel-header,
[data-bs-theme="dark"] .class-grid,
[data-bs-theme="dark"] .quick-link,
[data-bs-theme="dark"] .back-button {
  background: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] tbody tr:hover td,
[data-bs-theme="dark"] .panel-header:hover,
[data-bs-theme="dark"] .class-card:hover {
  background: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .muted,
[data-bs-theme="dark"] .stat-label,
[data-bs-theme="dark"] .mini-stat-label,
[data-bs-theme="dark"] .panel-subtitle,
[data-bs-theme="dark"] .skytter-subtitle {
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .stat-value,
[data-bs-theme="dark"] .stat-value-text,
[data-bs-theme="dark"] .mini-stat-value,
[data-bs-theme="dark"] .skytter-heading-name,
[data-bs-theme="dark"] .skytter-heading-lag,
[data-bs-theme="dark"] .panel-title,
[data-bs-theme="dark"] .class-title,
[data-bs-theme="dark"] .quick-link,
[data-bs-theme="dark"] .class-line {
  color: var(--bs-body-color);
}

.num {
  text-align: right;
}

/* RESULT COLORS */

.droppa {
  background-color: #fff5f5;
  color: #b42318;
  font-weight: 700;
}

[data-bs-theme="dark"] .droppa {
  background: transparent;
  color: #f0a6a6;
  opacity: 0.72;
  box-shadow: inset 0 -2px 0 rgba(240, 166, 166, 0.42);
}

.beste {
  background-color: #e8f7e8;
  color: #166534;
  font-weight: 700;
}

/* STATS GRID */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stats-grid-centered .stat-card {
  text-align: center;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  box-sizing: border-box;
}

.stat-card-fancy {
  border: 1px solid #e8edf2;
}

.stat-label {
  font-size: 13px;
  color: #66788a;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #13293d;
}

.stat-value-text {
  font-size: 20px;
  line-height: 1.3;
}

/* BUTTON */

.back-button {
  padding: 10px 14px;
  font-size: 14px;
  border: 0;
  border-radius: 10px;
  background: #eef3f7;
  cursor: pointer;
}

.back-button:hover {
  background: #e1e9ef;
}

/* LINKS */

.name-link {
  color: var(--lerum-blue);
  font-weight: 700;
  text-decoration: none;
}

.name-link:hover {
  color: var(--lerum-red);
  text-decoration: none;
}

[data-bs-theme="dark"] .name-link {
  color: #fff;
}

[data-bs-theme="dark"] .name-link:hover {
  color: #ffdbe7;
}

/* HOME */

.home-shell {
  background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-tertiary-bg));
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  box-shadow: 0 20px 46px rgba(5, 5, 5, 0.08);
  padding: 18px;
}

.home-shell .card {
  margin-bottom: 0;
}

[data-bs-theme="dark"] .home-shell {
  background: color-mix(in srgb, var(--bs-body-bg) 72%, var(--bs-secondary-bg));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.25);
}

.home-info-card {
  border-top: 4px solid var(--lerum-red);
  min-height: 480px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.home-info-logo {
  display: block;
  width: min(220px, 58vw);
  height: auto;
  margin: 0 auto 18px auto;
}

.home-info-card h1 {
  color: #17324d;
  margin-bottom: 10px;
  text-align: center;
}

.home-info-card--news h1 {
  text-align: left;
}

[data-bs-theme="dark"] .home-info-card h1 {
  color: var(--bs-body-color);
}

.home-rich-text {
  line-height: 1.65;
}

.home-news-card h2 {
  margin-bottom: 16px;
  text-align: left;
}

.home-news-card {
  border-top: 4px solid var(--lerum-red);
  min-height: 260px;
}

.home-news-list {
  display: grid;
  gap: 14px;
}

.home-news-item {
  display: block;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 14px;
  color: inherit;
  text-decoration: none;
}

.home-news-item:hover h3,
.home-news-item.active h3 {
  color: var(--lerum-red);
}

.home-news-item.active {
  background: var(--bs-secondary-bg);
  border-radius: 10px;
  border-top-color: transparent;
  margin: -8px;
  padding: 12px 8px 10px 8px;
}

.home-news-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.home-news-item time {
  color: var(--bs-secondary-color);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.home-news-item h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.home-news-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--lerum-red);
  color: #fff;
  margin-right: 6px;
  vertical-align: -4px;
}

.home-news-pin svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.home-news-item p {
  margin-bottom: 8px;
}

.home-news-read-more,
.home-news-back,
.home-news-date {
  color: var(--lerum-red);
  font-weight: 800;
}

.home-news-read-more {
  display: inline-block;
  margin-top: 2px;
}

.home-news-back {
  display: inline-block;
  margin-bottom: 10px;
  text-decoration: none;
}

.home-news-date {
  display: block;
  margin-bottom: 6px;
}

.home-year-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.home-year-kicker {
  margin: 0 0 6px 0;
  color: #66788a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.home-year-hero h1 {
  margin: 0;
  color: #17324d;
  font-size: 42px;
  line-height: 1;
}

/* LIVE LINKS */

.live-hero-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 0, 77, 0.12), transparent 16rem),
    var(--bs-body-bg);
}

.live-hero-card h1 {
  color: #17324d;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

[data-bs-theme="dark"] .live-hero-card h1 {
  color: var(--bs-body-color);
}

.organizer-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.organizer-link-card {
  border-top: 4px solid var(--lerum-red);
}

.organizer-link-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  margin-bottom: 16px;
}

.organizer-link-card:not([open]) .organizer-link-card__header {
  margin-bottom: 0;
}

.organizer-link-card__header::-webkit-details-marker {
  display: none;
}

.organizer-link-card__header::before {
  content: "›";
  color: var(--lerum-red);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 140ms ease;
}

.organizer-link-card[open] .organizer-link-card__header::before {
  transform: rotate(90deg);
}

.organizer-link-card__header h2 {
  color: #17324d;
  margin-bottom: 6px;
}

[data-bs-theme="dark"] .organizer-link-card__header h2 {
  color: var(--bs-body-color);
}

.organizer-link-card__header p {
  color: var(--bs-secondary-color);
  margin: 0;
}

.organizer-link-list {
  display: grid;
  gap: 10px;
}

.organizer-link-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  color: var(--bs-secondary-color);
  background: rgba(181, 8, 8, 0.055);
  border: 1px dashed rgba(181, 8, 8, 0.34);
  border-radius: 14px;
}

.organizer-link-empty strong {
  color: var(--lerum-red);
}

[data-bs-theme="dark"] .organizer-link-empty {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-bs-theme="dark"] .organizer-link-empty strong {
  color: #ffffff;
}

.organizer-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.organizer-link-item:hover {
  color: inherit;
  border-color: rgba(181, 8, 8, 0.38);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.organizer-link-item em,
.organizer-link-item strong,
.organizer-link-item small {
  display: block;
}

.organizer-link-item em {
  color: var(--lerum-red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.organizer-link-item strong {
  margin-top: 2px;
}

.organizer-link-item small {
  color: var(--bs-secondary-color);
  margin-top: 4px;
}

.organizer-link-item svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.year-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.year-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 14px;
  border: 1px solid #d7e0e7;
  border-radius: 10px;
  background: #eef3f7;
  color: #17324d;
  font-weight: 700;
  text-decoration: none;
}

.year-tab:hover {
  background: #e1e9ef;
}

.year-tab.active {
  background: #0b3d91;
  border-color: #0b3d91;
  color: #fff;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff1f5;
  color: var(--lerum-red-dark);
  text-decoration: none;
  font-weight: 600;
}

.quick-link:hover {
  background: #ffdbe7;
}

/* ADMIN */

.admin-heading,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-heading {
  margin-bottom: 16px;
}

.admin-collapsible-stack {
  display: grid;
  gap: 16px;
}

.admin-collapsible-stack .card {
  margin-bottom: 0;
}

.admin-section-actions {
  margin-top: 18px;
}

.admin-field-full {
  margin: 14px 0;
  width: 100%;
}

.admin-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-link-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-link-groups {
  display: grid;
  gap: 18px;
}

.admin-link-group {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 16px;
}

.admin-link-group__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.admin-link-group[open] .admin-link-group__header {
  margin-bottom: 12px;
}

.admin-link-group__header::-webkit-details-marker {
  display: none;
}

.admin-link-group__header::before {
  content: "›";
  color: var(--lerum-red);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 140ms ease;
}

.admin-link-group[open] .admin-link-group__header::before {
  transform: rotate(90deg);
}

.admin-link-group__header > div:first-child {
  flex: 1 1 auto;
}

.admin-link-group__actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-link-group__header h3,
.admin-link-group__header p {
  margin-bottom: 4px;
}

.admin-field-full textarea {
  min-height: 280px;
}

.html-editor-source--hidden {
  display: none;
}

.html-editor {
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bs-body-bg);
}

.html-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-secondary-bg);
}

.html-editor__button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-weight: 700;
  padding: 4px 9px;
}

.html-editor__button:hover {
  border-color: var(--lerum-red);
}

.html-editor__surface {
  min-height: 300px;
  padding: 14px;
  outline: 0;
  line-height: 1.6;
}

.html-editor__surface--code {
  font-family: Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.note-editor {
  border-color: var(--bs-border-color) !important;
}

.note-editor .note-toolbar,
.note-editor .note-statusbar {
  background: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .note-editor .note-editable {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .note-editor .note-btn {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin: 12px 0;
}

.admin-editor-panel summary {
  cursor: pointer;
  list-style: none;
}

.admin-editor-panel summary::-webkit-details-marker {
  display: none;
}

.admin-editor-panel summary span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-editor-panel summary strong {
  color: #17324d;
  font-size: 24px;
}

.admin-editor-panel summary em {
  color: var(--bs-secondary-color);
  font-style: normal;
}

.admin-frontpage-preview {
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  margin: 16px 0;
  padding: 16px;
  background: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .admin-editor-panel summary strong {
  color: var(--bs-body-color);
}

.inline-form {
  display: inline;
  margin-left: 10px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--lerum-red);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

[data-bs-theme="dark"] .link-button {
  color: #ffdbe7;
}

.stevne-list {
  margin: 0;
  padding-left: 20px;
}

.stevne-list li {
  margin: 10px 0;
}

.stevne-links {
  margin-top: 6px;
}

/* STATISTIKK PANEL */

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  padding: 0;
  overflow: hidden;
}

.panel-header-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: #fff;
}

.panel-header:hover {
  background: #f9fbff;
}

.panel-title {
  margin: 0 0 8px 0;
  font-size: 28px;
  color: #0b3d91;
}

.panel-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #555;
}

.panel-metrics {
  text-align: right;
  min-width: 220px;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 0 20px 20px 20px;
  background: #fafafa;
}

.class-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-sizing: border-box;
}

.class-card:hover {
  background: #f7fbff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.class-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0b3d91;
}

.class-line {
  margin: 4px 0;
  color: #333;
}

/* CHART */

.chart-card {
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #526273;
  font-size: 14px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot-poeng {
  background: #2563eb;
}

.legend-dot-inner {
  background: #f59e0b;
}

.series-chart-legend {
  max-width: 520px;
  justify-content: flex-end;
}

.series-dot-serie-1 {
  background: #006b4f;
}

.series-dot-serie-2 {
  background: #00825f;
}

.series-dot-serie-3 {
  background: #9fc44d;
}

.series-dot-grunnlag {
  background: #bf6746;
}

.series-dot-omgang {
  background: #2563eb;
}

.chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.line-chart {
  width: 100%;
  min-width: 880px;
  height: auto;
  display: block;
}

.skytter-result-table {
  min-width: 0;
  table-layout: fixed;
}

.skytter-result-table th:first-child,
.skytter-result-table td:first-child {
  width: 42%;
  white-space: normal;
}

.skytter-result-table th:nth-child(2),
.skytter-result-table td:nth-child(2) {
  width: 24%;
}

.skytter-result-table th:last-child,
.skytter-result-table td:last-child {
  width: 34%;
}

.skytter-series-table {
  min-width: 760px;
}

.skytter-series-table th:first-child,
.skytter-series-table td:first-child {
  width: auto;
}

.skytter-series-table th:nth-child(2),
.skytter-series-table td:nth-child(2),
.skytter-series-table th:last-child,
.skytter-series-table td:last-child {
  width: auto;
}

.skytter-series-table .series-sum-column {
  color: var(--lerum-red);
  font-weight: 850;
  background: rgba(196, 0, 0, 0.055);
}

[data-bs-theme="dark"] .skytter-series-table .series-sum-column {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.075);
}

.series-chart-plot {
  fill: rgba(0, 107, 79, 0.035);
  stroke: rgba(0, 107, 79, 0.12);
  stroke-width: 1;
}

[data-bs-theme="dark"] .series-chart-plot {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(255, 255, 255, 0.10);
}

.series-bar-piece {
  filter: url(#seriesShadow);
}

.series-bar-segment {
  stroke: rgba(255, 255, 255, 0.58);
  stroke-width: 1;
  transition: opacity 140ms ease, transform 140ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.series-bar-piece:hover .series-bar-segment {
  opacity: 0.88;
  transform: translateY(-2px);
}

.series-bar-value {
  fill: #ffffff;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.24);
  stroke-width: 2px;
}

.series-total-value {
  fill: var(--lerum-navy);
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: var(--card-bg);
  stroke-width: 4px;
}

[data-bs-theme="dark"] .series-total-value {
  fill: #ffffff;
  stroke: #202830;
}

.chart-axis {
  stroke: #9eb0bf;
  stroke-width: 1.2;
}

.chart-grid {
  stroke: #edf2f7;
  stroke-width: 1;
}

.chart-grid-vertical {
  stroke: #f5f7fa;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-poeng {
  stroke: #2563eb;
}

.chart-line-inner {
  stroke: #f59e0b;
}

.chart-point {
  stroke: #fff;
  stroke-width: 2;
}

.chart-point-poeng {
  fill: #2563eb;
}

.chart-point-inner {
  fill: #f59e0b;
}

.chart-label {
  fill: #5d6d7e;
  font-size: 13px;
}

.chart-value {
  font-size: 12px;
  font-weight: 700;
}

.chart-value-poeng {
  fill: #2563eb;
}

.chart-value-inner {
  fill: #b45309;
}

/* TOPPLISTER */

.topplister-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel-expandable {
  padding: 0;
  overflow: hidden;
}

.panel-summary {
  list-style: none;
  cursor: pointer;
}

.panel-summary::-webkit-details-marker {
  display: none;
}

.panel-expandable[open] .panel-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.panel-body-card {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.panel-compact {
  margin-bottom: 0;
}

.panel-header-compact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.panel-header-main {
  min-width: 0;
}

.panel-mini-stats {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}

.mini-stat {
  background: #f7fbff;
  border: 1px solid #e6edf3;
  border-radius: 10px;
  padding: 10px 12px;
}

.mini-stat-label {
  font-size: 11px;
  color: #66788a;
  margin-bottom: 4px;
}

.mini-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #17324d;
  line-height: 1.2;
}

/* Toppliste table, kompakt og med synleg Sum/Inner */
.topplister-grid .table-wrap {
  overflow-x: auto;
}

.topplister-grid table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.topplister-grid thead th {
  font-size: 12px;
  padding: 8px 8px;
  position: static;
}

.topplister-grid tbody td {
  font-size: 13px;
  padding: 8px 8px;
  white-space: normal;
}

.topplister-grid .name-link {
  font-size: 13px;
}

.topplister-grid th:nth-child(1),
.topplister-grid td:nth-child(1) {
  width: 42px;
  white-space: nowrap;
  text-align: right;
}

.topplister-grid th:nth-child(2),
.topplister-grid td:nth-child(2) {
  width: 42%;
  white-space: normal;
  word-break: break-word;
}

.topplister-grid th:nth-child(3),
.topplister-grid td:nth-child(3) {
  width: 30%;
  white-space: normal;
  word-break: break-word;
}

.topplister-grid th:nth-child(4),
.topplister-grid td:nth-child(4) {
  width: 70px;
  white-space: nowrap;
  text-align: right;
}

.topplister-grid th:nth-child(5),
.topplister-grid td:nth-child(5) {
  width: 70px;
  white-space: nowrap;
  text-align: right;
}

/* OTHER */

.year-list {
  margin: 0;
  padding-left: 20px;
}

.year-list li {
  margin: 8px 0;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .page {
    padding: 0 14px 24px 14px;
    margin: 16px auto;
  }

  .site-title {
    font-size: 28px;
  }

  .site-logo {
    max-height: 54px;
  }

  .panel-header,
  .skytter-hero,
  .home-year-hero,
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .year-tabs {
    justify-content: flex-start;
  }

  .panel-metrics {
    text-align: left;
    min-width: 0;
  }

  .field,
  .field-wide,
  .compact-field {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .submit-field {
    width: 100%;
    flex: 1 1 100%;
  }

  .submit-field button {
    width: 100%;
  }

  .skytter-heading {
    font-size: 34px;
  }

  .topplister-grid {
    grid-template-columns: 1fr;
  }

  .admin-two-column {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-info-card {
    min-height: 0;
  }

  .panel-mini-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-title {
    font-size: 24px;
  }

  .site-brand {
    gap: 10px;
  }

  .site-logo {
    max-height: 42px;
  }

  .top-nav {
    gap: 8px;
    padding: 10px;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
  }

  .card {
    padding: 14px;
  }

  .home-shell {
    border-radius: 14px;
    padding: 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-value-text {
    font-size: 17px;
  }

  .class-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 14px 14px;
  }

  .panel-header {
    padding: 14px;
  }

  .panel-title {
    font-size: 24px;
  }

  .skytter-heading {
    font-size: 28px;
  }

  .home-year-hero h1 {
    font-size: 34px;
  }

  .year-tab {
    min-width: 0;
    flex: 1 1 auto;
  }

  thead th,
  tbody td {
    padding: 8px;
    font-size: 13px;
  }

  table {
    min-width: 640px;
  }

  table.responsive-shooter-table {
    min-width: 0;
  }

  .responsive-shooter-table .club-column {
    display: none;
  }

  .responsive-shooter-table .mobile-class-column {
    display: none;
  }

  .responsive-shooter-table .samanlagt-detail-column {
    display: none;
  }

  .responsive-shooter-table .sok-detail-column {
    display: none;
  }

  .responsive-shooter-table .shooter-cell {
    white-space: normal;
    min-width: 120px;
  }

  .responsive-shooter-table .mobile-club {
    display: block;
    margin-top: 3px;
    color: #63758a;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .beste35-table {
    table-layout: fixed;
  }

  .beste35-table th:first-child,
  .beste35-table td:first-child {
    width: 34px;
  }

  .beste35-table th:nth-child(2),
  .beste35-table td:nth-child(2) {
    width: auto;
  }

  .beste35-table th:nth-last-child(2),
  .beste35-table td:nth-last-child(2) {
    width: 76px;
    white-space: nowrap;
  }

  .beste35-table th:nth-last-child(3),
  .beste35-table td:nth-last-child(3) {
    width: 76px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  .beste35-table th,
  .beste35-table td {
    padding-left: 6px;
    padding-right: 6px;
  }

  .beste35-table .inner-column {
    display: none;
  }

  .beste35-table .mobile-inner {
    display: inline;
    color: var(--bs-secondary-color);
    font-size: 0.9em;
    font-weight: 750;
  }

  .samanlagt-table {
    table-layout: fixed;
  }

  .samanlagt-table th:first-child,
  .samanlagt-table td:first-child {
    width: 38px;
  }

  .samanlagt-table th:nth-last-child(3),
  .samanlagt-table td:nth-last-child(3),
  .samanlagt-table th:last-child,
  .samanlagt-table td:last-child {
    width: 54px;
  }

  .samanlagt-table .inner-column {
    display: none;
  }

  .samanlagt-table .mobile-inner {
    display: inline;
    color: var(--bs-secondary-color);
    font-size: 0.9em;
    font-weight: 750;
  }

  .sok-result-table {
    table-layout: fixed;
  }

  .sok-result-table th:first-child,
  .sok-result-table td:first-child {
    width: auto;
  }

  .sok-result-table th:nth-last-child(2),
  .sok-result-table td:nth-last-child(2),
  .sok-result-table th:last-child,
  .sok-result-table td:last-child {
    width: 58px;
  }

  .skytter-result-table {
    min-width: 0;
  }

  .skytter-result-table .skytter-result-class-column {
    display: none;
  }

  .skytter-result-table th:first-child,
  .skytter-result-table td:first-child {
    width: 58%;
    white-space: normal;
  }

  .skytter-result-table th:last-child,
  .skytter-result-table td:last-child {
    width: 42%;
  }

  .skytter-series-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .skytter-series-table thead {
    display: none;
  }

  .skytter-series-table tbody,
  .skytter-series-table tfoot,
  .skytter-series-table tr,
  .skytter-series-table td,
  .skytter-series-table th {
    display: block;
    width: 100% !important;
  }

  .skytter-series-table tbody tr,
  .skytter-series-table tfoot tr {
    padding: 10px;
    background: rgba(0, 107, 79, 0.035);
    border: 1px solid rgba(0, 107, 79, 0.12);
    border-radius: 16px;
  }

  [data-bs-theme="dark"] .skytter-series-table tbody tr,
  [data-bs-theme="dark"] .skytter-series-table tfoot tr {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.11);
  }

  .skytter-series-table td,
  .skytter-series-table th {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 4px;
    border: 0;
    text-align: right;
  }

  .skytter-series-table td::before,
  .skytter-series-table th::before {
    content: attr(data-label);
    color: #63758a;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
  }

  [data-bs-theme="dark"] .skytter-series-table td::before,
  [data-bs-theme="dark"] .skytter-series-table th::before {
    color: rgba(255, 255, 255, 0.72);
  }

  .skytter-series-table .series-stemne-cell {
    justify-content: flex-start;
    padding-bottom: 9px;
    color: var(--lerum-navy);
    font-size: 16px;
    font-weight: 900;
    text-align: left;
    border-bottom: 1px solid rgba(0, 107, 79, 0.12);
  }

  .skytter-series-table .series-stemne-cell::before {
    display: none;
  }

  [data-bs-theme="dark"] .skytter-series-table .series-stemne-cell {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.11);
  }

  .skytter-series-table tfoot tr {
    background: rgba(196, 0, 0, 0.07);
    border-color: rgba(196, 0, 0, 0.18);
  }

  .skytter-series-table tfoot .series-stemne-cell {
    color: var(--lerum-red);
  }

  [data-bs-theme="dark"] .skytter-series-table tfoot .series-stemne-cell {
    color: #ffffff;
  }

  .skytter-chart-wrap {
    overflow-x: hidden;
  }

  .skytter-line-chart .chart-label {
    font-size: 11px;
  }

  .skytter-line-chart .chart-value {
    font-size: 11px;
  }

  .line-chart {
    min-width: 760px;
  }

  .skytter-line-chart {
    min-width: 0;
  }

  .skytter-series-chart {
    min-width: 0;
  }

  .skytter-series-chart .chart-label {
    font-size: 11px;
  }

  .skytter-series-chart .series-bar-value,
  .skytter-series-chart .series-total-value {
    font-size: 11px;
  }

  .topplister-grid table {
    font-size: 12px;
  }

  .topplister-grid thead th,
  .topplister-grid tbody td {
    padding: 7px 6px;
  }

  .topplister-grid th:nth-child(4),
  .topplister-grid td:nth-child(4),
  .topplister-grid th:nth-child(5),
  .topplister-grid td:nth-child(5) {
    width: 58px;
  }
}

@media (max-width: 420px) {
  .page {
    padding: 0 10px 20px 10px;
  }

  .site-title {
    font-size: 20px;
  }

  .site-logo {
    max-height: 36px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .skytter-heading {
    font-size: 24px;
  }

  thead th,
  tbody td {
    padding: 7px;
    font-size: 12px;
  }

  table {
    min-width: 560px;
  }

  table.responsive-shooter-table {
    min-width: 0;
  }

  .responsive-shooter-table .mobile-club {
    font-size: 10px;
  }

  .beste35-table th:first-child,
  .beste35-table td:first-child {
    width: 30px;
  }

  .beste35-table th:nth-last-child(2),
  .beste35-table td:nth-last-child(2) {
    width: 68px;
  }

  .beste35-table th:nth-last-child(3),
  .beste35-table td:nth-last-child(3) {
    width: 68px;
  }

  .beste35-table th,
  .beste35-table td {
    padding-left: 5px;
    padding-right: 5px;
  }

  .samanlagt-table th:first-child,
  .samanlagt-table td:first-child {
    width: 32px;
  }

  .samanlagt-table th:nth-last-child(3),
  .samanlagt-table td:nth-last-child(3),
  .samanlagt-table th:last-child,
  .samanlagt-table td:last-child {
    width: 48px;
  }

  .sok-result-table th:nth-last-child(2),
  .sok-result-table td:nth-last-child(2),
  .sok-result-table th:last-child,
  .sok-result-table td:last-child {
    width: 50px;
  }

  .skytter-result-table th:first-child,
  .skytter-result-table td:first-child {
    width: 54%;
  }

  .skytter-result-table th:last-child,
  .skytter-result-table td:last-child {
    width: 46%;
  }

  .skytter-series-table td,
  .skytter-series-table th {
    font-size: 12px;
  }

  .skytter-series-table .series-stemne-cell {
    font-size: 15px;
  }

  .skytter-line-chart .chart-label,
  .skytter-line-chart .chart-value {
    font-size: 10px;
  }

  .line-chart {
    min-width: 680px;
  }

  .skytter-line-chart {
    min-width: 0;
  }

  .skytter-series-chart {
    min-width: 0;
  }

  .skytter-series-chart .chart-label,
  .skytter-series-chart .series-bar-value,
  .skytter-series-chart .series-total-value {
    font-size: 10px;
  }

  .topplister-grid table {
    font-size: 11px;
  }

  .topplister-grid .name-link {
    font-size: 11px;
  }

  .topplister-grid th:nth-child(1),
  .topplister-grid td:nth-child(1) {
    width: 34px;
  }

  .topplister-grid th:nth-child(4),
  .topplister-grid td:nth-child(4),
  .topplister-grid th:nth-child(5),
  .topplister-grid td:nth-child(5) {
    width: 52px;
  }
}
.chart-bar {
  fill: #2563eb;
  opacity: 0.9;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 4px;
  width: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 850;
  text-align: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.sort-header::after {
  content: "";
  color: var(--bs-secondary-color);
  font-size: 10px;
}

.sort-header.sort-asc::after {
  content: "▲";
}

.sort-header.sort-desc::after {
  content: "▼";
}

.mobile-inner {
  display: none;
}
