:root {
  --color-primary: #0D3B66;
  --color-secondary: #F1F3F5;
  --space-3: 16px;
  --font-base: system-ui, Arial, sans-serif;
  --color-primary-hover: #155A8A;
  --color-primary-active: #0A2E4D;
  --color-surface: #FFFFFF;
  --color-surface-muted: #E6ECF2;
  --color-text: #1C2534;
  --color-text-muted: #516070;
  --color-border: #CFD8E3;
  --color-danger: #C83C3C;
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 24px;
  --space-5: 32px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 2px 12px rgba(13, 59, 102, 0.12);
  --shadow-raised: 0 6px 18px rgba(13, 59, 102, 0.16);
  --transition-fast: 120ms ease-in-out;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-secondary);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > * {
  flex-shrink: 0;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-primary-hover);
}

.container{
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 14px;
  text-align: left;
}

.muted {
  color: var(--color-text-muted);
  font-size: 16px;
  text-align: left;
}

h1, h2, h3 {
  text-align: center;
  margin: var(--space-2) 0 var(--space-3);
  font-weight: 600;
}

h1 { font-size: 32px; }
h2 { font-size: 18px; }
h3 { font-size: 14px; }

h4 {
  text-align: center;
  margin: var(--space-1);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-primary);
}

.site-header {
  background: var(--color-primary);
  color: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header .logo {
  height: 54px;
  width: auto;
}

.home .site-header .logo {
  height: 72px;
}

.nav.tabs {
  margin: var(--space-2) 0 var(--space-3);
}

.tabs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.tab-item {
  display: flex;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tab-link:hover,
.tab-link:focus {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: rgba(13, 59, 102, 0.25);
}

.tab-link.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  box-shadow: 0 6px 16px rgba(13, 59, 102, 0.18);
}

.home-main {
  padding: var(--space-4) 0 var(--space-5);
}

.lead {
  margin: 0 0 var(--space-4);
  font-size: 18px;
  color: var(--color-text-muted);
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 200px;
  min-height: 40px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-soft);
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.tile:hover,
.tile:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
  color: #fff;
}

.tile.blue {
  background: var(--color-primary);
}

.tile.blue:hover,
.tile.blue:focus {
  background: var(--color-primary-hover);
}

.tile.admin {
  background: #1B998B;
}

.tile.admin:hover,
.tile.admin:focus {
  background: #188676;
}

.home-title {
  font-size: 72px;
  text-align: center;
  margin: var(--space-3) 0;
}

.home-hero,
.home-feature {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.home-hero__image {
  width: 100%;
  max-width: 400px;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.home-feature__image {
  width: 100%;
  max-width: 800px;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-3);
}

.card .card-content {
  padding: 0;
}

.card.centered-card {
  text-align: center;
}

form {
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0 0 var(--space-3);
}

.label {
  font-size: 14px;
  color: var(--color-text);
}

.input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.18);
}

.input[disabled] {
  background: var(--color-secondary);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.mt-2l {
  margin-top: calc(var(--space-3) * 1.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 20ch;
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-soft);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover,
.btn:focus {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-raised);
}

.btn:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  min-width: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: background var(--transition-fast);
}

.btn-small--icon {
  min-width: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.btn-small:hover,
.btn-small:focus {
  background: var(--color-primary-hover);
}

.alert {
  border: 1px solid rgba(200, 60, 60, 0.3);
  background: rgba(200, 60, 60, 0.08);
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

.table {
  width: 100%;
}

.table,
.data-table {
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.table-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
}

.dual-table-layout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-4);
}

.dual-table-panel {
  flex: 1 1 52%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
}

.dual-table-panel--secondary {
  flex: 1 1 38%;
}

.secondary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: var(--space-3);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.secondary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.table-wrap--static {
  gap: var(--space-2);
  align-items: stretch;
}

.data-table--compact th,
.data-table--compact td {
  padding: 4px 10px;
  font-size: 12.5px;
}

.author-select-link {
  display: inline-block;
  width: 100%;
  color: inherit;
  font-weight: 600;
}

.author-select-link:hover,
.author-select-link:focus {
  color: var(--color-primary-hover);
}

#table-forfattere .is-selected {
  background: rgba(13, 59, 102, 0.14);
}

#table-forfattere .is-selected .author-select-link {
  color: var(--color-primary);
}

.name-col {
  width: 60ch;
  max-width: 60ch;
}

.title-col {
  width: 70ch;
  max-width: 70ch;
}

.secondary-section {
  margin-top: var(--space-3);
  width: 100%;
}

.secondary-section:first-of-type {
  margin-top: var(--space-2);
}

.dual-table-panel .table-wrap,
.dual-table-panel .table-scroll {
  height: 100%;
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.toolbar-actions {
  display: flex;
  gap: var(--space-2);
}

.selection-summary {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--color-text);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}

.selection-summary strong {
  display: block;
  font-size: 13.5px;
  color: var(--color-text);
}

.tema-detail-table .col-issue {
  width: 15ch;
  min-width: 15ch;
}

.tema-detail-table .title-col {
  width: auto;
}

@media (max-width: 1024px) {
  .dual-table-layout {
    flex-direction: column;
  }

  .dual-table-panel {
    flex: 1 1 100%;
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  margin: 0 auto;
}

.table thead,
.data-table thead {
  background: var(--color-secondary);
  color: var(--color-text);
}

.table th,
.table td,
.data-table th,
.data-table td {
  padding: 6px var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  text-align: left;
}

.table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd) {
  background: rgba(13, 59, 102, 0.02);
}

