/* =========================================================
   SNFF DOMARAPP – CSS ENTRYPOINT
   ========================================================= */

@import url("./core/tokens.css");
@import url("./core/base.css");
@import url("./core/layout.css");

@import url("./components/header.css");
@import url("./components/buttons.css");
@import url("./components/forms.css");
@import url("./components/panels.css");
@import url("./components/loading.css");
@import url("./components/referee-navigation.css");
@import url("./components/stats.css");

@import url("./pages/matches.css");
@import url("./pages/referees.css");
@import url("./pages/referee-qualifications.css");
@import url("./pages/admin-referee-settings.css");
@import url("./pages/referee-blocks.css");
@import url("./pages/payments.css");
@import url("./pages/followup.css");



/* =========================================================
   Inloggad användare
   ========================================================= */

.user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);

  margin-top: 7px;
}

.user-info {
  margin: 0;

  color: rgb(255 255 255 / 85%);

  font-size: var(--font-size-sm);
  line-height: 1.3;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 22px;
  padding: 3px 9px;

  background: var(--color-danger);
  color: var(--color-text-inverse);

  border-radius: var(--radius-pill);

  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* =========================================================
   Navigation
   ========================================================= */

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);

  width: auto;
  margin: 0;
}

.topnav a,
.topnav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 8px 13px;

  background: rgb(0 0 0 / 20%);
  color: var(--color-text-inverse);

  border: 1px solid transparent;
  border-radius: var(--radius-md);

  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;

  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.topnav a:hover,
.topnav button:hover {
  background: rgb(0 0 0 / 32%);
}

.topnav a.active {
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.topnav a:active,
.topnav button:active {
  transform: translateY(1px);
}

.topnav a:focus-visible,
.topnav button:focus-visible {
  outline: 3px solid rgb(255 255 255 / 35%);
  outline-offset: 2px;
}


/* =========================================================
   Äldre separat topbar-actions
   Behålls för sidor som eventuellt använder den.
   ========================================================= */

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);

  grid-column: 1 / -1;
}

.topbar-actions button {
  min-height: 38px;
  padding: 8px 13px;

  background: rgb(0 0 0 / 20%);
  color: var(--color-text-inverse);

  border: 1px solid transparent;
  border-radius: var(--radius-md);

  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.topbar-actions button:hover {
  background: var(--color-danger);
}


/* =========================================================
   Header – mindre desktop / tablet
   ========================================================= */

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: var(--space-4);

    padding: 14px 20px;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(6, max-content);
    justify-content: end;
    gap: var(--space-2);

    width: 100%;
  }

}

/* =========================================================
   Header – mobil
   ========================================================= */

@media (max-width: 700px) {
  .topbar {
    padding: 12px 14px;

    border-bottom-width: 4px;
  }

  .brand {
    align-items: flex-start;
    gap: var(--space-3);
  }


  .brand p {
    font-size: var(--font-size-sm);
  }

  .user-row {
    gap: 6px;
  }

  .user-info {
    font-size: 0.78rem;
  }

  .topnav a,
  .topnav button {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;

    white-space: normal;
  }
}

/* =========================================================
   Grundfält
   ========================================================= */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;

  min-width: 0;
}

.form-field label {
  color: var(--color-text-secondary);

  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.3;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  max-width: none;
  margin: 0;
}

/* =========================================================
   6. Flikar
   ========================================================= */

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);

  margin: 0 0 var(--space-4);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 100px;
  min-height: 38px;
  padding: 8px 14px;

  background: var(--color-surface);
  color: var(--color-primary);

  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);

  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;

  cursor: pointer;

  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.tab:hover:not(.active) {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
}

.tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.tab:active {
  transform: translateY(1px);
}

.tab:focus-visible {
  outline: 3px solid rgb(11 107 58 / 20%);
  outline-offset: 2px;
}

/* =========================================================
   Matcher – huvudflikar
   ========================================================= */

.panel > .tabs {
  margin: 0;
  padding: 0 var(--space-5) var(--space-4);
}

.panel > .tabs .tab {
  min-width: 110px;
}


/* =========================================================
   9. Gemensamma hjälparklasser
   ========================================================= */


.hidden {
  display: none !important;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);

  padding: var(--space-5);
}

.panel-header h2 {
  margin: 0;
  padding: 0;
}

.panel > .tabs,
.panel > .past-year-filter,
.panel > .past-match-actions,
.panel > .match-filters {
  margin-top: 0;
}

#matches-list {
  border-top: 1px solid var(--color-border);
}



















/* =========================================================
   Domare – skapa ny domare
   ========================================================= */

.referee-create-panel {
  margin-bottom: var(--space-4);
}

.referee-create-card {
  margin:
    0
    var(--space-5)
    var(--space-5);

  border-left: 4px solid var(--color-primary);
}

.referee-create-card > h3 {
  margin:
    0
    0
    var(--space-4);

  color: var(--color-text);

  font-size: var(--font-size-xl);
  font-weight: 800;
}

.referee-form {
  display: grid;
  gap: var(--space-5);
}

.referee-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: var(--space-4);
}

.referee-form-actions {
  display: flex;
  justify-content: flex-end;

  padding-top: var(--space-4);

  border-top: 1px solid var(--color-border);
}

.referee-form-actions .primary-button {
  min-width: 140px;
}

.referee-form-message {
  display: none;

  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);

  border-radius: var(--radius-md);

  font-size: var(--font-size-sm);
  font-weight: 700;
}

.referee-form-message:not(:empty) {
  display: block;
}

#new-referee-button.is-open {
  background: var(--color-surface);
  color: var(--color-primary);

  border-color: var(--color-primary);
}

#new-referee-button.is-open:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}






/* =========================================================
   MOBIL – UTBETALNINGAR
   ========================================================= */

@media (max-width: 700px) {
  .payment-list {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .payment-list-header {
    display: none;
  }

  .payment-item {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .payment-row {
    grid-template-columns:
      28px
      minmax(0, 1fr)
      auto;
    grid-template-rows:
      auto
      auto
      auto;
    gap: 5px 10px;
    min-height: 0;
    padding: 14px 12px;
  }

  .payment-checkbox-cell {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .payment-date {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.9rem;
    font-weight: 700;
  }

  .payment-referee {
    grid-column: 2;
    grid-row: 2;
    font-size: 1rem;
  }

  .payment-amount {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    font-size: 1rem;
  }

  .payment-status {
    grid-column: 2;
    grid-row: 3;
    font-size: 0.9rem;
  }

  .payment-action {
    grid-column: 3;
    grid-row: 2 / span 2;
    align-self: end;
    justify-self: end;
  }

  .payment-show-button {
    min-width: 62px;
  }

  .payment-details {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .payment-info-row {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .payment-info-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  #toggle-all-payments,
  #mark-paid-button {
    width: 100%;
  }
}

#payout-batches-list {
  display: grid;
  gap: 12px;
}

.payout-batch-item {
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.payout-batch-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.5fr)
    120px
    100px
    minmax(260px, auto);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.payout-batch-row:hover {
  background: #f8fbf7;
}

.payout-batch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.payout-batch-info strong {
  color: #111827;
  font-size: 1rem;
}

.payout-batch-info span {
  color: #6b7280;
  font-size: 0.9rem;
}

.payout-batch-count,
.payout-batch-total {
  font-weight: 700;
  white-space: nowrap;
}

.payout-batch-total {
  color: #111827;
}

.payout-export-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(130px, 1fr));
  gap: 8px;
}

.payout-export-actions button {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.payout-export-actions button:active {
  transform: translateY(1px);
}

/* Detaljerad export */

.payout-export-actions .primary-button {
  background: var(--snff-green);
  color: white;
  border: 1px solid var(--snff-green);
}

.payout-export-actions .primary-button:hover {
  filter: brightness(0.92);
}

/* Sammanställd export */

.payout-export-actions .secondary-button {
  background: white;
  color: var(--snff-green);
  border: 1px solid var(--snff-green);
}

.payout-export-actions .secondary-button:hover {
  background: #eef8f1;
}

.payout-export-actions button:focus-visible {
  outline: 3px solid rgba(0, 120, 70, 0.22);
  outline-offset: 2px;
}


/* Expanderade exporter */

.payout-batch-details {
  padding: 16px 18px;
  background: #f8fbf7;
  border-top: 1px solid var(--border);
}

.payout-batch-details[hidden] {
  display: none;
}

.payout-batch-assignment {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.2fr)
    110px
    minmax(240px, 1.8fr)
    100px;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  padding: 11px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.payout-batch-assignment:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .payout-batch-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .payout-batch-count,
  .payout-batch-total {
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .payout-export-actions {
    grid-template-columns: 1fr;
  }

  .payout-batch-assignment {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}






/* =========================================================
   Admin - Inställningar
   ========================================================= */

/* Grundlayout */

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

.settings-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  padding: 10px 0;

  border-bottom: 1px solid var(--border);

  font-weight: 600;
}

.settings-form {
  display: grid;
  gap: 16px;
  max-width: 500px;
}

.settings-form label {
  display: grid;
  gap: 6px;

  font-weight: 700;
}

.settings-form input {
  padding: 10px 12px;

  border: 1px solid #cfd8d3;
  border-radius: 8px;

  font-size: 16px;
}

#settings-message.success {
  color: var(--snff-green);
  font-weight: 700;
}

#settings-message.error {
  color: var(--snff-red);
  font-weight: 700;
}

