/* ALTBIM – stylesheet */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  background: #f4f5f7;
  color: #1a1a2e;
  min-height: 100vh;
}

header {
  background: #1a1a2e;
  color: white;
  padding: 1.2rem 2rem;
}

.header-innhold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header h1 { font-size: 1.8rem; letter-spacing: 2px; }
header .subtitle { color: #aab; font-size: 0.9rem; margin-top: 0.2rem; }

.modus-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.bytt-modus-knapp {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 0.6rem;
  transition: background 0.15s, color 0.15s;
}

.bytt-modus-knapp:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

/* ── Modus-velger ──────────────────────────────────── */

#modusVelger {
  background: white;
  border-radius: 8px;
  padding: 1.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#modusVelger h2 {
  font-size: 1.15rem;
  color: #1a1a2e;
  margin-bottom: 0.3rem;
}

#modusVelger > p {
  color: #777;
  font-size: 0.88rem;
  margin-bottom: 1.4rem;
}

.modus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.modus-kort {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.4rem 1.2rem;
  background: #f9fafc;
  border: 2px solid #e4e7f0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  width: 100%;
}

.modus-kort:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

.modus-oppstart:hover    { border-color: #4a6cf7; background: #f0f3ff; }
.modus-kontroll-ny:hover { border-color: #43a047; background: #f1f8f1; }

.modus-ikon { font-size: 2rem; line-height: 1; margin-bottom: 0.2rem; }

.modus-kort strong {
  font-size: 0.95rem;
  color: #1a1a2e;
  font-weight: 700;
}

.modus-kort p {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 680px) {
  .modus-grid { grid-template-columns: 1fr; }
  .header-innhold { flex-direction: column; align-items: flex-start; }
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Fase-seksjoner */
.fase {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.fase h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.fase p { color: #555; font-size: 0.9rem; margin-bottom: 1rem; }

.skjult { display: none; }
.aktiv { display: block; }

/* Dropzone */
.dropzone {
  border: 2px dashed #c0c4cc;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 1rem;
}

.dropzone:hover, .dropzone.over { border-color: #4a6cf7; background: #f0f3ff; }
.dropzone p { color: #888; margin-bottom: 0.8rem; }

/* Fil-liste */
.fil-liste { margin-bottom: 1rem; }
.fil-liste .fil-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
}

/* Knapper */
button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  background: #e8eaf0;
  color: #333;
  transition: background 0.15s;
}

button:hover { background: #d0d4e8; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.hoved-knapp {
  background: #4a6cf7;
  color: white;
  font-weight: 600;
  padding: 0.7rem 1.8rem;
  margin-top: 1rem;
}

.hoved-knapp:hover { background: #3355e0; }

/* Endringstabellen */
.endringer-liste { margin-top: 1rem; }
.velg-alle { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th { background: #f0f3ff; padding: 0.5rem; text-align: left; border-bottom: 2px solid #dde; }
td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #eee; }
tr.usikker td { background: #fffbe6; }
tr.usikker td:last-child { color: #b87000; font-weight: 600; }

/* ITO og eksport */
.ito-valg, .eksport-valg {
  margin-bottom: 1.2rem;
}

.ito-valg h3, .eksport-valg h3 {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  color: #333;
}

.eksport-valg label {
  display: block;
  margin: 0.3rem 0;
  font-size: 0.88rem;
  cursor: pointer;
}

/* Fremdriftsindikator */
.progres-trinn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.2rem 0 0.6rem;
  font-size: 0.82rem;
}

.trinn {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: #eee;
  color: #888;
  font-weight: 500;
  transition: all 0.3s;
}

.trinn.aktiv-trinn {
  background: #4a6cf7;
  color: white;
}

.trinn.ferdig-trinn {
  background: #43a047;
  color: white;
}

.trinn-pil { color: #bbb; font-size: 0.8rem; }

.progres-bar-wrapper {
  height: 10px;
  background: #e0e4f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progres-fyll {
  height: 100%;
  background: linear-gradient(90deg, #4a6cf7, #7c9aff);
  border-radius: 10px;
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progres-fyll::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: rgba(255,255,255,0.3);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 130%; }
}

.progres-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #555;
}

.time-info { color: #888; }

/* ── To-bokser opplasting (kontroll-modus) ─────────── */

.to-bokser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  align-items: start;
}

.opplasting-boks {
  background: #f9fafc;
  border: 1px solid #e4e7f0;
  border-radius: 8px;
  padding: 1.1rem;
}

.opplasting-boks h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.boks-beskrivelse {
  font-size: 0.77rem !important;
  color: #888 !important;
  margin-bottom: 0.7rem !important;
}

.opplasting-boks .dropzone {
  padding: 1.2rem 0.8rem;
  margin-bottom: 0.5rem;
}

.opplasting-boks .dropzone p {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .to-bokser-grid { grid-template-columns: 1fr; }
}

/* Statusboks */
.status-boks {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: #2e7d32;
}

.status-boks.feil {
  background: #ffebee;
  border-left-color: #e53935;
  color: #c62828;
}

/* Ekskluderingspanel */
.ekskludering-panel {
  margin: 1.2rem 0 0.8rem;
  border: 1px solid #dde;
  border-radius: 6px;
  background: #f9fafc;
}

.ekskludering-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  user-select: none;
  list-style: none;
}

.ekskludering-panel > summary::-webkit-details-marker { display: none; }

.ekskludering-panel > summary::after {
  content: '▾';
  font-size: 1rem;
  color: #aaa;
  transition: transform 0.2s;
}

.ekskludering-panel[open] > summary::after {
  transform: rotate(180deg);
}

.ekskludering-panel[open] > summary { border-bottom: 1px solid #dde; }

.ekskludering-innhold {
  padding: 0.8rem 1rem 1rem;
}

.ekskludering-info {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 0.8rem;
}

.ekskludering-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.4rem 1.5rem;
}

.ekskludering-grid label {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.ekskludering-fast {
  color: #aaa;
  cursor: default !important;
}

.ekskludering-fast .lås {
  font-size: 0.75rem;
}

.ekskl-hint {
  color: #bbb;
  font-size: 0.78rem;
  margin-left: 0.2rem;
}

/* ── Auth ──────────────────────────────────────────── */

#view-auth {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-kort {
  background: white;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  max-width: 400px;
  width: 100%;
}

.auth-kort h2 {
  font-size: 1.25rem;
  color: #1a1a2e;
  margin-bottom: 1.4rem;
}

.auth-felt {
  margin-bottom: 1rem;
}

.auth-felt label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.35rem;
}

.auth-felt input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

.auth-felt input:focus {
  outline: none;
  border-color: #4a6cf7;
}

.auth-feil {
  color: #c62828;
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

.auth-bytt {
  font-size: 0.84rem;
  color: #666;
  margin-top: 0.8rem;
}

.auth-bytt a {
  color: #4a6cf7;
  text-decoration: none;
}

.auth-bytt a:hover { text-decoration: underline; }

/* ── Bruker-info i header ──────────────────────────── */

.bruker-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

.bruker-info button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bruker-info button:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

/* ── Prosjekt-dashboard ────────────────────────────── */

#view-projects {
  background: white;
  border-radius: 8px;
  padding: 1.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.prosjekt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}

.prosjekt-header h2 {
  font-size: 1.15rem;
  color: #1a1a2e;
}

.prosjekt-liste {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.prosjekt-kort {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: #f9fafc;
  border: 1px solid #e4e7f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prosjekt-kort:hover {
  border-color: #4a6cf7;
  box-shadow: 0 2px 10px rgba(74,108,247,0.10);
}

.prosjekt-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prosjekt-info strong {
  font-size: 0.97rem;
  color: #1a1a2e;
}

.prosjekt-meta {
  font-size: 0.8rem;
  color: #888;
}

.prosjekt-dato {
  font-size: 0.78rem;
  color: #aaa;
}

.slett-prosjekt {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  opacity: 0.45;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}

.slett-prosjekt:hover {
  opacity: 1;
  background: #ffebee;
}

.nytt-prosjekt-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nytt-prosjekt-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.92rem;
}

.nytt-prosjekt-form input:focus {
  outline: none;
  border-color: #4a6cf7;
}

.ingen-prosjekter {
  color: #aaa;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.feil-tekst {
  color: #c62828;
  font-size: 0.88rem;
}

/* ── Krav-banner ───────────────────────────────────── */

.krav-banner {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
