/* Aqua Portal: forside. Flat-stilen: ikoner direkte på fladen, rækker med tynde streger, fliser kun til de få apps. */
@font-face { font-family: "Hanken"; src: url("fonts/hanken-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("fonts/hanken-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --bg: #0f1424;
  --surface: #151c31;
  --surface-hi: #1b2440;
  --line: rgba(170, 195, 235, 0.12);
  --ink: #edf2fa;
  --muted: #94a3bd;
  --faint: #64728c;
  --accent: #7cc4ff;
  --ok: #3ccf8e;
  --warn: #ffb547;
  --bad: #ff6b6b;
  --edit: #6aa8ff;
  --app-shelfie: #f2c26b;
  --app-data: #7cc4ff;
  --app-cal: #8ee0b5;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-hi: #eef1f6;
  --line: rgba(20, 35, 60, 0.10);
  --ink: #111a2b;
  --muted: #5a677d;
  --faint: #8a95a8;
  --accent: #1f6fd1;
  --ok: #17915a;
  --warn: #b86e00;
  --bad: #d23c3c;
  --edit: #1f6fd1;
  --app-shelfie: #b7791f;
  --app-data: #1f6fd1;
  --app-cal: #1b8a5a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
.ic { width: 1em; height: 1em; fill: currentColor; flex: none; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
body.wide .wrap { max-width: none; padding: 0 40px; }

/* Topbar */
.top { display: flex; align-items: center; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.brand-org { font-size: 13px; color: var(--muted); margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); }
.top-sp { flex: 1; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); font-size: 22px; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-hi); color: var(--ink); }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 22px; transition: background .15s; }
.me:hover { background: var(--surface-hi); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-hi); color: var(--accent); }
.me-name { font-size: 14.5px; font-weight: 600; }
.me-role { font-size: 12.5px; color: var(--muted); }

/* Hilsen */
.hello { padding: 56px 0 40px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hello h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.025em; margin: 12px 0 14px; font-weight: 700; }
.hello p { font-size: 18px; color: var(--muted); margin: 0; max-width: 680px; }
.hello p b { color: var(--ink); font-weight: 600; }

/* App-fliser */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.apps.n1 { grid-template-columns: minmax(0, 420px); }
.apps.n2 { grid-template-columns: repeat(2, 1fr); }
.app {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 26px 26px 22px; min-height: 216px; border-radius: 16px;
  background: var(--surface); text-align: left;
  transition: background .2s, transform .2s;
}
.app:hover { background: var(--surface-hi); transform: translateY(-2px); }
.app:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-ic { font-size: 40px; margin-bottom: 14px; }
.app-name { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.app-desc { font-size: 14.5px; color: var(--muted); }
.app-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.app-foot .go { margin-left: auto; font-size: 22px; color: var(--faint); transition: transform .2s, color .2s; }
.app:hover .go { transform: translateX(4px); color: var(--ink); }
.app-tag { position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); }
.dot.idle { background: var(--faint); }
.dot.live { box-shadow: 0 0 0 0 rgba(60, 207, 142, .5); animation: puls 2.4s infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 142, .45); } 70% { box-shadow: 0 0 0 8px rgba(60, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 142, 0); } }

/* To kolonner med rækker */
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; margin-top: 64px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.sec-h h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.sec-h .more { margin-left: auto; font-size: 14px; color: var(--accent); }
.sec-h .more:hover { text-decoration: underline; }