/* Lagimport */

.team-import-settings {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.team-import-settings label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.team-import-settings select {
  padding: 8px;
  border: 1px solid #cfded2;
  border-radius: 6px;
}

.save-team-import-settings-button {
  margin-top: 4px;
  width: fit-content;
}


/* Accordion */

.settings-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-section {
  overflow: hidden;

  background: white;

  border: 1px solid #cfe3d5;
  border-radius: 12px;
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  padding: 18px 22px;

  background: #f7fbf8;
  color: var(--snff-dark-green);

  border: 0;

  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;

  cursor: pointer;
}

.settings-section-header:hover {
  background: #eef7f1;
}

.settings-section-header::after {
  content: "▶";
}

.settings-section.open .settings-section-header::after {
  content: "▼";
}

.settings-section-content {
  display: none;
  padding: 18px;
}

.settings-section.open .settings-section-content {
  display: block;
}


/* Knappar */

.delete-setting-button {
  width: 36px;
  height: 36px;

  background: white;
  color: var(--snff-red);

  border: 2px solid var(--snff-red);
  border-radius: 8px;

  cursor: pointer;
}

.delete-setting-button:hover {
  background: var(--snff-red);
  color: white;
}

.secondary-toggle-button {
  width: 50%;
  padding: 12px 14px;

  background: white;
  color: var(--snff-green);

  border: 1px solid var(--snff-green);
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}

.secondary-toggle-button.active {
  background: var(--snff-green);
  color: white;
}


/* Profilbild */

.profile-image-section {
  display: flex;
  flex-direction: column;
  gap: 12px;

  margin-bottom: 20px;
}

.profile-image-preview {
  width: 140px;
  height: 140px;

  object-fit: cover;

  border: 3px solid var(--snff-green);
  border-radius: 50%;
}


/* Krockregler - domaruppdrag */

.conflict-rules-header,
.conflict-rule-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr repeat(5, 0.8fr) 0.9fr 0.5fr;
  gap: 10px;
  align-items: center;
}

.conflict-rules-header {
  padding: 10px 12px;

  color: var(--snff-dark-green);

  border-bottom: 1px solid #d8e8dd;

  font-weight: 700;
}

.conflict-rule-row {
  padding: 12px;

  background: white;

  border-bottom: 1px solid #eef2ef;
}

.conflict-rule-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conflict-rule-row label span {
  display: none;
}

.conflict-rule-row input[type="number"] {
  width: 100%;
  min-width: 70px;
  padding: 7px;

  border: 1px solid #ccc;
  border-radius: 8px;
}

.conflict-rule-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.conflict-total {
  padding: 8px;

  background: #eef7f1;
  color: var(--snff-dark-green);

  border-radius: 8px;

  text-align: center;
  font-weight: 700;
}

.checkbox-label {
  align-items: center;
}

.conflict-rules-section-heading {
  margin-top: 24px;
}

/* Krockregler - lagaktiviteter */

.team-conflict-rules-header,
.team-conflict-rule-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.6fr;
  gap: 10px;
  align-items: center;
}

.team-conflict-rules-header {
  padding: 10px 12px;

  color: var(--snff-dark-green);

  border-bottom: 1px solid #d8e8dd;

  font-weight: 700;
}

.team-conflict-rule-row {
  margin-bottom: 10px;
  padding: 12px;

  background: white;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

.team-conflict-rule-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-conflict-rule-row label span {
  display: none;
}

.team-conflict-rule-row input[type="number"] {
  width: 100%;
  padding: 7px;

  border: 1px solid #ccc;
  border-radius: 8px;
}


/* Matchtider */

.match-time-settings {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;

  padding: 0;

  background: transparent;

  border: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;

  font-weight: 600;
}

#custom-match-time-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;

  margin-top: 10px;
  padding: 12px;

  background: #f7fbf8;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

#custom-match-time-fields.hidden {
  display: none;
}


/* Arvoden */

.fees-header,
.fee-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.6fr;
  gap: 10px;
  align-items: center;
}

.fees-header {
  padding: 10px 12px;

  color: var(--snff-dark-green);

  border-bottom: 1px solid #d8e8dd;

  font-weight: 700;
}

.fee-row {
  margin-bottom: 10px;
  padding: 12px;

  background: white;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

.fee-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fee-row label span {
  display: none;
}

.fee-row input[type="number"] {
  width: 60%;
  padding: 7px;

  border: 1px solid #ccc;
  border-radius: 8px;
}

.fee-summary-box {
  margin: 0 0 20px;
  padding: 18px;

  background: #f7fbf8;

  border: 1px solid #cfe3d6;
  border-radius: 12px;
}

.fee-summary-box h3 {
  margin: 0 0 14px;

  color: var(--snff-green);
}

.fee-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.fee-summary-grid div {
  padding: 12px;

  background: white;

  border: 1px solid #d6e6dc;
  border-radius: 10px;
}

.fee-summary-grid span {
  display: block;

  margin-bottom: 6px;

  color: #4b5563;

  font-size: 14px;
}

.fee-summary-grid strong {
  color: var(--snff-green);
  font-size: 22px;
}


/* Domarinformation - inställningar */


.referee-information-form textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.5;
}

.settings-information-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
}

.settings-save-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

#referee-information-message.success {
  color: #08783e;
  font-weight: 700;
}

#referee-information-message.error {
  color: #b42318;
  font-weight: 700;
}

@media (max-width: 700px) {
  .settings-information-logo {
    width: 56px;
    height: 56px;
  }

  .referee-information-form textarea {
    min-height: 150px;
  }

  .settings-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-save-row .primary-button {
    width: 100%;
  }
}






/* Redigera match - extra inställningar */

.edit-extra-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#edit-custom-match-time-fields,
#edit-custom-fee-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;

  padding: 12px;

  background: #f7fbf8;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

#edit-custom-match-time-fields.hidden,
#edit-custom-fee-fields.hidden {
  display: none;
}

/* Mobil - Inställningar */

@media (max-width: 700px) {
  .settings-page {
    padding: 10px;
  }

  .settings-section-content {
    padding: 12px;
  }

  .settings-page input {
    min-width: 0;
  }

  .profile-image-preview {
    width: 140px;
    height: 140px;
  }

  .fee-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .conflict-rules-header,
  .team-conflict-rules-header,
  .fees-header {
    display: none;
  }

  .conflict-rule-row,
  .team-conflict-rule-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-bottom: 10px;
    padding: 12px;

    background: white;

    border: 1px solid #d7eadf;
    border-radius: 10px;
  }

  .conflict-rule-row > div:first-child,
  .team-conflict-rule-row > div:first-child {
    grid-column: 1 / -1;
    font-size: 16px;
  }

  .conflict-rule-row > div:nth-child(2) {
    grid-column: 1 / -1;
    font-weight: 600;
  }

  .conflict-rule-row label,
  .team-conflict-rule-row label {
    display: block;
  }

  .conflict-rule-row label span,
  .team-conflict-rule-row label span,
  .fee-row label span {
    display: block;

    margin-bottom: 4px;

    font-size: 12px;
    font-weight: 700;
  }

  .conflict-rule-row input[type="number"],
  .team-conflict-rule-row input[type="number"] {
    width: 100%;
    min-width: 0;
  }

  .conflict-total {
    grid-column: 1;
    align-self: end;
    width: auto;
  }

  .conflict-rule-row .checkbox-label,
  .team-conflict-rule-row .checkbox-label {
    align-self: end;
  }

  .fee-row {
    grid-template-columns: 1fr;
  }

  .fee-row input[type="number"] {
    width: 100%;
  }

  #custom-match-time-fields {
    grid-template-columns: 1fr;
  }
}



/* =========================================================
   Matchdetalj & tilldelning
   ========================================================= */




.match-page {
  max-width: 1000px;
  margin: 0 auto;
}

.match-page > .card,
.match-page > .panel {
  margin-bottom: 18px;
}

#match-details {
  border-left: 6px solid var(--snff-green);
}

#match-details h2 {
  margin-top: 0;
  color: var(--snff-dark-green);
}

#assignment-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

#assignment-form label {
  color: var(--snff-dark-green);
  font-weight: bold;
}

#assignment-form select,
#assignment-form input {
  width: 100%;
}

#response-due-date {
  max-width: 300px;
  margin-bottom: 12px;
}

.match-assigned-summary {
  margin: 14px 0;
  padding: 14px;
  background: #f0f7f2;
  border-left: 5px solid var(--snff-green);
  border-radius: 8px;
  font-weight: bold;
}

.match-assigned-summary.unassigned {
  background: #fff1ef;
  border-left-color: var(--snff-red);
  color: var(--snff-red);
}

.assigned-summary-row {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* Varningar och krockar */

#referee-warnings {
  background: #fffaf0;
  border-left: 6px solid #b8860b;
}

#referee-warnings h3 {
  margin-top: 0;
  color: #8a6500;
}

.warning-empty {
  padding: 14px 18px;
  color: var(--snff-green);
  font-weight: bold;
}

.warning-row {
  background: white;
  border-bottom: 1px solid var(--border);
}

.warning-toggle {
  width: 100%;
  padding: 14px 18px;
  background: white;
  color: #8a6500;
  border: none;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
}

.warning-toggle:hover {
  background: #fffaf0;
}

.warning-details {
  padding: 0 18px 14px 42px;
  background: #fffaf0;
  color: #5c4700;
}


