:root {
  --bg: #f4f5f7;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f1f4;
  --line: #d8dbe2;
  --line-strong: #c3c8d2;
  --text: #1a1d23;
  --muted: #5c6570;
  --subtle: #7a8490;
  --accent: #ea5151;
  --accent-2: #c93c3c;
  --accent-fg: #fff;
  --ok: #1f7a42;
  --ok-bg: #e7f5ec;
  --warn: #8a6a00;
  --bad: #b42318;
  --info: #1d5fbf;
  --shadow: 0 8px 24px rgba(20, 24, 32, 0.08);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --tap: 44px;
  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  min-height: 100%;
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
button, input, select, textarea { font: inherit; color: inherit; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.main { flex: 1; min-width: 0; }
.app[hidden] { display: none !important; }
.main-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-height: var(--tap);
}
.side-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  min-width: var(--tap);
  padding: 4px;
  border-color: transparent;
}
.side-toggle img {
  width: 28px;
  height: 28px;
  display: block;
}
.side-backdrop { display: none; }
aside.side {
  width: 240px;
  flex: 0 0 240px;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #1a1d23;
  color: #fff;
  border: 1px solid #2a2e36;
  border-radius: var(--radius-lg);
  padding: 16px;
}
aside.side h1,
aside.side .who strong { color: #fff; }
aside.side .ver,
aside.side .subtle,
aside.side .muted { color: rgba(255, 255, 255, 0.86); }
aside.side .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
}
aside.side .btn.ghost:hover:not(:disabled),
aside.side .btn.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.side-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.side-nav .btn { width: 100%; }
.side-nav .nav-ico {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.75rem;
  line-height: 1.15;
  text-align: center;
}
.side-nav .nav-ico .ico,
.theme-toggle .ico { width: 20px; height: 20px; }
.theme-toggle { width: 100%; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
aside.side h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  font-weight: 650;
  line-height: 1.2;
}
.ver {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-left: 0;
  margin-top: 2px;
}
.muted { color: var(--muted); font-size: 0.9rem; }
.subtle { color: var(--subtle); font-size: 0.8rem; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}
#view > .card + .card { margin-top: 12px; }
.card h2, .card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
}

