:root {
  --tblr-primary: #206bc4;
  --tblr-font-sans-serif:
    "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --tblr-body-bg: #f6f8fb;
  --tblr-body-color: #182433;
}
.legacy-panel h3 {
  margin-top: 24px;
}
.legacy-panel form > label,
.legacy-panel #legacy-images,
.legacy-panel #legacy-text {
  margin-top: 14px;
}
.legacy-items {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.legacy-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #e1e6ed;
  border-radius: 6px;
  padding: 14px;
}
.legacy-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  background: #f6f8fb;
  border-radius: 4px;
  color: #52677d;
  font-size: 12px;
}
.legacy-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.legacy-item-body {
  min-width: 0;
}
.legacy-filename,
.legacy-item-status,
#legacy-notice,
#legacy-summary {
  overflow-wrap: anywhere;
}
.legacy-filename {
  display: block;
  margin-bottom: 9px;
  color: #52677d;
}
.legacy-item-status {
  margin: 9px 0 0;
}
.legacy-actions {
  flex-wrap: wrap;
}
.match-correction #match-query-form,
.match-correction #match-edit-form,
.match-correction #match-outcome:not(:empty) {
  margin-top: 20px;
}
.match-correction .filter > label {
  flex: 1 1 320px;
  min-width: 0;
}
.match-correction .filter {
  align-items: end;
}
.match-correction td,
.match-correction p,
.match-correction .notice,
.match-correction #match-selection {
  overflow-wrap: anywhere;
}
.match-correction .actions {
  flex-wrap: wrap;
}
.match-preview.card {
  margin-top: 18px;
  padding: 18px;
  border-color: #c7d8ef;
  background: #f6f9fd;
}
.match-preview h3 {
  margin-bottom: 14px;
}
.match-preview details {
  margin: 14px 0;
}
.match-preview .table-wrap {
  margin-top: 10px;
}
.monthly-correction > summary {
  font-size: 17px;
  font-weight: 600;
}
.monthly-correction > p,
.monthly-correction form,
.monthly-report,
.monthly-correction #monthly-history {
  margin-top: 18px;
}
.monthly-correction .filter {
  align-items: end;
}
.monthly-correction .actions {
  flex-wrap: wrap;
}
.monthly-correction textarea {
  margin-top: 8px;
}
.monthly-correction td,
.monthly-correction p,
.monthly-correction .notice,
.monthly-correction h4 {
  overflow-wrap: anywhere;
}
.monthly-report {
  border-top: 1px solid #d7e4f6;
  padding-top: 20px;
}
.monthly-employees {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.monthly-employee.card {
  padding: 16px;
  min-width: 0;
  background: #f6f9fd;
}
.monthly-employee h4 {
  margin: 0 0 10px;
}
.monthly-pay {
  width: 100%;
  table-layout: fixed;
  font-size: 13px;
}
.monthly-pay td,
.monthly-pay th {
  padding: 8px 5px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.monthly-pay td:not(:first-child),
.monthly-pay th:not(:first-child) {
  text-align: right;
}
.monthly-pending {
  padding: 10px;
  background: #fff8e8;
  border-radius: 5px;
}
.monthly-pending p:last-child {
  margin-bottom: 0;
}
.monthly-history-list article {
  padding: 14px 0;
  border-bottom: 1px solid #e1e6ed;
}
@media (max-width: 600px) {
  .legacy-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .legacy-thumb {
    height: 52px;
  }
  .legacy-actions button {
    width: 100%;
    white-space: normal;
  }
  .match-correction .filter,
  .match-correction .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .match-correction .filter > label {
    flex: 1 1 auto;
  }
  .match-correction button {
    white-space: normal;
    max-width: 100%;
  }
  .match-preview.card {
    padding: 14px;
  }
  .monthly-employees {
    grid-template-columns: minmax(0, 1fr);
  }
  .monthly-correction .filter,
  .monthly-correction .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .monthly-correction button {
    white-space: normal;
    max-width: 100%;
  }
}
[hidden] {
  display: none !important;
}
body {
  font-family: var(--tblr-font-sans-serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button.btn {
  min-height: 40px;
}
input.form-control,
select.form-select {
  min-height: 42px;
}
textarea {
  min-height: 90px;
}
label.form-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 500;
  margin-bottom: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 8px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  margin: 0 0 18px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: #52677d;
}
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: white;
  border-right: 1px solid #e1e6ed;
  padding: 32px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
}
.brand {
  font-size: 22px;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 0 16px 6px;
  color: #182433;
}
.brand-sub {
  font-size: 12px;
  color: #52677d;
  padding: 0 16px 32px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar nav button {
  justify-content: flex-start;
  text-align: left;
  color: #465a70;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}
.sidebar nav button.active {
  background: #e9f1fc;
  color: #206bc4;
  font-weight: 650;
  border-left: 3px solid #206bc4;
}
.sidebar footer {
  position: absolute;
  bottom: 28px;
  padding: 12px;
  color: #52677d;
  font-size: 11px;
  line-height: 1.8;
}
.main.page-wrapper {
  display: block;
  min-width: 0;
  margin: 0;
}
header.navbar {
  height: 74px;
  background: white;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e1e6ed;
  box-shadow: none;
}
header strong {
  font-size: 14px;
}
header button {
  margin-left: 6px;
}
main {
  padding: 28px 32px;
  max-width: 1520px;
  margin: auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}
.heading p {
  margin: 0;
}
.section-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #52677d;
  font-weight: 600;
  margin-bottom: 8px;
}
.panel.card {
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 2px #18243303;
}
.hero.card {
  background: #edf3fc;
  border-color: #d7e4f6;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hero h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.hero p {
  margin-bottom: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat.card {
  padding: 20px;
}
.stat b {
  display: block;
  font-size: 28px;
  margin: 8px 0;
  line-height: 1.3;
  color: #182433;
}
.cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid + label {
  margin-top: 16px;
}
form > label + label {
  margin-top: 16px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.badge {
  font-weight: 500;
  padding: 6px 9px;
  font-size: 12px;
  letter-spacing: 0;
}
.badge.bg-green-lt {
  color: #216747 !important;
}
.badge.bg-yellow-lt {
  color: #805c0e !important;
}
.notice {
  padding: 14px 16px;
  background: #fff6dc;
  color: #78580c;
  border: 1px solid #f1e2b5;
  border-radius: 6px;
  line-height: 1.6;
  margin: 14px 0;
}
.table-wrap {
  overflow: auto;
}
.table {
  font-size: 14px;
  margin: 0;
}
.table th {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #52677d;
  background: #f6f8fb;
  font-weight: 600;
  padding: 13px 12px;
}
.table td {
  padding: 14px 12px;
}
.table td.code {
  overflow-wrap: anywhere;
  max-width: 340px;
}
.batch-list .table {
  table-layout: fixed;
  width: 100%;
}
.batch-list .table th,
.batch-list .table td,
.batch-list .batch-state {
  white-space: normal;
  overflow-wrap: anywhere;
}
.batch-list .batch-meta {
  display: block;
  color: #66788a;
  margin-top: 6px;
}
.batch-list .batch-state {
  display: inline-block;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.batch-state-included {
  background: #e8f5ed;
  color: #216747;
}
.batch-state-inactive {
  background: #eef1f5;
  color: #52677d;
}
.batch-state-pending {
  background: #fff6dc;
  color: #805c0e;
}
.table td img,
.thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #f2f5f8;
  border-radius: 6px;
}
.table td button.btn {
  padding: 5px 11px;
  min-height: 32px;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  font-size: 12px;
}
.page-number {
  padding: 8px 12px;
}
.empty {
  text-align: center;
  padding: 40px !important;
  color: #52677d;
}
.login {
  max-width: 440px;
  margin: 10vh auto;
  padding: 36px !important;
}
.login label {
  margin: 18px 0;
}
.login button {
  width: 100%;
}
.login .section-label {
  color: #206bc4;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #182433;
  color: white;
  padding: 14px 22px;
  border-radius: 8px;
  max-width: 90%;
  display: none;
  z-index: 20;
  box-shadow: 0 4px 20px #18243333;
}
.clock {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 44px;
  font-weight: 600;
  margin: 24px 0;
  line-height: 1.3;
}
.clock-buttons {
  display: flex;
  gap: 16px;
}
.clock-buttons button {
  flex: 1;
  min-height: 72px !important;
  font-size: 20px;
}
.detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  line-height: 1.7;
  margin: 24px 0;
}
.detail dt {
  color: #52677d;
  font-weight: 500;
}
.detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.list-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f4;
}
.list-row > div {
  flex: 1;
}
.list-row p {
  margin: 6px 0 0;
}
.money {
  font-size: 34px;
  font-weight: 650;
  color: #182433;
  white-space: nowrap;
}
.payroll-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.split {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f4;
}
details {
  margin: 12px 0;
}
details.panel.card {
  display: block;
}
summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.filter {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.filter > * {
  flex: 1;
  min-width: 0;
}
progress {
  width: 100%;
  accent-color: #206bc4;
  height: 8px;
}
.mobile-only {
  display: none;
}
.sku-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.sku-tile {
  padding: 16px;
}
.sku-tile img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f6f8fb;
  border-radius: 5px;
  margin-bottom: 14px;
}
.sku-tile strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}
.sku-tile .btn {
  margin-top: 12px;
}
.gallery-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 10px;
  }
  main {
    padding: 24px 20px;
  }
  header.navbar {
    padding: 16px 20px;
  }
  .sku-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .payroll-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  button.btn {
    min-height: 44px;
  }
  .responsive td button.btn {
    min-height: 44px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #e1e6ed;
  }
  .brand {
    font-size: 19px;
    display: inline;
    padding: 0;
  }
  .brand-sub,
  .sidebar footer {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 14px;
    gap: 5px;
  }
  .sidebar nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 12px;
    min-height: 42px !important;
  }
  .sidebar nav button.active {
    border-left: 0;
    border-bottom: 2px solid #206bc4;
  }
  .sidebar nav.nav {
    flex-wrap: nowrap;
  }
  header.navbar {
    height: auto;
    padding: 12px 16px;
    font-size: 11px;
    flex-wrap: wrap;
  }
  header.navbar button {
    font-size: 11px;
    padding: 6px;
    min-height: 32px;
  }
  .main.page-wrapper {
    min-height: auto;
  }
  main {
    padding: 24px 16px;
  }
  .heading {
    display: block;
  }
  .heading button {
    margin-top: 12px;
  }
  h1 {
    font-size: 24px;
  }
  .hero.card {
    display: block;
    padding: 22px;
  }
  .hero button {
    margin-top: 16px;
  }
  .panel.card {
    padding: 18px;
  }
  .stat.card {
    padding: 16px;
  }
  .stat b {
    font-size: 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  input.form-control,
  select.form-select,
  textarea.form-control {
    font-size: 16px;
  }
  .filter {
    flex-wrap: wrap;
  }
  .filter > * {
    flex: 1 1 40%;
  }
  .detail {
    grid-template-columns: 100px 1fr;
  }
  .login {
    margin: 6vh 16px;
  }
  .clock {
    font-size: 36px;
  }
  .mobile-only {
    display: block;
  }
  .responsive thead {
    display: none;
  }
  .responsive tr {
    display: block;
    border-bottom: 1px solid #e1e6ed;
    padding: 12px 0;
  }
  .responsive td {
    display: block;
    border: 0;
    padding: 5px;
    max-width: 100%;
  }
  .responsive td:before {
    content: attr(data-label);
    color: #52677d;
    font-size: 12px;
    margin-right: 12px;
  }
  .table-footer {
    flex-wrap: wrap;
  }
  .sku-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sku-tile {
    padding: 12px;
  }
  .sku-tile img {
    height: 110px;
  }
  .grid {
    gap: 12px;
  }
}