/* Tilldelningshistorik */

.assignment-history-section {
  margin-bottom: 18px;
}

.assignment-history-section h3 {
  color: var(--snff-dark-green);
}

.assignment-history-card {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-left: 5px solid #999;
  border-radius: 8px;
}

.assignment-history-card.assignment-accepted {
  border-left-color: var(--snff-green);
}

.assignment-history-card.assignment-declined {
  border-left-color: var(--snff-red);
}

.assignment-history-card.assignment-pending {
  border-left-color: #b8860b;
}

.assignment-history-row {
  display: grid;
  grid-template-columns: 1.5fr 130px 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.assignment-history-row:hover {
  background: #f8fbf7;
}

.assignment-history-row.assignment-accepted {
  border-left: 5px solid var(--snff-green);
}

.assignment-history-row.assignment-pending {
  border-left: 5px solid #b8860b;
}

.assignment-history-row.assignment-declined {
  border-left: 5px solid var(--snff-red);
}

.assignment-history-row.assignment-removed {
  border-left: 5px solid #777;
}

.assignment-referee-name {
  color: var(--snff-dark-green);
  font-weight: bold;
}

.assignment-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.accept-assignment-button {
  padding: 8px 10px;
  background: var(--snff-green);
  color: white;
  border: 2px solid var(--snff-green);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.decline-assignment-button {
  padding: 8px 10px;
  background: white;
  color: var(--snff-red);
  border: 2px solid var(--snff-red);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.delete-assignment-button {
  width: 38px;
  height: 38px;
  background: white;
  color: var(--snff-red);
  border: 2px solid var(--snff-red);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.delete-assignment-button:hover {
  background: var(--snff-red);
  color: white;
}

/* =========================================================
   Uppdrag – statusikon
   ========================================================= */

.assignment-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 18px;
  height: 18px;
  margin-right: 4px;

  border-radius: var(--radius-pill);

  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.assignment-status-icon.accepted {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.assignment-status-icon.pending {
  background: var(--color-warning-soft);
  color: var(--color-warning-dark);

  border: 1px solid rgb(217 119 6 / 25%);
}

.assignment-status-icon.declined {
  background: var(--color-danger);
  color: var(--color-text-inverse);
}

.assignment-status-icon.removed {
  background: var(--color-text-muted);
  color: var(--color-text-inverse);
}

/* =========================================================
   Gemensamma uppdragsstatusar
   ========================================================= */

.pending-warning,
.declined-referees,
.referee-warning {
  color: var(--color-danger);

  font-weight: 700;
}

.pending-ok {
  color: var(--color-success);

  font-weight: 700;
}

.declined-box {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);

  background: var(--color-danger-soft);
  color: var(--color-danger-dark);

  border: 1px solid rgb(208 38 21 / 22%);
  border-left: 4px solid var(--color-danger);
  border-radius: var(--radius-md);

  font-size: var(--font-size-sm);
  font-weight: 700;
}








/* =========================================================
   Admin - Matchlista, filter och kort
   ========================================================= */

.referee-filters,
.assignment-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.referee-filters {
  padding: 0 18px 16px;
}

.assignment-filter-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 22px;
}

.assignment-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assignment-filter-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
}

.assignment-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignment-filter-button {
  min-width: 58px;
  padding: 9px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.assignment-filter-button:hover {
  border-color: #167547;
  background: #f0f8f4;
  color: #12613b;
}

.assignment-filter-button:active {
  transform: scale(0.97);
}

.assignment-filter-button.active {
  border-color: #167547;
  background: #167547;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(22, 117, 71, 0.2);
}

.assignment-filter-clear {
  padding: 0;
  border: none;
  background: transparent;
  color: #167547;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.assignment-filter-clear:hover {
  text-decoration: underline;
}

.assignment-filter-empty {
  padding: 8px 0;
  color: #6b7280;
  font-size: 0.88rem;
  font-style: italic;
}

@media (max-width: 600px) {
  .assignment-filter-buttons {
    gap: 7px;
  }

  .assignment-filter-button {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 9px 12px;
  }
}

.pending {
  background: #fff7db;
  color: #8a6300;
}

.accepted {
  background: #e5f6ec;
  color: #146c3e;
}

.declined {
  background: #fde8e8;
  color: #9b1c1c;
}

.removed {
  background: #f1f3f5;
  color: #6b7280;
}

.assignment-referee-info {
  min-width: 0;
}

.assignment-referee-name {
  font-weight: 700;
  color: #1f2937;
}

.assignment-notification-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 7px;
}

.assignment-notification-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.35;
}

.assignment-notification-status strong {
  color: #374151;
  font-weight: 700;
}

.assignment-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  font-size: 0.75rem;
}

.assignment-notification-status.not-sent {
  color: #9ca3af;
}

.assignment-notification-status.not-sent
.assignment-notification-icon {
  font-size: 1rem;
}

.assignment-notification-status.assignment
.assignment-notification-icon {
  color: #167547;
}

.assignment-notification-status.reminder-48h
.assignment-notification-icon,
.assignment-notification-status.reminder-72h
.assignment-notification-icon {
  color: #b7791f;
}

@media (max-width: 700px) {
  .assignment-notification-list {
    margin-top: 8px;
  }

  .assignment-notification-status {
    align-items: flex-start;
    font-size: 0.76rem;
  }
}

.notifications-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notifications-section-header .secondary-button {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .notifications-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-section-header .secondary-button {
    width: 100%;
  }
}

.read-notifications-card {
  padding: 0;
  overflow: hidden;
}

.read-notifications-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.read-notifications-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}

.read-notifications-content {
  padding: 0 20px 20px;
  border-top: 1px solid #e5e5e5;
}

.read-notification {
  opacity: 0.82;
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.notification-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 600px) {
  .notification-item-header {
    flex-direction: column;
    gap: 4px;
  }
}


.notification-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.notification-badge.active {
    background: #e8f8ec;
    color: #1f7a3d;
}

.notification-badge.inactive {
    background: #fdecec;
    color: #b42318;
}









/* =========================================================
   Domare – filter
   ========================================================= */

.referee-filters {
  display: grid;
  gap: var(--space-3);

  padding:
    0
    var(--space-5)
    var(--space-4);
}

.referee-filter-group {
  display: grid;
  gap: var(--space-2);
}

.referee-filter-label {
  color: var(--color-text-secondary);

  font-size: var(--font-size-xs);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.referee-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.referee-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;
  padding: 7px 12px;

  background: var(--color-surface);
  color: var(--color-primary);

  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);

  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.2;

  cursor: pointer;

  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.referee-filter-button:hover:not(.active) {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
}

.referee-filter-button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.referee-filter-button:active {
  transform: translateY(1px);
}

.referee-filter-button:focus-visible {
  outline: 3px solid rgb(11 107 58 / 20%);
  outline-offset: 2px;
}

.referee-filter-button.birth-year {
  min-width: 62px;
}

.referee-filter-button.playing-format {
  min-width: 54px;
}

@media (max-width: 700px) {
  .referee-filters {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .referee-filter-buttons {
    gap: 6px;
  }

  .referee-filter-button {
    min-height: 38px;
  }
}

/* =========================================================
   Admin - Domare, lag och kvalifikationer
   ========================================================= */

.qualification-pill {
  display: inline-block;
  margin: 3px;
  padding: 5px 10px;
  background: #e8f4ee;
  color: var(--snff-dark-green);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
}

.referee-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.delete-referee-button {
  padding: 8px 10px;
  background: white;
  color: var(--snff-red);
  border: 2px solid var(--snff-red);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.delete-referee-button:hover {
  background: var(--snff-red);
  color: white;
}

.referee-name {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--snff-dark-green);
  font-weight: 600;
}

.referee-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--snff-green);
  border-radius: 50%;
}

.team-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #d6e6dc;
}

.team-section h3 {
  margin-bottom: 6px;
}

.team-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-weight: 600;
}

.team-checkbox-row input {
  width: 18px;
  height: 18px;
}

.team-calendar-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #d6e6dc;
}

.team-calendar-meta {
  margin-top: 8px;
  color: #4b5563;
  font-size: 14px;
}

