/* Office portal — Bunker Master PRO.
   "Tide" redesign (owner decision 2026-10-25, blend): the app's design
   language with Oldendorff's blue #043148 for the sidebar and their logo,
   unaltered, at its top; ocean teal for actions. Replaces the 2026-10-25
   morning layout (white top bar, blue tab band, red rule).
   Sign-in: the live sea scene of ocean.js behind a glass card. */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.woff2?v=20261025") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --side: #043148;
  --side-2: #0a4566;
  --red: #a62c1c;
  --bg: #f3f6fa;
  --card: #ffffff;
  --card-alt: #f8fafc;
  --ink: #0b1f33;
  --heading: #0b1f33;
  --muted: #5e7184;
  --line: #e3e9f0;
  --soft: #eef2f6;
  --primary: #0e8a8a;
  --primary-hover: #0b7474;
  --primary-tint: #e6f5f4;
  --primary-ink: #0b6e6e;
  --accent: #0b6e6e;
  --focus: #0e8a8a;
  --bad: #c53030;
  --s-not: #4f6273;
  --s-not-bg: #eef2f6;
  --s-prog: #2f6fde;
  --s-prog-bg: #eaf1fe;
  --s-done: #13804d;
  --s-done-bg: #e7f6ee;
  --s-off: #b42318;
  --s-off-bg: #fdecec;
  --brass: #97610a;
  --brass-bg: #fdf4e3;
  --violet: #6a4cc7;
  --violet-bg: #f1edfc;
  --shadow: 0 1px 2px rgba(11, 31, 51, .05), 0 10px 28px rgba(11, 31, 51, .07);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11";
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --side: #031f2e;
    --side-2: #073348;
    --bg: #08131e;
    --card: #0f1e2c;
    --card-alt: #132433;
    --ink: #e8f0f7;
    --heading: #f1f6fa;
    --muted: #93a6b8;
    --line: #243a4f;
    --soft: #18293a;
    --primary: #1aa79d;
    --primary-hover: #2bc4b4;
    --primary-tint: rgba(43, 196, 180, .14);
    --primary-ink: #5edccd;
    --accent: #5edccd;
    --focus: #5edccd;
    --bad: #ff8a8a;
    --s-not: #b4c3d1;
    --s-not-bg: #18293a;
    --s-prog: #8db2ff;
    --s-prog-bg: rgba(47, 111, 222, .18);
    --s-done: #3dd68c;
    --s-done-bg: rgba(21, 150, 90, .18);
    --s-off: #ff9a8a;
    --s-off-bg: rgba(217, 59, 59, .18);
    --brass: #f0b54f;
    --brass-bg: rgba(224, 167, 62, .16);
    --violet: #b9a5ff;
    --violet-bg: rgba(124, 92, 219, .18);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.noscript { padding: 24px; }
