: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,
.document-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å */
  padding-bottom: 16px;
}

/* 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;
}

/* Litt luft mellom tekst og stats */
.hero p {
  margin-bottom: 10px;
}

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  background: linear-gradient(135deg, #103b66 0%, #0f6fff 100%);
  color: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero h1 {
  margin: 6px 0 8px;
  font-size: 2rem;
  line-height: 1.05;
}

.hero p {
  margin: 0;
  opacity: 0.95;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.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;
}

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

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 {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

.document-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.document-actions a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.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);
}

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

.preview-block {
  margin-top: 12px;
}

.preview-block summary,
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;
}

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

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

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

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

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

  .hero h1 {
    font-size: 1.7rem;
  }

  .item {
    flex-direction: column;
  }

  .actions,
  .document-actions {
    width: 100%;
  }

  .actions form,
  .document-actions form {
    width: auto;
  }

  button {
    width: auto;
  }
}
.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;
}


.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;
  }
}
@media (max-width: 768px) {
  .hero {
    text-align: center;
  }

  .hero form {
    display: none; /* skjuler evt fremtidige knapper */
  }
}
.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: space-around;
  align-items: center;
  z-index: 1000;
}

.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;
}

.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;
}
  
.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 */
}
}