.team-calendar-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.team-calendar-actions button {
  padding: 8px 12px;
  background: white;
  color: var(--snff-green);
  border: 1px solid var(--snff-green);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.team-calendar-actions .delete-team-button {
  color: var(--snff-red);
  border-color: var(--snff-red);
}



/* =========================================================
   Ledarsidan
========================================================= */

.leader-match-header{
    display:flex;
    align-items:center;
    gap:.75rem;
    margin-bottom:.75rem;
}

.leader-match-date-icon{
    font-size:1.4rem;
    line-height:1;
}

.leader-match-date-text{
    display:flex;
    flex-direction:column;
}

.leader-match-date-text strong{
    font-size:1.05rem;
    font-weight:700;
    color:#1f2937;
}

.leader-match-date-text span{
    font-size:.9rem;
    color:#6b7280;
}

.filter-chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-chip {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.filter-chip.active {
  background: #166534;
  color: white;
  border-color: #166534;
}

.leader-match-row-card {
  background: #fff;
  border: 1px solid #dfe5e8;
  border-radius: 16px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.leader-match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1.1rem;
  align-items: center;
}

.leader-match-row:hover {
  background: #f9fafb;
}

.leader-match-details {
  display: none;
  padding: 1rem;
  border-top: 1px solid #ececec;
  background: #fafafa;
}

.leader-match-details.open {
  display: block;
}

.leader-referee-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 700px) {
  .leader-match-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

}



/* =========================================================
   Domarsidor
   ========================================================= */

.referee-page {
  max-width: 1000px;
  margin: 0 auto;
}

.welcome-card h2 {
  margin: 0;
  color: var(--snff-dark-green);
}

.referee-match-card {
  margin: 16px;
  border-left: 5px solid var(--snff-green);
}

.referee-match-card h3 {
  margin-top: 0;
  color: var(--snff-dark-green);
}

.referee-response-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status-pending {
  color: #b8860b;
  font-weight: bold;
}

.status-accepted {
  color: var(--snff-green);
  font-weight: bold;
}

.status-declined {
  color: var(--snff-red);
  font-weight: bold;
}


.referee-assignment-card {
  padding: 18px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.referee-assignment-card.assignment-pending {
  border-left: 6px solid #d4a017;
}

.referee-assignment-card.assignment-accepted {
  border-left: 6px solid var(--snff-green);
}

.referee-assignment-card.assignment-declined {
  border-left: 6px solid var(--snff-red);
}

.referee-assignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.referee-assignment-header h3 {
  margin: 0 0 6px;
  color: var(--snff-dark-green);
}

.referee-assignment-header p {
  margin: 0;
}

.referee-assignment-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  white-space: nowrap;
}

.referee-assignment-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.referee-assignment-info p {
  margin: 0;
}

.referee-assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.response-due-warning {
  padding: 10px 12px;
  background: #fff4d6;
  color: #5f4300;
  border-left: 5px solid #b8860b;
  border-radius: 8px;
  font-weight: bold;
}

.assignment-date-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.assignment-date-badge,
.assignment-time-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1;
}

.assignment-date-badge {
  padding: 9px 12px;
  background: #fff3cd;
  color: #4b3b00;
  font-size: 18px;
}

.assignment-time-badge {
  padding: 9px 10px;
  background: #fff3cd;
  color: #4b3b00;
  font-size: 16px;
}

.assignment-accepted .assignment-date-badge,
.assignment-accepted .assignment-time-badge {
  background: #e8f5ee;
  color: #005c2e;
}

.assignment-declined .assignment-date-badge,
.assignment-declined .assignment-time-badge {
  background: #f3f4f6;
  color: #6b7280;
}

.completed-assignment-row {
  margin-bottom: 12px;
  overflow: hidden;
  background: white;
  border-left: 6px solid var(--snff-green);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.completed-assignment-row.unpaid {
  background: #fff7f6;
  border-left-color: #d93025;
}

.completed-assignment-row summary {
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.completed-assignment-row summary::-webkit-details-marker {
  display: none;
}

.completed-main strong {
  display: block;
  margin-bottom: 12px;
  font-size: 17px;
}

.completed-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.completed-summary-grid span {
  padding: 10px 12px;
  background: #f8faf9;
  border-radius: 10px;
  font-weight: 800;
}

.completed-summary-grid small {
  display: block;
  margin-bottom: 4px;
  color: #6b7280;
  font-size: 12px;
}

.completed-details {
  padding: 14px 16px 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
}

.completed-details p {
  margin: 6px 0;
}

.paid-text {
  color: var(--snff-green);
}

.unpaid-text {
  color: var(--snff-red);
}


/* Referee-statistik och årsfilter */

.small-stat-card {
  transform: scale(0.92);
  transform-origin: left top;
}

.small-stat-card .stat-number {
  font-size: 28px;
}

.small-stat-card .stat-label {
  font-size: 15px;
}

.declined-stat-card {
  width: 90px;
  min-height: 60px;
  justify-self: end;
  background: #f3f4f6;
  border-left: 4px solid #9ca3af;
}

.declined-stat-card .stat-number {
  color: #6b7280;
  font-size: 30px;
}

.declined-stat-card .stat-label {
  color: #6b7280;
  font-size: 14px;
}

.all-answered {
  background: #e8f7ec;
  border-left: 5px solid var(--snff-green);
}

.all-answered .stat-number,
.all-answered .stat-label {
  color: var(--snff-green);
}

.all-answered .stat-label {
  font-weight: bold;
}

.referee-page .year-filter,
.referee-page .past-year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin: 0 0 20px;
}

.referee-page .year-filter-button,
.referee-page .year-filter-btn {
  padding: 8px 14px;

  background: white;
  color: var(--snff-green);

  border: 1px solid var(--snff-green);
  border-radius: 8px;

  font-weight: 700;

  cursor: pointer;
}

.referee-page .year-filter-button.active,
.referee-page .year-filter-btn.active {
  background: var(--snff-green);
  color: white;
}

/* Portalflikar */

.portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.portal-tab {
  padding: 10px 14px;
  background: white;
  color: var(--snff-green);
  border: 2px solid var(--snff-green);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.portal-tab.active {
  background: var(--snff-green);
  color: white;
}

.portal-tab.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


/* Formhjälpare */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  color: var(--snff-dark-green);
  font-weight: bold;
}

.full-width {
  grid-column: 1 / -1;
}


/* =========================================================
   Notiscenter
   ========================================================= */

.notifications-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notifications-hero h2 {
  margin-bottom: 4px;
}

.notifications-hero p,
.muted-text {
  color: #64748b;
  margin: 0;
}

.notifications-count-box {
  min-width: 88px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fef2f2;
  color: #991b1b;
  text-align: center;
  border: 1px solid #fecaca;
}

.notifications-count-box span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.notifications-count-box small {
  font-size: 12px;
  font-weight: 700;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notification-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.notification-card-unread {
  border-color: #ef4444;
  background: #fff7f7;
}

.notification-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f1f5f9;
  font-size: 22px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-top-row h3 {
  margin: 0;
  font-size: 16px;
}

.notification-content p {
  margin: 6px 0 8px;
  color: #334155;
  line-height: 1.45;
}

.notification-meta {
  font-size: 13px;
  color: #64748b;
}

.notification-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dc2626;
  color: white;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}


.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.empty-state h3 {
  color: #0f172a;
  margin-bottom: 4px;
}

.empty-state-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  body {
    padding-bottom: 82px;
  }

  .notifications-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .notifications-count-box {
    width: 100%;
  }

  .notification-card {
    padding: 14px;
    border-radius: 16px;
  }

  .notification-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .notification-top-row {
    align-items: flex-start;
  }

  .notification-top-row h3 {
    font-size: 15px;
  }

  .notification-content p {
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  .profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
  }

  .profile-image-section input[type="file"] {
    width: 100%;
  }
}

/* Mobil bottennavigation */

.mobile-bottom-nav {
  display: none;
}















/* =========================================================
   Login
   ========================================================= */

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: #f4f7f3;
}