[hidden] { display: none !important; }
.num, .stat b, .progress { font-variant-numeric: tabular-nums; }
.ico { display: inline-grid; place-items: center; flex: none; }
.ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- sign in */
.login {
  position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); grid-template-rows: auto 1fr auto;
  gap: 28px clamp(28px, 6vw, 96px); padding: clamp(18px, 2.6vw, 34px) clamp(18px, 4vw, 56px) clamp(22px, 4vw, 52px);
}
/* Painted sky and sea until the scene appears, and where WebGL is missing. */
.sea {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #3d78b6 0%, #8db6da 30%, #c9deec 39.5%, #2a5f86 40%, #0b3b5a 58%, #041f30 100%);
}
.sea canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
.sea canvas.shown { opacity: 1; }
.login::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 20, 31, .30) 0%, rgba(2, 20, 31, 0) 20%, rgba(2, 20, 31, 0) 44%, rgba(2, 20, 31, .66) 100%);
}
.login-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login .brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand-tile { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(2, 20, 31, .25); }
.brand-tile img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; text-shadow: 0 1px 12px rgba(2, 20, 31, .35); }
.brand-name b { font-weight: 800; color: #7cf2d8; }
.brand-name small { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: .85; }
.back-site { color: #0b1f33; font-size: 13px; font-weight: 600; text-decoration: none; background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); padding: 8px 14px; border-radius: 999px; }
.back-site:hover { background: #fff; }

.login-hero { grid-column: 1; grid-row: 3; align-self: end; max-width: 680px; text-shadow: 0 1px 26px rgba(2, 20, 31, .4); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7cf2d8; }
.eyebrow::before { content: ''; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.login-hero h1 { font-weight: 800; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 20px; }
.login-hero h1 em { font-style: normal; color: #7cf2d8; }
.login-hero > p:not(.eyebrow) { font-size: 17px; line-height: 1.55; max-width: 46ch; margin: 0 0 24px; color: rgba(255, 255, 255, .9); }
.role-strip { display: flex; flex-wrap: wrap; gap: 10px; max-width: 700px; }
.role-strip div {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 13px; color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); text-shadow: none;
}
.role-strip b { color: #fff; font-weight: 700; }

.login-panel { grid-column: 2; grid-row: 2 / 4; align-self: center; }
.login-card {
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); color: #0b1f33; border-radius: 28px; padding: 38px 36px 30px;
  box-shadow: 0 30px 80px rgba(2, 20, 31, .32), 0 2px 8px rgba(2, 20, 31, .12);
}
.login-card h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: #0b1f33; margin: 0 0 6px; }
.login-card p { color: #5e7184; margin: 0 0 18px; }
.login-card label.field { color: #3c5266; }
.login-card .input { background: #fff; color: #0b1f33; border-color: #e3e9f0; }
.login-card .btn-3d { width: 100%; margin-top: 22px; height: 52px; font-size: 15px; }
.login-card .linkish { color: #0b6e6e; }
.login-card .message.bad { color: #b42318; }

label.field { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(14, 138, 138, .14); }
.linkish { background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font-weight: 600; font-size: 13px; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.message { min-height: 1.5em; margin-top: 14px; font-size: 13px; }
.message.bad { color: var(--bad); }

/* The main button (Sign in, Emergency mode). */
.btn-3d {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700;
  color: #fff; background: var(--primary);
  box-shadow: 0 1px 2px rgba(14, 138, 138, .3), 0 8px 20px rgba(14, 138, 138, .22);
  transition: background .15s ease, transform .08s ease;
}
.btn-3d:hover { background: var(--primary-hover); }
.btn-3d:active { transform: translateY(1px); }
.btn-3d:disabled { opacity: .6; cursor: default; transform: none; }
.btn-3d:focus-visible { outline: 3px solid rgba(14, 138, 138, .35); outline-offset: 3px; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--side) 264px, transparent 264px); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 10;
  background: var(--side); color: #fff; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px 16px;
}
.side-brand { display: flex; flex-direction: column; gap: 12px; }
.side .oldendorff-tile { background: #fff; border-radius: 14px; padding: 12px 14px; display: grid; place-items: center; }
.side .oldendorff { display: block; width: 100%; max-width: 200px; height: auto; }
.side .product { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 0 6px; }
.side .product img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; }
.side .product span { font-size: 14px; font-weight: 750; line-height: 1.2; }
.side .product b { color: #5edccd; font-weight: 800; }
.side .product small { display: block; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .62); }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
  background: none; color: rgba(255, 255, 255, .74); cursor: pointer; font-weight: 550; text-align: left; white-space: nowrap;
}
.tabs button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.tabs button[aria-current="page"] { background: rgba(94, 220, 205, .14); color: #fff; font-weight: 650; }
.tabs button[aria-current="page"] .ico { color: #5edccd; }
.tabs button:focus-visible { outline: 2px solid #5edccd; outline-offset: -2px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side .company { color: rgba(255, 255, 255, .62); font-size: 12px; padding: 0 6px; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-size: 13px; }
.who .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0e8a8a, #2f6fde); }
.who .who-name { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip { color: #5edccd; background: rgba(94, 220, 205, .12); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.side-actions { display: flex; gap: 8px; }
.side-actions .btn { flex: 1; justify-content: center; background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .16); }
.side-actions .btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 13px; font-weight: 650; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible { outline: 3px solid rgba(14, 138, 138, .3); outline-offset: 2px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }

main.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 36px) 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; color: var(--heading); margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 80ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 24px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat .ico { width: 42px; height: 42px; border-radius: 12px; color: var(--primary-ink); background: var(--primary-tint); }
.stat:nth-child(5n + 2) .ico { color: var(--s-prog); background: var(--s-prog-bg); }
.stat:nth-child(5n + 3) .ico { color: var(--brass); background: var(--brass-bg); }
.stat:nth-child(5n + 4) .ico { color: var(--s-done); background: var(--s-done-bg); }
.stat:nth-child(5n + 5) .ico { color: var(--violet); background: var(--violet-bg); }
.stat b { display: block; font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; color: var(--heading); }
.stat span:not(.ico) { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.section { margin-top: 30px; }
.section h2 { font-size: 17px; font-weight: 750; letter-spacing: -.01em; color: var(--heading); margin: 0 0 12px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--card-alt); }

.person-card h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--heading); }
.person-card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; word-break: break-all; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.mini-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-list li:last-child { border-bottom: 0; }

/* Jobs board (Overview): active jobs by status. */
.board { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lane { background: var(--soft); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-weight: 700; font-size: 13.5px; }
.lane-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--s-not); }
.lane.in_progress .dot { background: var(--s-prog); }
.lane.completed .dot { background: var(--s-done); }
.lane-head em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--card); padding: 1px 8px; border-radius: 999px; }
.job { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(11, 31, 51, .05); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.job b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .meta { font-size: 12px; color: var(--muted); }
.lane .more { font-size: 12.5px; text-align: center; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.not_started { color: var(--s-not); background: var(--s-not-bg); }
.pill.in_progress, .pill.reading { color: var(--s-prog); background: var(--s-prog-bg); }
.pill.completed { color: var(--s-done); background: var(--s-done-bg); }
.pill.cancelled, .pill.unreadable { color: var(--s-off); background: var(--s-off-bg); }
.verdict { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--soft); }
.verdict.accepted { color: var(--s-done); background: var(--s-done-bg); }
.verdict.remarks { color: var(--brass); background: var(--brass-bg); }
.verdict.returned { color: var(--s-off); background: var(--s-off-bg); }

.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 650; }
.progress .bar { flex: 1; }

.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-bottom: 0; }
th:first-child { border-radius: 12px 0 0 12px; }
th:last-child { border-radius: 0 12px 12px 0; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 180px; }

form.inline { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
form.inline .wide { grid-column: 1 / -1; }
.perm { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; font-size: 12.5px; white-space: nowrap; }
.perm input, .switch input { accent-color: var(--primary); width: 16px; height: 16px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }

/* ------------------------------------------------------------ dialogs */
/* A side panel on wide screens, the full screen on phones. */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(11, 31, 51, .40); backdrop-filter: blur(2px); display: flex; justify-content: flex-end; }
.dialog {
  background: var(--bg); color: var(--ink); width: min(780px, 100%); height: 100%; overflow: auto;
  padding: 24px 28px 32px; box-shadow: -30px 0 80px rgba(11, 31, 51, .25); animation: panel-in .22s ease-out;
}
@keyframes panel-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: -24px -28px 18px; padding: 22px 28px 18px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: -24px; z-index: 1; }
.dialog-head h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--heading); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; margin: 10px 0 18px; }
.facts div { font-size: 13.5px; font-weight: 550; }
.facts span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.source { border-radius: var(--radius); padding: 14px 18px 4px; margin: 6px 0 14px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.source.server { box-shadow: inset 0 0 0 1.5px rgba(14, 138, 138, .35); }
.source > h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px !important; font-weight: 750; margin: 0 0 4px !important; color: var(--muted); }
.source.server > h3 { color: var(--primary-ink); }
.source .facts { margin-bottom: 10px; }
.checklist { display: grid; gap: 9px; background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: inset 0 0 0 1.5px var(--line); }
.checklist .row { display: grid; grid-template-columns: 190px 1fr 110px; gap: 12px; align-items: center; font-size: 13.5px; }
.notice { font-size: 12.5px; color: var(--muted); padding: 12px 14px; background: var(--s-prog-bg); border-radius: var(--radius-sm); margin-top: 16px; line-height: 1.5; }

.emergency { position: fixed; inset: 0; z-index: 60; background: var(--side); display: flex; flex-direction: column; }
.emergency-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #fff; font-size: 13px; }
.emergency-bar .tag { background: var(--red); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; }
.emergency-bar .spacer { flex: 1; }
.emergency-bar .btn { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .3); }
.emergency iframe { flex: 1; border: 0; width: 100%; background: #fff; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; background: #0b2540; color: #fff; padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); max-width: calc(100vw - 32px); font-weight: 600; }
.toast.bad { background: #b42318; }

@media (max-width: 1100px) {
  .board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 22px; }
  .login-panel { grid-column: 1; grid-row: 2; align-self: start; margin-top: 24vh; }
  .login-hero { grid-row: 3; }
  .login-card { padding: 28px 22px 22px; border-radius: 24px; }

  /* The sidebar becomes a top bar with scrolling tabs. */
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: sticky; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 14px; }
  .side-brand { flex-direction: row; align-items: center; flex: 0 1 auto; min-width: 0; gap: 10px; }
  .side .oldendorff-tile { padding: 6px 10px; border-radius: 10px; flex: 0 1 auto; min-width: 0; }
  .side .oldendorff { width: auto; height: 22px; max-width: 46vw; }
  .side .product { padding: 0; flex: none; }
  .side .product span, .side .company { display: none; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
  .who { padding: 0; background: none; }
  .who .who-name { display: none; }
  .side-actions { gap: 6px; }
  .side-actions .btn { flex: none; width: 38px; padding: 0; justify-content: center; }
  .side-actions .btn .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs { order: 3; width: 100%; flex-direction: row; overflow-x: auto; margin: 0 -14px; padding: 0 10px; width: calc(100% + 28px); }
  .tabs button { width: auto; flex: none; min-height: 40px; }
  main.content { padding: 20px 14px 48px; }
  .checklist .row { grid-template-columns: 1fr; gap: 4px; }
  .dialog { padding: 20px 16px 28px; }
  .dialog-head { margin: -20px -16px 16px; padding: 16px; top: -20px; }
}
/* Phones: table rows become cards; each cell shows its column name. */
@media (max-width: 760px) {
  .table-wrap { background: none; box-shadow: none; padding: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 14px; margin-bottom: 12px; }
  .table-wrap td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td:first-child { display: block; text-align: left; font-size: 15px; }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td .actions { justify-content: flex-start; }
  .table-wrap td .progress { min-width: 160px; }
  .filters .input { min-width: 0; flex: 1; }
}
@media (max-width: 480px) {
  .back-site { display: none; }
  .who .role-chip { display: none; }
  .login-hero h1 { font-size: 38px; }
  .login-hero > p:not(.eyebrow) { font-size: 15px; }
  .side-actions .btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sea canvas { transition: none; }
  .dialog { animation: none; }
}
@media print {
  .side, .tabs, .btn, .overlay > .dialog .dialog-head .btn, .filters, .toast { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .overlay { position: static; background: none; padding: 0; display: block; backdrop-filter: none; }
  .dialog { max-height: none; height: auto; width: 100%; padding: 0; box-shadow: none; background: #fff; animation: none; }
  .dialog-head { position: static; margin: 0 0 12px; padding: 0; border: 0; }
  body.printing-dialog #app { display: none; }
}
