:root {
  color-scheme: light;
  --page: #eef3f1;
  --surface: #ffffff;
  --surface-soft: #f5f8f7;
  --text: #16211e;
  --muted: #68766f;
  --line: #dce5e1;
  --brand: #0f5f4a;
  --brand-dark: #0b4939;
  --brand-soft: #dff1ea;
  --danger: #9b3131;
  --shadow: 0 16px 40px rgba(26, 60, 49, .12);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
}

button, input, textarea, select { font: inherit; }
button, label[for], a { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface-soft);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  position: relative;
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(13px + env(safe-area-inset-top)) 18px 13px;
  color: #fff;
  background: var(--brand);
}

.topbar h1 { margin: 2px 0 0; font-size: 18px; font-weight: 650; }
.topbar-kicker { font-size: 11px; color: rgba(255,255,255,.72); }

.account-button { max-width: 48%; border: 0; padding: 7px 9px; border-radius: 12px; color: #fff; background: rgba(255,255,255,.12); text-align: right; cursor: pointer; }
.account-button strong, .account-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button strong { font-size: 11px; }
.account-button small { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 9px; }

.server-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,.12);
  white-space: nowrap;
}
.server-state span { width: 7px; height: 7px; border-radius: 50%; background: #72ddb5; }
.server-state.is-offline span { background: #ffb0a8; }

main { padding: 22px 18px 18px; }
.view { animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: .4; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
h2 { margin: 0 0 18px; font-size: clamp(23px, 7vw, 29px); line-height: 1.13; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 14px; }

.scan-action {
  min-height: 172px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #0f5f4a, #16866a);
  box-shadow: 0 14px 30px rgba(15,95,74,.22);
  cursor: pointer;
}
.scan-icon { align-self: start; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.16); font-size: 26px; }
.scan-copy strong, .scan-copy small { display: block; }
.scan-copy strong { font-size: 19px; margin-bottom: 5px; }
.scan-copy small { color: rgba(255,255,255,.78); line-height: 1.35; }
.scan-arrow { font-size: 25px; }

.secondary-action, .primary-action {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 13px 16px;
  font-weight: 650;
  cursor: pointer;
}
.secondary-action { margin-top: 10px; color: var(--brand); background: var(--brand-soft); }
.primary-action { margin-top: 14px; color: #fff; background: var(--brand); }
.primary-action:hover { background: var(--brand-dark); }
.primary-action:disabled { opacity: .45; cursor: default; }

.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 24px 0 10px; }
.text-button, .back-button { border: 0; padding: 5px 0; color: var(--brand); background: transparent; cursor: pointer; font-size: 12px; }
.back-button { margin: -8px 0 13px; font-size: 13px; }

.document-list { display: grid; gap: 8px; }
.empty-state { min-height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 18px; text-align: center; border-radius: 20px; color: var(--muted); background: var(--surface); }
.empty-state > span { font-size: 29px; color: var(--brand); }
.empty-state strong { color: var(--text); font-size: 14px; }
.empty-state small { max-width: 250px; font-size: 12px; line-height: 1.45; }

.document-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: center; padding: 12px 13px; border-radius: 17px; background: var(--surface); }
.document-card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.document-card strong, .document-card small { display: block; }
.document-card strong { font-size: 13px; overflow-wrap: anywhere; }
.document-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.document-card time { color: var(--muted); font-size: 10px; white-space: nowrap; }

.photo-preview { min-height: 290px; display: grid; place-items: center; overflow: hidden; border-radius: 20px; background: #1c2825; }
.photo-preview img { display: none; width: 100%; max-height: 410px; object-fit: contain; }
.photo-preview.has-image img { display: block; }
.photo-preview.has-image .preview-placeholder { display: none; }
.preview-placeholder { padding: 30px; color: rgba(255,255,255,.65); text-align: center; }
.photo-name { min-height: 17px; margin: 9px 2px 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

.notice { margin-bottom: 13px; padding: 11px 13px; border-radius: 14px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; }
form { display: grid; gap: 10px; }
form label, .search-field { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; outline: none; color: var(--text); background: var(--surface); }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,95,74,.1); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search-field { margin-bottom: 14px; }

.report-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 15px; border-radius: 18px; background: var(--surface); }
.report-card strong, .report-card small { display: block; }
.report-card strong { font-size: 13px; }
.report-card small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.download-action { color: var(--brand); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.access-form { margin-bottom: 12px; padding: 14px; border-radius: 18px; background: var(--surface); }
.user-list { display: grid; gap: 8px; }
.user-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 13px; border-radius: 16px; background: var(--surface); }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: 12px; }
.user-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-card button { border: 0; padding: 7px 9px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 10px; cursor: pointer; }
.user-card button.is-danger { color: var(--danger); background: #f8e8e8; }
.production-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.summary-chip { padding: 12px 8px; border-radius: 15px; background: var(--surface); text-align: center; }
.summary-chip strong, .summary-chip small { display: block; }
.summary-chip strong { color: var(--brand); font-size: 19px; }
.summary-chip small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.production-form { display: grid; gap: 10px; margin-bottom: 12px; padding: 14px; border-radius: 18px; background: var(--surface); }
.production-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.production-form .check-field { display: flex; align-items: center; gap: 8px; }
.production-form .check-field input { width: auto; }
.compact-form .secondary-action { margin-top: 0; }
.task-list, .management-list { display: grid; gap: 8px; }
.task-card { padding: 13px; border-radius: 17px; background: var(--surface); }
.task-card-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.task-card-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; }
.task-card-row.task-card-primary { grid-template-columns: minmax(0, 1fr) minmax(110px, 155px); }
.task-card-primary strong,
.task-card-primary .task-project,
.task-card-secondary .task-meta,
.task-card-secondary .task-plan { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-primary strong {
  overflow: visible;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.task-card-primary .task-project { width: 100%; max-width: none; color: var(--muted); font-size: 11px; text-align: right; }
.project-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid rgba(45, 45, 45, .16);
  border-radius: 999px;
  color: var(--text);
  background: var(--project-fill);
  font-weight: inherit;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-project .project-badge,
.report-corner > .project-badge { margin-left: auto; }
.project-plan { margin-left: 6px; color: var(--muted); }
.management-card strong .project-badge { font-size: 13px; }
.task-card-secondary { margin-top: 6px; }
.task-card-secondary .task-meta,
.task-card-secondary .task-plan { margin-top: 0; }
.task-card-secondary .task-plan { color: var(--text); font-weight: 600; text-align: right; }
.task-card-secondary .task-quantities { margin-top: 0; color: var(--text); font-size: 11px; font-weight: 600; text-align: right; white-space: nowrap; }
.task-inline-status { color: var(--brand-dark); font-weight: 600; }
.task-metrics { display: grid; grid-template-columns: minmax(92px, 1.45fr) repeat(3, minmax(48px, 1fr)); gap: 6px; margin-top: 9px; }
.task-metrics > span { min-width: 0; padding-left: 7px; border-left: 1px solid var(--line); }
.task-metrics > span:first-child { padding-left: 0; border-left: 0; }
.task-metrics small,
.task-metrics strong { display: block; min-width: 0; overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.task-metrics small { color: var(--muted); font-size: 10px; font-weight: 400; }
.task-metrics strong { margin-top: 2px; color: var(--text); font-size: 12px; font-weight: 600; }
.task-card.admin-task-card { padding: 9px 11px; }
.admin-task-card .task-card-primary { align-items: start; font-size: 12px; }
.admin-task-facts { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 5px; font-size: 11px; }
.admin-task-facts b { color: var(--brand-dark); }
.admin-task-start, .admin-task-hint { margin-top: 4px; font-size: 10px; color: var(--muted); }
.admin-task-run { display: grid; gap: 2px; padding-top: 5px; margin-top: 5px; border-top: 1px solid var(--line); font-size: 11px; overflow-wrap: anywhere; }
.admin-task-run-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.task-card.admin-task-card .admin-task-run strong { font-size: 11px; margin: 0; }
.task-card.admin-task-card .admin-task-run small { font-size: 10px; color: var(--muted); margin: 0; }
.admin-task-card .task-actions { margin-top: 5px; gap: 5px; }
.admin-task-card .task-actions button { padding: 6px 9px; min-height: 30px; font-size: 11px; }
.report-detail-card { transition: background-color .2s ease, border-color .2s ease; }
.report-status-area { margin: 8px -5px -5px; padding: 1px 5px 7px; border-radius: 11px; }
.report-detail-card.report-incomplete .report-status-area { background: #fff0f2; }
.report-detail-card.report-complete .report-status-area { background: #eff8ed; }
.report-detail-card.report-scrap .report-status-area { background: #fff5de; }
.report-detail-card.report-cancelled .report-status-area { background: #f1f1f1; }
.report-detail-card.report-incomplete::before { background: #df8e9d; }
.report-detail-card.report-complete::before { background: #5a972a; }
.report-detail-card.report-scrap::before { background: #dfa536; }
.report-detail-card.report-cancelled::before { background: #9f9f9f; }
.report-detail-card.report-incomplete .task-progress span { background: #df8e9d; }
.report-detail-card.report-complete .task-progress span { background: #5a972a; }
.report-detail-card.report-scrap .task-progress span { background: #dfa536; }
.report-detail-card.report-cancelled .task-progress span { background: #9f9f9f; }
.report-corner { width: 100%; max-width: none; color: var(--muted); text-align: right; }
.report-corner span,
.report-corner small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-corner span { font-size: 11px; }
.report-corner > .project-badge { display: inline-flex; }
.report-corner small { margin-top: 3px; color: var(--text); font-size: 10px; font-weight: 600; }
.report-metrics { grid-template-columns: minmax(52px, .85fr) minmax(58px, .75fr) minmax(50px, .7fr) minmax(88px, 1.15fr); }
.production-journal-card.is-compact time,
.production-journal-card.is-compact .journal-quantity { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.production-journal-card.is-compact .task-meta { color: var(--text); font-size: 12px; }
.production-journal-card.is-compact .journal-quantity { margin-top: 0; color: var(--text); font-weight: 600; }
.production-journal-card.is-compact .task-card-row { gap: 8px; }

@media (max-width: 410px) {
  .task-card-row { gap: 8px; }
  .task-card-row.task-card-primary { grid-template-columns: minmax(0, 1fr) minmax(92px, 120px); }
  .task-card-primary strong { font-size: 12px; }
  .task-card-primary .task-project { font-size: 10px; }
  .task-card-secondary .task-meta { font-size: 12px; }
  .task-card-secondary .task-quantities { font-size: 10px; }
  .task-metrics { grid-template-columns: minmax(82px, 1.35fr) repeat(3, minmax(45px, 1fr)); gap: 4px; }
  .task-metrics.report-metrics { grid-template-columns: minmax(48px, .72fr) minmax(52px, .7fr) minmax(44px, .58fr) minmax(84px, 1.25fr); }
  .task-metrics > span { padding-left: 5px; }
  .task-metrics small { font-size: 9px; }
  .task-metrics strong { font-size: 11px; }
}
.task-card strong, .task-card small { display: block; }
.task-card strong { font-size: 13px; overflow-wrap: anywhere; }
.task-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.task-status { flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 9px; }
.task-progress { height: 6px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: var(--line); }
.task-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.task-relaunch-note {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #4f4f4f;
  background: #e8e8e8;
  font-size: 10px;
  font-weight: 650;
}
.worktime-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.worktime-status-main strong,
.worktime-status-main small,
.worktime-empty strong,
.worktime-empty small { display: block; }
.worktime-status-main strong,
.worktime-empty strong { font-size: 17px; }
.worktime-status-main small,
.worktime-empty small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.worktime-status-meta { text-align: right; }
.worktime-status-meta span,
.worktime-status-meta strong { display: block; }
.worktime-status-meta span { color: var(--muted); font-size: 10px; }
.worktime-status-meta strong { margin-top: 4px; font-size: 13px; }
.worktime-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
.worktime-action {
  min-height: 54px;
  border: 1px solid #d3d3d0;
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}
.worktime-action span { margin-right: 6px; color: var(--brand); }
.worktime-action.is-checkin { color: #216b3b; background: #edf8f0; border-color: #b8ddc3; }
.worktime-action.is-checkout { color: #99413d; background: #fff1f0; border-color: #e5c0bd; }
.worktime-action:disabled { opacity: .38; cursor: default; }
.worktime-list { display: grid; gap: 8px; }
.worktime-card { padding: 13px; border: 1px solid var(--line); border-left: 3px solid #8b8b8b; border-radius: 10px; background: #fff; }
.worktime-card.is-open { border-left-color: #d77b91; background: #fff0f4; border-color: #e7a9b8; }
.worktime-card.is-weekend,
.worktime-current.is-weekend { border-color: #eadb9a; background: #fff7d9; }
.worktime-card.is-weekend { border-left-color: #d3ad26; }
.worktime-card.is-open,
.worktime-card.is-open.is-weekend { border-color: #e7a9b8; border-left-color: #d77b91; background: #fff0f4; }

.admin-module-heading { margin: 4px 0 18px; }
.admin-module-heading h3 { margin: 4px 0 0; font-size: clamp(24px, 5vw, 34px); }
.admin-worktime-create { margin: 18px 0 24px; padding: 14px; border: 1px solid #d7d5d1; border-radius: 14px; background: #fff; }
.admin-worktime-create summary { cursor: pointer; color: var(--orange); font-weight: 700; }
.admin-worktime-create form { margin-top: 16px; }
.worktime-export-form { margin-top: 16px; }
.worktime-export-head { display: flex; margin-bottom: 10px; align-items: center; justify-content: space-between; gap: 8px; }
.worktime-export-head > strong { font-size: 13px; }
.worktime-export-head > div { display: flex; gap: 5px; }
.worktime-export-head button { min-height: 28px; padding: 4px 8px; border: 1px solid #d5d2ce; border-radius: 7px; background: #fff; color: #6a4a39; font: inherit; font-size: 10px; font-weight: 700; }
.worktime-month-buttons { display: grid; gap: 8px; }
.worktime-month-link { display: flex; min-height: 44px; padding: 10px 12px; align-items: center; justify-content: center; border: 1px solid #d9d6d1; border-radius: 9px; background: #fff; color: #303030; font-size: 13px; font-weight: 700; text-decoration: none; }
.worktime-month-link.is-current { border-color: #ff671d; background: #fff0e8; color: #a43d0d; }
.report-card.personal-timesheet-card { display: grid; gap: 12px; }
.report-card.personal-timesheet-card[hidden] { display: none; }
.personal-timesheet-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.personal-timesheet-controls label { display: grid; gap: 5px; flex: 1 1 170px; min-width: 0; font-size: 12px; color: var(--muted); }
.personal-timesheet-controls input { width: 100%; min-width: 0; box-sizing: border-box; }
.personal-timesheet-controls button { flex: 1 1 150px; min-height: 46px; }
.worktime-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e3e1dd; }
.worktime-admin-actions button { min-height: 38px; padding: 8px 12px; border: 1px solid #ff671d; border-radius: 8px; background: #fff2eb; color: #5a321d; font: inherit; font-weight: 650; }
.worktime-admin-actions button.is-danger { border-color: #c9564b; background: #fff0ef; color: #9f3028; }
.admin-section-switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 24px; padding: 5px; border-radius: 14px; background: #e9e8e5; }
.admin-section-switcher button { min-height: 48px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: #666; font: inherit; font-weight: 700; }
.admin-section-switcher button.is-active { background: #fff; color: #222; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.admin-production-menu { margin: 0 0 10px; border: 1px solid #d8d6d2; border-radius: 12px; background: #fff; overflow: hidden; }
.admin-production-menu summary { position: relative; padding: 16px 48px 16px 16px; color: #303030; font-size: 16px; font-weight: 750; cursor: pointer; list-style: none; }
.admin-production-menu summary::-webkit-details-marker { display: none; }
.admin-production-menu summary::after { content: '⌄'; position: absolute; right: 17px; top: 50%; color: #ff671d; font-size: 22px; line-height: 1; transform: translateY(-58%); transition: transform .16s ease; }
.admin-production-menu[open] summary { border-bottom: 1px solid #e1dfdb; }
.admin-production-menu[open] summary::after { transform: translateY(-42%) rotate(180deg); }
.admin-production-menu-body { padding: 14px; }
.admin-production-menu-body > .production-form:first-child { margin-top: 0; }
.admin-production-menu-body > .management-list:last-child { margin-bottom: 0; }
.plan-import-history { margin-top: 16px; padding-top: 14px; border-top: 1px solid #dedbd7; }
.plan-import-history > strong { display: block; margin-bottom: 9px; font-size: 13px; }
.plan-import-card { display: block; }
.plan-import-card > div > small { display: block; margin-top: 6px; }
.plan-import-file { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 13px; font-weight: 750; text-decoration: none; }
.plan-import-file span { color: var(--brand); }
.plan-import-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.plan-import-actions .cancel-action { min-height: 48px; }
@media (max-width: 430px) {
  .plan-import-actions { grid-template-columns: 1fr; }
}
.plan-import-meta { display: grid; gap: 4px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.plan-import-meta span > strong,.plan-import-meta button > strong { color: var(--text); font-size: inherit; }
.plan-import-meta .plan-revision-date { margin: 3px 0; padding: 8px 10px; border: 1px solid #e3c65b; border-radius: 8px; background: #fff4bf; color: #5c4a12; }
.plan-import-meta > button { padding: 2px 0; border: 0; background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.plan-import-meta > button b { margin-left: 4px; color: var(--brand); font-size: 10px; }
.plan-import-card.is-cancelled { opacity: .72; background: #f7f6f4; }
.plan-import-cancelled-status { color: #8f342e; }
.plan-import-meta > .plan-import-cancel-button { margin-top: 7px; padding: 9px 10px; border: 1px solid #c9564b; border-radius: 8px; background: #fff0ef; color: #9f3028; font-weight: 700; text-align: center; }
.plan-import-meta > .plan-import-cancel-button:disabled { opacity: .55; cursor: wait; }
.plan-import-dialog { max-width: 620px; }
.plan-import-modal-body { max-height: calc(100dvh - 120px); overflow: auto; padding: 14px; }
.plan-import-modal-body ol { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.plan-import-modal-body li { padding: 9px 10px; border: 1px solid #dedbd7; border-radius: 9px; background: #faf9f7; font-size: 12px; }
.plan-import-modal-body li strong,.plan-import-modal-body li small { display: block; }
.plan-import-modal-body li small { margin-top: 4px; color: var(--muted); }
.ocr-test-lab { display: grid; gap: 12px; }
.ocr-test-warning { padding: 11px 13px; border: 1px solid #e6c65a; border-radius: 11px; color: #655116; background: #fff5c8; font-size: 11px; line-height: 1.4; }
.ocr-test-form { padding: 14px; border: 1px solid #ddd; border-radius: 14px; background: #fff; }
.ocr-test-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.ocr-test-form legend { margin-bottom: 7px; color: #666; font-size: 11px; }
.ocr-test-form fieldset label { position: relative; display: block; color: #222; cursor: pointer; }
.ocr-test-form fieldset input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ocr-test-form fieldset span { min-height: 66px; display: grid; align-content: center; padding: 10px 11px; border: 1px solid #d8d8d5; border-radius: 11px; background: #fafafa; }
.ocr-test-form fieldset input:checked + span { border-color: #ff641e; box-shadow: 0 0 0 2px rgba(255,100,30,.12); background: #fff2eb; }
.ocr-test-form fieldset strong,.ocr-test-form fieldset small { display: block; }
.ocr-test-form fieldset strong { font-size: 12px; }
.ocr-test-form fieldset small { margin-top: 3px; color: #777; font-size: 9px; line-height: 1.3; }
.ocr-test-file { margin-top: 4px; }
.ocr-test-preview { min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #c9c9c6; border-radius: 12px; color: #888; background: #f4f4f2; font-size: 11px; }
.ocr-test-preview img { display: none; width: 100%; max-height: 330px; object-fit: contain; background: #252525; }
.ocr-test-preview.has-image img { display: block; }
.ocr-test-preview.has-image span { display: none; }
.ocr-test-current { padding: 14px; border: 1px solid #ddd; border-left: 4px solid #ff641e; border-radius: 12px; background: #fff; }
.ocr-test-current.is-error { border-left-color: #c43c32; background: #fff1f0; }
.ocr-test-current.is-unreadable { border-left-color: #d8a328; background: #fff8df; }
.ocr-test-current h3 { margin-bottom: 10px; font-size: 15px; }
.ocr-result-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.ocr-result-grid span { min-width: 0; padding: 9px; border-radius: 9px; background: #f3f3f1; }
.ocr-result-grid small,.ocr-result-grid strong { display: block; overflow-wrap: anywhere; }
.ocr-result-grid small { color: #777; font-size: 9px; }
.ocr-result-grid strong { margin-top: 3px; font-size: 12px; }
.ocr-test-log-list { display: grid; gap: 8px; }
.ocr-test-log { border: 1px solid #ddd; border-left: 3px solid #ff641e; border-radius: 12px; background: #fff; overflow: hidden; }
.ocr-test-log.is-error { border-left-color: #c43c32; }
.ocr-test-log.is-unreadable { border-left-color: #d8a328; }
.ocr-test-log summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 12px; cursor: pointer; list-style: none; }
.ocr-test-log summary::-webkit-details-marker { display: none; }
.ocr-test-log summary strong,.ocr-test-log summary small { display: block; }
.ocr-test-log summary strong { overflow-wrap: anywhere; font-size: 12px; }
.ocr-test-log summary small { margin-top: 4px; color: #777; font-size: 10px; }
.ocr-test-log summary time { color: #777; font-size: 9px; white-space: nowrap; }
.ocr-test-log-body { padding: 0 12px 12px; border-top: 1px solid #ececea; }
.ocr-test-log-actions { display: flex; gap: 8px; margin-top: 10px; }
.ocr-test-log-actions a { padding: 7px 9px; border-radius: 8px; color: #a53e12; background: #fff0e8; font-size: 10px; text-decoration: none; }
.ocr-test-raw { max-height: 180px; overflow: auto; margin: 10px 0 0; padding: 9px; border-radius: 8px; color: #444; background: #f3f3f1; font: 10px/1.45 ui-monospace,Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.section-heading > div { display: flex; gap: 10px; }
.text-button.is-danger { color: #b43831; }
.topbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; }
.topbar-actions .account-button { max-width: 190px; }
.notification-button {
  position: relative; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px; color: #fff; background: rgba(255,255,255,.12); font-size: 19px; cursor: pointer;
}
.notification-button b {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; display: grid; place-items: center;
  padding: 0 5px; border: 2px solid var(--surface); border-radius: 999px; color: #fff; background: #c53c32;
  font-size: 10px; line-height: 1;
}
.notification-overlay { position: fixed; z-index: 1100; inset: 0; background: rgba(28,31,30,.48); }
.notification-overlay[hidden] { display: none; }
.notification-panel {
  position: absolute; top: 0; right: max(0px, calc((100vw - 560px) / 2)); bottom: 0; width: min(92vw, 420px);
  display: grid; grid-template-rows: auto auto 1fr; background: #f6f6f4; box-shadow: -18px 0 45px rgba(0,0,0,.18);
}
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 18px 14px; border-bottom: 1px solid #ddd; background: #fff; }
.notification-head small,.notification-head strong { display: block; }
.notification-head small { margin-bottom: 3px; color: #777; font-size: 10px; }
.notification-head strong { font-size: 22px; }
.notification-head button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #ededeb; font-size: 25px; cursor: pointer; }
.notification-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: 1px solid #e1e1de; }
.notification-toolbar span { color: #777; font-size: 11px; }
.notification-toolbar button { border: 0; padding: 7px; color: #ff641e; background: transparent; font-size: 11px; cursor: pointer; }
.notification-list { min-height: 0; display: grid; align-content: start; gap: 8px; overflow: auto; padding: 12px 14px calc(22px + env(safe-area-inset-bottom)); }
.notification-card { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; padding: 13px; border: 1px solid #ddd; border-radius: 13px; background: #fff; cursor: pointer; }
.notification-card.is-unread { border-color: #ffc2a5; background: #fff7f2; }
.notification-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #7c4c14; background: #fff0c9; font-size: 16px; }
.notification-card.is-error .notification-card-icon { color: #9f2929; background: #fde4e4; }
.notification-card.is-success .notification-card-icon { color: #24713e; background: #e1f3e5; }
.notification-card strong,.notification-card small,.notification-card time { display: block; }
.notification-card strong { padding-right: 10px; font-size: 12px; line-height: 1.35; }
.notification-card small { margin-top: 4px; color: #606762; font-size: 11px; line-height: 1.4; }
.notification-card time { margin-top: 7px; color: #8a8f8c; font-size: 9px; }
.notification-card.is-unread::after { content: ''; position: absolute; top: 14px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: #ff641e; }
.notification-empty { min-height: 220px; display: grid; place-items: center; padding: 30px; color: #777; text-align: center; font-size: 12px; }
@media (max-width: 430px) {
  .topbar-actions { gap: 5px; }
  .notification-button { flex-basis: 36px; width: 36px; height: 36px; }
  .topbar-actions .account-button { max-width: 150px; }
  .notification-panel { right: 0; width: 100%; }
}
.worktime-audit-card { padding: 14px; border: 1px solid #d9d7d3; border-left: 3px solid #777; border-radius: 10px; background: #fff; }
.worktime-audit-card p { margin: 8px 0 4px; font-weight: 650; }
.worktime-audit-card > small { color: #6c6c6c; }
@media (max-width: 430px) {
  .admin-section-switcher { gap: 4px; }
  .admin-section-switcher button { min-height: 52px; padding: 7px 4px; font-size: 11px; }
  .ocr-test-form fieldset { grid-template-columns: 1fr; }
}
.worktime-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.worktime-card .worktime-card-head { flex-wrap: wrap; row-gap: 4px; }
.worktime-card-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.worktime-card-head span { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.worktime-times { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.worktime-times span + span { padding-left: 10px; border-left: 1px solid var(--line); }
.worktime-times small,
.worktime-times strong { display: block; }
.worktime-photo-time { display: inline-flex; min-width: 58px; min-height: 34px; margin-top: 4px; padding: 5px 10px; align-items: center; justify-content: center; border: 1px solid #ff671d; border-radius: 8px; background: #fff; color: #1f1f1f; font: inherit; font-weight: 750; }
.worktime-photo-time:active { background: #fff0e8; transform: translateY(1px); }
.worktime-photo-modal { position: fixed; z-index: 1000; inset: 0; display: grid; padding: 18px; place-items: center; background: rgba(0,0,0,.68); }
.worktime-photo-modal[hidden] { display: none; }
.worktime-photo-dialog { width: min(680px, 100%); max-height: calc(100dvh - 36px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 18px 70px rgba(0,0,0,.35); }
.worktime-photo-head { position: sticky; z-index: 1; top: 0; display: flex; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dedbd7; background: #fff; }
.worktime-photo-head button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f0efed; color: #222; font-size: 28px; line-height: 1; }
.worktime-photo-dialog img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 110px); object-fit: contain; background: #191919; }
body.has-modal { overflow: hidden; }
.worktime-times small { color: var(--muted); font-size: 10px; }
.worktime-times strong { margin-top: 2px; font-size: 14px; }
.worktime-result { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.worktime-break-list { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #dedbd7; }
.worktime-break-list > strong { font-size: 12px; }
.worktime-break-row { padding: 10px; border: 1px solid #ddd9d4; border-radius: 9px; background: rgba(255,255,255,.72); }
.worktime-break-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.worktime-break-title span { font-size: 12px; font-weight: 700; }
.worktime-break-title small { color: var(--muted); font-size: 10px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.run-output-summary { flex-basis: 100%; padding: 9px 10px; border-radius: 10px; color: var(--text); background: var(--brand-soft); font-size: 10px; line-height: 1.4; }
.task-actions button { border: 0; padding: 8px 10px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 10px; cursor: pointer; }
.task-actions button.is-primary { color: #fff; background: var(--brand); }
.management-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 15px; background: var(--surface); }
.management-card strong, .management-card small { display: block; }
.management-card strong { font-size: 12px; }
.management-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.management-card button { border: 0; padding: 7px 9px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 10px; cursor: pointer; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(145deg, #e8f2ee, #f7faf9); }
.login-screen[hidden] { display: none; }
.login-card { width: min(100%, 390px); padding: 26px 22px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.login-card h2 { margin-bottom: 20px; }
.login-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 17px; color: #fff; background: var(--brand); font-size: 27px; }
.login-help { display: block; margin-top: 13px; color: var(--muted); text-align: center; font-size: 10px; }

.bottom-nav {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 560px);
  min-height: calc(68px + env(safe-area-inset-bottom));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 6px 4px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.bottom-nav button { border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); background: transparent; font-size: 9px; cursor: pointer; }
.bottom-nav button[hidden] { display: none !important; }
.bottom-nav button span { font-size: 19px; line-height: 1; }
.bottom-nav button.is-active { color: var(--brand); }
.app-shell.is-admin .bottom-nav { grid-template-columns: none; }
#adminWorkspace > * { margin-top: 18px; }
#adminWorkspace > *:first-child { margin-top: 0; }

.toast { position: fixed; z-index: 10; left: 50%; bottom: 88px; transform: translate(-50%, 15px); max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 999px; color: #fff; background: var(--text); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 28px 28px; }
}

@media (max-width: 370px) {
  main { padding-left: 14px; padding-right: 14px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .server-state { padding-left: 7px; padding-right: 7px; }
  .field-row { grid-template-columns: 1fr; }
}

/* K-Robotics visual system */
:root {
  --page: #eeeeec;
  --surface: #ffffff;
  --surface-soft: #f5f5f4;
  --text: #323232;
  --muted: #747474;
  --line: #c8c8c8;
  --brand: #fd691a;
  --brand-dark: #fd691a;
  --brand-soft: #fff0e7;
  --graphite: #424242;
  --graphite-deep: #323232;
  --success: #5a972a;
  --warning: #ffd700;
  --info: #3b88bd;
  --danger: #ff0000;
  --shadow: 0 18px 50px rgba(44, 44, 44, .11);
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at 9% 7%, rgba(253,105,26,.10), transparent 25%),
    linear-gradient(135deg, #f3f3f1, #e7e7e4);
}

.app-shell { background: var(--surface-soft); }

.topbar {
  min-height: 84px;
  padding-top: calc(12px + env(safe-area-inset-top));
  color: var(--text);
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}

.brand-lockup, .login-brand { display: flex; align-items: center; gap: 11px; }
.login-brand { margin-bottom: 30px; }
.brand-logo { display: block; width: auto; object-fit: contain; }
.brand-logo-login { width: min(100%, 360px); height: auto; }
.brand-logo-header { width: 132px; height: 44px; object-position: left center; }
.brand-refresh-button { display: block; flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.brand-refresh-button .brand-logo-header { max-width: 100%; }
.brand-refresh-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.brand-wordmark, .topbar-kicker {
  color: var(--graphite);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}
.topbar h1 { color: var(--graphite); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  position: relative;
  isolation: isolate;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 900;
  font-style: italic;
  box-shadow: 0 0 0 5px var(--brand-soft);
}
.brand-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px;
  border: 3px solid rgba(65,65,65,.82);
  border-radius: 50%;
}
.brand-mark-small { width: 38px; height: 38px; font-size: 18px; box-shadow: none; }
.brand-mark-small::after { inset: 6px; border-width: 2px; }

.account-button {
  color: var(--graphite);
  background: #f0f0ee;
  border-radius: 3px;
  border-right: 3px solid var(--brand);
}
.account-button small { color: var(--muted); }

main { padding-top: 25px; }
.eyebrow {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h2 {
  color: #545454;
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
h3 { color: #545454; font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }

.scan-action {
  min-height: 184px;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--graphite-deep), #565656);
  box-shadow: 0 16px 34px rgba(48,48,48,.20);
}
.scan-action::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -40px;
  top: -58px;
  border: 24px solid rgba(255,146,62,.16);
  border-radius: 50%;
}
.scan-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 92px;
  height: 5px;
  background: var(--brand);
}
.scan-icon {
  z-index: 1;
  border-radius: 50%;
  color: var(--graphite-deep);
  background: var(--brand);
  font-size: 22px;
}
.scan-copy, .scan-arrow { z-index: 1; }
.scan-copy strong { font-weight: 800; text-transform: uppercase; }
.scan-arrow { color: var(--brand); }

.primary-action, .secondary-action {
  min-height: 48px;
  border-radius: 3px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.primary-action { background: var(--brand); color: #fff; }
.primary-action:hover { background: var(--brand-dark); }
.secondary-action { color: var(--graphite); background: #fff; border: 1px solid #cfcfcb; }
.secondary-action:hover { border-color: var(--brand); color: var(--brand-dark); }
.text-button, .back-button, .download-action { color: var(--brand-dark); font-weight: 750; }

.empty-state, .document-card, .report-card, .access-form, .user-card,
.production-form, .task-card, .management-card, .summary-chip {
  border-radius: 3px;
  border: 1px solid #e2e2df;
  box-shadow: 0 7px 22px rgba(45,45,45,.045);
}
.document-card, .task-card, .management-card, .report-card, .user-card { position: relative; overflow: hidden; }
.document-card::before, .task-card::before, .management-card::before, .report-card::before, .user-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
}
.document-card-icon { border-radius: 50%; color: #fff; background: var(--brand); }
.empty-state > span, .summary-chip strong { color: var(--brand-dark); }
.summary-chip { border-top: 3px solid var(--brand); }

input, textarea, select {
  min-height: 46px;
  border-radius: 3px;
  border-color: #cececa;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,146,62,.15);
}
form label, .search-field, .production-form label { color: #777; font-weight: 600; }

.photo-preview { border-radius: 3px; background: var(--graphite-deep); border-bottom: 5px solid var(--brand); }
.scan-production-result { margin-top: 14px; }
.scan-match-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #dededb;
  border-left: 4px solid var(--brand);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(45,45,45,.045);
}
.scan-match-card.is-error { border-left-color: var(--danger); }
.scan-match-card strong, .scan-match-card small { display: block; }
.scan-match-card strong { color: var(--graphite); font-size: 16px; }
.scan-match-card small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.scan-match-operation {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 9px;
  color: #8c4918;
  background: var(--brand-soft);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 750;
}
.scan-match-route { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.skip-operation {
  flex: 0 0 auto;
  border: 1px solid var(--brand);
  border-radius: 3px;
  padding: 7px 10px;
  color: var(--brand-dark);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.skip-operation.full-width { width: 100%; margin-top: 0; min-height: 42px; text-transform: uppercase; }
.skip-operation:disabled { opacity: .45; cursor: default; }
.scan-start-form { margin-top: 10px; padding: 14px; border: 1px solid #dededb; border-radius: 3px; background: #fff; }
.scan-start-form[hidden], .scan-start-form [hidden] { display: none !important; }
.machine-choice { width: 100%; min-width: 0; }
.machine-choice summary { cursor: pointer; padding: 10px 0; color: var(--brand-dark); font-weight: 700; }
.machine-choice select { width: 100%; margin-bottom: 8px; }
.scan-machine-actions { display: grid; gap: 8px; }
.scan-machine-actions button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  padding: 10px 12px;
  color: var(--graphite);
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.review-footer { display: flex; justify-content: flex-end; margin-top: 10px; }
.cancel-action {
  min-width: 130px;
  min-height: 42px;
  border: 1px solid #c8c8c4;
  border-radius: 3px;
  color: var(--graphite);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}
.task-status { border-radius: 3px; color: #8c4918; background: var(--brand-soft); font-weight: 700; }
.task-progress { border-radius: 0; }
.task-progress span { border-radius: 0; background: var(--brand); }
.task-actions button, .management-card button, .user-card button {
  border-radius: 3px;
  color: var(--graphite);
  background: var(--brand-soft);
}
.task-actions button.is-primary { color: #fff; background: var(--brand); }

.login-screen {
  background:
    linear-gradient(155deg, rgba(253,105,26,.09), transparent 42%),
    linear-gradient(135deg, #f3f3f1, #e7e7e4);
}
.login-card {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border-top: 6px solid var(--brand);
}
.login-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -110px;
  bottom: -115px;
  border: 25px solid rgba(65,65,65,.05);
  border-radius: 50%;
}
.login-card h2 { text-transform: uppercase; }

.bottom-nav {
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding-top: 5px;
  border-top: 1px solid #d4d4d1;
  background: rgba(255,255,255,.97);
}
.bottom-nav button { position: relative; font-weight: 600; }
.bottom-nav button span { color: #777; }
.bottom-nav button.is-active { color: var(--graphite); }
.bottom-nav button.is-active span { color: var(--brand-dark); }
.bottom-nav button.is-active::before {
  content: "";
  position: absolute;
  top: -5px;
  width: 36px;
  height: 3px;
  background: var(--brand);
}
.toast { border-radius: 3px; background: var(--graphite-deep); }

@media (min-width: 700px) {
  .app-shell { border-radius: 4px; }
  .bottom-nav { border-radius: 0 0 4px 4px; }
}

@media (max-width: 410px) {
  .brand-logo-header { width: 110px; height: 38px; }
  .brand-lockup { gap: 8px; }
  .topbar h1 { font-size: 15px; }
  .topbar-kicker { font-size: 9px; }
}

/* iOS-style system typography. San Francisco is used automatically on Apple devices. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.025em;
  text-transform: none;
}
h3 {
  font-weight: 650;
  letter-spacing: -.01em;
  text-transform: none;
}
.scan-copy strong,
.primary-action,
.secondary-action,
.skip-operation.full-width,
.login-card h2 {
  letter-spacing: -.01em;
  text-transform: none;
}
button, input, textarea, select { font-family: inherit; }

body { font-size: 15px; font-weight: 400; line-height: 1.35; }
strong { font-weight: 600; }
.topbar h1 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.brand-wordmark, .topbar-kicker { font-weight: 600; letter-spacing: .04em; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
h2 { font-size: clamp(27px, 7vw, 32px); line-height: 1.15; }
h3 { font-size: 17px; line-height: 1.25; }
.scan-copy strong { font-size: 18px; font-weight: 600; }
.scan-copy small { font-size: 14px; }
.primary-action, .secondary-action, .cancel-action, .download-action,
.skip-operation, .scan-machine-actions button {
  font-size: 15px;
  font-weight: 600;
}
form label, .search-field, .production-form label {
  font-size: 13px;
  font-weight: 400;
}
input, textarea, select { font-size: 16px; font-weight: 400; }
.task-card strong, .management-card strong, .report-card strong,
.document-card strong, .user-card strong { font-size: 15px; font-weight: 600; }
.task-card small, .management-card small, .report-card small,
.document-card small, .user-card small { font-size: 13px; font-weight: 400; }
.task-actions button, .management-card button, .user-card button {
  font-size: 13px;
  font-weight: 500;
}
.task-status { font-size: 12px; font-weight: 500; }
.text-button, .back-button { font-size: 14px; font-weight: 500; }
.bottom-nav button { font-size: 10px; font-weight: 500; }
.account-button strong { font-size: 12px; font-weight: 600; }
.account-button small { font-size: 10px; font-weight: 400; }

/* Stable header layout and a crisp notification icon on iOS/Android. */
.topbar { overflow: hidden; }
.brand-lockup { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand-lockup > div { min-width: 0; }
.brand-lockup .topbar-kicker,
.brand-lockup h1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo-header { flex: 0 1 auto; max-width: 132px; }
.topbar-actions { flex: 0 0 auto; max-width: 46%; }
.topbar-actions .account-button { min-width: 0; max-width: 170px; }
.notification-button {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d5d5d2;
  border-radius: 10px;
  color: #555;
  background: #f0f0ee;
  cursor: pointer;
}
.notification-button[hidden],
.notification-button b[hidden] { display: none !important; }
.notification-button svg { width: 21px; height: 21px; overflow: visible; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-button b {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #c83d35;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
@media (max-width: 430px) {
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand-logo-header { width: 82px; height: 36px; }
  .brand-lockup { gap: 6px; }
  .brand-lockup .topbar-kicker { font-size: 8px; }
  .brand-lockup h1 { font-size: 14px; }
  .topbar-actions { max-width: 48%; gap: 6px; }
  .topbar-actions .account-button { max-width: 128px; padding-left: 7px; padding-right: 7px; }
  .notification-button { flex-basis: 36px; width: 36px; height: 36px; }
  .notification-button svg { width: 19px; height: 19px; }
}

.scan-execution-card { border-left-color: #d88923; background: #fff9ed; }
.scan-execution-card label { display: grid; gap: 6px; margin-top: 14px; color: #6d572b; }
.scan-execution-card select { width: 100%; background: #fff; }
.scan-execution-card .primary-action { width: 100%; margin-top: 10px; }