.table tbody tr:hover,
.data-table tbody tr:hover {
  background: rgba(13, 59, 102, 0.08);
}

.table tr.selected,
.data-table tr.selected {
  background: var(--color-primary);
  color: #fff;
}

.table td.error,
.data-table td.error {
  background: var(--color-danger);
  color: #fff;
  font-weight: 600;
}

.table thead tr:hover,
.table thead tr.selected,
.data-table thead tr:hover,
.data-table thead tr.selected {
  background: inherit;
  color: inherit;
}

.filter-row th {
  background: var(--color-surface);
}

.filter-row input.column-filter {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.filter-row th:nth-child(3) .column-filter {
  width: 8ch;
  min-width: 8ch;
  max-width: 8ch;
}

.table-empty-row td {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
}

.table-pagination {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: 13px;
}

.pagination-btn {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.pagination-btn:hover,
.pagination-btn:focus {
  background: var(--color-secondary);
}

.pagination-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pagination-info {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 600;
}

.pagination-page-input {
  width: 5.5ch;
  min-width: 5.5ch;
  padding: 4px;
  margin: 0 var(--space-1);
  text-align: right;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.count-col {
  width: 6ch;
  min-width: 6ch;
  text-align: right;
}

.site-footer {
  background: var(--color-primary);
  color: #fff;
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) 0 var(--space-4);
  font-size: 12.5px;
  margin-top: var(--space-4);
}

.site-footer .container {
  text-align: center;
}

.tab-link:focus-visible,
.btn:focus-visible,
.btn-small:focus-visible,
.tile:focus-visible {
  outline: 3px solid rgba(13, 59, 102, 0.35);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .home-title {
    font-size: 30px;
  }

  .home-actions {
    gap: var(--space-1);
  }

  .tile {
    font-size: 11px;
  }

  .home-hero__image {
    max-height: 160px;
  }

  .home-feature__image {
    max-height: 520px;
  }

  .site-header .logo {
    height: 48px;
  }

  .home .site-header .logo {
    height: 62px;
  }

  .btn {
    min-width: 18ch;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  .home-title {
    font-size: 28px;
  }

  .tabs-list {
    gap: var(--space-1);
  }

  .tab-link {
    padding: var(--space-2) var(--space-2);
  }

  .home-hero__image {
    max-height: 140px;
  }

  .home-feature__image {
    max-height: 420px;
  }

  .home-actions {
    gap: var(--space-1);
  }

  .site-footer {
    font-size: 12px;
  }
}
/* =========================================================
   DETAIL VIEW STYLING (for alle *_detalj.php)
   ========================================================= */
.detail-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  padding: 1.2rem 1.5rem;
  margin-top: 1rem;
  background-color: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.detail-list dt {
  font-weight: 600;
  color: var(--text-strong, #333);
  text-align: right;
  padding-right: 0.25rem;
}

.detail-list dd {
  margin: 0;
  padding: 0 0 0.3rem 0;
  color: var(--text-normal, #444);
  border-bottom: 1px dashed var(--border-color, #e0e0e0);
}

.detail-list dd:last-of-type {
  border-bottom: none;
}

.detail-list dt::after {
  content: ":";
}

.btn {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  margin-top: 1.2rem;
  font-size: 0.95rem;
  background-color: var(--primary, #003366);
  color: #fff;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

.btn:hover,
.btn:focus {
  background-color: var(--primary-hover, #005199);
}

/* =========================================================
   UTGAVER PAGE LAYOUT
   ========================================================= */
.utgaver-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.utgaver-section h2,
.utgaver-section h3 {
  text-align: left;
  margin-top: 0;
}

.utgaver-table tr.is-selected {
  background-color: var(--color-surface-muted);
}

.utgaver-table tr.is-selected a {
  font-weight: 600;
}

.utgaver-actions {
  margin-top: var(--space-4);
  text-align: right;
}

@media (max-width: 1024px) {
  .utgaver-layout {
    grid-template-columns: 1fr;
  }

  .utgaver-actions {
    text-align: left;
  }
}

.spesiell-tekst {
  /* Definerer fyllfargen for teksten (innsiden) */
  color: var(--color-primary);

  /* Definerer bredden og fargen på konturen (streken) */
  /* Bruker -webkit-prefiks for bredere støtte for text-stroke */
  -webkit-text-stroke-width: 1px; /* Konturbredde: 1 piksler */
  -webkit-text-stroke-color:#ffc107; /* konturfarge */ 

  /* Valgfritt: Legger til en skygge for å forsterke effekten (text-shadow er bedre støttet) */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 
  
  /* Valgfritt: Endre fontstørrelsen for å gjøre effekten mer synlig */
  font-size: 92px; 
  font-family: Arial, sans-serif;
}

.page-title {
  /* Definerer fyllfargen for teksten (innsiden) */
  color: var(--color-primary);

  /* Definerer bredden og fargen på konturen (streken) */
  /* Bruker -webkit-prefiks for bredere støtte for text-stroke */
  -webkit-text-stroke-width: 1px; /* Konturbredde: 1 piksler */
  -webkit-text-stroke-color:#ffc107; /* konturfarge */ 

  /* Valgfritt: Legger til en skygge for å forsterke effekten (text-shadow er bedre støttet) */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 
  
  /* Valgfritt: Endre fontstørrelsen for å gjøre effekten mer synlig */
  font-size: 38px; 
  font-family: Arial, sans-serif;
}