.loading-message { padding: 30px; text-align: center; }
.production-auth { max-width: 460px; margin: 7vh auto; padding: 0 16px; }
.production-auth .card-body { padding: 24px; }
.production-auth h1 { font-size: 28px; margin-bottom: 8px; }
.production-auth form { margin-top: 18px; }
.production-auth .button.primary { width: 100%; min-height: 48px; }
.production-auth .field { margin-bottom: 15px; }
.production-auth .pin-input { font-size: 30px; text-align: center; letter-spacing: .45em; }
.production-auth .login-roles { display: flex; gap: 7px; margin: 18px 0; }
.production-auth .login-roles button { flex: 1; }
.production-auth .login-roles button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.production-message { position: fixed; z-index: 100; right: 18px; bottom: 18px; max-width: min(540px, calc(100vw - 36px)); padding: 13px 18px; border: 1px solid #9abfb6; border-radius: 10px; background: #f4fcf8; color: var(--ink); box-shadow: 0 5px 25px #102c3426; }
.production-message.error { background: var(--red-soft); border-color: #dbaeb1; color: var(--red); }
.production-message[hidden] { display: none; }
.production-app .sidebar-footer { display: block; }
.production-app .sidebar-footer span { display: block; }
.production-app .topbar-user { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.production-app .page h1 { font-size: 32px; }
.production-app .page .stack { gap: 16px; }
.production-form { max-width: 760px; }
.production-form .actions { margin-top: 17px; }
.production-form .application-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.production-form .application-tabs .button { min-width: 115px; }
.application-tabs .button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.production-staff { max-width: 900px; margin: auto; }
.production-staff .page-heading h1 { font-size: 30px; }
.production-staff .production-form { max-width: none; }
.production-history { min-width: 520px; }
.production-history .request-operation { display: flex; flex-wrap: wrap; gap: 6px; }
.production-history .small { display: block; }
.production-history .request-reason { max-width: 280px; overflow-wrap: anywhere; }
.production-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.production-filters .field { flex: 1 1 180px; }
.production-chart th:first-child { width: 30%; }
.production-chart { table-layout: fixed; min-width: 560px; }
.production-chart tbody th { background: transparent; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--ink); white-space: normal; }
.production-chart td, .production-chart tbody th { padding-top: 13px; padding-bottom: 13px; vertical-align: middle; }
.production-chart tbody tr:last-child th { border-bottom: 0; }
.production-chart .person-label { display: block; }
.production-chart .person-label small { display: block; color: var(--muted); font-weight: 400; }
.production-chart .metric { display: grid; gap: 5px; }
.production-chart .metric strong { color: var(--blue); font-size: 17px; font-variant-numeric: tabular-nums; }
.production-chart .metric.balance strong { color: var(--accent-dark); }
.production-chart .track { height: 10px; background: #edf2f4; border-radius: 3px; overflow: hidden; }
.production-chart .track span { display: block; height: 100%; background: var(--blue); }
.production-chart .balance .track span { background: var(--accent); }
.production-chart .track.unknown { background: transparent; border: 1px dashed var(--line); }
.production-person-link { border: 0; padding: 3px 0; background: transparent; color: inherit; text-align: left; }
.production-person-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.production-settings details > summary { cursor: pointer; font-weight: 780; padding: 15px 17px; }
.production-settings details[open] > summary { border-bottom: 1px solid var(--line-soft); }
.production-settings .inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.production-settings .inline-form .field { flex: 1 1 160px; }
.production-settings .inline-form .field.pin-field { flex: 0 1 130px; }
.production-settings .employee-settings + .employee-settings { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.production-settings .employee-settings h3 { margin-bottom: 10px; }
.production-settings .sync-results { margin: 0; padding-left: 20px; }
.production-settings .sync-results li { margin: 6px 0; }
.production-settings .connection-state { margin-bottom: 15px; }
.approval-pairing { display: grid; gap: 8px; max-width: 560px; margin-top: 15px; padding: 16px; border: 1px solid #bfdad3; border-radius: 10px; background: var(--accent-soft); }
.approval-pairing-code { color: var(--accent-dark); font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: .18em; }
.approval-device-form { margin-top: 15px; }
.approval-device-form input { max-width: 200px; font-size: 22px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.approval-device-note { margin-top: 15px; }
.approval-recovery { margin-top: 16px; }
.approval-recovery summary { padding-left: 0 !important; }
.production-account-info { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.production-account-info:last-child { border-bottom: 0; }
#receipt { max-width: 540px; width: calc(100% - 32px); padding: 25px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
#receipt::backdrop { background: #102b3473; }
#receipt p { margin-top: 10px; }
#receipt .receipt-options { display: grid; gap: 10px; margin-top: 20px; }
#receipt .receipt-options .button { min-height: 50px; }
.receipt-countdown { color: var(--muted); font-size: 12px; }
.production-busy { opacity: .68; pointer-events: none; }
.data-note { padding: 0 3px; }
.password-control { display: flex; align-items: stretch; gap: 6px; width: 100%; min-width: 0; }
.password-control input { flex: 1 1 auto; min-width: 0; width: 0; }
.password-toggle { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; min-height: 40px; padding: 6px; border: 1px solid #cbd9da; border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: var(--accent-soft); color: var(--accent-dark); }
.password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.password-toggle svg { pointer-events: none; }
.login-help { margin-top: 18px; }
.login-help summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.login-help p { margin-top: 9px; }
.production-settings .leader-reset { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.production-settings .leader-reset > summary { padding: 12px 0; font-size: 13px; }
.production-settings .leader-reset[open] > summary { border-bottom: 0; }
.leader-reset form { padding: 0 0 10px; }
.history-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.touch-history-table { min-width: 430px; }
.touch-history-table td { font-variant-numeric: tabular-nums; }
.access-code-input { font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.access-enrollment { display: grid; gap: 8px; margin-top: 16px; padding: 16px; border: 1px solid #bfdad3; border-radius: 10px; background: var(--accent-soft); }
.access-enrollment-code { color: var(--accent-dark); font-size: clamp(20px, 4vw, 29px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: .04em; }
.access-devices-list { margin-top: 14px; }
.access-devices-list .small { display: block; margin-top: 3px; }
.write-setting { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 9px; font-weight: 700; }
.write-setting input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.integration-state { margin-top: 7px; font-weight: 700; max-width: 270px; white-space: normal; }
.integration-state.confirmed { color: var(--accent-dark); }
.integration-state.attention { color: var(--red); }
.integration-state.waiting { color: var(--muted); }
.integration-detail { max-width: 270px; overflow-wrap: anywhere; white-space: normal; margin-top: 4px; }
.csv-mode { display: flex; gap: 8px; flex-wrap: wrap; }
.csv-mode .button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.csv-include-exported { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 13px; cursor: pointer; }
.csv-include-exported input, .production-csv .csv-checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.production-csv { min-width: 560px; }
.production-csv td { vertical-align: top; }
.production-csv .small { display: block; margin-top: 4px; }
.production-csv .csv-checkbox { width: 42px; text-align: center; }
.csv-download-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 13px; padding: 18px; border-top: 1px solid var(--line-soft); }
.csv-download-result { display: grid; gap: 5px; margin: 0 18px 18px; padding: 15px; border: 1px solid #bfdad3; border-radius: 9px; background: var(--accent-soft); overflow-wrap: anywhere; }
.production-csv-page details > summary { cursor: pointer; font-weight: 750; padding: 16px 18px; }
.production-csv-page details[open] > summary { border-bottom: 1px solid var(--line-soft); }
.csv-attention { border-color: #ddcbb6; }
.csv-blocked-list { list-style: none; margin: 0; padding: 0; }
.csv-blocked-list li { display: grid; gap: 5px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.csv-blocked-list li:first-child { padding-top: 0; }
.csv-blocked-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.csv-blocked-reason { color: var(--red); overflow-wrap: anywhere; }
.csv-blocked-list .history-actions { margin-top: 7px; }
.csv-instructions ol { margin: 0 0 14px; padding-left: 22px; }
.csv-instructions li { margin-bottom: 12px; }
.csv-instructions li p { margin-top: 8px; overflow-wrap: anywhere; }
.csv-history-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.csv-history-item .small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.csv-output-history .card-body > p { margin-top: 14px; }
@media (max-width: 720px) {
  .production-auth { margin-top: 4vh; }
  .production-app .sidebar { height: auto; min-height: 0; position: static; padding: 16px; }
  .production-app .brand { padding-bottom: 12px; }
  .production-app .sidebar nav { display: flex; flex-wrap: wrap; }
  .production-app .nav-item { width: auto; }
  .production-app .sidebar-footer { display: none; }
  .production-app.app-shell { grid-template-columns: minmax(0, 1fr); }
  .production-app .page { padding: 19px 14px 40px; }
  .production-app .page h1 { font-size: 27px; }
  .production-form .form-grid { grid-template-columns: 1fr; }
  .production-chart .metric strong { font-size: 15px; }
}
