:root {
  color-scheme: light;
  --surface: #fff;
  --surface-muted: #f6f7f9;
  --surface-hover: #eef1f6;
  --border: #e1e6ee;
  --border-strong: #cdd6e3;
  --text: #172033;
  --muted: #5c697d;
  --primary: #245bcf;
  --primary-fill: #245bcf;
  --primary-hover: #1d4ed8;
  --primary-soft: #eaf0fd;
  --green: #087a53;
  --green-soft: #e9f7ef;
  --orange: #945312;
  --orange-soft: #fff5e5;
  --red: #b23b48;
  --red-soft: #fff0f2;
  --shadow: 0 1px 3px rgb(21 38 70 / .06);
  --shadow-modal: 0 24px 60px rgb(15 23 42 / .22), 0 4px 16px rgb(15 23 42 / .08);
  --backdrop: rgb(15 23 42 / .42);
  --radius-card: 10px;
  --radius-control: 7px;
  --sidebar-width: 204px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #151b27;
  --surface-muted: #0e131c;
  --surface-hover: #202838;
  --border: #283347;
  --border-strong: #3a4960;
  --text: #edf2fa;
  --muted: #a2b0c5;
  --primary: #8db3ff;
  --primary-fill: #2c64dc;
  --primary-hover: #3a70e0;
  --primary-soft: #1d3150;
  --green: #66dbad;
  --green-soft: #17362f;
  --orange: #f4be74;
  --orange-soft: #392b1d;
  --red: #ff98a3;
  --red-soft: #422630;
  --shadow: 0 2px 6px rgb(0 0 0 / .25);
  --shadow-modal: 0 28px 70px rgb(0 0 0 / .55);
  --backdrop: rgb(4 8 16 / .66);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; color: var(--text); background: var(--surface-muted); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 16px; }
