:root {
  --bg: #f2f3ef;
  --panel: #fff;
  --ink: #20362f;
  --muted: #65766e;
  --line: #dce3dd;
  --accent: #237559;
  --accent-light: #e5f2ea;
  --warn: #8c5a12;
  --warn-bg: #fff2d4;
  --error: #a53a37;
  --error-bg: #fceae8;
  --shadow: 0 12px 40px rgba(27, 52, 40, 0.05);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
body[data-theme="dark"] {
  --bg: #14211c;
  --panel: #1d3027;
  --ink: #e5eee7;
  --muted: #a8bbb0;
  --line: #355043;
  --accent: #79c79d;
  --accent-light: #2b4939;
  --warn: #efc883;
  --warn-bg: #42351d;
  --error: #f4b1a9;
  --error-bg: #442925;
  --shadow: none;
  color-scheme: dark;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 650;
}
button:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
body[data-theme="dark"] .primary {
  color: #14211c;
}
.primary:hover {
  filter: brightness(1.08);
  background: var(--accent);
}
.danger {
  color: var(--error);
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(27px, 3vw, 37px);
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}
h2 {
  font-size: 22px;
  line-height: 1.25;
}
h3 {
  font-size: 17px;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 12px;
}
.hidden {
  display: none !important;
}
.app-header {
  min-height: 86px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 36px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  background: var(--accent);
  color: var(--panel);
  border-radius: 11px;
  font-size: 16px;
}
.app-header nav {
  display: flex;
  gap: 8px;
}
.app-header nav button {
  border-color: transparent;
  background: transparent;
}
.app-header nav .nav-active {
  background: var(--accent-light);
  color: var(--accent);
}
.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-tools button {
  font-size: 12px;
  padding: 8px 10px;
}
.connection {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-right: 10px;
}
.connection:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.connection.offline {
  color: var(--error);
}
.connection.offline:before {
  background: var(--error);
}
.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 86px);
}
.sidebar {
  padding: 35px 28px;
  border-right: 1px solid var(--line);
}
.clock {
  font-size: 36px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.sidebar #date {
  font-size: 13px;
}
.sidebar-line {
  height: 1px;
  background: var(--line);
  margin: 27px 0;
}
.break-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin: 12px 0;
}
.sidebar-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
main {
  padding: 40px;
  min-width: 0;
  max-width: 1440px;
  width: 100%;
  margin: auto;
}
.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.heading p {
  max-width: 650px;
  margin-bottom: 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 27px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.login-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(220px, 1fr);
  gap: 24px;
}
.scan-card {
  border-top: 4px solid var(--accent);
}
.scan-icon {
  height: 42px;
  width: 42px;
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.span-all {
  grid-column: 1/-1;
}
label {
  display: block;
  font-weight: 650;
  font-size: 13px;
}
input,
select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
input.scan {
  font-size: 22px;
  font-family: Consolas, monospace;
  border: 2px solid var(--accent);
  background: var(--panel);
  letter-spacing: 0.03em;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0 8px 0 0;
}
.check-label {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 45px;
}
.field-help {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 7px;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
}
.pill.green {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--accent);
}
.pill.amber {
  background: var(--warn-bg);
  border-color: var(--warn-bg);
  color: var(--warn);
}
.pill.red {
  background: var(--error-bg);
  border-color: var(--error-bg);
  color: var(--error);
}
.notice {
  border-radius: 8px;
  padding: 13px 16px;
  margin: 15px 0;
  font-size: 13px;
  background: var(--accent-light);
  color: var(--accent);
}
.notice.error {
  background: var(--error-bg);
  color: var(--error);
}
.notice.warning {
  background: var(--warn-bg);
  color: var(--warn);
}
.intro-step {
  display: flex;
  gap: 13px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.step-number {
  background: var(--bg);
  color: var(--accent);
  border-radius: 50%;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
}
.intro-step strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.worker-strip {
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar {
  background: var(--accent-light);
  color: var(--accent);
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}
.worker-strip h2 {
  margin-bottom: 5px;
}
.worker-strip .actions {
  margin-left: auto;
}
.empty-state {
  text-align: center;
  padding: 35px 20px;
}
.empty-symbol {
  font-size: 42px;
  color: var(--accent);
  margin-bottom: 15px;
}
.pause-card {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-bg);
  text-align: center;
  padding: 42px;
}
.pause-card h2 {
  font-size: 28px;
}
.pause-count {
  font-size: 52px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px 24px;
  border-radius: 12px;
}
.kpi strong {
  display: block;
  font-size: 30px;
}
.kpi span {
  font-size: 12px;
  color: var(--muted);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
}
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td .actions {
  justify-content: flex-start;
  gap: 6px;
}
td button {
  padding: 7px 10px;
  font-size: 12px;
}
.mono {
  font-family: Consolas, monospace;
}
.person-form {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-bottom: 28px;
}
dialog {
  max-width: 460px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
}
dialog::backdrop {
  background: rgba(9, 29, 19, 0.5);
}
.dialog-content {
  padding: 28px;
}
.dialog-content label {
  margin: 20px 0;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  z-index: 100;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.setup-shell {
  max-width: 720px;
  margin: 6vh auto;
  padding: 24px;
}
.loading {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}
#printArea {
  display: none;
}
.badge-print {
  width: 85.6mm;
  height: 54mm;
  padding: 5mm;
  border: 1px solid #555;
  border-radius: 3mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  page-break-inside: avoid;
  break-inside: avoid;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #111;
}
.badge-print h2 {
  font-size: 16px;
  margin: 0;
}
.badge-print .badge-code {
  font-size: 12px;
  text-align: center;
  font-family: Consolas, monospace;
  letter-spacing: 0.04em;
}
.badge-print .badge-name {
  font-size: 18px;
  font-weight: 750;
}
.badge-print .badge-meta {
  font-size: 10px;
}
.badge-print svg {
  display: block;
  width: 100%;
  height: 13mm;
  shape-rendering: crispEdges;
}
.print-grid {
  display: flex;
  gap: 6mm;
  flex-wrap: wrap;
}
@media (max-width: 1050px) {
  .app-header {
    gap: 16px;
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .header-tools {
    margin-left: auto;
  }
  .app-shell {
    grid-template-columns: 210px 1fr;
  }
  .sidebar {
    padding: 28px 20px;
  }
  main {
    padding: 30px 24px;
  }
  .login-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .app-header {
    gap: 12px;
  }
  .brand {
    font-size: 18px;
  }
  .header-tools {
    width: 100%;
    justify-content: space-between;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .sidebar .clock {
    font-size: 25px;
  }
  .sidebar > .eyebrow,
  .sidebar > .sidebar-line,
  .sidebar > .break-row,
  .sidebar > .pill,
  .sidebar > .sidebar-note {
    display: none;
  }
  main {
    padding: 25px 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .heading {
    flex-direction: column;
  }
  .card {
    padding: 22px;
  }
  .kpis {
    gap: 8px;
  }
  .kpi {
    padding: 14px;
  }
  .kpi strong {
    font-size: 25px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .worker-strip {
    flex-wrap: wrap;
  }
  .worker-strip .actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .app-header nav button {
    padding: 8px;
  }
  .connection {
    margin: 0;
  }
}
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body {
    background: white !important;
  }
  body > *:not(#printArea) {
    display: none !important;
  }
  #printArea {
    display: block !important;
  }
  a {
    color: #000;
  }
  .badge-print {
    margin-bottom: 3mm;
  }
}
