:root {
  --bg: #f3f7fb;
  --card: #ffffff;
  --text: #183247;
  --muted: #6b7d8c;
  --border: #dbe5ee;
  --primary: #0f6fff;
  --primary-hover: #0b5ed7;
  --secondary: #eef4fa;
  --secondary-hover: #dde9f5;
  --danger: #dc3545;
  --danger-hover: #bb2d3b;
  --success: #198754;
  --shadow: 0 10px 30px rgba(19, 45, 72, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

#trip-map {
  width: 100%;
  min-height: 400px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f6f9fc 0%, #eef4f9 100%);
  color: var(--text);
}

.icon-btn {
  margin-left: 10px;
}

.icon-only {
  all: unset;              /* fjerner ALL default button styling */
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.task-documents {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-document-item a {
  font-size: 0.92rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.task-document-item a:hover {
  text-decoration: underline;
}


.actions,
.logpoint-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.delete-icon {
  background: none !important;
  color: inherit !important;
}

.delete-icon:hover {
  background: #fee2e2 !important;
}

.icon-btn {
  all: unset;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* hover effekt */
.icon-btn:hover {
  background: #f1f5f9;
  transform: scale(1.15);
}

/* litt mindre på mobil */
@media (max-width: 768px) {
  .icon-btn {
    font-size: 16px;
    padding: 4px;
  }
}


.icon-only:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

.icon-actions button:last-child:hover {
  background: #fee2e2;
}

.icon-actions {
  display: flex;
  gap: 8px;
}

.icon-actions form {
  margin: 0;
}

.icon-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
}

.icon-actions button:hover {
  background: #f1f5f9;
  transform: scale(1.1);
}

.hero {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f3c5c, #1f6f8b); /* juster til din blå */
}

/* Litt blur/overlay for moderne look */
@supports (backdrop-filter: blur(10px)) {
  .hero {
    backdrop-filter: blur(10px);
  }
}

.hero {
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

/* Mobil: ett felt der bildet er selve bakgrunnen og innholdet ligger over
   det (hero-media er skjult - hero-bar bærer bildet selv). På bred skjerm
   (se under) splittes dette i et rent bildefelt til venstre og et eget
   smalt panel til høyre, slik at hele bildet alltid er synlig uten
   beskjæring, uavhengig av skjermbredde. */
.hero {
  display: flex;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.hero-media {
  display: none;
}

.hero-bar {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  background-image:
    linear-gradient(135deg, rgba(16, 59, 102, 0.55) 0%, rgba(15, 111, 255, 0.28) 100%),
    url("img/hero-banner.jpg");
  background-size: cover;
  background-position: center;
  color: white;
}

.hero-brand .eyebrow {
  margin: 0 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 38px;
  flex-shrink: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: none;
}

.brand-name {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.05;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.hero-logout-form {
  align-self: flex-start;
}

/* Bildet er forhåndsbeskåret til nøyaktig denne fasongen (2000x700). På
   bred skjerm splittes heroen i et rent bildefelt (låst til bildets egen
   fasong, så det alltid vises kant til kant uten beskjæring) og et smalt
   panel med logo og utlogging. På smalere skjermer (under) er det for
   trangt til å dele opp slik, så vi beholder det opprinnelige fulle
   bildet med innholdet lagt over. */
@media (min-width: 901px) {
  .hero-media {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    aspect-ratio: 2000 / 700;
    background-image: url("img/hero-banner.jpg");
    background-size: cover;
    background-position: center;
  }

  .hero-bar {
    flex: 0 0 132px;
    background-image: none;
    background: linear-gradient(160deg, #0f3c5c, #1f6f8b);
    align-items: center;
    text-align: center;
    padding: 20px 12px;
    gap: 14px;
  }

  .hero-brand .eyebrow {
    justify-content: center;
  }

  .brand {
    flex-direction: column;
    gap: 8px;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .hero-logout-form {
    align-self: stretch;
    width: 100%;
  }

  .logout-btn {
    width: 100%;
  }
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.env-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.env-badge-produksjon {
  background: var(--success);
}

.env-badge-dev {
  background: #d97706;
}

.env-badge-preview {
  background: #8b5cf6;
}

.env-badge-lokalt {
  background: rgba(255, 255, 255, 0.25);
}

.flash-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash {
  background: #e8f6ed;
  color: #14532d;
  border: 1px solid #bfe3cb;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat {
  text-align: left;
  padding: 20px;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 8px;
}

.stat span {
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

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

.grid.two.compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(219, 229, 238, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.detail-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-rows {
  margin-top: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
}

.stack {
  display: grid;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 111, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(15, 111, 255, 0.12);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button,
a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, opacity 0.2s ease, background 0.2s ease;
  width: auto;
}

.timeline {
  position: relative;
  margin-left: 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d9e2ec;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.timeline-marker {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
  margin-left: 4px;
  flex-shrink: 0;
}

.timeline-content {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  font-size: 13px;
}

.timeline-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.timeline-notes {
  margin-top: 8px;
  background: #f7fafc;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
}

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

.logpoint-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.logpoint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.logpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 14px;
}

.logpoint-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.logpoint-grid strong {
  font-size: 14px;
}

.logpoint-notes {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text);
  background: #f7fafc;
  padding: 8px;
  border-radius: 8px;
}

button:hover,
a.button-link:hover {
  opacity: 0.96;
}

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

button[type="submit"],
button.primary {
  background: var(--primary);
  color: white;
}

button[type="submit"]:hover,
button.primary:hover {
  background: var(--primary-hover);
}

button.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.actions .secondary {
  background: var(--secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.actions .secondary:hover {
  background: var(--secondary-hover);
}

button.danger {
  background: var(--danger);
  color: white;
}

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

.item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

.item strong {
  font-size: 1rem;
}

.muted {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form {
  display: inline;
}

.document-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.document-item {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

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

.document-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.document-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 2;
}

.document-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.document-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.document-link-active {
  color: var(--primary);
}

.document-panel {
  margin-top: 10px;
}

.task-item {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

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

.task-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.task-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 2;
}

.task-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.task-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.task-date-col {
  flex-shrink: 0;
  min-width: 84px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.task-cost-col {
  flex-shrink: 0;
  min-width: 64px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.task-info-active {
  color: var(--primary);
}

.task-panel {
  margin-top: 10px;
}

.trip-item {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

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

.trip-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.trip-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 2;
}

.trip-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.trip-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.boat-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.boat-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--secondary);
}

.boat-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.boat-thumb-clickable {
  cursor: zoom-in;
}

.boat-hero-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  cursor: zoom-in;
}

.advice-context {
  font-size: 0.82rem;
  margin: 0 0 8px;
}

.advice-disclaimer {
  font-size: 0.78rem;
  font-style: italic;
  margin: 0 0 10px;
}

.advice-answer {
  margin-top: 12px;
  padding: 12px;
  background: var(--secondary);
  border-radius: 10px;
}

.advice-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.advice-answer-close {
  background: none;
  border: none;
  padding: 0 4px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  opacity: 0.6;
}

.advice-answer-close:hover {
  opacity: 1;
}

.btn-spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.8;
  vertical-align: -0.15em;
  animation: btn-spinner-rotate 0.7s linear infinite;
}

@keyframes btn-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 30, 0.88);
  z-index: 2000;
  padding: 24px;
}

.lightbox-overlay img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  all: unset;
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .boat-thumb {
    width: 72px;
    height: 72px;
  }

  .boat-thumb-placeholder {
    font-size: 1.9rem;
  }
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  
  align-items: center;
}

.logpoint-actions {
  display: flex;
  gap: 8px;
}

.logpoint-actions a,
.logpoint-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.logpoint-actions button:hover,
.logpoint-actions a:hover {
  transform: scale(1.1);
}

details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

iframe,
img {
  margin-top: 12px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: white;
}

.leaflet-container img {
  margin-top: 0;
  width: auto;
  border-radius: 0;
  border: none;
  background: transparent;
}

@media (max-width: 768px) {
  .logpoint-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .stats,
  .grid.two,
  .grid.two.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 14px;
  }

  .hero,
  .card {
    border-radius: 18px;
  }

  .hero-bar {
    padding: 16px;
  }

  .brand-name {
    font-size: 1.7rem;
  }

  .item {
    flex-direction: column;
  }

  .actions {
    width: 100%;
  }

  .actions form {
    width: auto;
  }

  button {
    width: auto;
  }

  .document-info,
  .task-info,
  .trip-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .task-row-completed {
    flex-wrap: wrap;
  }

  .task-row-completed .task-info {
    order: -1;
    flex-basis: 100%;
  }
}
.page-slider {
  display: block;
}

.page-slider {
  margin-top: 12px;
}

.page {
  min-width: auto;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .page-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-slider::-webkit-scrollbar {
    display: none;
  }

  .page {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    margin-bottom: 0;
  }
}
.mobile-hint {
  display: none;
}

@media (max-width: 768px) {
  .mobile-hint {
    display: block;
    margin-bottom: 10px;
  }
}

.mobile-tabs {
  display: none;
}

@media (min-width: 769px) {
  .page-menu-mobile-only {
    display: none;
  }
}

.page-slider {
  display: block;
}

.page {
  min-width: auto;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .page-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-slider::-webkit-scrollbar {
    display: none;
  }

  .page {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    margin-bottom: 0;
  }
}
.compact-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 10px 12px;
  color: white;
  min-width: 0;
  backdrop-filter: blur(6px);
}

.stat-chip strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-chip span {
  font-size: 0.82rem;
  opacity: 0.92;
}

@media (max-width: 768px) {
  .compact-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-chip {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .stat-chip strong {
    font-size: 0.98rem;
  }

  .stat-chip span {
    font-size: 0.78rem;
  }
}
.stat-chip .icon {
  font-size: 14px;
  opacity: 0.9;
  display: block;
  margin-bottom: 2px;
}

.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 1000;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav button {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  gap: 4px;
  flex: 1 0 auto;
  padding: 0 10px;
}

  .bottom-nav button span {
    font-size: 20px;
  }

  .bottom-nav button small {
    font-size: 11px;
  }

  .bottom-nav button.active {
    color: #2563eb;
  }

  body {
    padding-bottom: 80px; /* så innhold ikke går bak nav */
  }
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.economy-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.economy-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.economy-card strong {
  font-size: 1.5rem;
  color: var(--text);
}

@media (max-width: 768px) {
  .economy-grid {
    grid-template-columns: 1fr;
  }
}

.economy-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.economy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.economy-row span {
  color: var(--text);
}

.economy-row strong {
  font-size: 1rem;
}

#map-card.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  margin: 0;
  border-radius: 0;
  padding: 16px;
  overflow-y: auto;
  background: var(--card);
}

#map-card.map-fullscreen #trip-map {
  height: calc(100vh - 80px) !important;
}

body.map-fullscreen-active {
  overflow: hidden;
}

.tasks-subtabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.tasks-subtab-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.tasks-subtab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.menu-grid-item span {
  font-size: 28px;
}

@media (max-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Sammenleggbare seksjoner (kun aktivert på bred skjerm - se media query under) */
.accordion-header {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: default;
}

.accordion-header h2 {
  margin: 0;
}

.accordion-chevron {
  display: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

@media (min-width: 769px) {
  .accordion-header {
    cursor: pointer;
    padding-bottom: 16px;
  }

  .accordion-header h2 {
    margin-bottom: 0;
  }

  .accordion-chevron {
    display: block;
  }

  .accordion-page[data-open="false"] .accordion-chevron {
    transform: rotate(-90deg);
  }

  .accordion-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.22s ease;
  }

  .accordion-page[data-open="false"] .accordion-body {
    grid-template-rows: 0fr;
  }

  .accordion-body-inner {
    min-height: 0;
    overflow: hidden;
  }

  .accordion-page[data-open="false"] .card {
    padding-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .accordion-body,
  .accordion-chevron {
    transition: none;
  }
}

/* Filterrad med båt-nedtrekk og flervalgs kategori-knapper */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-bar select {
  width: auto;
  flex: 0 1 auto;
}

.filter-chip {
  all: unset;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  background: #fff;
}

.filter-chip[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filter-reset {
  all: unset;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 2px;
}

.filter-reset[hidden] {
  display: none;
}

/* Flervalg av kategorier i skjemaer (oppgave/dokument) */
.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.88rem;
  cursor: pointer;
}

.category-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.category-checkbox:has(input:checked) {
  background: var(--secondary);
  border-color: var(--primary);
}

/* Grånet "Lagre endringer"-knapp når skjemaet ikke er endret ennå */
button[type="submit"]:disabled,
button.primary:disabled {
  background: var(--secondary);
  color: var(--muted);
  cursor: not-allowed;
}

button[type="submit"]:disabled:hover,
button.primary:disabled:hover {
  background: var(--secondary);
}