.query-state {
  min-height: 150px;
  padding: 32px 20px;
  border: 1px solid #e1e6ed;
  border-radius: 6px;
  background: #f6f8fb;
  color: #52677d;
  text-align: center;
  overflow-wrap: anywhere;
}
.query-state p {
  margin: 0 0 14px;
}
.query-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.query-error {
  background: #fff6ed;
  border-color: #efd6ba;
  color: #7b4f1c;
}

.audit-table {
  table-layout: fixed;
  width: 100%;
}
.audit-table th:nth-child(1) {
  width: 22%;
}
.audit-table th:nth-child(2) {
  width: 16%;
}
.audit-table th:nth-child(3) {
  width: 25%;
}
.audit-table td,
.audit-table pre {
  white-space: normal;
  overflow-wrap: anywhere;
}
.audit-table td {
  vertical-align: top;
}
.audit-table details {
  margin: 0;
  min-width: 0;
}
.audit-table summary {
  padding: 0;
}
.audit-table pre {
  white-space: pre-wrap;
  max-width: 100%;
  margin-top: 12px;
}
#audit-workspace .table-footer {
  align-items: flex-start;
}
#audit-workspace .table-footer button {
  flex: 0 0 auto;
}

.punch-summary{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.punch-summary small,.punch-summary strong{display:block}.punch-summary strong{font-size:22px;font-variant-numeric:tabular-nums}.punch-done{color:#28794b;font-weight:600}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0}.calendar-toolbar label{flex:1;max-width:220px}.month-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-week{text-align:center;color:#667382;padding:8px 0}.calendar-day{position:relative;min-height:60px;border:1px solid #e1e6ed;border-radius:6px;background:white;color:#182433;padding:12px 4px;font-size:16px}.calendar-day:disabled{opacity:1;color:#182433;cursor:default}.calendar-day.today{border:2px solid #206bc4}.calendar-day.selected{background:#e6f0ff;outline:2px solid #206bc4}.calendar-badge{position:absolute;right:2px;top:1px;font-size:11px;border-radius:3px;padding:0 3px}.calendar-badge.rest{background:#e1f3e7;color:#237340}.calendar-badge.makeup{background:#ffe5e5;color:#b52b36}.statutory-dot{position:absolute;width:5px;height:5px;border-radius:50%;background:#b52b36;bottom:4px;left:calc(50% - 2px)}.attendance-calendar{max-width:680px}.clock-buttons{flex-wrap:wrap}.clock-buttons .punch-done{flex-basis:100%}@media(max-width:640px){.calendar-day{min-height:46px;font-size:14px}.calendar-badge{font-size:10px}.month-calendar{gap:3px}.clock-buttons button{font-size:17px}}

.calendar-step,#retry-attendance-network,#request-makeup{min-height:44px;min-width:44px}.attendance-primary{max-width:680px}

@media(max-width:640px){.attendance-primary .clock{margin:12px 0}.attendance-primary .notice{padding:10px 12px;margin-bottom:8px}.attendance-primary .clock-buttons{gap:8px;margin:8px 0}.attendance-primary .clock-buttons button{min-height:60px!important}.attendance-primary .punch-done{margin:4px 0}}

.task-card{border-bottom:1px solid #e1e6ed;padding:16px 0}.task-card:last-child{border-bottom:0}.task-description{white-space:pre-wrap;overflow-wrap:anywhere}.task-card .actions{display:flex;gap:12px;flex-wrap:wrap}.task-card button{min-height:44px}.task-card details p{overflow-wrap:anywhere}

/* 1.0.24: a compact Chinese operations workspace, shared by every role. */
:root {
  --work-blue: #206bc4;
  --work-ink: #182433;
  --work-muted: #52677d;
  --work-canvas: #f6f8fb;
  --work-line: #d8e0ea;
  --ease-out: cubic-bezier(0.23,1,0.32,1);
  --ease-drawer: cubic-bezier(0.32,0.72,0,1);
  --tblr-font-sans-serif: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
body { background: var(--work-canvas); color: var(--work-ink); font-size: 15px; }
button, a, summary { touch-action: manipulation; }
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid #206bc4; outline-offset: 3px;
}
.skip-link { position: fixed; left: 16px; top: 0; z-index: 100; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); color: white; background: #17559e; }
.skip-link:focus-visible { top: 8px; width: auto; height: auto; padding: 12px; clip-path: none; }
.layout { grid-template-columns: 224px minmax(0,1fr); grid-template-rows: auto 1fr; }
.layout > header.navbar { grid-column: 2; grid-row: 1; }
.layout > .sidebar { grid-column: 1; grid-row: 1 / span 2; }
.layout > .main.page-wrapper { grid-column: 2; grid-row: 2; }
.sidebar { padding: 24px 16px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { font-size: 21px; padding: 0 12px 24px; letter-spacing: 0; }
.sidebar nav { gap: 20px; }
.nav-group { display: grid; gap: 4px; min-width: 0; }
.nav-group h2 { font-size: 13px; color: var(--work-muted); margin: 0 12px 4px; font-weight: 500; }
.sidebar a.nav-link { display: flex; min-height: 44px; padding: 10px 12px; color: var(--work-muted); border-radius: 6px; text-align: left; }
.sidebar a.nav-link.active { color: #17559e; background: #e9f1fc; font-weight: 650; box-shadow: inset 3px 0 var(--work-blue); }
.sidebar footer { position: static; margin-top: auto; padding: 24px 12px 0; font-size: 12px; }
header.navbar { height: auto; min-height: 64px; padding: 12px 24px; }
.notification-center { position: relative; margin-left: auto; flex: 0 0 auto; }
.notification-toggle { width: 44px; height: 44px; display: grid; place-items: center; position: relative; border: 1px solid var(--work-line); border-radius: 10px; background: #fff; color: #33445e; cursor: pointer; }
.notification-toggle:hover,.notification-toggle[aria-expanded="true"] { color: var(--work-blue); background: #f3f6ff; border-color: #b9c8ea; }
.notification-toggle svg { width: 21px; height: 21px; }
.notification-badge { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 11px; line-height: 17px; text-align: center; font-weight: 700; }
.notification-panel { position: absolute; z-index: 45; top: calc(100% + 9px); right: 0; width: min(390px,calc(100vw - 24px)); max-height: min(70vh,680px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--work-line); border-radius: 12px; box-shadow: 0 14px 42px rgba(25,38,68,.2); color: #1f2937; }
.notification-panel[hidden],.notification-badge[hidden] { display: none; }
.notification-heading,.notification-actions { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--work-line); }
.notification-heading { justify-content: space-between; }
.notification-heading strong { font-size: 16px; }
.notification-heading button,.notification-actions button { margin: 0; }
.notification-actions { border-top: 1px solid var(--work-line); border-bottom: 0; flex-wrap: wrap; }
.notification-actions label { margin-right: auto; white-space: nowrap; }
.notification-actions button { min-height: 36px; }
.notification-content { overflow-y: auto; min-height: 60px; padding: 4px 0; }
.notification-item { display: flex; align-items: start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #edf0f5; }
.notification-item.is-read { opacity: .67; }
.notification-item strong { font-size: 14px; }
.notification-item p { margin: 4px 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.notification-item a { font-size: 13px; }
.notification-choice { padding-top: 2px; }
.notification-choice input,.notification-actions input { width: 18px; height: 18px; }
.notification-note { color: #9a3412; }
.notification-help { margin: 0; padding: 0 16px 12px; font-size: 12px; color: var(--work-muted); }
.notification-empty,.notification-error { margin: 12px 16px; }
@media (max-width: 640px) {
  .notification-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(78dvh,720px); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -12px 40px rgba(25,38,68,.24); }
  .notification-actions { position: sticky; bottom: 0; background: #fff; }
}
.page-context,.account-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-actions button { margin: 0; font-size: 13px; }
.account-role { font-size: 13px; color: var(--work-muted); }
#navigation-toggle { display: none; }
main { padding: 24px; min-width: 0; }
h1 { font-size: 24px; margin-bottom: 8px; overflow-wrap: anywhere; }
h2 { font-size: 18px; margin-bottom: 16px; }
h3 { font-size: 16px; }
.heading { margin-bottom: 20px; }
.heading p,small,.section-label { font-size: 13px; letter-spacing: 0; }
.panel.card { padding: 20px; margin-bottom: 20px; border: 1px solid var(--work-line); border-radius: 8px; box-shadow: none; min-width: 0; }
.hero.card { padding: 20px; gap: 16px; }
.hero h2 { font-size: 20px; }
.stat.card { padding: 16px; border: 1px solid var(--work-line); box-shadow: none; }
.stat b { font-size: 26px; }
.grid { gap: 16px; margin-bottom: 20px; }
.cols { gap: 20px; }
.form-grid { gap: 16px; }
label.form-label { font-size: 14px; gap: 6px; }
input.form-control,select.form-select,textarea.form-control { border-color: #8191a3; }
.filter { gap: 12px; align-items: end; margin-bottom: 16px; }
.filter > * { min-width: 0; }
.actions { gap: 8px; flex-wrap: wrap; }
.table-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
table { font-size: 14px; }
th { color: var(--work-muted); font-size: 13px; }
td,dd,.task-card p { overflow-wrap: anywhere; }
.task-card { padding: 20px 0; }
.task-card h3 { margin-bottom: 8px; }
.task-card p { margin-bottom: 8px; }
.task-card .actions { margin: 12px 0; }
summary { cursor: pointer; min-height: 32px; padding: 6px 0; font-weight: 550; }
.task-description { font-size: 14px; margin-top: 8px; }
.section-navigation { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.section-navigation button { font-size: 14px; }
main h2 { scroll-margin-top: 16px; }
.settings-rules > summary h2 { display: inline; font-size: 18px; }
.settings-rules[open] > summary,.attendance-secondary[open] > summary { margin-bottom: 16px; }
img { object-fit: contain; max-width: 100%; }
.attendance-overview { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(0,1.15fr); gap: 20px; align-items: start; }
.attendance-overview .attendance-calendar { max-width: none; }
.attendance-primary .clock { font-size: 40px; line-height: 1.2; margin: 12px 0 8px; font-weight: 650; letter-spacing: 0; }
.attendance-primary .clock-buttons button { min-height: 48px; font-size: 18px; }
.attendance-primary .notice { font-size: 14px; }
.punch-summary { gap: 12px; margin: 16px 0; }
.punch-summary strong { font-size: 20px; }
.form-feedback { margin: 12px 0 0; color: var(--work-muted); padding: 10px 12px; border-left: 3px solid var(--work-blue); background: #edf3fc; overflow-wrap: anywhere; }
.form-feedback.error { color: #a12622; border-color: #a12622; background: #fff0ef; }
.form-feedback:empty { display: none; }
.login.card { max-width: 440px; margin: 8vh auto; padding: 28px; }
.login h1 { font-size: 24px; }
.login .actions button { width: 100%; min-height: 44px; }
button.btn { transition: transform 120ms var(--ease-out); }
button.btn:active { transform: scale(.98); }
button.btn:focus-visible { transition: none; transform: none; }
#toast { max-width: min(480px,calc(100vw - 32px)); overflow-wrap: anywhere; transition: opacity 180ms var(--ease-out); }
@starting-style { #toast { opacity: 0; } }
@media (hover:hover) and (pointer:fine) { .sidebar a.nav-link:hover { background: #edf3fc; color: #17559e; } }
@media (max-width:1200px) { .attendance-overview { grid-template-columns: minmax(0,1fr); } }
@media (max-width:1023px) {
  .layout { display: grid; grid-template-columns: minmax(0,1fr); }
  .main.page-wrapper { display: contents; }
  .layout > header.navbar { grid-column: 1; grid-row: 1; padding: 12px 16px; font-size: 14px; flex-wrap: wrap; gap: 8px; }
  .layout > .sidebar { grid-column: 1; grid-row: 2; }
  #navigation-toggle { display: inline-flex; min-height: 44px; }
  .sidebar { display: none; position: static; grid-row: 2; height: auto; padding: 16px; border: 0; border-bottom: 1px solid var(--work-line); }
  .nav-open .sidebar { display: flex; transition: opacity 220ms var(--ease-drawer); }
  @starting-style { .nav-open .sidebar { opacity: 0; } }
  .sidebar .brand,.sidebar footer { display: none; }
  .sidebar nav.nav { flex-direction: column; flex-wrap: nowrap; overflow: visible; margin: 0; gap: 16px; }
  .sidebar a.nav-link { min-height: 44px; }
  main { grid-row: 3; padding: 20px 16px; width: 100%; }
  .account-actions { flex-wrap: wrap; gap: 8px; }
  header.navbar .account-actions button { min-height: 44px; padding: 8px 12px; font-size: 14px; }
  .attendance-overview { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-width:640px) {
  body { font-size: 16px; }
  .account-actions { width: 100%; justify-content: flex-end; }
  .account-actions strong { margin-right: auto; }
  .account-role { font-size: 13px; }
  .panel.card { padding: 16px; margin-bottom: 16px; }
  .heading { margin-bottom: 16px; }
  h1 { font-size: 24px; }
  label.form-label { font-size: 15px; }
  button.btn,summary,input.form-control,select.form-select { min-height: 44px; }
  header.navbar button { font-size: 14px; }
  .grid { gap: 12px; }
  .form-grid { gap: 12px; }
  .filter > * { flex: 1 1 100%; }
  .hero.card { padding: 16px; }
  .hero h2 { font-size: 19px; }
  .clock-buttons { gap: 8px; }
  .calendar-toolbar { gap: 8px; flex-wrap: wrap; }
  .calendar-toolbar button { min-width: 44px; }
  .login.card { margin: 24px 16px; max-width: none; }
}
.calendar-toolbar label { display: flex; align-items: center; gap: 8px; min-width: 0; }
input[data-calendar-month] {
  display: block; flex: 1; min-width: 0; width: 100%; min-height: 44px;
  padding: 8px 10px; border: 1px solid #8191a3; border-radius: 6px;
  background: white; color: var(--work-ink); font: inherit; font-size: 16px;
  box-sizing: border-box;
}
.instant-motion *, .instant-motion *::before, .instant-motion *::after { transition: none !important; }
.bulk-workspace { padding: 16px; margin-bottom: 16px; border: 1px solid var(--work-line); border-radius: 8px; background: #f6f8fb; min-width: 0; }
.bulk-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.bulk-check input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; }
.bulk-preview-list { display: grid; gap: 12px; margin: 16px 0; }
.bulk-preview-row { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--work-line); border-radius: 6px; background: white; min-width: 0; }
.bulk-preview-row > div { min-width: 0; overflow-wrap: anywhere; }
.bulk-preview-row > img { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; }
.bulk-preview-row p { margin: 4px 0; }
.bulk-workspace .filter > label { flex: 1 1 180px; }
.bulk-workspace .filter > .bulk-check { flex: 1 1 180px; }
.bulk-workspace button { min-height: 44px; }
@media(max-width:640px) { .bulk-workspace { padding: 12px; } .bulk-workspace .filter > * { flex: 1 1 100%; } }
@media (prefers-reduced-motion:reduce) {
  button.btn,#toast,.nav-open .sidebar { transition: none; }
  button.btn:active { transform: none; }
}

/* Sales pagination keeps page entry usable on narrow screens. */
.sales-pagination {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;min-width:0;}
.sales-page-jump {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;}
.sales-page-jump label {display:flex;flex-direction:row;align-items:center;gap:6px;margin:0;white-space:nowrap;}
#sale-table .sales-page-jump input {width:5.5rem;min-height:44px;margin:0;}
#sale-table .sales-pagination button {min-height:44px;}
.sales-page-error {flex-basis:100%;color:#a4212b;max-width:100%;}
.sales-page-error[hidden] {display:none;}
@media(max-width:600px){.sales-pagination{width:100%;justify-content:flex-start;}.sales-page-jump{width:100%;}}

/* Shared unsaved-draft confirmation stays inside the application. */
.print-phone [data-print-nav] { display:none !important; }
@media(max-width:860px) { [data-print-nav] { display:none !important; } }
.print-embed { width:100%; min-width:0; }
.print-embed iframe { display:block; width:100%; height:calc(100dvh - 176px); min-height:540px; border:0; border-radius:10px; background:var(--work-canvas); }
.print-embed iframe[title="印花工作台"]{height:540px;overflow:hidden}
.app-unsaved-dialog{width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--border,#d5dce5);border-radius:12px;padding:0;color:var(--text,#182433);background:var(--surface,#fff);box-shadow:0 20px 64px #18243340}.app-unsaved-dialog::backdrop{background:#18243366}.app-unsaved-dialog .dialog-heading{padding:20px 24px;border-bottom:1px solid var(--border,#d5dce5)}.app-unsaved-dialog .dialog-body{padding:20px 24px}.app-unsaved-dialog .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
