:root {
  --bg: #f2f1ed;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --ink: #111317;
  --ink-2: #2a2d33;
  --muted: #6b6f76;
  --line: rgba(17, 19, 23, .08);
  --line-strong: rgba(17, 19, 23, .16);
  --accent: #2f54eb;
  --accent-2: #1f3fcc;
  --accent-soft: #e9edff;
  --ok: #16784f;
  --ok-bg: #e2f3ea;
  --warn: #9a5b00;
  --warn-bg: #fdf0d8;
  --bad: #c2362b;
  --bad-bg: #fce7e4;
  --info: #2f54eb;
  --info-bg: #e9edff;
  --grey-bg: #ecebe7;
  --violet: #6b3fb0;
  --violet-bg: #f0e9fb;
  --r-lg: 22px;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(17,19,23,.04), 0 8px 24px -12px rgba(17,19,23,.12);
  --shadow-lift: 0 2px 4px rgba(17,19,23,.05), 0 18px 40px -16px rgba(17,19,23,.22);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, #dfe5ff 0, transparent 60%),
    radial-gradient(900px 480px at 100% -4%, #fbe6d2 0, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* fine grain over the ambient gradient */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app, #modal-root, #toast { position: relative; z-index: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { width: 16px; height: 16px; flex: none; }
td .mono { white-space: nowrap; }

/* ---------- top navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 30; padding: 14px 20px 0; }
.topbar-in {
  max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 1px 0 rgba(17,19,23,.04), 0 12px 32px -18px rgba(17,19,23,.28);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name span { color: var(--muted); font-weight: 500; margin-left: 5px; }
.nav { display: flex; gap: 2px; margin: 0 auto; padding: 4px; background: rgba(17,19,23,.04); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--ink-2); padding: 7px 14px; border-radius: 999px; font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: background .25s var(--ease), color .25s var(--ease);
}
.nav a:hover { background: rgba(255,255,255,.9); text-decoration: none; }
.nav a.active { background: var(--ink); color: #fff; }
.count { background: var(--accent); color: #fff; font-weight: 600; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.nav a.active .count { background: #fff; color: var(--ink); }
.who { position: relative; }
.who-btn { border: 0; background: transparent; padding: 4px 10px 4px 4px; border-radius: 999px; gap: 10px; font-weight: 500; }
.who-btn:hover { background: rgba(17,19,23,.05); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; }
.who-text { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.who-text b { font-weight: 600; }
.who-text small { color: var(--muted); font-size: 11.5px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); animation: pop .18s var(--ease);
}
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); border: 0; background: none; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.menu a.active { background: var(--accent-soft); color: var(--accent-2); }
.menu button { color: var(--bad); margin-top: 4px; }

.main { max-width: 1320px; margin: 0 auto; padding: 36px 20px 80px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.back:hover { color: var(--ink); text-decoration: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2, .tile.flush > h2 { padding: 20px 22px 4px; }
.grid { display: grid; gap: 16px; }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + .grid { margin-top: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; color: inherit; box-shadow: var(--shadow);
  position: relative; transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
a.stat:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.stat .value { font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat.accent .label::before { background: var(--warn); }
.stat.bad .label::before { background: var(--bad); }
.stat.ok .label::before { background: var(--ok); }
.stat.info .label::before { background: var(--accent); }

/* ---------- dashboard bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-flow: dense; gap: 16px; }
.bento > * { margin: 0; }
.span2 { grid-column: span 2; }
.row2 { grid-row: span 2; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.hero-tile {
  position: relative; color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 280px;
  background:
    radial-gradient(520px 300px at 100% 0, rgba(47,84,235,.55), transparent 65%),
    radial-gradient(420px 260px at 0 100%, rgba(234,140,60,.28), transparent 60%),
    linear-gradient(160deg, #15181e, #0c0e12);
  border-color: transparent;
}
.hero-tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(180deg, transparent, #000 70%);
}
.hero-tile > * { position: relative; z-index: 1; }
.hero-tile .kicker { color: rgba(255,255,255,.62); font-weight: 500; }
.hero-tile .big { font-size: clamp(56px, 6vw, 88px); font-weight: 600; letter-spacing: -.05em; line-height: .95; }
.hero-tile .lead { font-size: 18px; font-weight: 500; letter-spacing: -.01em; max-width: 34ch; color: rgba(255,255,255,.9); }
.hero-tile .actions .btn { border-color: rgba(255,255,255,.18); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; background: transparent; }
thead th { border-bottom: 1px solid var(--line-strong); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s var(--ease); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.diff td { background: var(--bad-bg); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-PENDING, .b-ON_HOLD { background: var(--warn-bg); color: var(--warn); }
.b-APPROVED, .b-ISSUED { background: var(--info-bg); color: var(--info); }
.b-RECEIVED, .b-ACTIVE { background: var(--ok-bg); color: var(--ok); }
.b-REJECTED, .b-DISCREPANCY, .b-SHORT, .b-low { background: var(--bad-bg); color: var(--bad); }
.b-CANCELLED, .b-COMPLETED, .b-inactive { background: var(--grey-bg); color: var(--muted); }
.b-RESOLVED { background: var(--violet-bg); color: var(--violet); }
.role { text-transform: capitalize; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.tag { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }

/* ---------- buttons & forms ---------- */
button, .btn {
  font: inherit; font-weight: 500; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; justify-content: center;
  white-space: nowrap; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
button:hover, .btn:hover { border-color: rgba(17,19,23,.32); text-decoration: none; }
button:active, .btn:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.primary:hover { background: #262a31; border-color: #262a31; }
.accent-btn { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(47,84,235,.7); }
.accent-btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.good:hover { background: #10603f; border-color: #10603f; }
.danger { background: var(--surface); border-color: #efc2bd; color: var(--bad); }
.danger:hover { background: var(--bad-bg); border-color: #e6a39b; }
.light { background: #fff; border-color: #fff; color: var(--ink); }
.light:hover { background: #eef0f6; border-color: #eef0f6; }
.ghost-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.ghost-light:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.block { width: 100%; }
.sm { padding: 5px 12px; font-size: 12.5px; }
.sm .ic { width: 14px; height: 14px; }

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea {
  font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: rgba(17,19,23,.28); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,84,235,.14); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 14px;
  background: rgba(255,255,255,.6); border: 1px solid var(--line); border-radius: var(--r-lg); backdrop-filter: blur(8px);
}
.filters .field { margin: 0; min-width: 180px; flex: 0 1 240px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 12px; }
.alert { border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.warn { background: var(--warn-bg); color: #6d4300; border-color: #f4dcae; }
.alert.bad { background: var(--bad-bg); color: #7b1f15; border-color: #f4c6c0; }
.alert.ok { background: var(--ok-bg); color: #10533a; border-color: #bfe3cf; }
.alert.info { background: var(--info-bg); color: #1d358f; border-color: #cdd6ff; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 22px; border-left: 1px solid var(--line-strong); position: relative; margin-left: 5px; }
.timeline li::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); position: absolute; left: -6px; top: 15px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(12,14,18,.42); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .2s var(--ease); }
.modal { background: var(--surface); border-radius: var(--r-lg); width: min(880px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); animation: pop .28s var(--ease); }
.modal.narrow { width: min(480px, 100%); }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }
.x { border: 0; background: var(--surface-2); width: 34px; height: 34px; padding: 0; border-radius: 50%; color: var(--muted); }
.x:hover { background: var(--grey-bg); color: var(--ink); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lift); max-width: min(460px, calc(100vw - 32px)); animation: pop .25s var(--ease); }
.toast.err { background: var(--bad); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 420px at 85% 10%, rgba(47,84,235,.6), transparent 60%),
    radial-gradient(600px 400px at 0 100%, rgba(234,140,60,.35), transparent 60%),
    linear-gradient(160deg, #15181e, #090a0d);
}
.login-art::before {
  content: ""; position: absolute; inset: 0; opacity: .6;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.login-art > * { position: relative; }
.login-art .brand { color: #fff; }
.login-art .brand-mark { width: 44px; height: 44px; }
.login-art .brand-name span { color: rgba(255,255,255,.6); }
.hull { position: absolute; right: -6%; bottom: 18%; width: 78%; opacity: .9; }
.login-art h1 { font-size: clamp(32px, 3.6vw, 52px); letter-spacing: -.035em; line-height: 1.05; max-width: 18ch; }
.login-art p { color: rgba(255,255,255,.7); font-size: 16px; margin: 14px 0 0; max-width: 46ch; }
.login-panel { display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(380px, 100%); animation: rise .6s var(--ease) both; }
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 0 22px; }
.login-card h2 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 6px; }
.login-card > p { margin: 0 0 26px; }
.login-card .primary { padding: 12px 18px; margin-top: 6px; }
.demo { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.demo div { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- delivery note ---------- */
.dn { background: #fff; max-width: 840px; margin: 0 auto; padding: 44px 48px; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); color: #000; }
.dn-head { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 14px; margin-bottom: 18px; gap: 16px; }
.dn-head h1 { font-size: 26px; letter-spacing: .06em; }
.dn table th { background: #f1f1f1; color: #000; border: 1px solid #999; font-weight: 600; }
.dn table td, .dn table tbody tr:last-child td { border: 1px solid #999; }
.dn .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin-bottom: 18px; font-size: 13px; }
.dn .meta div { display: flex; gap: 8px; }
.dn .meta span { min-width: 120px; color: #555; }
.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.signs div { border-top: 1px solid #000; padding-top: 6px; font-size: 12px; text-align: center; }
.print-bar { max-width: 840px; margin: 0 auto 16px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.main > * { animation: rise .55s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .05s; }
.main > *:nth-child(3) { animation-delay: .1s; }
.main > *:nth-child(4) { animation-delay: .15s; }
.main > *:nth-child(n+5) { animation-delay: .2s; }
.bento > * { animation: rise .6s var(--ease) both; }
.bento > *:nth-child(2) { animation-delay: .06s; }
.bento > *:nth-child(3) { animation-delay: .1s; }
.bento > *:nth-child(4) { animation-delay: .14s; }
.bento > *:nth-child(5) { animation-delay: .18s; }
.bento > *:nth-child(n+6) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; }
  body::before, .topbar, .print-bar, .no-print, #toast { display: none !important; }
  .main { padding: 0; max-width: none; }
  .main > * { animation: none; }
  .dn { border: 0; padding: 0; max-width: none; box-shadow: none; }
  .card, .tile { border: 0; padding: 0; box-shadow: none; }
}

@media (max-width: 1000px) {
  .who-text { display: none; }
  .brand-name span { display: none; }
}
@media (max-width: 860px) {
  .topbar { padding: 10px 12px 0; }
  .topbar-in { flex-wrap: wrap; border-radius: 24px; padding: 8px; gap: 8px; }
  .brand { padding-left: 6px; }
  .who { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0; }
  .main { padding: 24px 16px 64px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kv { grid-template-columns: 110px 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; padding: 28px 24px; }
  .hull { width: 110%; bottom: 8%; opacity: .5; }
  .dn { padding: 22px 16px; }
  .dn .meta { grid-template-columns: 1fr; }
  .filters .field { flex: 1 1 100%; }
}

/* ======================================================================
   Logistics & purchasing workflow components
   ====================================================================== */
.b-PENDING_SPV, .b-PENDING_ADMIN, .b-PENDING_MANAGER { background: var(--warn-bg); color: var(--warn); }
.b-PROCESSING, .b-ORDERING, .b-READY_TO_DISPATCH, .b-DISPATCHED { background: var(--info-bg); color: var(--info); }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.accent { background: var(--accent-soft); color: var(--accent-2); }
.modal.wide { width: min(1100px, 100%); }
.sig-count { font-family: var(--mono); font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.sig-count.done { background: var(--ok-bg); color: var(--ok); }

/* stepper */
.stepper-card { padding: 18px 20px; overflow-x: auto; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; min-width: 760px; }
.stepper li { flex: 1; position: relative; padding: 0 8px; text-align: center; min-width: 96px; }
.stepper li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--accent); }
.stepper .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line-strong); color: #fff; }
.stepper .dot .ic { width: 14px; height: 14px; }
.stepper li.done .dot { background: var(--accent); border-color: var(--accent); }
.stepper li.current .dot { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(47,84,235,.15); }
.stepper li.stopped .dot { border-color: var(--bad); background: var(--bad-bg); }
.step-k { font-weight: 600; font-size: 12.5px; line-height: 1.25; }
.step-at { font-size: 11px; margin-top: 3px; color: var(--ink-2); }
.step-by { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.step-dur { display: inline-block; font-size: 10.5px; margin-top: 4px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* role action panels */
.action-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid #c9d3ff;
  background: linear-gradient(180deg, #f7f8ff, #fff); }
.action-card h2 { margin-bottom: 4px; }
.action-card p { margin: 0; }
.action-card.col { flex-direction: column; align-items: stretch; }
.action-card.col > .actions { justify-content: flex-end; }
.closure-card { border: 1px solid #f4dcae; background: linear-gradient(180deg, #fffaf0, #fff); }
.closure-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.closure-head h2 { margin-bottom: 4px; }
.closure-head p { margin: 0; }
.shop-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--surface); }
.shop-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.shop-line.total { border-bottom: 0; padding-top: 8px; }

/* signatures */
.sigpad { position: relative; border: 1px dashed var(--line-strong); border-radius: var(--r); background: #fff; }
.sigpad canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 18px; right: 18px; bottom: 30px; border-top: 1px solid var(--ink-2); padding-top: 4px; font-size: 11px; color: var(--muted); pointer-events: none; }
.sig-tools { display: flex; gap: 8px; margin-top: 8px; }
.sig-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.sig-slot { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; text-align: center; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.sig-slot.empty-slot { justify-content: center; border-style: dashed; background: var(--surface-2); }
.sig-slot.rejected { border-color: #efc2bd; background: var(--bad-bg); }
.sig-img { max-width: 100%; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.sig-name { font-weight: 600; font-size: 13px; }
.sig-rejected { color: var(--bad); font-weight: 600; padding: 18px 0; }
.sig-current { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; }
.sig-current .sig-img { height: 120px; }
.print-sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.print-sig { border: 1px solid #999; padding: 8px; text-align: center; font-size: 12px; }
.print-sig-img { height: 70px; display: grid; place-items: center; border-bottom: 1px solid #000; margin-bottom: 6px; }
.print-sig-img .sig-img { height: 64px; margin: 0; }
.print-sig-name { font-weight: 600; }

/* comparison & survey grids */
.compare td, .survey td { vertical-align: middle; }
.compare td.lowest { background: #f3fbf6; }
.compare td.chosen { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.compare tfoot td, .survey tfoot td { border-top: 1px solid var(--line-strong); background: var(--surface-2); }
.pick { display: flex; align-items: flex-start; gap: 8px; justify-content: flex-end; margin: 0; cursor: pointer; font-weight: 400; }
.pick input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.decision-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.decision-bar b { font-size: 18px; letter-spacing: -.02em; }
.survey th.shop-col { min-width: 190px; vertical-align: top; }
.shop-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.shop-head input { font-weight: 600; padding: 7px 10px; }
.survey .s-contact { padding: 6px 10px; font-size: 12px; }
.survey th.add-col { vertical-align: top; }
.price-in { display: flex; align-items: center; gap: 6px; }
.price-in span { color: var(--muted); font-size: 12.5px; }
.price-in input { text-align: right; padding: 8px 10px; }
.line-total { margin-top: 4px; text-align: right; min-height: 18px; }

/* purchasing workspace */
.workspace { border: 1px solid #c9d3ff; }
.ws-step { margin: 20px 0 10px; font-size: 13px; color: var(--accent-2); }
.ws-line { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; background: var(--surface); }
.ws-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ws-controls { display: grid; grid-template-columns: 2fr 1.4fr .8fr .8fr; gap: 12px; align-items: end; }
.ws-controls .field { margin: 0; }
.to-buy { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 600; text-align: right; }
.to-buy.buy { background: var(--warn-bg); color: var(--warn); }
.match-note, .new-item-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 12px; }
.match-note { background: var(--ok-bg); color: #10533a; border: 1px solid #bfe3cf; }
.new-item-note { background: var(--warn-bg); color: #6d4300; border: 1px solid #f4dcae; }
.match-note.no-stock { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-strong); }
.match-note > .ic, .new-item-note > .ic { margin-top: 2px; }
.match-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.match { justify-content: space-between; width: 100%; text-align: left; border-radius: var(--r-sm); background: #fff; flex-wrap: wrap; white-space: normal; color: var(--ink); }
.match.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.new-item-name { margin-top: 6px; font-weight: 600; color: var(--ink); }
.ws-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* worker typeahead */
.typeahead-wrap { overflow: visible; }
.card.flush:has(.typeahead-wrap) { overflow: visible; }
.typeahead { position: relative; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lift); padding: 4px; min-width: 300px; animation: pop .15s var(--ease); }
.sg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; border: 0; border-radius: 8px; padding: 8px 10px; background: none; white-space: normal; text-align: left; }
.sg:hover, .sg.on { background: var(--accent-soft); }
.sg-foot { padding: 6px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.l-hint { display: flex; align-items: center; gap: 4px; margin-top: 4px; min-height: 16px; }
.l-hint .ic { width: 13px; height: 13px; }
.l-hint.linked { color: var(--ok); }
.l-hint.new { color: var(--warn); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }

/* inventory & site */
.wh-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wh-chip { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.period { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: -4px 0 16px; padding: 12px 18px; border-radius: var(--r); background: rgba(255,255,255,.65); border: 1px solid var(--line); font-size: 13px; }
.period b { color: var(--muted); font-weight: 500; margin-right: 6px; }
.filters.inline { margin: 6px 22px 10px; padding: 0; background: none; border: 0; backdrop-filter: none; }
.project-banner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
  .ws-controls { grid-template-columns: 1fr 1fr; }
  .sig-grid { grid-template-columns: 1fr; }
  .action-card .actions { width: 100%; }
  .action-card .actions > * { flex: 1; }
  .print-sigs { grid-template-columns: 1fr; }
}
@media print {
  .stepper-card, #action-panel { display: none !important; }
  .compare td.chosen { box-shadow: none; background: #e8e8e8; }
}

/* ======================================================================
   v3: notifications, validation, settlement note, units, machinery, counts
   ====================================================================== */
.b-DRAFT_REVIEW { background: var(--warn-bg); color: var(--warn); }
.bell-wrap { position: relative; }
.bell { position: relative; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: transparent; }
.bell:hover { background: rgba(17,19,23,.05); }
.bell .ic { width: 19px; height: 19px; }
.bell .count { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 5px; }
.menu.notes { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; }
.note-item { display: flex !important; gap: 10px; align-items: flex-start !important; white-space: normal; line-height: 1.35; }
.note-n { flex: none; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.note-item.warn .note-n { background: var(--warn-bg); color: var(--warn); border-color: #f4dcae; }
.note-item.bad .note-n { background: var(--bad-bg); color: var(--bad); border-color: #f4c6c0; }
.pick-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 6px; padding: 4px; }
.pick-list:empty { display: none; }
.sig-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.validated-by { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.validated-by .sig-img { height: 48px; width: 140px; margin: 0; }
table.validation input { padding: 7px 9px; }
table.validation td { vertical-align: middle; }
.unit-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 12px; margin: 0 0 14px; }
.unit-box legend { font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 0 6px; }
.steps-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
details > summary { cursor: pointer; margin: 6px 0; }
table.snote td, table.snote th { padding: 8px 10px; }
.dn input { padding: 5px 8px; border-radius: 6px; }
@media (max-width: 860px) {
  .sig-grid.two { grid-template-columns: 1fr; }
  .bell-wrap { margin-left: auto; }
}
@media print {
  .bell-wrap { display: none !important; }
  .dn input { border: 0; padding: 0; width: auto !important; }
}

/* ---------- v4: material request, project page, printed documents ---------- */
.choose .choice h2 { display: flex; align-items: center; gap: 8px; }
.choice.disabled { opacity: .75; }
.radio-list { display: grid; gap: 6px; margin: 6px 0 14px; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
table.calc td { vertical-align: middle; padding: 6px 8px; }
table.calc input, table.calc select { padding: 6px 8px; font-size: 13px; }
table.calc td.res { min-width: 90px; }
tr.head-row td { background: var(--surface-2); }
table.calc-print { font-size: 13px; }
table.calc-print td { padding: 4px 8px; border-bottom: 1px solid var(--line); }
table.calc-print .mat { white-space: nowrap; font-weight: 500; }
table.calc-print tr.head-row td { padding-top: 10px; }
.wo-card .wo-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px 22px 10px; flex-wrap: wrap; }
.wo-card .wo-head h2 { margin: 0 0 4px; padding: 0; }
.mini-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; font-size: 13px; }
.mini-steps li { padding: 4px 10px; border-radius: 99px; background: var(--grey-bg); color: var(--muted); }
.mini-steps li.cur { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.mini-steps li.done { background: var(--ok-bg); color: var(--ok); }
.yna-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.yna-row select { width: auto; padding: 3px 6px; }
.note-item.unread { background: var(--accent-soft); }
.note-item .note-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: none; margin-top: 6px; }
.note-item.unread .note-dot { background: var(--accent); }
.print-only { display: none; }
.page-break { height: 0; }
/* document formats (IMSF) */
.doc { font-size: 13px; }
.doc h3 { font-size: 13px; margin: 16px 0 6px; text-transform: none; }
.doc-head { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 12px; }
.doc-head td { border: 1px solid #999; padding: 3px 8px; }
.doc-head td.k { width: 170px; color: #333; }
.doc-head .doc-logo { width: 34%; text-align: center; vertical-align: middle; }
.doc-co { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.doc-title { text-align: center; font-size: 18px; letter-spacing: .06em; margin: 10px 0 14px; }
.doc-kv { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.dn .doc-kv td, .doc-kv td { border: 0 !important; padding: 2px 6px; vertical-align: top; }
.doc-kv td.k { width: 230px; color: #222; }
.doc-two { display: grid; grid-template-columns: 1fr 200px; gap: 18px; }
.purpose div { margin: 3px 0; }
.cbx { font-size: 15px; line-height: 1; }
.sign-table { width: 100%; margin-top: 18px; text-align: center; }
.sign-table .sig-row td { height: 70px; }
.sign-table .sig-img { max-height: 60px; }
.print-sigs.three { grid-template-columns: repeat(3, 1fr); }
.sn-company { text-align: center; margin-bottom: 8px; }
.sn-kv { max-width: 560px; }
.sn-table { width: 100%; font-size: 12.5px; }
.sn-table td { padding: 3px 6px; }
.sn-table tr.sec td { font-weight: 700; background: #f4f4f4; }
.sn-table tr.sub td { padding-top: 8px; }
.sn-table .mat { font-weight: 600; }
.c { text-align: center; }
.wide-doc { max-width: 1100px; }
@media print {
  .print-only { display: block; }
  .page-break { page-break-before: always; break-before: page; }
  .doc { font-size: 11.5px; }
  .sn-table { font-size: 11px; }
}
.doc-head .doc-logo img { max-width: 210px; max-height: 92px; width: auto; height: auto; display: inline-block; }
.sn-letterhead { display: flex; align-items: center; justify-content: center; gap: 18px; border-bottom: 2px solid #1f2a7a; padding-bottom: 10px; margin-bottom: 8px; }
.sn-letterhead img { width: 84px; height: 84px; object-fit: contain; }
.sn-letterhead .sn-company { margin: 0; }
table.calc select[data-f="kind"] { width: 150px; }
table.calc select[data-f="size"] { width: 120px; display: inline-block; }
table.calc td.nowrap input, table.calc td.nowrap select { display: inline-block; vertical-align: middle; }
.dn.doc-next { margin-top: 24px; }
@media print { .dn.doc-next { margin-top: 0; break-before: page; page-break-before: always; } }
/* printed documents: compact cells that fit the page */
.doc table th, .doc table td { padding: 6px 8px; }
.doc table th { white-space: normal; }
.dn.sn-doc { max-width: 980px; }
.sn-doc table.sn-est { table-layout: fixed; }
.sn-doc table.sn-est td { overflow-wrap: anywhere; }

.radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 4px; }

/* invoice sheets (A4) */
@page inv { size: A4; margin: 0; }
.inv-sheet { position: relative; box-sizing: border-box; width: 210mm; height: 297mm; margin: 0 auto 18px; padding: 8mm 9mm 8mm; background: #fff; color: #000; overflow: hidden;
  font-family: Cambria, Georgia, 'Times New Roman', serif; font-size: 9px; line-height: 1.15; box-shadow: var(--shadow); }
.inv-logo { display: block; width: 52mm; height: auto; margin: 2mm 0 6mm 10mm; }
.inv-title { font-family: inherit; text-align: center; text-decoration: underline; font-size: 11.5px; font-weight: 700; letter-spacing: 0; margin: 3mm 0 5mm; }
.inv-to { display: flex; justify-content: space-between; margin-bottom: 2mm; font-size: 9.5px; line-height: 1.35; }
.inv-table, .kw-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-family: inherit; }
.inv-table th, .kw-table th { background: none; color: #000; font-size: 9.5px; font-weight: 700; text-align: center; padding: 6px 2px; border: 1.2px solid #000; white-space: normal; }
.inv-table td, .kw-table td { padding: 0 3px; border: 0; border-left: 1px solid #000; font-size: 9px; line-height: 1.15; vertical-align: middle; white-space: nowrap; overflow: hidden; }
.inv-table td.d { border-left: 0; padding: 0 1px; }
.inv-table td.sub { padding-left: 8px; }
.inv-table td:last-child, .kw-table td:last-child { border-right: 1px solid #000; }
.inv-table td.rp, .kw-table td.rp { padding-right: 0; }
.inv-table td.rp + td.num, .kw-table td.rp + td.num { border-left: 0; }
.inv-table tbody tr td { border-bottom: 1px solid #bbb; }
.inv-table tbody tr td.num { font-variant-numeric: tabular-nums; }
.inv-table tr.sp td { height: 11px; }
.inv-table td.t { text-overflow: ellipsis; }
.inv-table tr.tot td, .kw-table tr.tot td { border: 1px solid #000; padding: 2px 3px; font-size: 9.5px; }
.kw-table th { font-size: 10.5px; }
.kw-table td { font-size: 10.5px; padding: 2px 5px; white-space: normal; }
.kw-table tr.tot td { font-size: 10.5px; }
.kw-table tr.kw-row td { height: 30px; vertical-align: top; border-top: 1.2px solid #000; }
.inv-words { font-style: italic; font-weight: 700; margin: 3mm 0; font-size: 9.5px; }
.inv-close { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 10mm; margin-top: 3mm; font-size: 9.5px; line-height: 1.3; }
.inv-close.end { justify-content: flex-end; }
.inv-sign { text-align: center; min-width: 70mm; }
.inv-stamp { height: 22mm; }
.inv-page { position: absolute; left: 0; right: 0; bottom: 3mm; z-index: 2; text-align: center; font-size: 7px; font-weight: 700; }
.inv-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; font-family: Arial, Helvetica, sans-serif; }
.inv-addr { position: relative; z-index: 1; padding: 0 9mm; margin-bottom: -14mm; font-size: 9px; line-height: 1.35; }
.inv-addr table { margin-top: 3px; width: auto; }
.inv-addr td { padding: 0 8px 0 0; border: 0; font-size: 9px; }
.inv-foot svg { display: block; width: 100%; height: 26mm; }
.inv-sheet.kw .inv-foot { bottom: auto; top: 122mm; }
.inv-editor { max-width: 1100px; margin: 0 auto 18px; }
#doc-inv .inv-sheet.kw { height: 152mm; }
@media print {
  #doc-inv .inv-sheet, #doc-inv .inv-sheet.kw { page: inv; margin: 0; box-shadow: none; height: 297mm; break-after: page; page-break-after: always; }
  #doc-inv .inv-sheet:last-child { break-after: auto; page-break-after: auto; }
}

/* company document preset: yellow IMSF forms */
.dn table th { background: #f3cb14; color: #000; border: 1px solid #000; font-weight: 700; }
.dn table td, .dn table tbody tr:last-child td { border: 1px solid #000; }
.dn-head { border-bottom-color: #f3cb14; }
.doc h3 { background: #f3cb14; color: #000; font-weight: 700; padding: 2px 6px; }
.doc-head td { border-color: #000; }
.print-sig { border-color: #000; }
.sn-letterhead { border-bottom: 3px double #000; }
.sn-doc table th { background: #9bc2e6; }
.sn-table tr.sec td { background: #ddebf7; }
table.calc-print tr.head-row td { background: #fff1cc; }
@media print { .dn table th, .doc h3, .sn-table tr.sec td, .rl-doc tr.sec td, .of-doc tr.sec td, table.calc-print tr.head-row td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* repair list and the Satisfaction Note paper */
.rl-bar { max-width: 980px; }
.dn.rl-doc { max-width: 980px; font-family: 'Segoe UI', Tahoma, Arial, sans-serif; font-size: 11.5px; line-height: 1.3; }
.rl-letter { display: flex; align-items: center; gap: 22px; border-bottom: 3px double #000; padding-bottom: 8px; margin-bottom: 18px; }
.rl-letter img { width: 190px; height: auto; flex: none; }
.rl-title { text-align: center; text-decoration: underline; font-size: 17px; font-weight: 700; margin: 0; }
.rl-no { text-align: center; font-weight: 700; margin-bottom: 16px; }
.dn table.rl-kv { width: auto; margin: 0 0 14px 44px; border-collapse: collapse; }
.dn table.rl-kv td, .dn table.rl-kv tbody tr:last-child td { border: 0; padding: 0 8px 0 0; }
.rl-kv td.k { min-width: 190px; }
.rl-kv td:last-child { padding-left: 34px; }
.dn table.rl-table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 2px solid #000; }
.rl-table thead { display: table-header-group; }
.dn .rl-table th { background: #9bc2e6; border: 2px solid #000; padding: 7px 2px; font-size: 11px; text-align: center; white-space: normal; }
.dn .rl-table td, .dn .rl-table tbody tr:last-child td { border: 0; border-bottom: 1px solid #bfbfbf; padding: 1px 3px; font-size: 10.5px; vertical-align: middle; overflow-wrap: anywhere; }
.dn .rl-table td:first-child, .dn .rl-table td:nth-last-child(1), .dn .rl-table td:nth-last-child(3) { border-left: 1px solid #000; border-right: 1px solid #000; }
.rl-table td:first-child { border-left: 0 !important; }
.rl-table td:nth-last-child(1) { border-right: 0 !important; }
.dn .rl-table tr.sec td { background: #ddebf7; }
.rl-table tr.sp td { height: 12px; }
.rl-table td.c { text-align: center; }
.rl-table td.num { text-align: right; }
.rl-close { margin-top: 12px; break-inside: avoid; }
.rl-close p { margin: 0 0 12px; }
.rl-signs { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid #000; margin-top: 4px; font-family: Cambria, Georgia, serif; font-size: 12px; }
.rl-signs > div { display: flex; flex-direction: column; align-items: center; padding: 4px; border-right: 2px solid #000; }
.rl-signs > div:last-child { border-right: 0; }
.rl-signs .img { height: 84px; display: grid; place-items: center; }
.rl-signs .img .sig-img { height: 78px; margin: 0; }
.rl-signs .n { text-decoration: underline; }
table.rl-edit tr.rl-sec td, .rl-tree tr.rl-sec td { background: #ddebf7; }
table.rl-edit tr.at td:first-child { box-shadow: inset 3px 0 0 var(--accent, #2563eb); }
.rl-tools { padding: 12px 18px; }
.rl-sig { max-width: 460px; }
.rl-tree { width: 100%; }
.rl-tree td { padding: 4px 10px; }
.rl-pick { max-height: none; }

/* quotation */
.dn.of-doc { max-width: 980px; font-family: Cambria, Georgia, 'Times New Roman', serif; font-size: 11px; line-height: 1.25; }
.of-logo { display: block; width: 150px; height: auto; }
.of-title { text-align: center; font-size: 18px; font-weight: 700; letter-spacing: .02em; margin: 6px 0 12px; font-family: inherit; }
.of-head { display: grid; grid-template-columns: 1.75fr 1fr; gap: 12px; padding: 0 34px 0 34px; margin-bottom: 12px; }
.dn .of-head table, .dn table.of-terms { width: 100%; border-collapse: collapse; }
.dn .of-head td, .dn .of-head tbody tr:last-child td, .dn .of-terms td, .dn .of-terms tbody tr:last-child td { border: 0; padding: 1px 4px; font-size: 11px; }
.of-head td.k { width: 42%; white-space: nowrap; }
.of-head td:nth-child(2) { width: 14px; }
.dn .of-head td.u, .dn .of-terms td.u { border-bottom: 1px solid #000; }
.of-head .lnk { color: #0462c1; text-decoration: underline; }
.dn table.of-table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1.5px solid #000; }
.of-table thead { display: table-header-group; }
.dn .of-table th { background: #f3cb14; border: 1.5px solid #000; padding: 6px 2px; font-size: 11px; text-align: center; white-space: normal; }
.dn .of-table td, .dn .of-table tbody tr:last-child td { border: 0; border-bottom: 1px solid #bfbfbf; border-left: 1px solid #000; padding: 1px 3px; font-size: 10.5px; }
.dn .of-table td.rp + td.num, .dn .of-table td:nth-child(4) { border-left: 0; }
.dn .of-table tr.sec td { background: #fff1cc; }
.of-table td.c { text-align: center; }
.of-table td.num { text-align: right; }
.of-table td.pre { white-space: pre-wrap; }
.of-table td.note { color: #e60012; font-style: italic; font-weight: 700; }
.of-table td.hint { vertical-align: middle; }
.of-table tr.sp td { height: 12px; }
.dn table.of-total { width: 30%; margin: 0 0 14px auto; border-collapse: collapse; }
.of-total td { padding: 1px 4px; font-size: 11px; }
.of-total td.tl { width: 62%; }
.of-total td.tv { text-align: right; }
.of-term { font-size: 11px; text-decoration: underline; margin: 0 0 14px 34px; font-family: inherit; }
.dn table.of-terms { width: 70%; margin-left: 34px; }
.of-terms td.k { width: 200px; }
.of-terms td:nth-child(2) { width: 12px; }
.of-sign { margin: 16px 0 0 34px; }
.of-stamp { height: 62px; }
.of-name { margin: 0 0 4px 34px; }
.dn table.of-ctl { width: auto; margin-left: 34px; border-collapse: collapse; border-top: 2px solid #777; border-bottom: 2px solid #777; font-family: Arial, sans-serif; }
.dn .of-ctl td, .dn .of-ctl tbody tr:last-child td { border: 0; padding: 0 18px 0 6px; font-size: 9.5px; }
table.of-edit tr.of-sec td { background: #fff1cc; }
@media print { .rl-doc, .of-doc { font-size: 10.5px; } .rl-signs { break-inside: avoid; } }
.dn .rl-table td.d { white-space: nowrap; padding: 1px 0; overflow-wrap: normal; }
.rl-signs .h { text-align: center; font-size: 11px; }
.dn .of-table td, .dn .of-table tbody tr:last-child td { padding: 0 3px; line-height: 1.2; white-space: normal; }
.of-table td.c { white-space: nowrap; }
.of-end { break-inside: avoid; }
@media print { #doc-inv .inv-sheet:last-child { height: 296mm; } }

/* purchase order and delivery order (plain, as the yard's sheets) */
.dn.pur-doc { font-family: Calibri, Carlito, Arial, sans-serif; font-size: 13.5px; line-height: 1.3; }
.pur-doc p { margin: 2px 0; }
.po-top { position: relative; text-align: center; min-height: 84px; }
.po-top img { position: absolute; left: 0; top: 0; width: 130px; }
.po-top h1 { font-size: 18px; font-weight: 700; margin: 22px 0 2px; font-family: inherit; }
.po-to { margin: 6px 0 4px !important; }
.dn .pur-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.dn .pur-table th { background: none; border: 1px solid #000; text-align: center; padding: 1px 3px; font-size: 13.5px; white-space: normal; }
.dn .pur-table td, .dn .pur-table tbody tr:last-child td { border: 1px solid #000; padding: 1px 4px; height: 21px; font-size: 13.5px; }
.pur-table td.c { text-align: center; }
.pur-table td.num { text-align: right; }
.po-mid { display: grid; grid-template-columns: 1fr 31%; gap: 12px; margin-top: 6px; }
.po-co { margin-top: 22px !important; }
.dn table.po-tot { width: 100%; height: fit-content; border-collapse: collapse; border: 1px solid #000; }
.dn .po-tot td, .dn .po-tot tbody tr:last-child td { border: 0; padding: 1px 6px; font-size: 14.5px; }
.dn .po-tot tr:last-child td { border-top: 1px solid #000; }
.po-tot td.tl { text-align: right; width: 44%; border-right: 1px solid #000 !important; }
.po-tot td.rp { width: 12%; }
.po-tot td.tv { text-align: right; }
.po-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 10px; }
.po-signs .img { height: 58px; }
.po-signs .img .sig-img { height: 56px; margin: 0; }
.dn .po-signs table { width: auto; border-collapse: collapse; }
.dn .po-signs td, .dn .po-signs tbody tr:last-child td { border: 0; padding: 0 6px 0 0; font-size: 13.5px; }
.dn table.pur-ctl { width: 100%; margin-top: 10px; border-collapse: collapse; border: 3px double #000; }
.dn .pur-ctl td, .dn .pur-ctl tbody tr:last-child td { border: 0; padding: 2px 8px; font-size: 13px; }
.dn .pur-ctl td:first-child { border-right: 1px solid #000; width: 60%; }
.do-doc { font-family: 'Times New Roman', Times, serif !important; }
.do-top { display: flex; justify-content: space-between; align-items: flex-end; }
.do-top > div:first-child img { display: block; width: 110px; margin-bottom: 2px; }
.do-top b { display: block; font-size: 17px; line-height: 1.5; }
.do-to { width: 27%; }
.do-to .to { text-align: center; margin-bottom: 26px; }
.do-doc h1 { font-family: inherit; font-size: 18px; font-weight: 700; margin: 24px 0 2px 44px; }
.dn table.do-kv { width: 58%; margin: 0 0 14px 34px; border-collapse: collapse; }
.dn .do-kv td, .dn .do-kv tbody tr:last-child td { border: 0; padding: 2px 4px; font-size: 15px; }
.dn .do-kv td.u { border-bottom: 1px solid #000; width: 30%; }
.do-doc .pur-table th { font-size: 15px; }
.do-doc .pur-table td { font-family: Calibri, Carlito, Arial, sans-serif; height: 25px; font-size: 14px; }
.do-signs { display: grid; grid-template-columns: 46.5% 18% 18%; margin: 0 0 0 4%; }
.dn table.do-sign { width: 100%; border-collapse: collapse; }
.dn .do-sign th { background: none; border: 1px solid #000; font-size: 15px; padding: 1px; text-align: center; }
.dn .do-sign td, .dn .do-sign tbody tr:last-child td { border: 1px solid #000; font-family: Calibri, Carlito, Arial, sans-serif; font-size: 13px; padding: 1px 3px; }
.do-sign td.img { height: 66px; text-align: center; }
.do-sign td.img .sig-img { height: 60px; margin: 0; }
.do-doc .pur-ctl { width: 76%; margin-left: 4%; }
.dn.do-doc table.pur-ctl { width: 81%; margin-left: 4%; }
.do-signs { grid-template-columns: 43% 16% 22%; }
.dn .do-sign td { white-space: nowrap; overflow: hidden; }
.do-sign td.img .sig-img { display: inline-block; }
.rl-more { padding: 10px 22px 16px; }
.rl-more summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* fuel counter */
.fuel-total { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 4px 22px 16px; }
.fuel-total > div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.fuel-total span { display: block; font-size: 12px; color: var(--muted); }
.fuel-total b { font-size: 24px; margin-right: 4px; }
@media (max-width: 700px) { .fuel-total { grid-template-columns: 1fr 1fr; } }

.b-PENDING_PINPRO { background: var(--warn-bg); color: var(--warn); }
/* photos */
.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-grid figure { position: relative; margin: 0; width: 160px; cursor: pointer; }
.photo-grid img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.photo-grid figcaption { font-size: 12px; margin-top: 4px; }
.photo-grid figcaption input { width: 100%; }
.photo-grid figure [data-rmph] { position: absolute; top: 4px; right: 4px; }
.photo-add { width: 160px; height: 120px; border: 2px dashed var(--line); border-radius: 10px; background: none; }
.rl-changes { margin: 4px 0 0 16px; padding: 0; font-size: 12.5px; }
.rl-changes li.add { color: var(--ok, #127a3a); } .rl-changes li.del { color: var(--bad, #b42318); }
/* docking report pages */
.dr-editor { max-width: 980px; margin: 0 auto 18px; }
.dp-prev img { width: 100%; margin-top: 8px; border-radius: 8px; }
.dr-page { position: relative; box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto 18px; padding: 16mm 18mm 30mm; background: #fff; color: #000;
  font-family: 'Segoe UI', Calibri, Arial, sans-serif; font-size: 11.5px; line-height: 1.45; box-shadow: var(--shadow); break-after: page; page-break-after: always; }
.dr-logo { position: absolute; top: 10mm; right: 14mm; width: 48mm; }
.dr-cover-title { text-align: center; font-size: 22px; font-weight: 800; margin: 30mm 0 6mm; font-family: inherit; }
.dr-cover { display: block; width: 100%; height: 95mm; object-fit: cover; margin-bottom: 14mm; }
.dr-empty { display: grid; place-items: center; background: #f2f2f2; color: #888; }
.dr-box { border: 1.5px solid #000; padding: 4mm 6mm; width: 75%; margin: 0 auto; font-size: 13px; font-weight: 700; }
.dr-title { text-align: center; text-decoration: underline; font-size: 18px; font-weight: 800; margin: 26mm 0 1mm; font-family: inherit; }
.dr-no { text-align: center; font-weight: 700; margin-bottom: 8mm; }
.dr-kv { border-collapse: collapse; margin: 0 0 4mm; }
.dr-kv td { padding: 1px 6px 1px 0; border: 0; vertical-align: top; }
.dr-kv td:first-child { min-width: 70mm; }
.dr-box .dr-kv td:first-child { min-width: 30mm; }
.dr-dim { margin-left: 18mm; }
.dr-dim td:first-child { min-width: 48mm; }
.dr-page h3 { font-size: 12px; margin: 4mm 0 2mm; }
.dr-sign-space { height: 22mm; }
.dr-items { border-collapse: collapse; margin: 2mm 0 6mm 4mm; }
.dr-items td { padding: 0 8px 0 0; border: 0; }
.dr-items tr.section td { padding-top: 2px; }
.dr-signs { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 8px; }
.dr-ph { margin-bottom: 6mm; break-inside: avoid; }
.dr-ph-t { font-weight: 600; margin-bottom: 1mm; }
.dr-ph table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dr-ph th { border: 1px solid #000; background: none; font-weight: 500; padding: 1px; }
.dr-ph td { border: 1px solid #000; padding: 2mm; height: 52mm; text-align: center; }
.dr-ph img { max-width: 100%; max-height: 50mm; object-fit: contain; }
.dr-foot { position: absolute; left: 0; right: 0; bottom: 8mm; text-align: center; font-family: Arial, sans-serif; font-size: 8px; line-height: 1.3; }
@media print {
  .dr-page { margin: 0; box-shadow: none; height: 297mm; min-height: 0; overflow: hidden; }
  #dr-doc .dn.rl-doc { break-before: page; page-break-before: always; padding: 12mm 10mm; }
}
.price-hints { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.price-hints .chip { cursor: pointer; border: 0; font-size: 11.5px; }

/* documents on narrow screens: headers wrap inside the page instead of being cut off */
@media screen and (max-width: 900px) {
  .dn { padding: 18px 14px; overflow-x: auto; }
  .doc-head { table-layout: fixed; }
  .doc-head td { overflow-wrap: anywhere; font-size: 11px; padding: 3px 4px; }
  .doc-head td.k { width: 36%; }
  .doc-head .doc-logo { width: 30%; }
  .doc-head .doc-logo img { max-width: 100%; height: auto; }
  .doc-kv td.k { width: auto; min-width: 0; }
  .doc-two { grid-template-columns: 1fr; }
  .dn table.rl-kv { margin-left: 0; }
  .rl-kv td.k { min-width: 0; }
  .rl-kv td:last-child { padding-left: 8px; }
  .rl-letter { flex-wrap: wrap; gap: 10px; }
  .rl-letter img { width: 130px; }
  .po-top img { position: static; display: block; width: 110px; }
  .po-mid { grid-template-columns: 1fr; }
  .of-head { grid-template-columns: 1fr; padding: 0; }
  .do-top { flex-wrap: wrap; }
  #doc-inv, #dr-doc { overflow-x: auto; }
}
@media screen and (max-width: 900px) {
  .dn table.rl-kv { width: 100%; table-layout: fixed; }
  .dn .rl-kv td { overflow-wrap: anywhere; }
  .dn .rl-kv td:nth-child(2) { width: 10px; }
  .dn .rl-kv td:last-child { width: 46px; }
  .po-mid > * { min-width: 0; }
  .dn table.po-tot { table-layout: fixed; }
  .dn .po-tot td { font-size: 13px; padding: 1px 4px; }
}
.dr-page table.dr-kv, .dr-page table.dr-items { width: auto; }
.dr-page .dr-kv td, .dr-page .dr-items td { border: 0 !important; background: none; }
.dr-ph-title { text-align: center; font-size: 15px; font-weight: 800; margin: 0 0 5mm; font-family: inherit; }
.dr-ph-sec { font-weight: 700; margin: 2mm 0 2mm; }
.dr-page.photos { padding-bottom: 12mm; }
.dr-img-page { padding: 8mm; display: flex; flex-direction: column; align-items: center; }
.dr-img-page img { width: 100%; max-height: 270mm; object-fit: contain; flex: 1; }
.dr-img-t { font-weight: 700; margin-bottom: 3mm; align-self: flex-start; }
.dr-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2mm; align-items: center; }
.dr-img-page .dr-tools { position: absolute; top: 2mm; right: 2mm; background: #fff; padding: 4px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
@media print { #dr-doc > .dr-page:not(:first-child) { break-before: page; page-break-before: always; } }
.dr-img-page img { max-height: 262mm; }
@media print { .dr-page { height: 296mm; } }
@media print { #toast, #modal-root:empty { display: none !important; } }
.rl-grip { display: inline-block; cursor: grab; touch-action: none; user-select: none; color: #8a94a3; font-size: 16px; line-height: 1; padding: 4px 6px 4px 0; vertical-align: middle; }
.rl-grip:hover { color: var(--accent, #2563eb); }
table.rl-edit tr.drop-top td { box-shadow: inset 0 3px 0 var(--accent, #2563eb); }
table.rl-edit tr.drop-bottom td { box-shadow: inset 0 -3px 0 var(--accent, #2563eb); }
/* Konsumsi BBM card */
.fuel-card .wo-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 22px 12px; flex-wrap: wrap; }
.fuel-card .wo-head h2 { margin: 0; padding: 0; }
.fuel-card .wo-head .actions { margin: 0; }
.fuel-card .fuel-total { padding: 0 22px 18px; }
.fuel-card .fuel-total > div { border: 1px solid var(--line, #e5e7eb); }
.fuel-card .fuel-total span { margin-bottom: 2px; }
.fuel-card .fuel-total b { font-size: 22px; line-height: 1.15; }
.fuel-card .table-wrap, .fuel-card > table { border-top: 1px solid var(--line, #e5e7eb); }
.sig-keep { font-size: 13px; margin-left: 6px; }
.of-stamp { display: flex; align-items: flex-end; padding-left: 34px; }
.of-stamp .sig-img { max-height: 60px; margin: 0; }
/* repair list form: drag preview, X button always visible */
table.rl-edit tr.dragging { display: none; }
table.rl-edit tr.rl-ph td { padding: 4px 8px; background: transparent; }
table.rl-edit tr.rl-ph td > div { border: 2px dashed var(--accent, #2563eb); border-radius: 10px; background: color-mix(in srgb, var(--accent, #2563eb) 7%, transparent); transition: height .12s; }
.rl-ghost { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; display: flex; align-items: center; gap: 10px; max-width: 420px;
  padding: 10px 14px; background: #fff; border-radius: 12px; border-left: 4px solid var(--accent, #2563eb); box-shadow: 0 12px 32px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .12);
  font-size: 13.5px; rotate: -1.5deg; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-ghost.section { background: #ddebf7; }
.rl-ghost .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
.rl-ghost .n { font-size: 12px; color: var(--muted, #6b7280); }
body.rl-dragging, body.rl-dragging * { cursor: grabbing !important; user-select: none; }
table.rl-edit { min-width: 1240px; }
table.rl-edit th:last-child, table.rl-edit td:last-child { position: sticky; right: 0; z-index: 1; background: var(--surface, #fff); box-shadow: -8px 0 10px -8px rgba(15, 23, 42, .18); }
table.rl-edit tr.rl-sec td:last-child { background: #ddebf7; }
table.rl-edit tr.head-row td:last-child { background: var(--surface-2); }
table.rl-edit tr.rl-ph td:last-child { position: static; box-shadow: none; background: transparent; }
.pg-prev { display: flex; gap: 6px; flex-wrap: wrap; max-height: 260px; overflow: auto; }
.pg-prev img { width: 90px; border: 1px solid var(--line, #e5e7eb); border-radius: 4px; }
.live-pill { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9000; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 0; background: var(--accent, #2563eb); color: #fff; font-weight: 600; box-shadow: 0 10px 28px rgba(15, 23, 42, .25); cursor: pointer; }
@media print { .live-pill { display: none !important; } }
.rl-pick-rows { max-height: 55vh; overflow: auto; }
.rl-pick-rows tr.rl-sec td { background: #ddebf7; }
/* docking report on a phone: the A4 pages scroll inside their own box instead of pushing the whole page sideways */
@media screen { #dr-doc { overflow-x: auto; } }
.rl-period { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.rl-period input { width: 138px; }
.rl-period span { font-size: 12px; color: var(--muted); }
.rl-period .rl-days { font-size: 12.5px; min-width: 48px; color: var(--accent); }
/* long numbers (PO / DO / WO) wrap instead of stretching cards past a phone screen */
.grid > *, .kv dd, .kv dt { min-width: 0; }
.kv dd { overflow-wrap: anywhere; }
/* Certificate of Conformance */
.coc-doc { max-width: 840px; margin: 0 auto; }
.coc-page { position: relative; box-sizing: border-box; background: #fff; color: #000; font-family: Calibri, 'Segoe UI', Arial, sans-serif; font-size: 13.5px; line-height: 1.35;
  min-height: 262mm; padding: 18px 40px 80px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.coc-in-sn { margin-top: 18px; }
.coc-logo { width: 150px; display: block; margin: 8px 0 6px 8px; }
.coc-title { text-align: center; font-size: 22px; font-weight: 700; margin: 6px 0 22px; font-family: inherit; }
.coc-h { font-size: 13.5px; font-weight: 700; text-decoration: underline; margin: 14px 0 6px; }
.coc-page table.coc-kv { width: 100%; border-collapse: collapse; }
.coc-page .coc-kv td { border: 0 !important; padding: 1px 4px; vertical-align: bottom; background: none; }
.coc-page .coc-kv td.k { width: 26%; }
.coc-page .coc-kv td.c { width: 3%; font-weight: 700; }
.coc-page .coc-kv td.v { border-bottom: 1px solid #000 !important; }
.coc-scope { display: flex; justify-content: space-between; gap: 10px; }
.coc-box { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1px solid #000; font-size: 12px; line-height: 1; vertical-align: -2px; }
.coc-page table.coc-sum { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.coc-page .coc-sum th { background: #f3cb14 !important; color: #000; border: 1px solid #000 !important; padding: 4px 6px; font-weight: 700; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.coc-page .coc-sum td { border: 1px solid #000 !important; padding: 2px 6px; vertical-align: top; background: none; }
.coc-page .coc-sum td.r { text-align: center; font-weight: 700; }
.coc-page .coc-sum td.rm { font-weight: 700; }
.coc-page .coc-sum ol { margin: 0; padding-left: 38px; }
.coc-st { margin: 10px 0 2px; font-size: 13.5px; }
.coc-list { margin: 2px 0 0; padding-left: 28px; list-style: square; }
.coc-auth { margin-bottom: 0; }
.coc-sig { height: 80px; }
.coc-sig .sig-img { max-height: 78px; margin: 0; }
.coc-page table.coc-foot { position: absolute; left: 40px; bottom: 24px; width: calc(100% - 80px); border-collapse: collapse; border: 3px double #000; font-family: Arial, sans-serif; font-size: 12px; }
.coc-page .coc-foot td { border: 0 !important; padding: 1px 8px; background: none; }
.coc-page .coc-foot td:nth-child(2) { border-right: 3px double #000 !important; }
@media print {
  /* one sheet per page on A4 or Letter with the printer's own margins */
  .coc-page { border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0 4mm 22mm; min-height: 0; height: 240mm; overflow: hidden; break-before: page; page-break-before: always; break-inside: avoid; }
  .coc-doc:not(.coc-in-sn) > .coc-page:first-child { break-before: auto; page-break-before: auto; }
  .coc-page .coc-foot { left: 4mm; width: calc(100% - 8mm); bottom: 2mm; }
}
/* Purchase Order / Delivery Order on paper: compact, about half a 241 x 279 form */
@media print {
  .dn.pur-doc { font-size: 11px !important; line-height: 1.2; break-inside: avoid; }
  .pur-doc p { margin: 1px 0; }
  .po-top { min-height: 62px; }
  .po-top img { width: 78px; }
  .po-top h1 { font-size: 15px; margin: 4px 0 0; }
  .po-to { margin: 2px 0 3px !important; }
  .dn .pur-table th { font-size: 11px !important; padding: 0 3px !important; }
  .dn .pur-table td, .dn .pur-table tbody tr:last-child td { font-size: 11px !important; height: 15px !important; padding: 0 3px !important; }
  .po-mid { margin-top: 3px; gap: 8px; }
  .po-co { margin-top: 6px !important; }
  .dn .po-tot td, .dn .po-tot tbody tr:last-child td { font-size: 11px !important; padding: 0 5px !important; }
  .po-signs { margin-top: 4px; gap: 12px; }
  .po-signs .img { height: 34px; }
  .po-signs .img .sig-img { height: 32px; }
  .dn .po-signs td, .dn .po-signs tbody tr:last-child td { font-size: 10.5px !important; }
  .dn table.pur-ctl { margin-top: 4px; border-width: 2px; }
  .dn .pur-ctl td, .dn .pur-ctl tbody tr:last-child td { font-size: 9.5px !important; padding: 0 6px !important; }
  .do-top > div:first-child img { width: 64px; }
  .do-top b { font-size: 11.5px; line-height: 1.25; }
  .do-to .to { margin-bottom: 4px; }
  .do-doc h1 { font-size: 14px; margin: 6px 0 2px 30px; }
  .dn table.do-kv { margin: 0 0 5px 24px; }
  .dn .do-kv td, .dn .do-kv tbody tr:last-child td { font-size: 11.5px !important; padding: 0 4px !important; }
  .do-doc .pur-table th { font-size: 11.5px !important; }
  .do-doc .pur-table td, .do-doc .pur-table tbody tr:last-child td { height: 15px !important; font-size: 11px !important; }
  .dn .do-sign th { font-size: 11.5px !important; }
  .dn .do-sign td, .dn .do-sign tbody tr:last-child td { font-size: 10px !important; padding: 0 3px !important; }
  .do-sign td.img { height: 36px !important; }
  .do-sign td.img .sig-img { height: 32px !important; }
}
