@font-face {
  font-family: Outfit;
  src: url("/outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --blue: #243bb2;
  --ink: #24213a;
  --muted: #5b596b;
  --canvas: #e1e0e7;
  --field: #f3f2f7;
  --line: #cfcedb;
  --width: 880px;
  font: 400 16px/1.45 Outfit,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body,h1,h2,h3,p { margin: 0; }
header { background: white; border-bottom: 1px solid var(--line); }
.masthead,.navigation,main { width: min(calc(100% - 32px),var(--width)); margin-inline: auto; }
.masthead,.navigation,.brand,.bar,.row,.actions { display: flex; align-items: center; gap: 12px; }
.masthead,.navigation,.bar { justify-content: space-between; }
.masthead { min-height: 52px; padding: 10px 0; }
.brand { gap: 9px; color: var(--blue); font-size: 15px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.brand::before { content: ""; width: 20px; height: 20px; border-radius: 4px; background: var(--blue); }
.brand span { color: var(--muted); letter-spacing: normal; text-transform: none; font-size: 14px; font-weight: 400; }
#account { font-size: 13px; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
a { color: var(--blue); }
.navigation { gap: 8px; }
nav { display: flex; flex-wrap: wrap; align-self: stretch; }
nav button { border: 0; border-radius: 0; border-bottom: 3px solid transparent; color: var(--muted); padding-inline: 14px; font-weight: 500; }
nav button[aria-current=page] { color: var(--blue); border-color: var(--blue); }
#context label { display: flex; align-items: center; gap: 8px; }
#context br { display: none; }
#context select { min-height: 34px; padding: 4px 8px; max-width: 150px; }
main { padding-block: 24px 64px; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p,.muted,small { color: var(--muted); }
small { font-size: 13px; }
.sub { margin-top: 5px; }
.bar,.row,.actions { flex-wrap: wrap; }
.bar { margin-bottom: 16px; }
.actions { margin-top: 14px; align-items: end; }
.metrics,.grid,.stack { display: grid; gap: 12px; }
.metrics { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 16px 0 24px; color: white; background: var(--blue); padding: 16px 18px; border-radius: 10px; }
.metric strong,.metric span { display: block; }
.metric strong { font-size: 26px; line-height: 1.15; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric span { font-size: 13px; }
.card,details.vessel { background: white; border: 1px solid var(--line); border-radius: 10px; }
.card { padding: 16px; margin-bottom: 14px; }
.stack>.card { margin-bottom: 0; }
.card>h2 { margin-bottom: 10px; }
.grid { grid-template-columns: repeat(auto-fit,minmax(152px,1fr)); }
label { color: var(--muted); font-size: 14px; }
.grid label,.actions label,.stack>label,.filelabel { display: grid; gap: 4px; }
input,select,textarea,button,.button { font: inherit; }
input,select,textarea { background: var(--field); color: var(--ink); min-height: 44px; width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 16px; }
input[type=checkbox] { width: auto; min-height: auto; accent-color: var(--blue); }
input[type=file] { font-size: 14px; padding: 8px; }
.document-drop { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 12px; border: 1px dashed var(--muted); border-radius: 8px; }
.document-drop.dragging,.document-drop:focus-within { background: var(--field); border-color: var(--blue); }
.document-drop [role=status] { overflow-wrap: anywhere; }
.document-drop [role=status]:empty { display: none; }
.attachment-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(140px,220px) auto; gap:8px; align-items:center; margin-top:6px; }
.attachment-row span { overflow-wrap:anywhere; }
.delete-button { color:#922d35; }
@media (max-width:540px) { .attachment-row { grid-template-columns:minmax(0,1fr) auto; } .attachment-row span { grid-column:1/-1; } }
input[type=search] { width: min(100%,260px); }
textarea { min-height: 70px; }
button,.button { border: 1px solid var(--line); border-radius: 8px; padding: 10px 15px; min-height: 42px; background: white; color: var(--blue); font-weight: 600; cursor: pointer; }
button:hover { background: var(--field); }
button.primary { background: var(--blue); color: white; border-color: var(--blue); }
button.primary:hover { background: #1c3092; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
details.vessel { margin-block: 10px; overflow: hidden; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 600; }
summary span { float: right; color: var(--muted); font-weight: 400; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: white; }
th,td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: var(--field); font-weight: 500; }
td button.link { padding: 0; border: 0; background: transparent; text-decoration: underline; }
.tag,.count { display: inline-block; background: #e9ecfc; color: var(--blue); font-size: 13px; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.count { background: #faeade; color: var(--ink); }
.departed { background: var(--field); color: var(--muted); }
.identifier { display: block; overflow-wrap: anywhere; font-size: 12px; }
.editor { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.lines { display: grid; grid-template-columns: 1.4fr repeat(5,1fr) auto; gap: 8px; align-items: end; border-bottom: 1px solid var(--line); padding: 12px 0; }
.lines label { display: grid; gap: 4px; font-size: 13px; }
.stack>label.check { display: flex; align-items: center; gap: 8px; }
.empty { padding: 18px; background: white; border: 1px solid var(--line); border-radius: 10px; }
#message:not(:empty) { margin-bottom: 16px; background: white; border-left: 4px solid var(--blue); padding: 12px 16px; }
dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; }
dt { font-size: 13px; color: var(--muted); }
dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.filelist { padding-left: 20px; }
#labels { display: none; }
@media (max-width: 700px) {
  .navigation { flex-direction: column-reverse; align-items: start; }
  #context { padding-block: 4px; }
  nav button { padding: 8px; font-size: 14px; }
  .lines { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .bar { gap: 8px; }
  #account { max-width: 48%; }
  summary span { float: none; display: block; }
}
@media (max-width: 460px) {
  .brand { flex-wrap: wrap; gap: 5px; }
  .brand span { flex-basis: 100%; }
  .metrics { padding: 12px; gap: 8px; }
  .metric span { font-size: 12px; }
  .grid { grid-template-columns: 1fr; }
  .actions label { width: 100%; }
}
@media print {
  @page { margin: 6mm; }
  body { background: white; }
  header,main { display: none !important; }
  #labels { display: block; }
  .label { break-after: page; break-inside: avoid; font-size: 14pt; color: black; }
  .label:last-child { break-after: auto; }
  .label h2 { font-size: 24pt; margin: 3mm 0; }
  .label strong { display: block; margin: 3mm 0; }
  .label-inbound { margin-top: 3mm; }
  .label-inbound strong { display: inline-block; margin: 0 0 0 2mm; font-size: 18pt; }
}