.login-card {
  width: 100%;
  max-width: 520px;
  padding: 26px;
  background: white;
  border-top: 6px solid var(--snff-green);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-brand h1 {
  margin: 0;
  color: var(--snff-dark-green);
  font-size: 22px;
}

.login-brand p {
  margin: 3px 0 0;
  color: var(--snff-red);
  font-weight: bold;
}

.login-info {
  margin-bottom: 20px;
  padding: 14px;
  background: #f0f7f2;
  border-left: 5px solid var(--snff-green);
  border-radius: 8px;
}

.login-info h2 {
  margin-top: 0;
  color: var(--snff-dark-green);
}

.login-info p {
  margin: 8px 0;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: var(--snff-dark-green);
  font-weight: bold;
}

.login-form button {
  min-height: 46px;
  margin-top: 8px;
}

.club-link {
  margin-top: 14px;
  font-weight: 600;
}

.club-link a {
  color: var(--snff-green);
  text-decoration: none;
}

.club-link a:hover {
  text-decoration: underline;
}

/* =========================================================
   Mobil
   ========================================================= */

@media (min-width: 701px) {
  .completed-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  main {
    padding: 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
  }

  .brand {
    align-items: center;
  }

  .brand h1 {
    margin: 0;
    font-size: 22px;
  }

  .brand p {
    margin: 2px 0;
    font-size: 16px;
  }

  .user-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .topnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 95%;
  }

  .topnav a,
  .topnav button {
    width: 95%;
    padding: 10px 8px;
    text-align: center;
    font-size: 14px;
  }

  .card,
  .panel {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
  }

  .panel-header h2 {
    font-size: 24px;
  }

  input,
  select,
  button {
    font-size: 16px;
  }

 .referee-filter-cards,
.fee-summary-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

  .tabs,
  .portal-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab,
  .portal-tab {
    min-height: 46px;
  }

  .match-details {
    padding: 14px 16px;
  }

  .assigned-summary-row,
  .assignment-history-row {
    grid-template-columns: 1fr;
  }

  .referee-response-buttons {
    flex-direction: column;
  }

  .referee-response-buttons button {
    width: 100%;
    min-height: 46px;
  }

  .referee-assignment-card {
    margin-bottom: 12px;
    padding: 18px 14px;
    border-radius: 14px;
  }

  .referee-assignment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .referee-assignment-header h3 {
    font-size: 20px;
    line-height: 1.25;
  }

  .referee-assignment-status {
    align-self: flex-start;
    font-size: 16px;
    font-weight: 800;
  }

  .referee-assignment-info {
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    font-size: 16px;
  }

  .referee-assignment-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .referee-assignment-actions button {
    width: 100%;
    min-height: 48px;
    font-size: 17px;
    font-weight: 800;
  }

  .response-due-warning {
    grid-column: 1 / -1;
    padding: 12px;
    font-size: 16px;
  }

  .assignment-date-badge-row {
    margin-top: 10px;
    margin-bottom: 6px;
  }

  .assignment-date-badge {
    padding: 10px 12px;
    font-size: 20px;
  }

  .assignment-time-badge {
    padding: 10px 12px;
    font-size: 18px;
  }

  .referee-page main,
  body.referee-page main {
    padding: 14px;
  }

  .referee-page .card,
  body.referee-page .card,
  .referee-page .panel {
    margin-bottom: 16px;
    padding: 18px;
    border-radius: 16px;
  }

  .referee-page h2,
  body.referee-page h2 {
    margin: 0 0 16px;
    font-size: 24px;
  }

  .referee-page h3 {
    font-size: 20px;
  }

  .referee-page label,
  body.referee-page label {
    display: block;
    margin-top: 4px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 800;
  }

  .referee-page input,
  .referee-page select,
  .referee-page textarea,
  body.referee-page input,
  body.referee-page select,
  body.referee-page textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
  }

  .referee-page .primary-button,
  .referee-page .danger-button,
  body.referee-page .primary-button {
    min-height: 52px;
    font-size: 17px;
    font-weight: 800;
  }

  body.referee-page #blocks-list > div {
    margin-bottom: 12px;
    padding: 16px;
    background: white;
    border-left: 6px solid var(--snff-green);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  }

  .referee-page .profile-image-section {
    align-items: center;
  }

  .referee-page .profile-image-preview {
    width: 140px;
    height: 140px;
    margin-bottom: 12px;
    object-fit: cover;
    border: 4px solid var(--snff-green);
    border-radius: 50%;
  }

  .referee-page .settings-form,
  .settings-form {
    max-width: 100%;
  }

  .referee-page #profile-image-input {
    width: 100%;
  }

  body.referee-page {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .referee-page .topnav {
    display: none;
  }


.referee-page .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    min-height: 68px;
    padding-bottom: env(safe-area-inset-bottom);

    background: #ffffff;
    border-top: 1px solid #d7d7d7;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  }

  .referee-page .mobile-bottom-nav a,
  .referee-page .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    min-width: 0;
    min-height: 68px;
    gap: 3px;
    padding: 7px 2px;

    background: #ffffff;
    color: #606a65;

    border: 0;
    border-radius: 0;

    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .referee-page .mobile-bottom-nav a:hover,
  .referee-page .mobile-bottom-nav button:hover {
    background: #f5faf7;
    color: var(--snff-green);
  }

  .referee-page .mobile-bottom-nav a.active {
    position: relative;

    background: #f0f8f4;
    color: var(--snff-green);
    font-weight: 800;
  }

  .referee-page .mobile-bottom-nav a.active::before {
    content: "";

    position: absolute;
    top: 0;
    right: 18%;
    left: 18%;

    height: 3px;

    background: var(--snff-green);
    border-radius: 0 0 4px 4px;
  }

  .referee-page .mobile-bottom-nav a > span:last-child,
  .referee-page .mobile-bottom-nav button > span:last-child {
    display: block;
    width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .referee-page .mobile-bottom-nav a > span:first-child,
  .referee-page .mobile-bottom-nav button > span:first-child {
    font-size: 20px;
    line-height: 1;
  }


  

  main.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 95%;
    min-height: 100dvh;
    padding: 10px;
  }

  .login-card {
    width: 95%;
    max-width: none;
    margin: 0;
    padding: 24px 18px;
    border-radius: 16px;
  }

  .login-brand {
    gap: 16px;
    margin-bottom: 24px;
  }

  .login-brand .club-logo {
    width: 72px;
  }

  .login-brand h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .login-brand p,
  .login-info {
    font-size: 15px;
  }

  .login-form input,
  .login-form button {
    width: 90%;
    padding: 14px 12px;
    font-size: 16px;
  }
}




/* =========================================================
   Notisbadge
   ========================================================= */






.notification-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notification-nav-badge,
.notification-mobile-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.notification-mobile-link {
  position: relative;
}

.mobile-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-mobile-badge {
  position: absolute;
  top: -9px;
  right: -13px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  background: #dc2626;
  color: #ffffff;

  border: 2px solid #ffffff;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;

  box-sizing: border-box;
}

.hidden {
  display: none !important;
}




/* =========================================================
   Installpanel
   ========================================================= */




.install-panel {
  max-width: 520px;
  margin: 2rem auto;
}

.install-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-box {
  border: 1px solid #dfe5e8;
  border-radius: 14px;
  padding: 1rem;
  background: #f9fafb;
}

.install-login-link {
  text-align: center;
  text-decoration: none;
}


/* =========================================================
   KONTOAKTIVERING OCH VÄLKOMSTSIDA
   ========================================================= */




.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 92, 55, 0.1),
      rgba(255, 255, 255, 0)
    ),
    #f4f6f5;
}

