:root {
  color-scheme: light;
  --ink: #182e3d;
  --muted: #516372;
  --faint: #5f7180;
  --line: #d9e1e5;
  --accent: #285772;
  --accent-soft: #eaf1f5;
  --green: var(--accent);
  --green-dark: #183e56;
  --gold: #ecd3a3;
  --paper: #f1f4f6;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px #122c4010, 0 8px 24px -14px #19385030;
  --control-border: #b6c5ce;
  --control-shadow: inset 0 1px 0 #fff, 0 1px 2px #19364a13;
  --focus-ring: #357496;
  --gutter: clamp(24px, 2.8vw, 48px);
  --sidebar: clamp(212px, 17vw, 248px);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button { -webkit-appearance: none; appearance: none; cursor: pointer; }
button:disabled { opacity: .62; cursor: not-allowed; }
button, a, select, input, textarea, summary { touch-action: manipulation; }
button svg { pointer-events: none; }
svg { vertical-align: middle; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 2.65vw, 40px); line-height: 1.23; letter-spacing: -.055em; }
h2 { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.4; letter-spacing: -.035em; }
h3 { font-size: 16px; }
h1, h2, h3 { text-wrap: pretty; }
.muted, .page-head p, .panel-head p { color: var(--muted); }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; padding: 10px 12px; z-index: 100; top: 10px; left: 10px; clip-path: none; color: var(--ink); background: #fff; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 25; width: var(--sidebar);
  display: flex; flex-direction: column; color: #e8eef1; border-right: 1px solid #112935;
  background: radial-gradient(ellipse at top left,#284759 0,transparent 65%), linear-gradient(155deg,#1b3545,#122632 80%); }
.brand-row { display: flex; align-items: center; gap: 8px; padding: 0 22px; min-height: 84px; border-bottom: 1px solid #ffffff1c; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 41px; height: 41px; border-radius: 11px; box-shadow: 0 4px 12px #091c2a33; }
.brand strong { display: block; font-size: 25px; font-weight: 760; letter-spacing: -1.5px; line-height: 1.03; }
.brand small { display: block; color: #bed0d9; font-size: 12px; letter-spacing: .13em; margin-top: 4px; }
.sidebar nav { padding: 18px 12px; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nav-group + .nav-group { border-top: 1px solid #ffffff17; margin-top: 13px; padding-top: 13px; }
.nav-label { color: #a1b7c3; font-size: 12px; letter-spacing: .1em; font-weight: 600; margin: 0 12px 8px; }
.nav-item { display: flex; position: relative; align-items: center; gap: 12px; min-height: 39px; padding: 7px 12px; margin: 2px 0; border: 1px solid transparent; border-radius: 8px; color: #dce6ea; font-size: 14px; font-weight: 510; }
.nav-item svg { color: #b1c6d1; }
.nav-item:hover { color: #fff; background: #ffffff0f; }
.nav-item.active { color: #fff7e4; border-color: #e7d2ac50; background: linear-gradient(105deg,#dfc19025,#ffffff0c); box-shadow: inset 3px 0 #e3c894, 0 3px 10px #0a1b251f; }
.nav-item.active svg { color: var(--gold); }
.sidebar :focus-visible { outline-color: var(--gold); }
.sidebar-foot { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #ffffff1c; }
.account-trigger { border: 1px solid #ffffff23; background: #ffffff08; color: #eff5f7; width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px; border-radius: 11px; }
button.account-trigger:hover { background: #ffffff13; }
.avatar { color: #f7e8c7; background: #586264; border: 1px solid #ffffff31; border-radius: 9px; width: 34px; height: 34px; display: grid; flex-shrink: 0; place-content: center; font-weight: 650; }
.account-name { min-width: 0; flex: 1; }
.account-name strong, .account-name small { display: block; overflow: hidden; text-overflow: ellipsis; }
.account-name strong { font-size: 14px; font-weight: 620; }
.account-name small, .account-logout { color: #c0ced5; font-size: 12px; }
.account-logout { border: 0; padding: 7px 3px; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.workspace { margin-left: var(--sidebar); min-height: 100vh; min-width: 0; background: radial-gradient(ellipse 95% 480px at 100% 0,#e6edf1,transparent 70%), var(--paper); }
.topbar { padding: 0 var(--gutter); height: 58px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.breadcrumbs, .crumb-home, .topbar-tools, .online, .quick-search { display: flex; align-items: center; }
.breadcrumbs { flex: 1; min-width: 0; gap: 11px; color: var(--muted); font-size: 13px; }
.crumb-home { gap: 8px; flex-shrink: 0; }
.crumb-group { white-space: nowrap; }
.crumb-sep { color: #788c98; }
.breadcrumbs strong { min-width: 0; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs a:hover { text-decoration: underline; }
.topbar-tools { gap: 17px; }
.quick-search { gap: 5px; background: #fff; border: 1px solid var(--control-border); box-shadow: var(--control-shadow); border-radius: 9px; padding: 0 5px; height: 32px; }
.quick-search button { display: grid; place-content: center; border: 0; background: none; width: 26px; height: 100%; color: var(--muted); }
.quick-search input[type=search] { width: clamp(95px, 11vw, 165px); min-height: 27px; font-size: 13px; border: 0; padding: 0 2px; background: transparent; }
.quick-search:focus-within, .searchbox:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.quick-search input:focus, .searchbox input:focus { outline: none; }
.online { gap: 7px; padding: 4px 10px; border-radius: 20px; border: 1px solid #dbe4e7; background: #f4f7f8; color: #3b565e; font-weight: 600; font-size: 12px; white-space: nowrap; }
.online i { width: 7px; height: 7px; background: #3a976b; border-radius: 50%; box-shadow: 0 0 0 3px #e2f1e6; }
.online small { font-size: 11px; font-weight: 500; color: #526874; border-left: 1px solid #cbd6dc; padding-left: 7px; }
.drawer-trigger, .drawer-close, .nav-shade { display: none !important; }
main#main { max-width: 1740px; margin: auto; padding: 28px var(--gutter) max(44px, env(safe-area-inset-bottom)); }
main#main:focus { outline: none; }
.page-head, .panel-head, .section-line, .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.page-head { margin: 2px 0 22px; padding: 2px 0 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head h1, .panel-head h2 { overflow-wrap: anywhere; }
.page-head p { margin-top: 6px; font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .09em; margin-bottom: 6px; }
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.btn { min-height: 39px; padding: 8px 15px; font-size: 14px; line-height: 1.45; text-align: center; }
.btn.primary, .btn-primary { color: #fff; background: linear-gradient(180deg,#356782,var(--green)); border-color: #214962; box-shadow: inset 0 1px #ffffff29, 0 2px 4px #14344726; }
.btn.primary:hover, .btn-primary:hover { background: var(--green-dark); }
.btn.secondary, .btn-secondary { border-color: var(--control-border); background: linear-gradient(#fff,#f6f8fa); color: var(--green-dark); box-shadow: var(--control-shadow); }
.btn.secondary:hover, .btn-secondary:hover, .icon-btn:hover { background: #e9f0f4; border-color: #8ba4b3; }
.btn.mini { min-height: 30px; font-size: 13px; padding: 4px 9px; }
.icon-btn { background: transparent; padding: 7px; }
.sidebar .icon-btn:hover { background: #ffffff16; }
.btn:active:not(:disabled) { box-shadow: inset 0 2px 4px #182f401c; }
.panel, .metric { min-width: 0; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: 18px 22px 16px; }
.panel-head p { margin-top: 4px; font-size: 13px; }
.panel-head p span { padding: 0 3px; }
.text-link, .table-open { border: 0; padding: 0; background: transparent; color: var(--green); display: inline-flex; gap: 4px; align-items: center; font-size: 14px; font-weight: 580; }
.text-link:hover, .number:hover { text-decoration: underline; text-underline-offset: 3px; }
.count-label { border: 1px solid #cedde5; background: var(--accent-soft); color: var(--green-dark); border-radius: 20px; font-size: 12px; font-weight: 620; padding: 3px 10px; white-space: nowrap; }

.dashboard-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 206px;
  display: flex; align-items: center; border: 1px solid #18394b; border-radius: 18px; color: #fff;
  background: #172f3d; box-shadow: inset 0 1px #ffffff16, 0 10px 28px -16px #152f48aa;
}
.dashboard-hero::after {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: url('quality-workbench.webp') right center / auto 110% no-repeat;
  filter: hue-rotate(32deg) saturate(.65);
  -webkit-mask-image: linear-gradient(90deg,transparent 22%,#000 68%);
  mask-image: linear-gradient(90deg,transparent 22%,#000 68%);
}
.hero-copy { padding: 26px clamp(22px,3vw,48px); }
.hero-date, .hero-kicker { display: flex; align-items: center; gap: 7px; color: #e9d5b1; font-size: 13px; font-weight: 550; letter-spacing: .04em; }
.hero-date time span { margin: 0 3px; }
.dashboard-hero h1, .module-card h2 { color: #fff; margin: 8px 0 18px; line-height: 1.2; font-size: clamp(31px,3.1vw,48px); letter-spacing: -.04em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-primary { background: linear-gradient(#f5e3c1,#e8cda0); color: #30291f; border-color: #f1deb9; box-shadow: inset 0 1px #fff9, 0 2px 6px #06172440; }
.hero-primary:hover { background: #fae8c9; }
.hero-secondary { border-color: #91aab580; color: #f4f8fb; background: #284352df; box-shadow: inset 0 1px #ffffff16; }
.hero-secondary:hover { background: #355767; }
.hero-actions .btn { min-height: 40px; padding: 8px 15px; }
.home-heading { border: 0; padding-bottom: 0; margin-bottom: 19px; }
.home-heading time { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.module-card { min-height: clamp(215px,17vw,265px); }
.module-card h2 { margin-bottom: 8px; }
.module-card p { color: #dce8ed; margin: 0 0 21px; font-size: 14px; }
.home-section { margin-top: clamp(22px,2.2vw,32px); }
.home-section-title { margin-bottom: 11px; }
.home-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.home-link { display: flex; align-items: center; gap: 12px; min-width: 0; padding: clamp(14px,1.6vw,24px); }
.home-link-copy { min-width: 0; overflow-wrap: anywhere; }
.home-link-copy strong, .home-link-copy small { display: block; }
.home-link-copy small { color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 3px; }
.home-link > svg { color: var(--faint); margin-left: auto; }
.home-link:hover, .home-link:focus-visible { background: #f8fbfd; border-color: #9bb1bf; }
.home-link:hover strong { color: var(--green); }
.home-icon, .catalog-glyph { display: inline-grid; place-items: center; flex: 0 0 auto; }
.home-icon { width: 44px; height: 44px; border-radius: 12px; color: var(--green); background: #e7f0f5; box-shadow: inset 0 0 0 1px #1d456115, inset 0 2px 1px #ffffffb3; }
.home-icon.ochre { color: #836435; background: #f6f0e3; }
.home-icon.iris { color: #65587c; background: #f0edf5; }
.home-catalog { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.home-catalog { overflow: hidden; }
.home-catalog .home-link:focus-visible { outline-offset: -3px; }
.home-catalog .home-link + .home-link { border-left: 1px solid var(--line); }
.catalog-glyph { color: #5e7583; }
.overview { margin: 19px 0; }
.section-line { margin: 0 0 10px; }
.section-line h2 { font-size: 18px; }
.period label { border: 1px solid var(--control-border); background: white; border-radius: 7px; display: flex; align-items: center; padding-left: 9px; }
.period label > svg { color: var(--muted); }
.period select { border: 0; min-height: 31px; padding: 4px 26px 4px 6px; font-size: 13px; background-color: transparent; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.metric { position: relative; min-height: 125px; padding: 14px 16px; overflow: hidden; --accent: #33627e; --tint: #e6eff5; --spark: #82a5b8; }
.metric.good { --accent: #427735; --tint: #ecf2df; --spark: #97b68a; }
.metric.warn { --accent: #a05c24; --tint: #fcf0dc; --spark: #d7ae81; }
.metric.todo { --accent: #6a609c; --tint: #f0edf8; --spark: #ad9cc8; }
.metric-top { display: flex; align-items: center; gap: 8px; }
.metric-top h3 { font-size: 14px; font-weight: 570; color: var(--muted); }
.metric-icon, .task-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 8px; }
.metric-icon { background: var(--tint); color: var(--accent); }
.metric-value { line-height: 1.08; margin-top: 9px; font-weight: 650; letter-spacing: -.055em; font-size: clamp(29px,2.45vw,40px); font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.metric-value small { color: var(--muted); letter-spacing: normal; margin-left: 4px; font-size: 14px; font-weight: 520; }
.metric-note { margin-top: 5px; position: relative; z-index: 1; color: var(--muted); font-size: 12px; }
.metric-spark { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; position: absolute; right: 16px; bottom: 24px; width: 24%; max-width: 65px; height: 35px; pointer-events: none; }
.metric-spark i { flex: 1; min-width: 0; height: var(--bar); border-radius: 2px 2px 0 0; opacity: .75; background: var(--spark); }
.queue-spark { height: 62px; }
.dashboard-middle { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(255px,1fr); gap: 16px; margin-bottom: 18px; }
.trend .panel-head, .todo-panel .panel-head { align-items: flex-start; }
.legend, .legend span { display: flex; align-items: center; gap: 5px; }
.legend { gap: 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: #248669; }
.legend span:last-child i { background: #d98e55; }
.chart-meta { margin: 0 23px 10px; font-size: 12px; color: var(--muted); }
.chart { display: grid; grid-template-columns: 26px minmax(0,1fr); height: 117px; margin: 0 22px 30px 14px; }
.axis-y { display: flex; flex-direction: column; align-items: center; justify-content: space-between; font-size: 11px; line-height: 1; color: var(--faint); margin: -5px 0; }
.plot { position: relative; }
.grid-lines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.grid-lines i { border-top: 1px dashed #d8e2e8; }
.grid-lines i:last-child { border-top-style: solid; }
.bar-groups { height: 100%; display: flex; position: relative; }
.bar-column { position: relative; height: 100%; flex: 1; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: clamp(1px,.3vw,4px); height: 100%; }
.bar { width: 20%; max-width: 19px; border-radius: 3px 3px 0 0; }
.bar.ok { background: #248669; }
.bar.ng { background: #d98e55; }
.axis-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); color: var(--faint); font-size: 11px; line-height: 2; }
.bar-tip { display: none; z-index: 4; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); padding: 6px 8px; width: max-content; background: #1a3748; border-radius: 5px; color: #fff; font-size: 12px; pointer-events: none; }
.bar-column:hover .bar-tip, .bar-column:focus .bar-tip { display: block; }
.bar-column:first-child .bar-tip { left: 0; transform: none; }
.bar-column:last-child .bar-tip { left: auto; right: 0; transform: none; }
.todo-list { padding: 0 18px 10px; }
.todo-list a { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: 1px solid var(--line); font-size: 14px; }
.todo-list a:hover { background: #f1f6f9; color: var(--green); }
.todo-list a>b { margin-left: auto; font-size: 16px; font-variant-numeric: tabular-nums; }
.todo-list a>svg { color: #728793; }
.task-icon { width: 27px; height: 27px; border-radius: 7px; }
.purple { background: #efebf8; color: #71628f; }
.teal { background: #e5f3ea; color: #357c58; }
.amber { background: #fcf0d9; color: #96692a; }
.blue { background: #e9f2f8; color: #416c8c; }

.table-wrap { min-width: 0; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.data-table, table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.data-table { font-size: 14px; }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid #e4eaee; }
.data-table th { color: #4d6373; font-size: 13px; font-weight: 600; background: #eff3f6; border-top: 1px solid var(--line); white-space: nowrap; }
.data-table td:first-child, .data-table th:first-child { padding-left: 21px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 20px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7fafc; }
.data-table td strong { font-weight: 570; }
.data-table td small { display: block; margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; color: var(--faint); }
.batch-table td { white-space: nowrap; }
.table-open { width: 28px; height: 29px; justify-content: center; border-radius: 6px; color: var(--green); }
.table-open:hover { background: var(--accent-soft); }
.number { color: var(--green); font-size: 14px; font-weight: 650; }
.mono { font-family: "IBM Plex Mono",ui-monospace,monospace; font-size: .92em; }
.amount { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 3px 7px; font-size: 12px; line-height: 1.45; font-weight: 580; white-space: nowrap; }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { color: #256d46; background: #e5f4e8; }
.badge.red { color: #9d4332; background: #fae9e4; }
.badge.amber { color: #895d1a; background: #fcf0d7; }
.badge.gray { color: #51616e; background: #eaf0f3; }
.verdict { font-size: 14px; }
.verdict.pass { color: #327550; }
.verdict.fail { color: #a44935; }
.empty { text-align: center !important; padding: 32px !important; color: var(--muted); }
.empty p { margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink); font-size: 14px; font-weight: 570; }
.field small, .help { font-size: 13px; color: var(--muted); font-weight: 450; }
.field input, .field select, .field textarea { width: 100%; }
:where(input):not([type=checkbox],[type=radio],[type=hidden]), textarea, select {
  min-height: 39px; max-width: 100%; border: 1px solid var(--control-border); border-radius: 7px; background-color: #fff; padding: 7px 10px;
}
textarea { resize: vertical; }
input:disabled, input:read-only, textarea:read-only { color: var(--muted); }
select {
  appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23586e5f' stroke-width='1.4'/%3E%3C/svg%3E");
  background-position: right 10px center; background-repeat: no-repeat;
}
input, textarea { accent-color: var(--green); }
input::placeholder, textarea::placeholder { color: var(--faint); font-weight: 450; }
.stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.filter-bar { padding: 16px 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 14px; }
.searchbox { display: flex; align-items: center; gap: 6px; padding: 0 10px; min-width: 220px; border-radius: 9px; border: 1px solid var(--control-border); background: #fff; box-shadow: var(--control-shadow); color: var(--muted); }
.searchbox input { border: 0; background: transparent; padding-left: 2px; min-width: 0; min-height: 36px; flex: 1; }
.pagination { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.pagination>div { display: flex; gap: 6px; }
.modal { position: fixed; background: #fff; color: var(--ink); border: 1px solid var(--control-border); border-radius: 18px; padding: 22px; width: min(440px,92vw); max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 90px #102a4059; }
dialog::backdrop { background: #101f2a80; backdrop-filter: blur(2px); }
.modal-head { margin-bottom: 13px; }
.role-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0; }
.role-list label { cursor: pointer; padding: 9px; display: flex; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 7px; }
.role-list label:has(input:checked) { border-color: #8aaaba; background: var(--accent-soft); }
.flash { display: flex; align-items: center; gap: 8px; background: #e6f3e7; color: #24583b; border: 1px solid #b9dabe; padding: 10px 14px; margin-bottom: 14px; border-radius: 8px; }
.flash.error, .flash.danger { background: #feeee7; color: #9a4937; border-color: #ebc8ba; }
.error-box { padding: 40px; margin: 32px auto; max-width: 650px; text-align: center; }
.error-box h1, .error-box p { margin: 12px 0; }

@media (min-width: 1500px) {
  .dashboard-hero { min-height: 236px; }
  .metric { min-height: 136px; padding: 17px 20px; }
  .chart { height: 145px; }
  .todo-list a { min-height: 47px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .brand-row { min-height: 70px; }
  .sidebar nav { padding-block: 12px; }
  .nav-item { min-height: 34px; padding-block: 5px; }
  .nav-group + .nav-group { margin-top: 9px; padding-top: 9px; }
}
@media (max-width: 1199px) {
  :root { --sidebar: 195px; --gutter: 20px; }
  .brand-row { padding-inline: 19px; }
  .metric-grid { gap: 10px; }
  .metric { padding: 13px; }
  .metric-spark { right: 10px; width: 19%; }
  .data-table td, .data-table th { padding-inline: 10px; }
  .dashboard-middle { gap: 12px; grid-template-columns: minmax(0,1.45fr) minmax(230px,1fr); }
}
@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .sidebar { display: none; width: min(284px,85vw); box-shadow: 12px 0 45px #12273447; }
  .sidebar.open { display: flex; }
  .drawer-trigger, .drawer-close { display: inline-flex !important; width: 42px; height: 42px; }
  .drawer-close { margin-left: auto; }
  .nav-shade:not([hidden]) { display: block !important; position: fixed; inset: 0; z-index: 24; background: #101f2a70; }
  body.drawer-visible { overflow: hidden; }
  .workspace { margin-left: 0; }
  .topbar { padding-left: max(9px, calc(var(--gutter) - 7px)); gap: 8px; height: 55px; }
  .brand-row { min-height: 74px; }
  .sidebar nav { padding-top: 12px; }
  .nav-item { min-height: 42px; }
  .account-trigger { min-height: 47px; }
  .quick-search input[type=search] { width: 140px; }
}
@media (min-width: 641px) and (max-width: 1190px) {
  .home-links { gap: 10px; }
  .home-links .home-link { align-items: flex-start; flex-wrap: wrap; position: relative; }
  .home-links .home-link-copy { flex-basis: 100%; }
  .home-links .home-link > svg { position: absolute; top: 24px; right: 15px; }
}
@media (min-width: 641px) and (max-width: 760px) {
  .metric-value { font-size: 29px; }
  .metric-spark { display: none; }
  .dashboard-middle { grid-template-columns: minmax(0,1.4fr) minmax(210px,1fr); }
  .panel-head { padding-inline: 16px; }
  .todo-list { padding-inline: 14px; }
}
@media (max-width: 640px) {
  :root { --gutter: 14px; --radius: 12px; }
  .topbar { padding-right: max(var(--gutter), env(safe-area-inset-right)); }
  .topbar-tools { gap: 5px; }
  .quick-search, .crumb-home, .crumb-sep, .crumb-group { display: none; }
  .home-links { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .home-link { padding: 13px 15px; }
  .home-catalog { grid-template-columns: minmax(0,1fr); }
  .home-catalog .home-link + .home-link { border-left: 0; border-top: 1px solid var(--line); }
  .breadcrumbs { font-size: 14px; }
  .online { font-size: 12px; }
  .online small { font-size: 11px; }
  main#main { padding: 14px max(var(--gutter),env(safe-area-inset-right)) max(30px,env(safe-area-inset-bottom)) max(var(--gutter),env(safe-area-inset-left)); }
  .dashboard-hero { border-radius: 13px; min-height: 157px; }
  .dashboard-hero::after {
    background-size: auto 100%; background-position: right -64px center;
    -webkit-mask-image: linear-gradient(90deg,transparent 10%,#0004 47%,#000 92%);
    mask-image: linear-gradient(90deg,transparent 10%,#0004 47%,#000 92%);
  }
  .module-card { min-height: 212px; }
  .module-card p { max-width: 16em; text-wrap: balance; }
  .hero-copy { padding: 19px 17px; }
  .hero-date { gap: 5px; font-size: 12px; }
  .dashboard-hero h1 { font-size: 31px; margin-bottom: 12px; }
  .hero-actions .btn { min-height: 40px; padding-inline: 10px; }

  .overview { margin: 14px 0; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 112px; padding: 12px; }
  .metric-value { font-size: 29px; }
  .metric-spark { width: 20%; }
  .metric.todo .metric-spark { display: none; }
  .metric-note { font-size: 12px; }
  .dashboard-middle { display: grid; grid-template-columns: minmax(0,1fr); gap: 13px; margin-bottom: 14px; }
  .chart { height: 133px; margin-right: 17px; margin-bottom: 28px; }
  .panel-head { padding: 15px; flex-wrap: wrap; }
  .panel-head p { font-size: 12px; }
  .todo-list { padding-inline: 14px; }
  .todo-list a { min-height: 45px; }
  .page-head { gap: 10px; padding-bottom: 13px; margin: 1px 0 14px; }
  .page-head p { font-size: 14px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .filter-bar { padding: 12px; gap: 8px; }
  .searchbox { flex: 1 0 100%; min-width: 0; }
  .filter-bar select { flex: 1 1 100px; }
  :where(input):not([type=checkbox],[type=radio],[type=hidden]), textarea, select { font-size: 16px; }
  .btn, .filter-bar select, .filter-bar input, .field input, .field select { min-height: 42px; }
  .period select { min-height: 35px; font-size: 13px; }
  .data-table:not(.batch-table) { min-width: 550px; }
  .modal { padding: 18px; }
  .modal .icon-btn { min-width: 40px; min-height: 40px; }
  .error-box { padding: 24px 14px; }
  .batch-table, .batch-table tbody { display: block; }
  .batch-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .batch-table tbody tr { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 12px; padding: 13px 15px; border-top: 1px solid var(--line); }
  .batch-table tbody td { border: 0; white-space: normal; padding: 0 !important; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
  .batch-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; }
  .batch-table .batch-id { grid-column: 1 / -1; margin-bottom: 1px; padding-right: 78px !important; }
  .batch-table .batch-id small { display: inline; margin-left: 6px; font-size: 12px; }
  .batch-table .batch-status { position: absolute; top: 14px; right: 15px; }
  .batch-table .batch-status::before { display: none !important; }
  .batch-table .batch-more { display: none; }
  .batch-table .amount { text-align: left; }
  .batch-table td.empty { grid-column: 1 / -1; padding: 20px 0 !important; text-align: center; }
  .pagination { padding: 12px; }
}
@media (max-width: 365px) {
  :root { --gutter: 10px; }
  .metric-spark { display: none; }
  .hero-copy { padding-inline: 14px; }
  .online small { display: none; }
  .batch-table .batch-id small { display: block; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