.rep-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.rep-card h3 {
  margin: 16px 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fine {
  margin: 8px 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #5c6570;
}

.btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 14px;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--motion-quick) var(--ease), transform var(--motion-quick) var(--ease), border-color var(--motion-quick) var(--ease);
}
.btn:hover:not(:disabled):not(.ghost) {
  background: var(--accent-2);
  color: #fff;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn.ghost:hover:not(:disabled),
.btn.ghost:focus-visible {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.ok { background: var(--ok); }
.btn.ok:hover:not(:disabled) { filter: brightness(1.08); }
.btn.warn { background: transparent; border: 1px solid var(--bad); color: var(--bad); }
.btn.sm {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
}
.btn.sm.icon { padding: 4px 7px; }
.btn.sm.icon .ico { width: 18px; height: 18px; }
.ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--panel);
  transition: border-color var(--motion-quick) var(--ease), background var(--motion-quick) var(--ease);
  min-height: var(--tap);
  align-items: center;
}
.job:hover { border-color: var(--accent); background: var(--panel-2); }
.job:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.job.arch-row { cursor: default; }
.job.arch-row:hover { border-color: var(--line); background: var(--panel); }
.arch-month {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--panel);
  overflow: hidden;
}
.arch-month > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 650;
  list-style-position: inside;
}
.arch-month .job {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
}
.card .theme-toggle {
  width: auto;
  min-height: var(--tap);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.modal.rep-modal { width: min(1100px, 100%); }

.pill {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef0f3;
  font-weight: 600;
}
.pill.odprto { color: var(--warn); }
.pill.servis { color: var(--info); }
.pill.obracun { color: #7a3e00; background: #fff1e0; }
.pill.zakljuceno { color: var(--ok); }
.pill.ukinjeno { color: var(--bad); }

.steps {
  display: flex;
  gap: 6px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.steps button {
  flex: 1;
  min-width: 120px;
}
.steps button.ghost {
  border-color: transparent;
  color: var(--text);
  background: transparent;
}
.steps button.ghost:hover:not(:disabled):not(.on) {
  background: #fde8e8;
  border-color: #f0b4b4;
  color: #7a1f1f;
}
.steps button.on,
.steps button.on:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: none;
}
.side-nav .btn.on,
.side-nav .btn.on:hover:not(:disabled),
aside.side .side-nav .btn.on,
aside.side .side-nav .btn.on:hover:not(:disabled),
aside.side .side-nav .btn.on:focus-visible {
  background: #ea5151;
  color: #fff;
  border-color: #ea5151;
}

.item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg-elev);
  transition: border-color var(--motion-quick) var(--ease), box-shadow var(--motion-quick) var(--ease);
}
.item:hover {
  border-color: #ea5151;
  box-shadow: 0 4px 14px rgba(234, 81, 81, 0.14);
}
.item.done { border-color: #b7d7c4; background: var(--ok-bg); }
.item.done:hover {
  border-color: #7dbe96;
  box-shadow: 0 4px 14px rgba(31, 122, 66, 0.1);
}
.item.overdue { border-left: 4px solid #c0392b; }
.item.overdue:hover { border-left-color: #c0392b; }
.item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.find-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.find-row input { flex: 1; min-width: 8rem; width: auto; }
.find-row .btn { width: auto; flex: 0 0 auto; }
.find-row .find-year {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 0 0 auto;
  width: auto;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  font-weight: 600;
}
.find-row .find-year select {
  width: auto;
  min-width: 7.2rem;
  text-transform: none;
  letter-spacing: normal;
}
.scan-video {
  width: 100%;
  max-height: 280px;
  background: #111;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: var(--tap);
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 1px;
}
.caps { text-transform: uppercase; }
select { appearance: auto; }

.part-picks {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  margin-top: 8px;
}
.part-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.part-pick label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  color: var(--text);
}
.part-pick:last-child { border-bottom: 0; }
.part-pick input[type="checkbox"] { width: 22px; min-height: 22px; flex: 0 0 auto; }
.part-pick input[type="number"] { width: 76px; min-height: 36px; flex: 0 0 auto; }
.combo { position: relative; }
.combo-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  max-height: 220px;
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  z-index: 5;
}
.combo-list li {
  padding: 8px 10px;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.combo-list li.hi,
.combo-list li[data-v]:hover { background: #fde8e8; }
.combo-hint { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.combo-empty { color: var(--muted); cursor: default; }

.sig-block { margin-top: 14px; }
.sig-cap {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.sig-pad {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-image: linear-gradient(#fff 0 78%, #d0d0d0 78%, #d0d0d0 calc(78% + 1px), #fff calc(78% + 1px));
}
.sig-pad canvas {
  width: 100%;
  height: 150px;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background: transparent;
}
.sig-print { display: none; }
.sig-live { display: block; max-height: 28mm; max-width: 70mm; background: #fff; }
.sig-who { margin: 6px 0 0; }
.sum-print { display: none; }
.sum-print p { white-space: pre-wrap; margin: 0; }

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  z-index: 40;
  animation: fadeIn var(--motion-fast) var(--ease);
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl) var(--radius-xl) 12px 12px;
  padding: 16px 16px 0;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
  animation: rise var(--motion-fast) var(--ease);
  display: flex;
  flex-direction: column;
}
.modal > .row:last-child {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--panel);
  padding: 12px 16px 16px;
  margin: 8px -16px 0;
  border-top: 1px solid var(--line);
}
.modal h3 { margin: 0 0 8px; font-size: 1.05rem; }

.hide { display: none !important; }

.banner {
  background: #fff8eb;
  border: 1px solid #e6d3a4;
  color: #5c4810;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.banner.err {
  background: #fdecec;
  border-color: #e7b4b4;
  color: #7a1f1f;
}
.banner.ok {
  background: var(--ok-bg);
  border-color: #b7d7c4;
  color: #14532d;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 50;
  max-width: min(92vw, 420px);
  box-shadow: var(--shadow);
}
.toast.err { border-color: var(--bad); }

table.rep {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
table.rep th, table.rep td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
table.rep th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.card.off, .item.off { opacity: 0.72; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 140px;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.filters select,
.filters input {
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  color: var(--text);
}
.acts { gap: 6px; }
.acts .btn { min-height: 32px; padding: 4px 8px; flex: 0 1 auto; }

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.who strong { display: block; font-size: 0.95rem; }
.who .subtle { display: block; word-break: break-all; }
button.who {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top, rgba(234, 81, 81, 0.2), transparent 52%),
    var(--bg);
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 24px 22px;
  box-shadow: var(--shadow);
}
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.gate-brand h1 { margin: 0; font-size: 1.35rem; letter-spacing: 0.02em; }
.gate-brand .ver { display: inline; margin: 0 0 0 6px; font-size: 0.8rem; }
.gate-brand p { margin: 2px 0 0; }
.gate-card .btn { width: 100%; margin-top: 18px; }
.gate-card .banner { margin-top: 14px; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 721px) {
  html, body { min-height: 100%; }
  .app {
    max-width: none;
    min-height: 100vh;
    height: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: stretch;
  }
  aside.side {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    overflow: auto;
    transition: width var(--motion-fast) var(--ease), flex-basis var(--motion-fast) var(--ease), padding var(--motion-fast) var(--ease);
  }
  body:not(.side-open) aside.side {
    width: 0;
    flex-basis: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right-width: 0;
    overflow: hidden;
  }
  .main {
    height: auto;
    overflow: visible;
    padding: 16px 20px 48px;
  }
  .modal-bg { align-items: center; }
  .modal { border-radius: var(--radius-xl); }
}

@media (max-width: 720px) {
  .app { display: block; }
  .side-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
  }
  body.side-open .side-backdrop { display: block; }
  aside.side {
    position: fixed;
    z-index: 40;
    top: 12px;
    left: 12px;
    bottom: 12px;
    height: auto;
    max-height: none;
    width: min(280px, calc(100vw - 24px));
    overflow: auto;
    transform: translateX(calc(-100% - 24px));
    transition: transform var(--motion-fast) var(--ease);
  }
  body.side-open aside.side { transform: none; }
  .item header { flex-direction: column; align-items: stretch; }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
  .item header .row.acts { justify-content: flex-start; }
  .item header .row.acts .btn { flex: 0 1 auto; }
  .steps button { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

html[data-theme="dark"] {
  --bg: #121418;
  --bg-elev: #1c2028;
  --panel: #1a1e26;
  --panel-2: #242933;
  --line: #343a46;
  --line-strong: #4a5260;
  --text: #f2f4f7;
  --muted: #a8b0bb;
  --subtle: #8b939e;
  --accent: #ea5151;
  --accent-2: #ff6d6d;
  --ok: #3dce7a;
  --ok-bg: #163324;
  --warn: #e6c15a;
  --bad: #ff8a80;
  --info: #8eb6ff;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .pill { background: #2a303a; }
html[data-theme="dark"] .pill.obracun { color: #ffd7a8; background: #3a2a16; }
html[data-theme="dark"] .steps button.ghost:hover:not(:disabled):not(.on) {
  background: rgba(234, 81, 81, 0.18);
  border-color: #ea5151;
  color: var(--text);
}
html[data-theme="dark"] .item.done { border-color: #2f6b48; }
html[data-theme="dark"] .combo-list li.hi,
html[data-theme="dark"] .combo-list li[data-v]:hover { background: #3a2426; }
html[data-theme="dark"] .banner {
  background: #3a3018;
  border-color: #6a5520;
  color: #f3e2b0;
}
html[data-theme="dark"] .banner.err {
  background: #3a1c1c;
  border-color: #7a3030;
  color: #ffc9c9;
}
html[data-theme="dark"] .banner.ok {
  background: var(--ok-bg);
  border-color: #2f6b48;
  color: #b7f0cc;
}

.wo-sheet { display: none; }
body.wo-open .wo-sheet {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 9, 12, 0.72);
  overflow: auto;
  padding: 16px 16px 32px;
}
.wo-frame {
  max-width: 210mm;
  margin: 0 auto;
}
.wo {
  background: #fff;
  color: #161616;
  padding: 14mm 16mm;
  box-shadow: 0 16px 50px rgba(0,0,0,.4);
}
.wo-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.wo-kicker-l {
  text-transform: uppercase;
  text-align: left;
}
.wo-kicker-r {
  text-align: right;
}
.wo h1 {
  margin: 2mm 0 1mm;
  font-size: 22pt;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
}
.wo h2 {
  margin: 8mm 0 3mm;
  font-size: 12pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wo-lead { margin: 0 0 6mm; color: #444; font-size: 10.5pt;text-align: center;}
table.wo-meta { width: 100%; border-collapse: collapse; }
table.wo-meta th, table.wo-meta td {
  text-align: left;
  vertical-align: top;
  padding: 1.6mm 2mm;
  border-bottom: 0.2mm solid #ddd;
  font-size: 11pt;
  color: #111;
}
table.wo-meta th { width: 34mm; color: #444; font-weight: 600; }
.wo-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm;
  margin: 5mm 0 2mm;
}
table.wo-checks { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
table.wo-checks td { padding: 3px 8px; font-size: 0.85rem; }
.wo-counts > div {
  border: 0.45mm solid #111;
  padding: 4mm 5mm;
}
.wo-counts .n {
  font-size: 28pt;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wo-note { font-size: 11pt; }
.wo-label {
  margin: 4mm 0 1mm;
  font-size: 10pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wo-line {
  border-bottom: 0.35mm solid #111;
  min-height: 8mm;
  margin: 0 0 2mm;
}
.wo-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8mm;
  font-weight: 600;
}
.wo-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12mm;
  margin-top: 8mm;
}
.wo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

@media print {
  html {
    --bg: #fff;
    --bg-elev: #fff;
    --panel: #fff;
    --panel-2: #fff;
    --text: #111;
    --muted: #333;
    --subtle: #444;
    --line: #999;
    --line-strong: #999;
  }
  @page { size: A4; margin: 12mm; }
  html, body, .app, .main, .table-wrap, #view, #body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }
  .no-print, #toast, .toast, #modal, #flash { display: none !important; }
  .sum-print { display: block !important; margin-top: 4mm; }
  .sum-print h3, .sum-print p { color: #111; }
  .sig-pad { border-color: #999; background: #fff; overflow: hidden; }
  .sig-print { display: block !important; max-height: 28mm; max-width: 70mm; }
  .sig-cap, .sig-who { color: #111; }
  body { background: #fff; color: #111; }
  .card, .item { background: #fff; border-color: #ccc; box-shadow: none; }
  table.rep { table-layout: fixed; font-size: 8.5pt; word-break: break-word; }
  table.rep th, table.rep td { border-color: #999; color: #111; padding: 1mm 1.2mm; overflow-wrap: anywhere; vertical-align: top; }
  a { color: inherit; }
  ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  body.print-nalog .app,
  body.print-nalog #modal,
  body.print-nalog #toast,
  body.print-nalog #flash { display: none !important; }
  body.print-nalog .wo-sheet {
    display: block !important;
    position: static;
    background: #fff;
    padding: 0;
    overflow: visible;
  }
  body.print-nalog .wo {
    box-shadow: none;
    padding: 0;
    max-width: none;
  }
  body.print-arch .app,
  body.print-arch #toast,
  body.print-arch #flash { display: none !important; }
  body.print-arch #modal { display: block !important; }
  body.print-arch .modal-bg {
    position: static;
    display: block !important;
    background: #fff;
    padding: 0;
    animation: none;
  }
  body.print-arch .modal {
    box-shadow: none;
    border: 0;
    max-height: none;
    width: auto;
    max-width: none;
    padding: 0;
    overflow: visible;
    animation: none;
  }
	.rep-break { break-after: page; page-break-after: always; }
	.fine { color: #333; }
}