.account-activation-wrapper,
.welcome-page-wrapper {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.account-activation-card,
.welcome-page-card {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  padding: 34px;
  background: #ffffff;
  border: 1px solid #dde5e0;
  border-radius: 22px;
  box-shadow:
    0 18px 50px rgba(25, 55, 40, 0.12);
}

.account-activation-logo,
.welcome-page-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.account-activation-logo img,
.welcome-page-logo img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.account-activation-heading,
.welcome-page-card {
  text-align: center;
}

.account-activation-eyebrow,
.welcome-page-eyebrow {
  margin: 0 0 8px;
  color: #26704a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.account-activation-heading h1,
.welcome-page-card h1 {
  margin: 0;
  color: #173a2a;
  font-size: 2rem;
  line-height: 1.15;
}

.account-activation-heading > p:last-child,
.welcome-page-intro {
  margin: 14px 0 0;
  color: #607066;
  line-height: 1.6;
}

.account-activation-status {
  margin-top: 24px;
  padding: 14px 16px;
  color: #53635a;
  background: #f2f5f3;
  border-radius: 12px;
  text-align: center;
}

.account-activation-form {
  margin-top: 26px;
  text-align: left;
}

.account-activation-form label {
  display: block;
  margin: 18px 0 7px;
  color: #263d31;
  font-weight: 700;
}

.password-field-wrapper {
  position: relative;
}

.password-field-wrapper input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  padding: 12px 72px 12px 14px;
  color: #21332a;
  background: #ffffff;
  border: 1px solid #cbd6cf;
  border-radius: 11px;
  font: inherit;
}

.password-field-wrapper input:focus {
  outline: none;
  border-color: #26704a;
  box-shadow:
    0 0 0 3px rgba(38, 112, 74, 0.14);
}

.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 8px;
  color: #26704a;
  background: transparent;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.account-activation-help {
  margin: 7px 0 0;
  color: #748078;
  font-size: 0.85rem;
}

.account-activation-primary-button,
.account-activation-secondary-button {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.account-activation-primary-button {
  margin-top: 24px;
  color: #ffffff;
  background: #26704a;
  border: 1px solid #26704a;
}

.account-activation-primary-button:hover {
  background: #1e5e3d;
  border-color: #1e5e3d;
}

.account-activation-primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.account-activation-secondary-button {
  margin-top: 20px;
  color: #26704a;
  background: #ffffff;
  border: 1px solid #26704a;
}

.account-activation-message {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 11px;
  line-height: 1.45;
  text-align: left;
}

.account-activation-message-error {
  color: #842a2a;
  background: #fff0f0;
  border: 1px solid #efc7c7;
}

.account-activation-message-success {
  color: #1d5d3a;
  background: #edf8f1;
  border: 1px solid #c3e3cf;
}

.account-activation-expired {
  margin-top: 28px;
  text-align: center;
}

.account-activation-expired h2 {
  margin: 0 0 10px;
  color: #713030;
  font-size: 1.25rem;
}

.account-activation-expired p {
  margin: 0;
  color: #6e7771;
  line-height: 1.55;
}

.welcome-page-card {
  max-width: 570px;
}

.welcome-celebration-icon {
  margin: 8px 0 12px;
  font-size: 2.4rem;
  line-height: 1;
}

.welcome-recommendation-heading {
  margin-top: 30px;
  text-align: left;
}

.welcome-recommendation-heading h2 {
  margin: 0;
  color: #223b2e;
  font-size: 1.2rem;
}

.welcome-recommendation-heading p {
  margin: 7px 0 0;
  color: #6b7770;
  line-height: 1.5;
}

.welcome-checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.welcome-checklist-item {
  display: grid;
  grid-template-columns: 42px 1fr 20px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: inherit;
  background: #f8faf9;
  border: 1px solid #dfe7e2;
  border-radius: 14px;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.welcome-checklist-item:hover {
  background: #f0f6f2;
  border-color: #b9d1c2;
  transform: translateY(-1px);
}

.welcome-checklist-item-complete {
  background: #eef8f2;
  border-color: #c2dfcc;
}

.welcome-checklist-item-complete:hover {
  background: #e7f4ec;
  border-color: #a9d1b8;
}

.welcome-checklist-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  color: #657269;
  background: #ffffff;
  border: 2px solid #c9d4cd;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
}

.welcome-checklist-status-complete {
  color: #ffffff;
  background: #26704a;
  border-color: #26704a;
}

.welcome-checklist-text {
  min-width: 0;
}

.welcome-checklist-text strong {
  display: block;
  color: #213a2d;
}

.welcome-checklist-text small {
  display: block;
  margin-top: 4px;
  color: #68756d;
  line-height: 1.4;
}

.welcome-checklist-arrow {
  color: #26704a;
  font-size: 1.7rem;
  line-height: 1;
}

.welcome-page-footer-text {
  margin: 20px 0 0;
  color: #7b847f;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .account-activation-wrapper,
  .welcome-page-wrapper {
    align-items: flex-start;
    padding: 18px 12px;
  }

  .account-activation-card,
  .welcome-page-card {
    padding: 26px 18px;
    border-radius: 18px;
  }

  .account-activation-heading h1,
  .welcome-page-card h1 {
    font-size: 1.65rem;
  }

  .account-activation-logo img,
  .welcome-page-logo img {
    width: 72px;
    height: 72px;
  }

  .welcome-checklist-item {
    grid-template-columns: 38px 1fr 16px;
    gap: 10px;
    padding: 14px 12px;
  }

  .welcome-checklist-status {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .welcome-checklist-arrow {
    font-size: 1.45rem;
  }
}

.welcome-checklist-item-attention {
  background: #fff8e8;
  border-color: #e5b956;
}

.welcome-checklist-item-attention:hover {
  background: #fff3d5;
  border-color: #d8a83e;
}

.welcome-checklist-status-attention {
  color: #7a4d00;
  background: #ffe6a8;
  border-color: #e0b24c;
  font-weight: 800;
}

.welcome-checklist-item-attention
.welcome-checklist-text strong {
  color: #704600;
}

.welcome-checklist-item-attention
.welcome-checklist-text small {
  color: #755f39;
}



/* =========================================================
   INSTALLATION - FORTSÄTT UTAN ATT INSTALLERA
   ========================================================= */




.install-continue-section {
  margin: 34px 0 24px;
  padding-top: 24px;
  border-top: 1px solid #dfe7e2;
  text-align: center;
}

.install-welcome-button {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.install-continue-text {
  margin: 12px 0 0;
  color: #66736b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.install-browser-warning {
  margin: 18px 0;
  padding: 18px;
  color: #6f3d00;
  background: #fff4df;
  border: 2px solid #e7a53a;
  border-radius: 14px;
  text-align: left;
}

.install-browser-warning h3 {
  margin: 0 0 10px;
  color: #7a4100;
  font-size: 1.1rem;
}

.install-browser-warning p {
  margin: 0;
  line-height: 1.55;
}

.install-browser-warning-help {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid rgba(122, 65, 0, 0.18);
  font-size: 0.9rem;
}

#install-app-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}





/* =========================================================
   ONBOARDING - TILLBAKA TILL VÄLKOMSTGUIDEN
   ========================================================= */







.onboarding-return-bar {
  position: sticky;
  top: 0;
  z-index: 1100;
  padding: 12px 16px;
  background: #edf7f1;
  border-bottom: 1px solid #b8d8c4;
  box-shadow: 0 3px 10px rgba(24, 76, 48, 0.08);
}

.onboarding-return-content {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.onboarding-return-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #244b36;
}

.onboarding-return-text strong {
  font-size: 0.98rem;
}

.onboarding-return-text span {
  color: #587064;
  font-size: 0.9rem;
  line-height: 1.4;
}

.onboarding-return-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  color: #ffffff;
  background: #26704a;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(38, 112, 74, 0.2);
}

.onboarding-return-button:hover {
  background: #1f5e3e;
}

@media (max-width: 700px) {
  .onboarding-return-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .onboarding-return-button {
    width: 100%;
    box-sizing: border-box;
  }
}






/* =========================================================
   GLÖMT LÖSENORD
   ========================================================= */









.login-password-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 6px;
}

.forgot-password-link {
  color: #26704a;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.login-message {
  min-height: 22px;
  margin: 18px 0 4px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.login-message-info {
  color: #52645a;
}

.login-message-success {
  padding: 12px 14px;
  color: #185c38;
  background: #eaf7ef;
  border: 1px solid #b9dec7;
  border-radius: 10px;
}

.login-message-error {
  padding: 12px 14px;
  color: #8b2525;
  background: #fff0f0;
  border: 1px solid #e8bcbc;
  border-radius: 10px;
}





/* =========================================================
   DOMARINFORMATION
   Domarsida, accordion, regelböcker och administratörseditor
   ========================================================= */








/* ---------------------------------------------------------
   SIDLAYOUT OCH INTRO
   --------------------------------------------------------- */

.referee-info-main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 110px;
}

.referee-info-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  margin-bottom: 24px;
  padding: 28px 32px;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      rgba(0, 102, 51, 0.98),
      rgba(0, 72, 37, 0.98)
    );

  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 66, 34, 0.16);
}

.referee-info-intro > div {
  min-width: 0;
}

.referee-info-eyebrow {
  display: inline-block;
  margin-bottom: 8px;

  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.referee-info-intro h2 {
  margin: 0 0 10px;

  color: #ffffff;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.referee-info-intro p {
  max-width: 620px;
  margin: 0;

  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
}

.referee-info-intro-logo {
  width: 100px;
  height: 100px;
  flex-shrink: 0;

  padding: 8px;

  object-fit: contain;

  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
}


/* ---------------------------------------------------------
   LISTA MED INFORMATIONSAVSNITT
   --------------------------------------------------------- */

.referee-info-content {
  display: grid;
  gap: 16px;
}

.referee-info-section {
  overflow: hidden;

  background: #ffffff;
  border: 1px solid #e4e8e6;
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(20, 40, 30, 0.07);
}

.referee-rulebooks-section {
  border-top: 4px solid #f4cf24;
}

.referee-match-climate-section {
  border-top: 4px solid #006633;
}


/* ---------------------------------------------------------
   ACCORDIONKNAPP OCH RUBRIK
   --------------------------------------------------------- */

.referee-info-accordion-button {
  display: block;
  width: 100%;
  padding: 0;

  color: inherit;
  font: inherit;
  text-align: left;

  background: transparent;
  border: 0;
  cursor: pointer;

  transition: background-color 0.18s ease;
}

.referee-info-accordion-button:hover {
  background: rgba(0, 102, 51, 0.035);
}

.referee-info-accordion-button:focus-visible {
  outline: 3px solid rgba(0, 102, 51, 0.22);
  outline-offset: -3px;
}

.referee-info-section-header {
  display: flex;
  align-items: center;
  gap: 18px;

  width: 100%;
  padding: 22px 24px;
  box-sizing: border-box;
}

.referee-info-header-text {
  min-width: 0;
  flex: 1;
}

.referee-info-section-header h2 {
  margin: 0 0 4px;

  color: #183127;
  font-size: 1.25rem;
  line-height: 1.25;
}

.referee-info-section-header p {
  margin: 0;

  color: #657169;
  font-size: 0.94rem;
  line-height: 1.45;
}

.referee-info-section-eyebrow {
  display: block;
  margin-bottom: 4px;

  color: #006633;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.referee-info-accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin-left: auto;

  color: #006633;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;

  background: #edf7f1;
  border-radius: 50%;

  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.referee-info-accordion-button[aria-expanded="true"]
  .referee-info-section-header {
  border-bottom: 1px solid #edf0ee;
}

.referee-info-accordion-button[aria-expanded="true"]
  .referee-info-accordion-icon {
  color: #ffffff;
  background: #006633;
}


/* ---------------------------------------------------------
   RUBRIKIKONER OCH LOGOTYPER
   --------------------------------------------------------- */

.referee-info-icon,
.referee-info-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  background: #eef7f2;
  border-radius: 15px;
}

.referee-info-icon {
  font-size: 1.7rem;
}

.referee-info-section-logo {
  display: block;
  max-width: 46px;
  max-height: 46px;

  object-fit: contain;
}

.referee-rulebooks-section
  .referee-info-logo-wrap {
  background: #f4f7fa;
}

.referee-match-climate-section
  .referee-info-logo-wrap {
  background: #eef7f2;
}

.svff-info-logo {
  max-width: 48px;
  max-height: 52px;
}

.snff-info-logo {
  max-width: 46px;
  max-height: 46px;
}


/* ---------------------------------------------------------
   EXPANDERAT INNEHÅLL
   --------------------------------------------------------- */

.referee-info-accordion-content {
  display: block;
}

.referee-info-accordion-content.hidden {
  display: none;
}

.referee-info-text {
  padding: 22px 24px 26px;

  color: #27312c;
  font-size: 1rem;
  line-height: 1.7;

  overflow-wrap: anywhere;
}

.referee-info-text p {
  margin: 0 0 12px;
}

.referee-info-text p:last-child {
  margin-bottom: 0;
}

.referee-info-text ul,
.referee-info-text ol {
  margin: 10px 0;
  padding-left: 24px;
}

.referee-info-text li {
  margin-bottom: 6px;
}

.referee-info-text li:last-child {
  margin-bottom: 0;
}

.referee-info-text strong,
.referee-info-text b {
  font-weight: 800;
}


/* ---------------------------------------------------------
   REGELBOKSKORT
   --------------------------------------------------------- */

.rulebooks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;

  padding: 22px 24px 26px;
}

.rulebook-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 165px;
  padding: 18px;

  color: inherit;
  text-decoration: none;

  background: #f8faf9;
  border: 1px solid #e2e8e5;
  border-radius: 15px;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.rulebook-card:hover {
  transform: translateY(-2px);

  background: #ffffff;
  border-color: #006633;
  box-shadow: 0 8px 20px rgba(0, 102, 51, 0.1);
}