h2 { font-size: 14px; }
h3 { font-size: 13px; }
p { color: var(--muted); }
small { font-size: .9em; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon { display: inline-block; width: 1.2em; height: 1.2em; flex: none; background: currentColor; mask: var(--glyph) center / contain no-repeat; vertical-align: middle; }
.i-home { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7.5 9 7.5M5 9v10a1 1 0 0 0 1 1h4v-5h4v5h4a1 1 0 0 0 1-1V9'/%3E%3C/svg%3E"); }
.i-person { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.7' r='3.4'/%3E%3Cpath d='M4.8 20v-1.5a4.2 4.2 0 0 1 4.2-4.2h6a4.2 4.2 0 0 1 4.2 4.2V20'/%3E%3C/svg%3E"); }
.i-building { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v16m0-12h3a1 1 0 0 1 1 1v11M9 7h3M9 11h3M9 15h3m-1 6v-3'/%3E%3C/svg%3E"); }
.i-grid { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.4'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.4'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.4'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.4'/%3E%3C/svg%3E"); }
.i-calendar { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3.5' y='5.5' width='17' height='15' rx='2'/%3E%3Cpath d='M8 3v5m8-5v5M4 10h16m-12 4h2m4 0h2m-8 3h2'/%3E%3C/svg%3E"); }
.i-activity { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12h4l2.5-6 5 12 2.5-6h5'/%3E%3C/svg%3E"); }
.i-check { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.3 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.i-upload { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3m-4 4 4-4 4 4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E"); }
.i-flask { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6m-5 0v6l-5 8.5A2.2 2.2 0 0 0 6.9 21h10.2a2.2 2.2 0 0 0 1.9-3.5L14 9V3M8 15h8'/%3E%3C/svg%3E"); }
.i-play { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m8 5 11 7-11 7z'/%3E%3C/svg%3E"); }
.i-clock { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.i-search { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.6' cy='10.6' r='6'/%3E%3Cpath d='m15 15 4.6 4.6'/%3E%3C/svg%3E"); }

.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  border-right: 1px solid var(--border); background: var(--surface); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-size: 14px; line-height: 1.25; }
.brand-mark { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--primary-fill); color: #fff; font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group-label { color: var(--muted); font-size: 11px; font-weight: 650; padding: 6px 10px 2px; }
.nav-group-label:not(:first-child) { margin-top: 13px; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link[aria-current] { background: var(--primary-soft); color: var(--primary); }
.sidebar-foot { margin-top: auto; padding: 10px 4px 0; border-top: 1px solid var(--border); }
.sidebar-foot .button { width: 100%; }
.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 14px; min-height: 54px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 28px;
}
.topbar-title, .topbar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-end { color: var(--muted); justify-content: flex-end; }
#current-user { overflow-wrap: anywhere; }
.period-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 10px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 650; white-space: nowrap; }
.main { width: min(100%, 1240px); margin-inline: auto; padding: 22px 28px 40px; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.page-heading, .section-heading { margin-bottom: 14px; }
.panel-heading { padding: 14px 18px; }
.page-heading p, .section-heading p, .panel-heading p, .example-panel p { margin-top: 4px; }
.heading-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }

.button, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 6px; min-height: 34px; padding: 4px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface);
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--surface-hover); }
.button.primary { color: #fff; background: var(--primary-fill); border-color: var(--primary-fill); }
.button.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.quiet, .button.danger-link, .icon-button { background: transparent; border-color: transparent; color: var(--muted); }
.button.danger-link { color: var(--red); }
.button.danger-link:hover:not(:disabled), .button.danger { color: var(--red); background: var(--red-soft); }
.button.table-action { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.icon-button { min-height: 32px; width: 32px; padding: 0; font-size: 20px; line-height: 1; }
input:not([type=checkbox]):not([type=file]), select {
  width: 100%; min-width: 0; min-height: 34px; border-radius: var(--radius-control); border: 1px solid var(--border-strong);
  padding: 5px 9px; background: var(--surface);
}
input[type=checkbox] { accent-color: var(--primary-fill); margin: 1px; width: 14px; height: 14px; }
input::placeholder { color: var(--muted); }
.form-fields, .field { display: grid; gap: 8px; min-width: 0; }
.form-fields label, .field { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.form-fields input, .field :is(input, select) { color: var(--text); font-size: 13px; font-weight: 400; }
.form-message { color: var(--red); }
.search-field { display: flex; align-items: center; position: relative; min-width: 0; }
.search-field > .icon { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.search-field input[type=search] { padding-left: 31px; }
.select-field { display: grid; gap: 4px; color: var(--muted); }
.select-field select { color: var(--text); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--muted); font-size: 12px; font-weight: 650; background: var(--surface-muted); white-space: nowrap; }
.data-table td { overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.tax-mono, .record-tax-id { font-family: Consolas, ui-monospace, monospace; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.num { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-pending { background: var(--surface-hover); color: var(--muted); }
.state-running { background: var(--primary-soft); color: var(--primary); }
.state-done { background: var(--green-soft); color: var(--green); }
.state-issue { background: var(--orange-soft); color: var(--orange); }
.empty-state { padding: 24px 18px; text-align: center; color: var(--muted); }
.empty-state p, .record-result { margin-top: 4px; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-card { width: min(100%, 410px); padding: 25px; }
.login-brand { padding: 0; margin-bottom: 22px; }
.login-card h1 { font-size: 20px; }
.login-card p, .login-card #login-toggle { margin-top: 8px; }
.login-card form { margin-top: 18px; gap: 13px; }
.login-card #login-toggle { padding-inline: 0; }

.detail-dialog {
  position: fixed; width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  border: 1px solid var(--border); border-radius: 13px; padding: 0; color: var(--text); background: var(--surface); box-shadow: var(--shadow-modal);
}
.detail-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.dialog-content { padding: 16px 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; max-width: calc(100% - 36px); padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--primary); background: var(--primary-soft); box-shadow: var(--shadow-modal); }
.toast[data-type=error] { background: var(--red-soft); color: var(--red); }
.toast[data-type=success] { background: var(--green-soft); color: var(--green); }

.enterprise-intake { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.upload-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 18px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-muted); }
.upload-drop.is-dragging { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.upload-drop small { display: block; color: var(--muted); }
.upload-drop button { margin-left: auto; }
.upload-message { color: var(--muted); padding: 10px 18px 14px; overflow-wrap: anywhere; }
.example-panel { display: flex; align-content: start; align-items: center; flex-wrap: wrap; gap: 12px; padding: 15px 18px; }
.example-panel > div { flex: 1; }
.entry-icon { display: grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); }
.entry-icon-success { color: var(--green); background: var(--green-soft); }
.entry-icon-neutral { color: var(--muted); background: var(--surface-hover); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.stat > div { display: grid; }
.stat span { color: var(--muted); }
.stat strong { font-size: 19px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.records-panel:has(.data-table), #admin-records { overflow: auto; }
.records-panel .panel-heading { border-bottom: 1px solid var(--border); }
.queue-panel { margin-bottom: 14px; }
.queue-header, .queue-timing, .queue-item, .queue-hint { padding: 12px 16px; }
.queue-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.queue-intro p { margin-top: 4px; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.queue-timing { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); background: var(--surface-muted); border-block: 1px solid var(--border); }
.queue-timing strong { font-variant-numeric: tabular-nums; }
.queue-item { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-bottom: 1px solid var(--border); }
.queue-item > div:first-child { flex: 1 1 240px; }
.queue-item p { font-size: 12px; }
.queue-row-actions, .tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.queue-hint { font-size: 12px; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.admin-toolbar :is(select, .search-field) { width: auto; min-width: 120px; }
.admin-toolbar .search-field { flex: 1; max-width: 290px; }
.tab { border: 0; border-radius: 7px; padding: 7px 10px; background: var(--surface); color: var(--muted); font-weight: 650; }
.tab:hover { background: var(--surface-hover); }
.tab[aria-pressed=true] { background: var(--primary-soft); color: var(--primary); }

/* Personal workbench and the shared company dialog. */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric { min-width: 0; padding: 14px 17px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-val { margin-top: 3px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-val small { padding-left: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.table-toolbar, .table-filters, .toolbar-actions, .company-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.table-toolbar { justify-content: space-between; padding: 13px 17px; border-bottom: 1px solid var(--border); }
.table-filters { flex: 1 1 520px; }
.table-filters h2 { margin-right: 4px; }
.table-filters .search-field { flex: 1 1 180px; max-width: 300px; }
.search-field .icon { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.table-filters select { width: auto; }
.table-scroll, .inner-table { min-width: 0; overflow: auto; }
.company-table { min-width: 755px; }
.company-table th:first-child { width: 42px; }
.company-table .clickable-row { cursor: pointer; }
.company-table .clickable-row:hover { background: var(--surface-hover); }
.company-period { display: block; margin-top: 2px; color: var(--muted); }
.company-actions { gap: 5px; }
.emp-trigger { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); font-weight: 650; }
.emp-trigger:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.emp-trigger .caret { color: var(--muted); font-size: 11px; }

.company-dialog { width: min(850px, calc(100% - 32px)); }
.company-dialog[open], .modal-layout { display: flex; flex-direction: column; min-height: 0; }
.company-dialog[open] { overflow: hidden; }
.modal-head, .modal-foot, .strip-head, .employees-head, .modal-title-group, .strip-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0;
}
.modal-head, .modal-foot, .strip-head, .employees-head { justify-content: space-between; }
.modal-head, .modal-foot { flex: none; padding: 12px 18px; }
.modal-head { border-bottom: 1px solid var(--border); }
.modal-head .toolbar-actions { margin-left: auto; }
.modal-title-group { flex: 1 1 220px; }
.modal-title-group h2 { font-size: 16px; overflow-wrap: anywhere; }
.modal-foot { background: var(--surface-muted); border-top: 1px solid var(--border); }
.modal-foot p { font-size: 12px; }
.modal-foot .toolbar-actions { margin-left: auto; }
.modal-body { min-height: 0; overflow-y: auto; display: grid; gap: 12px; padding: 15px 18px; }
.company-info-strip, .new-employee, .modal-editor, .delete-confirm { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--border); background: var(--surface-muted); border-radius: var(--radius-card); }
.modal-editor { padding: 10px; background: var(--surface); }
.emp-editor { border-color: var(--primary); background: var(--primary-soft); }
.delete-confirm { background: var(--red-soft); }
.password-text { color: var(--muted); font-size: 12px; }
.password-text code { margin-left: 5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.employees-section { display: grid; gap: 9px; min-width: 0; }
.employee-summary { color: var(--muted); font-size: 12px; }
.inner-table { border: 1px solid var(--border); border-radius: var(--radius-control); }
.employee-table .tax-mono { display: block; margin-top: 2px; }
.employee-table th, .employee-table td { padding: 8px 10px; }
.receipt-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 0; font-size: 12px; }
.receipt-meta div { display: flex; flex-wrap: wrap; gap: 5px; }
.receipt-meta dt { color: var(--muted); }
.receipt-meta dd { margin: 0; overflow-wrap: anywhere; }
.company-notice { flex: none; padding: 8px 18px; color: var(--green); background: var(--green-soft); }
.company-notice[data-type=error] { color: var(--red); background: var(--red-soft); }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; gap: 10px; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 14px; }
  .sidebar-foot { border: 0; margin: 0; padding: 0; }
  .sidebar-foot .button { width: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group-label { display: none; }
  .nav-link { padding: 7px 9px; }
  .topbar { position: static; padding: 8px 14px; }
  .main { padding: 16px 14px 28px; }
  .data-table td, .data-table th { padding: 9px 10px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .table-filters { flex-basis: 100%; }
  .company-table { min-width: 0; }
  .company-table thead { display: none; }
  .company-table tbody, .company-table tr, .company-table td { display: block; }
  .company-table tr { display: grid; grid-template-columns: 16px repeat(2, minmax(0, 1fr)); gap: 5px 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .company-table td { border: 0; padding: 0; min-width: 0; }
  .company-table td[data-label="纳税人识别号"], .company-table td[data-label="快捷操作"] { grid-column: 2 / -1; }
  .company-table td[data-label="员工人数"], .company-table td[data-label="状态"] { grid-column: 2; }
  .company-table td[data-label="企业名称"] { grid-column: 2 / -1; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .topbar { align-items: flex-start; }
  .topbar-title, .topbar-end { flex-wrap: wrap; justify-content: flex-start; }
  .enterprise-intake { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { gap: 7px; }
  .stat { padding: 9px; }
  .stat .entry-icon { display: none; }
  .queue-actions { margin-left: 0; }
  #enterprise-records .data-table, #admin-records .data-table { min-width: 650px; }
  .table-toolbar, .modal-head, .modal-foot, .modal-body { padding-inline: 11px; }
  .table-filters .search-field { flex-basis: 100%; max-width: none; }
  .company-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .employee-table thead { display: none; }
  .employee-table tbody, .employee-table td { display: block; }
  .employee-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); }
  .employee-table td { padding: 0; border: 0; min-width: 0; }
  .employee-table td:is([data-label="员工"], [data-label="操作"]) { grid-column: 1 / -1; }
  .employee-table td[data-label="员工"] { grid-row: 1; }
  .employee-table td[data-label="序号"] { display: none; }
}
