:root {
  color-scheme: light;
  font-family: 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', system-ui, sans-serif;
  color: #182b32;
  background: #f3f6f6;
  --ink: #182b32;
  --muted: #53696d;
  --line: #dce6e5;
  --surface: #fff;
  --teal: #146960;
  --soft: #e7f3ef;
  --sidebar: #172b34;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
input, select, textarea { min-width: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #26958b; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.icon { width: 20px; height: 20px; flex: none; }
.splash { display: flex; gap: 16px; min-height: 100dvh; align-items: center; justify-content: center; }
.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 222px; z-index: 5; display: flex; flex-direction: column; color: #eef5f4; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 80px; padding: 14px 19px; overflow-wrap: anywhere; }
.brand-mark { width: 39px; height: 39px; border-radius: 10px; background: #bcf0da; color: #125b51; display: grid; place-items: center; flex: none; }
.brand-mark .icon { width: 23px; height: 23px; }
.brand b { display: block; font-size: 16px; line-height: 1.45; letter-spacing: .01em; }
.brand small { display: block; margin-top: 3px; color: #a8bfbe; font-size: 12px; }
.module-nav { flex: 1; overflow-y: auto; min-height: 0; padding: 9px 10px 15px; border-top: 1px solid #2b434a; scrollbar-width: thin; scrollbar-color: #507373 transparent; }
.module-link { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 12px; margin: 2px 0; border: 1px solid transparent; border-radius: 7px; color: #c9d9d9; font-size: 14px; }
.module-link .icon { width: 17px; height: 17px; color: #9db7ba; }
.module-link:hover { background: #213d44; color: #fff; }
.module-link.selected { background: #254a4a; border-color: #3c6864; color: #fff; font-weight: 650; }
.module-link.selected .icon { color: #bcf0da; }
.sidebar-foot { display: flex; gap: 6px; justify-content: space-between; border-top: 1px solid #2b434a; padding: 11px 12px; }
.side-tool { border: 0; background: transparent; color: #c4d8d8; border-radius: 6px; padding: 8px; display: flex; gap: 6px; align-items: center; font-size: 13px; }
.side-tool:hover { background: #254a4a; color: #fff; }
.side-tool .icon { width: 16px; height: 16px; }
.workspace { margin-left: 222px; min-width: 0; }
.topbar { height: 66px; padding: 0 clamp(14px, 3vw, 36px); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumbs { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; }
.breadcrumbs > span { color: #789092; }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.icon-btn { display: inline-grid; border: 0; border-radius: 7px; background: transparent; color: #4a6267; width: 36px; height: 36px; place-items: center; }
.icon-btn:hover { background: var(--soft); color: var(--teal); }
.menu-toggle, .scrim { display: none; }
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.account summary::-webkit-details-marker { display: none; }
.account summary > .icon { width: 15px; height: 15px; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; color: var(--teal); background: var(--soft); border-radius: 50%; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 2; background: #fff; min-width: 165px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 25px #172b3422; padding: 6px; }
.account-menu small { display: block; padding: 8px; color: var(--muted); overflow-wrap: anywhere; }
.account-menu button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 8px; color: var(--ink); border-radius: 4px; white-space: nowrap; }
.account-menu button:hover { background: var(--soft); }
.content { max-width: 1680px; margin: 0 auto; padding: 27px clamp(14px, 3vw, 36px) 40px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 21px; min-height: 42px; }
.page-heading h1 { font-size: clamp(1.45rem, 3vw, 1.95rem); line-height: 1.4; letter-spacing: -.025em; }
.page-heading p { color: var(--muted); margin-top: 5px; font-size: 14px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.page-actions > div:empty { display: none; }
.tabs { display: flex; gap: 3px; margin-bottom: 20px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { color: var(--muted); border-bottom: 2px solid transparent; padding: 9px 13px 11px; white-space: nowrap; font-size: 14px; }
.tabs a:hover { color: var(--teal); }
.tabs a.selected { color: #125e54; font-weight: 700; border-bottom-color: var(--teal); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 16px; margin-bottom: 17px; }
.metric { min-height: 108px; padding: 18px; display: flex; gap: 14px; align-items: center; }
.metric-icon, .empty-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--teal); background: var(--soft); border-radius: 10px; flex: none; }
.metric span { display: block; color: var(--muted); font-size: 14px; }
.metric strong { display: block; font-size: 1.8rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; margin-bottom: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 1.05rem; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.shortcut-grid a { display: flex; gap: 8px; align-items: center; font-size: 14px; background: #f6f9f8; border: 1px solid #e4edeb; border-radius: 8px; min-height: 47px; padding: 9px 10px; }
.shortcut-grid a:hover { color: var(--teal); border-color: #a4cbc0; background: var(--soft); }
.shortcut-grid .icon { width: 17px; height: 17px; color: var(--teal); }
.module-groups { display: grid; gap: 16px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 9px; padding: 14px; }
.module-grid a { display: flex; gap: 9px; align-items: center; min-height: 47px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; font-size: 14px; }
.module-grid a:hover { background: var(--soft); border-color: #a4cbc0; color: var(--teal); }
.module-grid .icon { width: 17px; height: 17px; color: var(--teal); }
.list-tools { padding: 12px 15px; display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); align-items: center; }
.audit-range { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 15px; align-items: flex-end; border-bottom: 1px solid var(--line); }
.audit-range label { flex: 1 1 180px; }
.audit-range .form-error:not(:empty) { flex-basis: 100%; }
.list-tools .search { display: flex; flex-direction: row; gap: 8px; align-items: center; background: #fff; border: 1px solid #c8d7d7; padding: 0 10px; border-radius: 7px; width: min(100%, 260px); }
.list-tools .search:focus-within { outline: 2px solid #26958b; outline-offset: 2px; }
.search .icon { width: 16px; height: 16px; color: #527376; }
.search input { border: 0; padding-left: 0; outline: 0; }
.spacer { flex: 1; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th { background: #f1f6f5; color: #3d565b; font-weight: 650; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbfa; }
.table-footer { min-height: 44px; padding: 12px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.link-btn { color: var(--teal); border: 0; background: transparent; padding: 2px; font-size: 14px; font-weight: 650; border-radius: 3px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.empty { min-height: 206px; padding: 30px 12px; display: grid; place-content: center; align-items: center; justify-items: center; text-align: center; gap: 10px; color: var(--muted); }
.empty strong { color: var(--ink); }
.empty p { font-size: 14px; }
.error-panel { display: flex; padding: 18px; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-block; border-radius: 5px; padding: 4px 7px; color: #445f65; background: #eaf0f1; font-size: 13px; font-weight: 650; white-space: nowrap; }
.badge.approved { color: #186254; background: #e1f3eb; }
.badge.pending { color: #824700; background: #fff1d7; }
.badge.rejected, .badge.void { color: #8d3034; background: #f9e6e8; }
.btn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 1px solid #c8d7d7; border-radius: 7px; background: #fff; color: #294449; min-height: 38px; padding: 7px 12px; white-space: nowrap; font-size: 14px; font-weight: 650; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { border-color: #93b5b4; background: #f4faf8; }
.btn.primary { color: #fff; border-color: var(--teal); background: var(--teal); }
.btn.primary:hover { border-color: #0d564e; background: #0d564e; }
.btn.danger { color: #9a292d; }
.btn.wide { width: 100%; }
label { font-size: 14px; font-weight: 650; display: flex; flex-direction: column; gap: 7px; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 39px; background-color: #fff; border: 1px solid #c8d7d7; border-radius: 7px; color: var(--ink); font-size: 14px; padding: 7px 9px; font-weight: 400; }
.search input { padding-left: 0; border: 0; }
input:disabled, select:disabled, textarea:disabled, input[readonly] { opacity: 1; color: #4c6469; background-color: #f2f6f6; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 25px; background-image: linear-gradient(45deg, transparent 50%, #567174 50%), linear-gradient(135deg, #567174 50%, transparent 50%); background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.list-tools select { width: auto; }
dialog { width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #cdd9d9; border-radius: 13px; color: var(--ink); box-shadow: 0 24px 65px #14293144; }
dialog.large { width: min(820px, calc(100% - 24px)); }
dialog::backdrop { background: #11272f88; }
.dialog-head, .dialog-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; }
.dialog-head { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); justify-content: space-between; }
.dialog-head h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.dialog-body { padding: 16px 18px; }
.dialog-foot { border-top: 1px solid var(--line); justify-content: flex-end; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.checkbox { display: flex; flex-direction: row; gap: 7px; align-items: center; min-height: 25px; }
.form-error { margin-top: 10px; color: #9c262c; font-size: 14px; }
.form-error:empty { display: none; }
.line-head { margin: 14px 0 8px; display: flex; align-items: center; justify-content: space-between; }
.line-head h3 { font-size: .95rem; }
.line-table { border: 1px solid var(--line); border-radius: 8px; }
.line-table td, .line-table th { padding: 7px; }
.line-table select { min-width: 126px; }
.line-table input { min-width: 72px; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.reason { color: #8d3034; overflow-wrap: anywhere; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.scope { margin-top: 15px; }
.scope legend { font-weight: 650; font-size: 14px; padding: 0 0 8px; }
.scope-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.settings { width: min(100%, 490px); padding: 18px; }
.settings .btn { margin-top: 13px; }
.informational p { color: var(--muted); margin: 6px 0; font-size: 14px; line-height: 1.65; }
.informational ol { margin: 0; padding-left: 25px; }
.informational li + li { margin-top: 12px; }
#toasts { position: fixed; z-index: 10; right: 16px; bottom: 16px; display: grid; gap: 6px; max-width: calc(100vw - 34px); }
.toast { background: #214943; color: white; padding: 11px 15px; border-radius: 8px; box-shadow: 0 6px 20px #20323333; font-size: 14px; }
.toast.error { background: #922f36; }
.login { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { position: relative; display: flex; flex-direction: column; min-height: 100%; background: #172f36; color: #eef8f2; padding: clamp(20px, 6vw, 68px); overflow: hidden; }
.login-art .brand { padding: 0; min-height: 0; width: max-content; }
.login-message { position: relative; z-index: 1; margin: auto 0; padding-top: 10vh; padding-bottom: 11vh; }
.login-message span { color: #a8dccf; font-size: 14px; }
.login-message h1 { font-size: clamp(2.1rem, 4.6vw, 4.15rem); letter-spacing: -.045em; line-height: 1.27; margin: 13px 0; }
.login-message p { font-size: 15px; color: #bed7d3; }
.login-lines { position: absolute; width: 81%; height: 65%; right: -29%; bottom: -15%; transform: rotate(-26deg); opacity: .64; background: repeating-linear-gradient(0deg, transparent 0 22px, #69ab9e46 23px 24px), repeating-linear-gradient(90deg, transparent 0 22px, #69ab9e38 23px 24px); }
.login-main { display: grid; place-items: center; background: #f6f9f8; padding: 28px; }
.auth-card { width: min(100%, 400px); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.auth-card h2 { font-size: 1.6rem; letter-spacing: -.02em; }
.auth-card p { margin: 7px 0 18px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.auth-card .btn { margin-top: 17px; }
.barcode-sheet { display: none; }
.count-import { margin-top: 12px; }
.count-import small { font-size: 13px; color: var(--muted); font-weight: 400; }
.mobile-bar, .phone-brand, .row-more { display: none; }
.menu-finder { display: flex; align-items: center; gap: 6px; padding: 0 10px 12px; }
.menu-finder .search { flex: 1; min-width: 0; flex-direction: row; align-items: center; gap: 6px; border-radius: 7px; background: white; padding: 0 8px; }
.menu-finder .search:focus-within { outline: 2px solid #a8dccf; outline-offset: 2px; }
.menu-finder .icon-btn { display: none; color: white; }
.menu-finder .icon-btn:hover { background: #254a4a; }
.menu-matches { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px; scrollbar-width: thin; scrollbar-color: #507373 transparent; }
.menu-matches a { display: flex; align-items: center; justify-content: space-between; min-height: 38px; border-top: 1px solid #36545b; gap: 8px; padding: 5px; font-size: 14px; }
.menu-matches a:hover, .menu-matches a:focus-visible { background: #254a4a; }
.menu-matches small { color: #b8ceca; white-space: nowrap; }
.menu-matches p { padding: 12px 5px; font-size: 14px; }
.menu-matches[hidden], .module-nav[hidden] { display: none; }
@media (max-height: 850px) and (min-width: 861px) {
  .module-link { min-height: 34px; }
}
@media (max-width: 1040px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: min(300px, 90vw); transform: translateX(-100%); transition: transform .18s ease; }
  .menu-finder .icon-btn { display: inline-grid; }
  .menu-matches a { min-height: 46px; }
  .shell:not(.mobile-open) .sidebar { visibility: hidden; }
  .mobile-open .sidebar { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .mobile-open .scrim { display: block; position: fixed; inset: 0; z-index: 4; background: #182b3277; border: 0; }
}
@media screen and (max-width: 600px) {
  body { -webkit-text-size-adjust: 100%; }
  .login { display: flex; flex-direction: column; }
  .login-art { padding-top: calc(16px + env(safe-area-inset-top)); }
  .login-main { flex: 1; padding: 24px 16px; }
  .login .auth-card { padding: 22px; }
  .topbar { min-height: calc(52px + env(safe-area-inset-top)); height: auto; padding: env(safe-area-inset-top) 16px 0; }
  .topbar .header-tools, .topbar .menu-toggle, .desktop-brand { display: none; }
  .breadcrumbs { min-width: 0; width: 100%; }
  .breadcrumbs .phone-brand { display: block; color: var(--ink); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .breadcrumbs a { flex: none; min-height: 44px; display: inline-flex; align-items: center; }
  .content { padding: 18px 12px calc(84px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 14px; gap: 8px; }
  .page-heading h1 { font-size: 1.4rem; }
  .mobile-bar { position: fixed; inset: auto 0 0; z-index: 3; display: flex; align-items: stretch; justify-content: space-evenly; border-top: 1px solid var(--line); background: var(--surface); padding: 4px max(7px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); }
  .mobile-bar a, .mobile-bar button { flex: 1; min-height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; background: transparent; color: var(--muted); border: 0; border-radius: 7px; font-size: 13px; }
  .mobile-bar [aria-current=page], .mobile-bar [aria-expanded=true] { background: var(--soft); color: var(--teal); font-weight: 650; }
  .sidebar { inset: 0 auto 0 0; width: min(91vw, 400px); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .sidebar .brand { min-height: 64px; }
  .module-nav:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; align-content: start; }
  .module-link { margin: 0; min-height: 46px; background: #203a43; }
  .sidebar-foot { padding: 4px 10px; }
  .sidebar-foot .side-tool { min-height: 44px; }
  .tabs a { display: inline-flex; align-items: center; min-height: 44px; }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 7px; }
  .metrics .metric { display: grid; gap: 5px; padding: 10px; min-height: 0; align-content: start; }
  .metric-icon { width: 27px; height: 27px; border-radius: 7px; }
  .metric-icon .icon { width: 16px; height: 16px; }
  .metric span { font-size: 13px; }
  .metric strong { font-size: 1.35rem; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 7px; }
  .module-grid a { padding: 8px; }
  .btn, .link-btn, .icon-btn { min-height: 44px; }
  .icon-btn { width: 44px; flex: none; }
  a.link-btn { display: inline-flex; align-items: center; }
  .list-tools { padding: 10px; gap: 7px; }
  .list-tools .search { width: 100%; }
  .records, .records tbody { display: block; }
  .records thead, .line-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .records tr { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .records tr:last-child { border-bottom: 0; }
  .records td { display: grid; grid-template-columns: minmax(65px, 32%) 1fr; align-items: center; gap: 8px; min-height: 28px; border: 0; padding: 2px 0; white-space: normal; overflow-wrap: anywhere; }
  .records td::before, .line-table [data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 500; }
  .records td > span { min-width: 0; }
  .records td:first-child > span { font-weight: 700; }
  .records td.secondary-cell { display: none; }
  .records tr.expanded td.secondary-cell { display: grid; }
  .records td.row-more { display: flex; justify-content: flex-end; }
  .records td.row-more::before { content: none; }
  .records .link-btn { min-width: 44px; text-align: left; }
  .records td.row-more .link-btn { font-size: 13px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; min-height: 44px; }
  .checkbox { min-height: 42px; }
  dialog[open] { display: flex; flex-direction: column; inset: auto 0 0; margin: 0; width: 100%; max-width: 100%; max-height: calc(100dvh - env(safe-area-inset-top)); border-radius: 14px 14px 0 0; overflow: hidden; }
  dialog.large[open] { height: calc(100dvh - env(safe-area-inset-top)); }
  .dialog-head, .dialog-foot { flex: none; background: white; }
  .dialog-head { padding-top: 5px; padding-bottom: 5px; }
  .dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .large .dialog-body { flex: 1; }
  .dialog-foot { gap: 5px; padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
  .dialog-foot .btn { padding-left: 9px; padding-right: 9px; }
  .workflow-actions:empty { display: none; }
  .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-table { border: 0; overflow: visible; }
  .line-table table, .line-table tbody { display: block; }
  .line-table tr { display: grid; position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; }
  .line-table td { border: 0; padding: 0; min-width: 0; white-space: normal; }
  .line-table [data-label]::before { display: block; margin: 0 0 4px; }
  .line-table .line-item { grid-column: 1 / -1; }
  fieldset:not(:disabled) .line-table .line-item { padding-right: 45px; }
  .line-table .line-item select { min-width: 0; }
  .line-table .line-remove { position: absolute; top: 15px; right: 8px; }
  .line-table .line-remove .icon-btn { width: 44px; height: 44px; }
  .line-table .line-remove .icon { width: 16px; height: 16px; }
  fieldset:disabled .line-remove { display: none; }
  body:has(dialog[open]), body:has(.mobile-open) { overflow: hidden; }
  #toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .extension-panel { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: auto; padding: 15px 20px; }
  .login-message, .login-lines { display: none; }
  .login-main { padding: 20px 12px; align-items: start; }
  .breadcrumbs { gap: 6px; }
  .header-tools { gap: 6px; }
  .account summary > span:nth-child(2) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .shortcut-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 82px; padding: 12px; }
  .dialog-foot, .dialog-body, .dialog-head { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print {
  .sidebar, .topbar, .page-actions, .tabs, .list-tools, .audit-range, .table-footer, #toasts, .link-btn { display: none !important; }
  .workspace { margin-left: 0; }
  .content { padding: 0; }
  .table-scroll { overflow: visible; }
  table { font-size: 10pt; }
  th, td { padding: 4px; white-space: normal; }
  .barcode-print #app { display: none !important; }
  .barcode-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7mm; }
  .barcode-label { display: grid; gap: 2mm; justify-items: center; break-inside: avoid; margin: 0; padding: 2mm; border: 1px solid #bbb; color: #000; }
  .barcode-label svg { display: block; width: auto; max-width: 100%; height: 17mm; fill: #000; }
}