.rulebook-card:focus-visible {
  outline: 3px solid rgba(0, 102, 51, 0.25);
  outline-offset: 3px;
}

.rulebook-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 14px;
}

.rulebook-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  font-size: 1.3rem;

  background: #eaf3ee;
  border-radius: 11px;
}

.rulebook-external-icon {
  color: #006633;
  font-size: 1.2rem;
  font-weight: 700;
}

.rulebook-card h3 {
  margin: 0 0 6px;

  color: #193228;
  font-size: 1.08rem;
}

.rulebook-card p {
  margin: 0 0 16px;

  color: #68746d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.rulebook-card-link {
  margin-top: auto;

  color: #006633;
  font-size: 0.88rem;
  font-weight: 800;
}


/* ---------------------------------------------------------
   LADDNING OCH TOMT LÄGE
   --------------------------------------------------------- */

.referee-info-loading {
  padding: 34px 20px;

  color: #68746d;
  text-align: center;

  background: #ffffff;
  border: 1px solid #e4e8e6;
  border-radius: 16px;
}

.referee-info-empty {
  padding: 46px 24px;

  text-align: center;

  background: #ffffff;
  border: 1px solid #e4e8e6;
  border-radius: 18px;
}

.referee-info-empty-icon {
  margin-bottom: 12px;
  font-size: 2.4rem;
}

.referee-info-empty h2 {
  margin: 0 0 8px;
  color: #183127;
}

.referee-info-empty p {
  margin: 0;
  color: #68746d;
}


/* =========================================================
   DOMARINFORMATION – ADMIN OCH RICH TEXT-EDITOR
   ========================================================= */

.referee-information-form {
  display: grid;
  gap: 24px;

  margin-top: 20px;
}

.rich-text-field {
  overflow: hidden;

  background: #ffffff;
  border: 1px solid #d9dfdc;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.rich-text-field-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding: 18px 20px;

  background: #f4f8f6;
  border-bottom: 1px solid #dfe5e2;
}

.rich-text-field-title {
  margin: 0;

  color: #173f2c;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.rich-text-field-description {
  max-width: 680px;
  margin: 6px 0 0;

  color: #66716c;
  font-size: 13px;
  line-height: 1.5;
}

.rich-text-field-badge {
  flex-shrink: 0;

  padding: 6px 10px;

  color: #23643f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;

  background: #e7f3ec;
  border: 1px solid #b9d5c5;
  border-radius: 999px;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;

  padding: 10px 12px;

  background: #fafcfb;
  border-bottom: 1px solid #e3e8e5;
}

.rich-text-toolbar button {
  min-height: 36px;
  padding: 7px 10px;

  color: #2f3834;
  font-size: 13px;

  background: #ffffff;
  border: 1px solid #ccd5d0;
  border-radius: 7px;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.rich-text-toolbar button:hover {
  background: #edf5f0;
  border-color: #719c83;
}

.rich-text-toolbar button:focus-visible {
  outline: 3px solid rgba(0, 102, 51, 0.2);
  outline-offset: 2px;
}

.rich-text-color-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-height: 36px;
  padding: 5px 8px;

  color: #46504b;
  font-size: 12px;
  font-weight: 700;

  background: #ffffff;
  border: 1px solid #ccd5d0;
  border-radius: 7px;
}

.rich-text-color-input {
  width: 27px;
  height: 24px;
  padding: 0;

  background: transparent;
  border: 0;
  cursor: pointer;
}

.rich-text-editor {
  min-height: 150px;
  padding: 18px 20px;

  color: #202824;
  font-size: 15px;
  line-height: 1.65;

  outline: none;
}

.rich-text-editor:focus {
  background: #fffef8;
  box-shadow: inset 0 0 0 2px #79a889;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);

  color: #929b97;
  pointer-events: none;
}

.rich-text-editor p:first-child {
  margin-top: 0;
}

.rich-text-editor p:last-child {
  margin-bottom: 0;
}

.rich-text-editor ul,
.rich-text-editor ol {
  padding-left: 24px;
}


/* =========================================================
   KOMMENTAR TILL DOMARE
   ========================================================= */


/* ---------------------------------------------------------
   ADMIN
   --------------------------------------------------------- */

.referee-comment-admin-card textarea {
  width: 100%;
  min-height: 130px;
  padding: 12px 14px;
  box-sizing: border-box;

  font: inherit;
  line-height: 1.5;

  border: 1px solid #cfd8d3;
  border-radius: 10px;
  resize: vertical;
}

.referee-comment-admin-card textarea:focus {
  outline: none;
  border-color: #006633;
  box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.12);
}

.referee-comment-description {
  margin: 4px 0 0;
  color: #66736c;
}

.referee-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 12px;
}


/* ---------------------------------------------------------
   DOMARSIDA
   --------------------------------------------------------- */

.referee-match-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.referee-comment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  font-size: 18px;
  cursor: help;
}

.referee-match-comment {
  grid-column: 1 / -1;

  width: 100%;
  margin-top: 10px;
  padding: 18px 20px;
  box-sizing: border-box;

  background: #eef8f2;
  border-left: 4px solid #006633;
  border-radius: 12px;
}

.referee-match-comment-heading {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 14px;

  color: #006633;
  font-size: 17px;
  font-weight: 700;
}

.referee-match-comment p {
  margin: 0;

  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.completed-match-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}


/* =========================================================
   MOBILANPASSNING
   ========================================================= */

@media (max-width: 700px) {
  .referee-info-main {
    width: min(100% - 24px, 1100px);
    padding-top: 18px;
    padding-bottom: 110px;
  }

  .referee-info-intro {
    align-items: flex-start;
    gap: 18px;

    margin-bottom: 16px;
    padding: 22px 20px;

    border-radius: 16px;
  }

  .referee-info-intro h2 {
    font-size: 1.55rem;
  }

  .referee-info-intro p {
    font-size: 0.93rem;
  }

  .referee-info-intro-logo {
    width: 68px;
    height: 68px;
    padding: 6px;

    border-radius: 13px;
  }

  .referee-info-content {
    gap: 12px;
  }

  .referee-info-section {
    border-radius: 15px;
  }

  .referee-info-section-header {
    align-items: center;
    gap: 13px;

    padding: 17px;
  }

  .referee-info-section-header h2 {
    font-size: 1.08rem;
  }

  .referee-info-section-header p {
    margin-right: 4px;
    font-size: 0.85rem;
  }

  .referee-info-icon,
  .referee-info-logo-wrap {
    width: 48px;
    height: 48px;
    flex-basis: 48px;

    border-radius: 12px;
  }

  .referee-info-icon {
    font-size: 1.4rem;
  }

  .referee-info-section-logo {
    max-width: 38px;
    max-height: 38px;
  }

  .svff-info-logo {
    max-width: 38px;
    max-height: 42px;
  }

  .referee-info-accordion-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;

    font-size: 23px;
  }

  .referee-info-text {
    padding: 18px;

    font-size: 0.95rem;
    line-height: 1.65;
  }

  .rulebooks-grid {
    grid-template-columns: 1fr;
    gap: 11px;

    padding: 18px;
  }

  .rulebook-card {
    min-height: 0;
    padding: 16px;
  }

  .rulebook-card p {
    margin-bottom: 12px;
  }

  .rich-text-field-header {
    display: block;
    padding: 15px 16px;
  }

  .rich-text-field-badge {
    display: inline-block;
    margin-top: 10px;
  }

  .rich-text-toolbar {
    gap: 6px;
    padding: 9px;
  }

  .rich-text-toolbar button {
    flex: 0 0 auto;
  }

  .rich-text-color-control span {
    display: none;
  }

  .rich-text-editor {
    min-height: 180px;
    padding: 16px;
  }

  .referee-comment-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .referee-comment-form-footer
    .primary-button {
    width: 100%;
  }

  .referee-match-title {
    align-items: flex-start;
    justify-content: space-between;
  }

  .referee-assignment-info {
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
  }

  .referee-match-comment {
    grid-column: 1 / -1;
    padding: 16px;
  }
}

@media (max-width: 430px) {
  .referee-info-intro {
    padding: 19px 17px;
  }

  .referee-info-intro-logo {
    width: 58px;
    height: 58px;
  }

  .referee-info-eyebrow {
    font-size: 0.68rem;
  }

  .referee-info-section-header {
    gap: 11px;
    padding: 15px;
  }

  .referee-info-icon,
  .referee-info-logo-wrap {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .referee-info-accordion-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;

    font-size: 21px;
  }

  .referee-info-text,
  .rulebooks-grid {
    padding: 16px;
  }
}






/* =========================================================
   Admin - matchklassificering
   ========================================================= */






   
.match-classification-card {
  border-left: 6px solid #d97706;
}

.match-classification-card h2 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--snff-dark-green);
}

.match-classification-description {
  margin: 0;
  color: #64748b;
  line-height: 1.4;
}

#match-classification-form {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.match-level-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.match-level-fieldset legend {
  margin-bottom: 10px;
  color: var(--snff-dark-green);
  font-weight: 700;
}

.match-level-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.match-level-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 14px;

  background: #f8faf9;

  border: 2px solid #d7e4d9;
  border-radius: 10px;

  cursor: pointer;
  transition: 0.15s ease;
}