.row { display: flex; align-items: center; gap: 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; transition: background .15s; border-radius: 0; }
.row:hover { background: linear-gradient(90deg, transparent, var(--surface) 12%, var(--surface) 88%, transparent); }
.row-ic { font-size: 28px; color: var(--muted); }
.row-main { flex: 1; min-width: 0; }
.row-t, .row-s { display: block; }
.row-t { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 14.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-r { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.row-go { font-size: 22px; color: var(--faint); }
.state { font-weight: 600; }
.state.sea { color: var(--ok); }
.state.port { color: var(--muted); }

.when { width: 52px; flex: none; text-align: center; }
.when-d { font-size: 24px; font-weight: 700; line-height: 1; }
.when-m { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.ship-tag { font-weight: 600; }
.ship-tag.dana { color: var(--app-data); }
.ship-tag.havfisken { color: var(--app-cal); }

.note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 14.5px; color: var(--muted); }
.note .ic { font-size: 20px; margin-top: 1px; }

/* Bund */
.foot { margin: 88px 0 0; padding: 22px 0 96px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: var(--faint); }
.foot span { display: inline-flex; align-items: center; gap: 6px; }
.foot .ic { font-size: 16px; }

/* Login */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.signin-l { padding: 48px 64px; display: flex; flex-direction: column; }
.signin-box { margin: auto 0; max-width: 400px; }
.signin-box h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.025em; margin: 14px 0 12px; }
.signin-box p { color: var(--muted); font-size: 16px; margin: 0 0 32px; }
.btn-main { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border-radius: 12px; background: var(--accent); color: #06182c; font-size: 16px; font-weight: 700; transition: filter .15s, transform .15s; }
:root[data-theme="light"] .btn-main { color: #fff; }
.btn-main:hover { filter: brightness(1.08); }
.btn-main:active { transform: scale(.99); }
.btn-main .ic { font-size: 22px; }
.links { margin-top: 22px; display: flex; flex-direction: column; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; }
.link-row:hover { color: var(--accent); }
.link-row .ic { font-size: 22px; color: var(--muted); }
.link-row .row-go { margin-left: auto; }
.fine { margin-top: 28px; font-size: 13px; color: var(--faint); display: flex; gap: 8px; }
.fine .ic { font-size: 16px; margin-top: 2px; }
.signin-r { position: relative; overflow: hidden; background: var(--surface); }
.signin-r canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.signin-cap { position: absolute; left: 48px; top: 48px; right: 48px; }
.signin-cap .row-t { font-size: 20px; }

/* Prototype-bjælke (kun demo) */
.proto { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; background: var(--surface-hi); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: 13.5px; z-index: 10; white-space: nowrap; }
.proto-l { padding: 0 10px 0 8px; color: var(--muted); font-weight: 600; }
.proto button { padding: 7px 12px; border-radius: 9px; color: var(--muted); }
.proto button:hover { color: var(--ink); }
.proto button.on { background: var(--bg); color: var(--ink); font-weight: 600; }

/* Indtoning */
.fade { animation: ind .5s both; }
.fade.d1 { animation-delay: .05s; } .fade.d2 { animation-delay: .1s; } .fade.d3 { animation-delay: .15s; } .fade.d4 { animation-delay: .2s; }
@keyframes ind { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade, .dot.live { animation: none; } .app, .app .go { transition: none; } }

/* Mobil */
@media (max-width: 860px) {
  .wrap, body.wide .wrap { padding: 0 20px; }
  .brand-org, .me-txt { display: none; }
  .hello { padding: 28px 0 28px; }
  .hello h1 { font-size: 32px; }
  .hello p { font-size: 16px; }
  .apps, .apps.n2 { grid-template-columns: 1fr; gap: 12px; }
  .app { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 18px 20px; }
  .app-ic { margin: 0; font-size: 32px; }
  .app-txt { flex: 1; min-width: 0; }
  .app-name { font-size: 19px; }
  .app-foot { width: 100%; padding-top: 10px; }
  .app-tag { top: 20px; right: 20px; }
  .cols { grid-template-columns: 1fr; gap: 40px; margin-top: 44px; }
  .signin { grid-template-columns: 1fr; }
  .signin-r { display: none; }
  .signin-l { padding: 28px 24px; }
  .proto { left: 12px; right: 12px; transform: none; overflow-x: auto; }
  .proto-l { display: none; }
}

/* Fælles data (store.js): hvor gemmes det, og beskeder om gemning */
.store-badge.ok { color: var(--c-cal, #3fbf7f); }
.store-note { position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%); z-index: 40; max-width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-size: 14.5px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.store-note .ic { font-size: 20px; flex: none; }
.store-note.ok .ic { color: #3fbf7f; }
.store-note.warn .ic { color: #f0a020; }
.store-note button { margin-left: auto; padding: 4px; border-radius: 8px; color: inherit; opacity: .7; }
.store-note button:hover { opacity: 1; }
@media print { .store-note { display: none !important; } }
/* Opdatering på vej (store.js): rolig besked øverst, ingen grund til panik */
.store-update { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: min(720px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 14px; background: #10233a; color: #e8eef8;
  border: 1px solid rgba(124, 196, 255, .35); font-size: 14px; line-height: 1.4; }
.store-update .ic { font-size: 22px; color: #7cc4ff; flex: none; }
.store-update.soon .ic, .store-update.restart .ic, .store-update.loading .ic { animation: store-spin 2.4s linear infinite; }
.store-update.ready .ic { color: #3fbf7f; }
.store-update b { font-weight: 700; }
.store-update button { margin-left: 12px; padding: 6px 12px; border-radius: 9px; background: #7cc4ff; color: #06182c; font-weight: 700; font-size: 13px; white-space: nowrap; }
@keyframes store-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .store-update .ic { animation: none; } }
