:root {
  color-scheme: light;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: #17283b;
  background: #f3f6fa;
  --nav: #101e32;
  --nav-text: #b9c8d9;
  --ink: #17283b;
  --muted: #4d6075;
  --line: #d8e2ec;
  --accent: #08756d;
  --accent-dark: #075b55;
  --mint: #59e4c9;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.desktop { display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar {
  background: var(--nav);
  color: white;
  padding: 1.65rem .95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 2.1rem;
}
.desktop .sidebar { position: sticky; top: 0; height: 100dvh; }
.brand {
  color: white;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  width: fit-content;
  margin-inline: .45rem;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -.055em;
  text-decoration: none;
}
.brand-accent { color: var(--mint); }
.mark { width: 2.25rem; height: 2.25rem; flex: none; }
.tabs { display: grid; gap: .35rem; }
.tabs a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .8rem;
  color: var(--nav-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: .55rem;
  white-space: nowrap;
  font-size: .93rem;
  font-weight: 650;
}
.tabs a:hover { background: #20334b; color: white; }
.tabs [aria-current="page"] { background: #1b3b47; color: #80f0da; border-color: #2c535a; }
.icon-svg { flex: none; vertical-align: middle; }
.nav-icon, .button-icon { width: 1.1rem; height: 1.1rem; }
.tabs a { --icon-surface: var(--nav); }
.tabs a:hover { --icon-surface: #20334b; }
.tabs [aria-current="page"] { --icon-surface: #1b3b47; }
.exit { margin-top: auto; }
.exit .quiet { width: 100%; color: var(--nav-text); background: transparent; border-color: #42546a; }
.exit .quiet:hover { color: white; background: #20334b; }
.shell { min-width: 0; width: min(100%, 1300px); margin-inline: auto; padding: clamp(1.1rem, 3vw, 2.6rem); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3.1vw, 2.42rem); line-height: 1.14; letter-spacing: -.045em; }
h2 { font-size: 1.14rem; line-height: 1.35; letter-spacing: -.012em; }
p { color: var(--muted); }
.page-head p, .card > p { margin-top: .42rem; }
.overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.metric {
  display: flex;
  align-items: center;
  gap: .72rem;
  min-width: 0;
  min-height: 5.5rem;
  padding: .8rem .95rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: .83rem;
  box-shadow: 0 2px 7px #12274308;
  text-decoration: none;
}
.metric:hover { border-color: #73a49f; }
.metric div > span { display: block; color: var(--muted); font-size: .875rem; font-weight: 650; }
.metric strong { display: block; font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-icon, .empty-icon { background: #e7f7f3; color: var(--accent-dark); border-radius: .55rem; width: 2.35rem; height: 2.35rem; padding: .5rem; }
.card { background: white; border: 1px solid var(--line); border-radius: .86rem; padding: clamp(1rem, 2.2vw, 1.52rem); margin-bottom: 1.05rem; box-shadow: 0 3px 12px #12274308; }
.card > h2 { margin-bottom: .88rem; }
.section-head, .actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.section-head { justify-content: space-between; margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); align-items: end; gap: .9rem; }
.job-fields { grid-template-columns: minmax(12rem,1.3fr) repeat(3,minmax(0,1fr)); }
.print-form, .stack { display: grid; gap: .95rem; }
label { display: grid; gap: .32rem; min-width: 0; color: var(--ink); font-size: .875rem; font-weight: 650; }
label.check { display: flex; align-items: center; min-height: 2.75rem; }
input, select, button, .button { font: inherit; border-radius: .52rem; }
input:not([type=checkbox]), select {
  width: 100%; min-width: 0; min-height: 2.75rem; padding: .52rem .66rem;
  border: 1px solid #b4c5d6; background-color: #fbfcfe; color: var(--ink); font-weight: 450;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg,transparent 50%,#52667a 50%),linear-gradient(135deg,#52667a 50%,transparent 50%);
  background-repeat: no-repeat; background-position: calc(100% - 15px) center,calc(100% - 10px) center;
  background-size: 5px 5px; padding-right: 1.65rem;
}
input[type=file]::file-selector-button { border: 0; background: #e6edf5; border-radius: .35rem; color: var(--ink); padding: .3rem .6rem; margin-right: .55rem; font: inherit; cursor: pointer; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--accent); border: 1px solid var(--accent); color: white;
  min-height: 2.75rem; padding: .48rem .95rem; text-decoration: none;
  font-size: .9rem; font-weight: 700; cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary, .quiet { color: var(--ink); background: white; border-color: #bccbda; }
.secondary:hover, .quiet:hover { color: var(--accent-dark); background: #edf7f6; border-color: #7caeaa; }
.compact, td button { min-height: 2.2rem; padding: .27rem .58rem; font-size: .875rem; }
.danger { color: #9c2b3f; }
.danger:hover { color: #8b2336; background: #fff0f2; border-color: #d9919e; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #a452c1; outline-offset: 2px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; padding: .6rem; color: var(--ink); background: white; z-index: 3; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.empty { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; padding: 1rem; background: #f6f9fc; border: 1px dashed #b8cbdc; border-radius: .68rem; }
.setup .actions { margin-left: auto; }
.history { justify-content: center; min-height: 6.8rem; }
.printer-selection { display: flex; flex-wrap: wrap; gap: .55rem; min-width: 0; margin: 0; padding: .25rem 0 0; border: 0; }
.printer-selection legend { padding: 0; font-size: .875rem; font-weight: 700; }
.printer-choice { display: flex; align-items: flex-start; min-width: min(100%,11rem); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .57rem; cursor: pointer; }
.printer-choice:has(input:checked) { background: #edf9f5; border-color: #4e9a90; }
.printer-choice input, .check input { accent-color: var(--accent); width: 1rem; height: 1rem; margin: .18rem .32rem 0 0; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem; background: #f0f7f7; border-radius: .62rem; }
.preview strong, .preview p { font-size: .875rem; }
small { display: block; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .55rem; font-weight: 700; font-size: .875rem; border-radius: 1rem; color: #34485b; background: #edf1f6; }
.status::before { content: ""; width: .42rem; height: .42rem; background: currentColor; border-radius: 50%; flex: none; }
.status.good { background: #e1f5ea; color: #176143; }
.status.busy { background: #e5efff; color: #244f8d; }
.status.warn { background: #fff3d8; color: #795000; }
.status.bad { background: #fce9ee; color: #932b40; }
.notice { background: #def4e9; color: #164d39; border: 1px solid #9acfb8; border-radius: .65rem; padding: .7rem .85rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.notice.error { background: #fce9ee; color: #842840; border-color: #e6aebd; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th, td { padding: .68rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); background: #f3f6fa; font-size: .875rem; }
th:last-child, td:last-child { min-width: 5rem; }
tbody tr:hover { background: #f8fbfd; }
tbody tr:last-child td { border-bottom: 0; }
details { margin-top: .48rem; }
summary { cursor: pointer; }
details form { margin-top: .65rem; }
.profile { padding: .72rem; border: 1px solid var(--line); border-radius: .57rem; }
.profile[open] { background: #f8fbfd; }
.sign-in { background: radial-gradient(ellipse at top right,#1b484d,transparent 54%),var(--nav); }
.sign-in .sidebar { background: transparent; padding: 1.3rem; }
.sign-in .shell { max-width: 31rem; padding-block: clamp(1rem,10vh,6rem); }
.login { padding: clamp(1.3rem, 4vw, 2.25rem); }
.login p { margin: .5rem 0 1.25rem; }
.login button { margin-top: .3rem; }
@media (max-width: 1120px) {
  .job-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .desktop { display: block; }
  .desktop .sidebar { position: static; height: auto; padding: .8rem; display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
  .tabs { grid-row: 2; grid-column: 1 / -1; display: flex; overflow-x: auto; }
  .tabs a { padding: .45rem .62rem; }
  .exit { margin: 0; }
  .exit .quiet { min-height: 2.2rem; }
  .overview { gap: .42rem; }
  .metric { padding: .58rem; gap: .4rem; }
  .metric-icon { display: none; }
  .table table { min-width: 520px; }
}
@media (max-width: 420px) {
  .page-head, .compose-footer { align-items: stretch; flex-direction: column; }
  .job-fields { grid-template-columns: minmax(0,1fr); }
  .tabs a { gap: .3rem; }
  .tabs .nav-icon { display: none; }
  .setup .actions { margin-left: 0; }
}