.match-level-option:hover {
  border-color: var(--snff-green);
  background: #f0f7f2;
}

.match-level-option.selected {
  border-color: var(--snff-green);
  background: #eef8f1;
  box-shadow: 0 0 0 2px rgba(11, 107, 58, 0.08);
}

.match-level-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.match-level-option span {
  display: grid;
  gap: 3px;
}

.match-level-option strong {
  color: #1f2937;
}

.match-level-option small {
  color: #64748b;
  line-height: 1.35;
}

.match-level-easy.selected {
  border-color: var(--snff-green);
  background: #eef8f1;
}

.match-level-medium.selected {
  border-color: #d97706;
  background: #fff8e7;
}

.match-level-hard.selected {
  border-color: var(--snff-red);
  background: #fff1ef;
}

.match-level-clear-button {
  margin-top: 10px;
  padding: 0;

  background: transparent;
  color: #64748b;

  border: 0;

  font: inherit;
  font-size: 13px;
  text-decoration: underline;

  cursor: pointer;
}

.match-level-clear-button:hover {
  color: var(--snff-red);
}

.hot-match-checkbox {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 16px;

  background: #fff8e7;

  border: 2px solid #f0b429;
  border-radius: 12px;

  cursor: pointer;
}

.hot-match-checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
}

.hot-match-checkbox-icon {
  font-size: 34px;
  line-height: 1;
}

.hot-match-checkbox > span:last-child {
  display: grid;
  gap: 4px;
}

.hot-match-checkbox strong {
  color: #9a3412;
  font-size: 17px;
}

.hot-match-checkbox small {
  color: #7c4a12;
  line-height: 1.35;
}

.match-classification-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#match-classification-message {
  margin: 0;
  font-weight: 700;
}

#match-classification-message.success {
  color: var(--snff-green);
}

#match-classification-message.error {
  color: var(--snff-red);
}


/* Matchnivå i expanderade detaljer */

.match-level-badge {
  display: inline-block;

  padding: 4px 10px;

  border-radius: 999px;

  font-size: 13px;
  font-weight: 800;
}

.match-level-badge-easy {
  background: #e8f4ee;
  color: var(--snff-green);
}

.match-level-badge-medium {
  background: #fff4d6;
  color: #8a6500;
}

.match-level-badge-hard {
  background: #fff1ef;
  color: var(--snff-red);
}

.match-level-badge-empty {
  background: #eef2f3;
  color: #64748b;
}


@media (max-width: 700px) {
  .match-level-options {
    grid-template-columns: 1fr;
  }

  .match-classification-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .match-classification-actions .primary-button {
    width: 100%;
  }
}




/* =========================================================
   SETTINGS - MEDDELANDEN
   ========================================================= */






.message-list {
  display: grid;
  gap: 12px;

  margin-top: 18px;
}

.message-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;

  padding: 16px 18px;

  background: white;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

.message-card-content {
  display: grid;
  gap: 6px;
}

.message-card-title {
  margin: 0;

  color: var(--snff-dark-green);

  font-size: 1rem;
  font-weight: 700;
}

.message-card-description {
  margin: 0;

  color: #5f6f65;

  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.message-edit-button {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .message-card {
    align-items: stretch;
    flex-direction: column;
  }

  .message-edit-button {
    width: 100%;
  }
}




/* =========================================================
   SETTINGS - MEDDELANDEN - REDIGERINGSDIALOG
========================================================= */





.message-editor-dialog {
  width: min(780px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;

  background: white;
  color: inherit;

  border: 1px solid #cfe3d5;
  border-radius: 14px;

  box-shadow: 0 20px 60px rgb(0 0 0 / 20%);
}

.message-editor-dialog::backdrop {
  background: rgb(15 36 24 / 55%);
}

.message-editor-form {
  display: flex;
  flex-direction: column;

  max-height: calc(100vh - 40px);
}

.message-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;

  padding: 22px 24px;

  background: #f7fbf8;

  border-bottom: 1px solid #d8e8dd;
}

.message-editor-header h2 {
  margin: 2px 0 6px;

  color: var(--snff-dark-green);
}

.message-editor-eyebrow {
  margin: 0;

  color: var(--snff-green);

  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-editor-description {
  margin: 0;

  color: #5f6f65;
  line-height: 1.5;
}

.message-editor-close-button {
  flex-shrink: 0;

  width: 38px;
  height: 38px;
  padding: 0;

  background: white;
  color: var(--snff-dark-green);

  border: 1px solid #cfe3d5;
  border-radius: 8px;

  font-size: 1.6rem;
  line-height: 1;

  cursor: pointer;
}

.message-editor-close-button:hover {
  background: #eef7f1;
}

.message-editor-body {
  display: grid;
  gap: 18px;

  padding: 24px;

  overflow-y: auto;
}

.message-editor-field {
  display: grid;
  gap: 7px;

  font-weight: 700;
}

.message-editor-field input,
.message-editor-field textarea {
  width: 100%;
  padding: 11px 12px;

  background: white;
  color: inherit;

  border: 1px solid #cfd8d3;
  border-radius: 8px;

  font: inherit;
}

.message-editor-field textarea {
  min-height: 220px;

  line-height: 1.5;
  resize: vertical;
}

.message-editor-field input:focus,
.message-editor-field textarea:focus {
  border-color: var(--snff-green);
  outline: 3px solid rgb(40 125 70 / 15%);
}

.message-template-variables {
  display: grid;
  gap: 14px;

  padding: 16px;

  background: #f7fbf8;

  border: 1px solid #d8e8dd;
  border-radius: 10px;
}

.message-template-variables h3 {
  margin: 0 0 4px;

  color: var(--snff-dark-green);

  font-size: 1rem;
}

.message-template-variables p {
  margin: 0;
}

.message-template-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-template-variable-list code {
  padding: 6px 9px;

  background: white;
  color: var(--snff-dark-green);

  border: 1px solid #cfe3d5;
  border-radius: 6px;

  font-size: 0.85rem;
}

.message-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 16px 24px;

  background: #f7fbf8;

  border-top: 1px solid #d8e8dd;
}

@media (max-width: 600px) {
  .message-editor-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .message-editor-form {
    max-height: calc(100vh - 20px);
  }

  .message-editor-header,
  .message-editor-body,
  .message-editor-footer {
    padding: 16px;
  }

  .message-editor-footer {
    flex-direction: column-reverse;
  }

  .message-editor-footer button {
    width: 100%;
  }
}
















/* =========================================================
   Spelform
   ========================================================= */

#playing-format-checklist label {
  min-width: 110px;
}


/* =========================================================
   Åldersgrupper
   ========================================================= */

#age-group-checklist label {
  min-width: 125px;
}


/*
 * "Alla åldersgrupper" ligger i en egen checklist.
 * Den får lite tydligare status.
 */

#all-age-groups {
  accent-color: var(--color-primary);
}


/* =========================================================
   Spara
   ========================================================= */

#qualification-form > .primary-button {
  width: fit-content;
  min-width: 150px;

  margin-top: 4px;
}


/* =========================================================
   NUVARANDE BEHÖRIGHETER
   ========================================================= */

.qualification-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;

  margin-bottom: 14px;
}

.qualification-actions button {
  min-height: 34px;
  padding: 6px 11px;

  background: var(--color-surface);
  color: var(--color-primary);

  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);

  font-size: var(--font-size-sm);
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.qualification-actions button:hover:not(:disabled) {
  background: var(--color-primary-soft);
}


/* Ta bort markerade */

.qualification-actions .danger-button {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.qualification-actions .danger-button:hover:not(:disabled) {
  background: var(--color-danger-soft);
  color: var(--color-danger-dark);
}


/* Disabled */

.qualification-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


/* =========================================================
   Lista
   ========================================================= */

.qualification-list {
  overflow: hidden;

  background: var(--color-surface);

  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.qualification-row {
  display: flex;
  align-items: center;
  gap: 9px;

  min-height: 42px;
  padding: 8px 12px;

  color: var(--color-text);

  border-bottom: 1px solid var(--color-border);

  font-size: var(--font-size-sm);
  font-weight: 700;

  transition:
    background-color var(--transition-fast);
}

.qualification-row:last-child {
  border-bottom: 0;
}

.qualification-row:hover {
  background: var(--color-surface-hover);
}

.qualification-row:has(
  .qualification-checkbox:checked
) {
  background: var(--color-primary-soft);
}


/* Checkbox i nuvarande behörigheter */

.qualification-checkbox {
  width: 15px;
  height: 15px;
  margin: 0;

  flex: 0 0 auto;

  accent-color: var(--color-primary);

  cursor: pointer;
}


/* =========================================================
   MOBIL / SMAL VY
   ========================================================= */

@media (max-width: 700px) {

  #qualification-form .checklist {
    gap: 6px;
  }

  #qualification-form .checklist label {
    min-height: 34px;
    padding: 6px 9px;

    font-size: var(--font-size-xs);
  }

  #playing-format-checklist label,
  #age-group-checklist label {
    min-width: 0;
  }

  #qualification-form > .primary-button {
    width: auto;
    min-width: 140px;
  }

  .qualification-actions {
    gap: 6px;
  }

  .qualification-actions button {
    min-height: 32px;
    padding: 5px 8px;

    font-size: var(--font-size-xs);
  }

  .qualification-row {
    min-height: 38px;
    padding: 7px 9px;

    font-size: var(--font-size-xs);
  }
}

