/* Self-hosted typeface. Licence: static/fonts/OFL-DM-Sans.txt. */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* Stock workspace: burgundy identity, neutral surfaces and distinct operational status. */
:root {
  color-scheme: light;
  --sidebar: #30212c;
  --sidebar-deep: #241820;
  --accent: #972747;
  --accent-dark: #771735;
  --accent-light: #f9eaf0;
  --ink: #28242d;
  --muted: #625b66;
  --line: #d9d3da;
  --canvas: #f5f3f5;
  --white: #fff;
  --red: #b33c3e;
  --amber: #92631b;
  --radius: 7px;
  --shadow: 0 2px 6px rgb(19 44 61 / 4%);
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, .button { touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #b45c7a; outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(22px, 1.7vw, 27px); line-height: 1.2; letter-spacing: -.8px; }
h2 { font-size: 17px; line-height: 1.4; letter-spacing: -.25px; }
h3 { font-size: 14px; line-height: 1.5; }
small { font-size: 12px; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 212px; flex: 0 0 212px; min-height: 100vh; padding: 17px 10px 12px; background: var(--sidebar); color: #dce8ed; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 16px; font-size: 19px; font-weight: 700; letter-spacing: -.4px; color: #fff; text-decoration: none; }
.brand-mark { width: 35px; height: 35px; border-radius: 9px; display: inline-grid; place-items: center; background: #a52c50; color: #fff; font-size: 21px; line-height: 1; }
.brand small { display: block; color: #d2bfc9; font-size: 10px; letter-spacing: 1.8px; font-weight: 500; text-transform: uppercase; margin-top: 1px; }
.nav-section { margin: 9px 0 18px; }
.nav-section > p, .nav-section > .label { margin: 0 14px 9px; font-size: 10px; font-weight: 650; letter-spacing: 1.35px; text-transform: uppercase; color: #c7b5c0; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 11px; border: 0; border-radius: 7px; margin: 3px 0; color: #e0d4dc; background: transparent; text-align: left; font-size: 13px; font-weight: 500; transition: background .16s, color .16s; }
.nav-button svg { width: 18px; height: 18px; opacity: .88; }
.nav-button:hover { color: #fff; background: #49303f; }
.nav-button.active { background: #773149; color: #ffffff; box-shadow: inset 3px 0 #f09ab8; }
.nav-button .count { margin-left: auto; background: rgb(255 255 255 / 10%); color: inherit; }
.sidebar-foot { margin-top: auto; padding: 21px 13px 0; border-top: 1px solid #644553; color: #d2bfc9; font-size: 12px; }
.sidebar-foot strong { display: block; color: #d9e6eb; font-weight: 500; margin-bottom: 3px; }
.workspace { min-width: 0; flex: 1; }
.topbar { min-height: 56px; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 12px; display: flex; gap: 10px; align-items: center; }
.breadcrumb strong { font-weight: 500; color: var(--ink); }
.user-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; }
.user-chip > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #eaf1f2; color: #41606d; font-weight: 650; }
.user-chip small { display: block; color: var(--muted); font-size: 10px; }
.environment-banner { padding: 6px 20px; border-bottom: 1px solid #eedcb6; background: #fff9ec; color: #78591f; font-size: 12px; }
.environment-banner strong { font-weight: 650; }
.content { padding: 18px 20px 28px; max-width: none; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-heading p { margin: 5px 0 0; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.65px; text-transform: uppercase; color: var(--accent); margin-bottom: 9px; }
.muted { color: var(--muted); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button, button.primary, button.secondary, button.danger { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 34px; padding: 7px 12px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.35; transition: background .15s, border-color .15s, box-shadow .15s; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 2px rgb(5 86 83 / 8%); }
.primary:hover { background: var(--accent-dark); color: #fff; }
.secondary { background: #fff; border-color: #cfdade !important; color: #3b5361; }
.secondary:hover { background: #faf2f5; border-color: #aabfc7 !important; }
.danger { background: #fff3f2; border-color: #efc7c4 !important; color: var(--red); }
.danger:hover { background: #fce6e4; }
.button-small { min-height: 29px !important; padding: 5px 10px !important; font-size: 11px !important; }
.button svg, .toolbar svg { width: 15px; height: 15px; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); position: relative; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #637986; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.metric-label svg { width: 17px; height: 17px; color: #78909c; }
.metric-value { font-size: 27px; font-weight: 650; line-height: 1.2; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.metric-note { margin-top: 4px; font-size: 11px; color: var(--muted); }
.grid-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.panel + .panel { margin-top: 14px; }
.grid-two > .panel + .panel { margin-top: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid #e8edef; }
.panel-header h2, .panel-header h3 { margin: 0; }
.panel-header p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.panel > .stack, .panel > .detail-grid, .panel > .form-grid, .panel > .settings-group { padding: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 9px 13px; background: #f8fafb; color: #72848e; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid #e7edef; }
td { padding: 10px 13px; border-bottom: 1px solid #eaf0f2; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbf7f9; }
td .button { white-space: nowrap; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 24px 18px !important; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: #405c6b; font-size: 14px; margin-bottom: 6px; }
.empty svg { display: block; margin: 0 auto 12px; width: 30px; height: 30px; color: #9aafb8; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; border: 1px solid transparent; font-size: 10px; line-height: 1.4; font-weight: 600; white-space: nowrap; }
.pill-green { background: #eaf6f0; color: #27704e; border-color: #d8ece1; }
.pill-amber { background: #fff7e7; color: #95641c; border-color: #f6e5bf; }
.pill-red { background: #fff0ee; color: #b34842; border-color: #f5dcd7; }
.pill-blue { background: #edf3fc; color: #446d9e; border-color: #dde8f7; }
.pill-grey { background: #f0f3f5; color: #687b87; border-color: #e1e7eb; }
.cell-title { display: block; color: #284657; font-weight: 600; }
.cell-sub { display: block; margin-top: 3px; color: #7a8b95; font-size: 11px; font-weight: 400; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.notice { border: 1px solid var(--line); border-radius: 7px; padding: 10px 13px; margin-bottom: 14px; font-size: 12px; line-height: 1.6; }
.notice p { margin-bottom: 5px; }
.notice p:last-child { margin-bottom: 0; }
.notice-warning { color: #7d5a22; background: #fff9ed; border-color: #efdfb8; }
.notice-danger { color: #a4403b; background: #fff2f0; border-color: #efcdc9; }
.notice-success { color: #2c735b; background: #ecf7f1; border-color: #cfe8dc; }
.notice-info { color: #42697e; background: #eef6fa; border-color: #d5e5ee; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > .panel + .panel { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.detail-item { min-width: 0; }
.label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.value { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 23px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 12px 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #71838e; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.tab:hover { color: var(--accent); }
.count { display: inline-block; padding: 1px 6px; margin-left: 5px; border-radius: 4px; background: #eaf0f2; color: #738894; font-size: 10px; }
.search { position: relative; min-width: 220px; }
.search input { padding-left: 34px; }
.search > svg { position: absolute; left: 11px; top: 12px; width: 15px; height: 15px; color: #879aa4; }
.input, input:where(:not([type="checkbox"]):not([type="radio"]):not([type="range"])), select, textarea { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #cedbdf; border-radius: 6px; color: var(--ink); background: #fff; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #91a0a9; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #aebfc7; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #f9eaf0; }
input:disabled, select:disabled, textarea:disabled { background: #f4f7f8; color: #7e8f98; cursor: not-allowed; }
textarea { min-height: 95px; resize: vertical; line-height: 1.6; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 16px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px; background: #eaf0f2; }
.login-card { display: grid; grid-template-columns: .95fr 1.05fr; width: min(900px, 100%); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 18px 70px rgb(19 44 61 / 11%); }
.login-aside { display: flex; flex-direction: column; justify-content: space-between; min-height: 530px; padding: 42px; background: var(--sidebar); color: #fff; position: relative; overflow: hidden; }
.login-aside::after { content: ""; position: absolute; width: 270px; height: 270px; border: 1px solid #70334e; border-radius: 50%; bottom: -110px; right: -90px; box-shadow: 0 0 0 40px rgb(43 86 97 / 15%), 0 0 0 80px rgb(43 86 97 / 10%); pointer-events: none; }
.login-aside h1 { font-size: 35px; line-height: 1.2; margin: 40px 0 20px; letter-spacing: -1px; }
.login-aside p { font-size: 13px; line-height: 1.8; color: #e2d1db; }
.login-aside small { color: #8faab7; font-size: 11px; }
.login-logo { display: flex; gap: 11px; align-items: center; font-size: 18px; font-weight: 600; }
.login-form { padding: 53px 45px; align-self: center; }
.login-form h2 { font-size: 25px; letter-spacing: -.6px; margin-bottom: 6px; }
.login-form > p { margin-bottom: 27px; font-size: 13px; color: var(--muted); }
.login-form .field { margin-bottom: 18px; }
.login-form .primary { width: 100%; margin-top: 8px; min-height: 42px; }
.error { color: #b33c3e; font-size: 12px; margin: 10px 0; }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid #d6e7e5; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog.modal { width: min(920px, calc(100vw - 40px)); max-width: 1180px; max-height: 88vh; padding: 0; border: 1px solid #d6e0e4; border-radius: 12px; color: var(--ink); box-shadow: 0 22px 70px rgb(10 31 44 / 23%); overflow: auto; }
dialog::backdrop { background: rgb(10 28 40 / 54%); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.45px; }
.modal-head > button:not(.button) { border: 0; background: #f2f5f6; border-radius: 5px; color: #6c808c; width: 29px; height: 29px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding: 12px 20px; border-top: 1px solid var(--line); background: #f9fbfb; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .label { display: block; color: #425e6d; font-size: 12px; font-weight: 550; margin-bottom: 7px; }
.field-hint { display: block; margin-top: 6px; color: #7d8f99; font-size: 11px; line-height: 1.5; }
.check-field { display: flex; align-items: flex-start; gap: 9px; color: #4f6875; font-size: 12px; line-height: 1.5; }
.check-field input { margin: 2px 0 0; }
.row-editor { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.editor-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 11px 14px; background: #f6f9fa; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.editor-row { display: flex; align-items: flex-end; gap: 10px; padding: 14px; border-bottom: 1px solid #e7edef; }
.editor-row:last-child { border-bottom: 0; }
.editor-row-fields { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; min-width: 0; }
.editor-row .field label { font-size: 10px; }
.section-title { font-size: 12px; font-weight: 650; color: #405e6d; margin: 23px 0 12px; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; padding: 0 6px; background: #e8f3f1; color: var(--accent); font-size: 10px; font-weight: 650; }
.timeline { padding: 18px 23px 23px; overflow-x: auto; }
.timeline-row { display: grid; grid-template-columns: 150px minmax(450px, 1fr); gap: 17px; align-items: center; min-height: 52px; }
.timeline-label { font-size: 12px; font-weight: 500; }
.timeline-label small { display: block; font-size: 10px; color: var(--muted); }
.timeline-track { height: 34px; position: relative; border-left: 1px solid #e4ebee; background: repeating-linear-gradient(to right, transparent 0, transparent calc(14.2857% - 1px), #edf1f3 calc(14.2857% - 1px), #edf1f3 14.2857%); }
.timeline-bar { position: absolute; min-width: 24px; height: 27px; top: 3px; display: flex; align-items: center; padding: 0 9px; border-radius: 4px; background: #ddf0ed; color: #2c716a; border-left: 3px solid #4caa9d; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-bar.pill-amber { background: #fff0d1; color: #8e682b; border-left-color: #d2a04d; }
.timeline-bar.pill-red { background: #fce5e2; color: #ad5047; border-left-color: #ce746c; }
.timeline-axis { display: flex; justify-content: space-between; margin: 0 0 10px 167px; min-width: 450px; font-size: 10px; color: #7d909b; }
.thread { display: flex; flex-direction: column; gap: 17px; padding: 21px 23px; }
.message { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 92%; background: #fff; }
.message.outgoing { align-self: flex-end; border-color: #cee7e2; background: #f2faf7; }
.message-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 11px 15px; font-size: 11px; border-bottom: 1px solid #e6edee; color: #728793; }
.message-head strong { color: #476572; font-weight: 600; }
.message-body { padding: 14px 15px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.file-list { display: flex; flex-direction: column; gap: 9px; }
.file-item { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 8px 11px; border: 1px solid #dfe8eb; border-radius: 7px; background: #fbfcfd; font-size: 12px; }
.file-item small { color: var(--muted); font-size: 10px; }
.permission-grid { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.permission-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(3, minmax(65px, .55fr)); align-items: center; padding: 12px 16px; gap: 12px; border-bottom: 1px solid #e7edef; font-size: 12px; }
.permission-row:last-child { border-bottom: 0; }
.permission-row:first-child { background: #f7f9fa; color: #6f838f; font-size: 11px; font-weight: 600; }
.settings-group + .settings-group { border-top: 1px solid var(--line); }
.settings-group h3 { margin-bottom: 5px; }
.settings-group > p { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.toast { position: fixed; bottom: 25px; right: 28px; z-index: 100; max-width: min(420px, calc(100vw - 40px)); padding: 14px 19px; border: 1px solid #344e5c; border-radius: 8px; background: #213e4d; color: #fff; font-size: 12px; box-shadow: 0 8px 25px rgb(15 40 55 / 18%); }
.toast.success { background: #21694f; border-color: #338568; }
.toast.error { background: #a4443e; border-color: #ba625c; }
.data-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; color: #586f7e; word-break: break-all; }
.result-box { padding: 15px; border: 1px solid #dbe6e8; border-radius: 7px; background: #f6f9fa; overflow: auto; font-size: 12px; }
.result-box pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 11px; line-height: 1.7; }
details { border: 1px solid var(--line); border-radius: 7px; background: #fff; }
details > summary { padding: 13px 16px; cursor: pointer; font-size: 12px; font-weight: 550; color: #3e5d6b; }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 0; }
details > :not(summary) { margin: 15px 16px; }
.key-value-list { display: grid; grid-template-columns: minmax(130px, .65fr) 1fr; gap: 10px 20px; margin: 0; font-size: 12px; }
.key-value-list dt { color: var(--muted); }
.key-value-list dd { margin: 0; overflow-wrap: anywhere; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: inherit; text-align: left; font-weight: 550; }
.link-button:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1150px) {
  .sidebar { width: 212px; flex-basis: 212px; padding-inline: 12px; }
  .topbar { padding-inline: 25px; }
  .environment-banner { padding-inline: 25px; }
  .content { padding: 27px 25px 40px; }
  .metric-grid { gap: 12px; }
  .metric { padding: 18px; }
  .metric-value { font-size: 27px; }
  .grid-two { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { width: 185px; flex-basis: 185px; padding-inline: 9px; }
  .brand { padding-inline: 9px; font-size: 17px; gap: 9px; }
  .brand-mark { width: 30px; height: 30px; font-size: 18px; }
  .nav-button { padding: 11px 10px; gap: 8px; font-size: 12px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-header { padding-inline: 18px; flex-wrap: wrap; }
  .login-aside { padding: 32px; }
  .login-form { padding: 36px 30px; }
  .login-aside h1 { font-size: 29px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { width: 100%; min-height: 0; padding: 15px 15px 9px; }
  .brand { padding: 0 5px 13px; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 10px; }
  .nav-section { display: flex; flex-shrink: 0; margin: 0; gap: 4px; }
  .nav-section > p, .nav-section > .label, .sidebar-foot { display: none; }
  .nav-button { width: auto; white-space: nowrap; padding: 10px 12px; }
  .nav-button.active { box-shadow: inset 0 -2px #f09ab8; }
  .topbar { min-height: 60px; padding: 13px 20px; }
  .environment-banner { padding: 8px 20px; font-size: 11px; }
  .content { padding: 24px 18px 35px; }
  .page-heading { margin-bottom: 22px; }
  .page-heading .toolbar { width: 100%; }
  .metric-grid { margin-bottom: 20px; }
  .metric { padding: 16px; }
  .metric-label { font-size: 11px; }
  .metric-value { font-size: 25px; }
  .metric-note { font-size: 10px; }
  .toolbar .search { flex: 1; min-width: 170px; }
  .panel-header { padding: 16px; }
  th, td { padding-inline: 14px; }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .editor-row-fields { grid-template-columns: 1fr; }
  .login-screen { padding: 20px; }
  .login-card { grid-template-columns: 1fr; max-width: 440px; }
  .login-aside { min-height: 0; padding: 26px 28px; gap: 18px; }
  .login-aside h1 { font-size: 25px; margin: 8px 0; }
  .login-aside p, .login-aside > small { display: none; }
  .login-form { padding: 30px 28px; }
  dialog.modal { width: calc(100vw - 24px); max-height: 90vh; }
  .modal-head, .modal-body { padding: 19px; }
  .modal-foot { padding: 10px 13px; flex-wrap: wrap; }
  .message { max-width: 100%; }
  .permission-row { padding: 10px; grid-template-columns: minmax(90px, 1fr) repeat(3, 52px); gap: 5px; font-size: 11px; }
  .toast { bottom: 16px; right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .environment-banner, .toolbar, .actions, .toast { display: none !important; }
  .workspace, .shell { display: block; width: 100%; }
  body, .content { background: #fff; padding: 0; }
  .panel, .metric { box-shadow: none; break-inside: avoid; }
  .table-wrap { overflow: visible; }
}

/* Concrete application layout and controls. */
.nav-section { margin: 15px 11px 5px; color: #c7b5c0; font-size: 10px; font-weight: 650; letter-spacing: 1.35px; text-transform: uppercase; }
.nav-button { text-decoration: none; }
.nav-button > span:first-child { flex: 0 0 18px; font-size: 17px; text-align: center; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-foot { margin-top: auto; }
.sidebar-foot small { display: block; padding-top: 5px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #72c6b9; margin-right: 7px; }
.environment-banner { display: flex; justify-content: space-between; gap: 18px; }
.environment-banner a { color: inherit; font-size: 11px; }
.toolbar { justify-content: space-between; margin-bottom: 12px; }
.search > span { position: absolute; left: 12px; top: 4px; font-size: 24px; color: #879aa4; }
.metric-value, .metric-note { display: block; }
.grid-two { margin-bottom: 14px; }
.panel-padding { padding: 16px; }
.panel > .key-value-list { padding: 16px; margin: 0; }
.key-value-list { display: grid; grid-template-columns: minmax(130px, .85fr) minmax(0, 1.5fr); gap: 12px 20px; font-size: 12px; }
.key-value-list dt { color: var(--muted); overflow-wrap: anywhere; }
.key-value-list dd { margin: 0; overflow-wrap: anywhere; }
.key-value-list dd .key-value-list { margin: 0; }
.key-value-list .result-box { padding: 10px; }
.record-actions { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.empty-symbol { display: block; font-size: 28px; color: #9aafb8; margin-bottom: 10px; }
.object-fields { padding: 18px; }
.multi-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; max-height: 250px; overflow: auto; }
.permission-row { grid-template-columns: minmax(150px, 1fr) minmax(100px, .55fr); }
.evidence-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 15px; border: 1px solid var(--line); border-radius: 7px; padding: 15px; margin-bottom: 12px; }
.evidence-row > .field-hint { align-self: center; }
.evidence-row > label:last-child { grid-column: 1 / -1; }
[data-add-evidence-name] { flex: 1; min-width: 160px; }
.timeline-bar { border-top: 0; border-bottom: 0; border-right: 0; }
.timeline-bar.draft { background: #eef1f4; border-left-color: #9aabb6; color: #627785; }
.skip-link:focus { clip: auto; width: auto; height: auto; padding: 10px 20px; left: 10px; top: 10px; background: #fff; z-index: 200; }
.login-screen:has(.login-aside) { display: flex; justify-content: center; align-items: stretch; padding: max(50px, calc((100vh - 630px) / 2)) 30px; }
.login-screen > .login-aside { width: 420px; min-height: 560px; border-radius: 14px 0 0 14px; flex-shrink: 0; }
.login-screen > .login-card { display: block; width: 470px; padding: 62px 44px 35px; border-radius: 0 14px 14px 0; }
.login-screen > .login-card:only-child { border-radius: 14px; }
.login-screen .login-form { padding: 10px 0; display: flex; flex-direction: column; }
.login-form label.field { display: block; font-size: 12px; color: #425e6d; font-weight: 550; }
.login-form label.field input { display: block; margin-top: 8px; }
.login-aside .brand { padding: 0; }
.login-aside .notice { position: relative; z-index: 1; margin-bottom: 0; color: #cae1e7; border-color: #466472; background: #193848; }
.modal-head > button.secondary { flex-shrink: 0; padding: 5px; }
details.settings-group { margin-bottom: 12px; }
details.settings-group summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
@media (max-width: 900px) {
  .login-screen > .login-aside { width: 40%; padding: 32px; }
  .login-screen > .login-card { width: 55%; padding: 45px 30px; }
}
@media (max-width: 700px) {
  .sidebar { position: static; height: auto; }
  .nav-section { display: none; }
  .environment-banner { flex-direction: column; gap: 3px; }
  .login-screen:has(.login-aside) { display: block; padding: 25px 18px; }
  .login-screen > .login-aside, .login-screen > .login-card { width: 100%; max-width: 480px; margin: auto; }
  .login-screen > .login-aside { border-radius: 14px 14px 0 0; min-height: auto; }
  .login-screen > .login-card { border-radius: 0 0 14px 14px; padding: 32px; }
  .multi-options, .evidence-row { grid-template-columns: 1fr; }
  .permission-row { grid-template-columns: minmax(130px, 1fr) minmax(100px, .7fr); }
  .key-value-list { grid-template-columns: 1fr; gap: 4px; }
  .key-value-list dd { margin-bottom: 10px; }
}


/* Compact operational workspace, October 2026 usability update. */
.sidebar { scrollbar-width: thin; }
.sidebar nav { flex: 1; }
.brand { font-size: 16px; gap: 10px; }
.brand small { font-size: 8px; letter-spacing: .7px; text-transform: none; }
.brand-mark { width: 31px; height: 31px; border-radius: 8px; }
.nav-button { gap: 9px; margin: 1px 0; min-height: 34px; font-size: 12px; }
.nav-button { line-height: 18px; }
.nav-button > span:first-child { font-size: 16px; line-height: 1; }
.nav-button > span:nth-child(2) { flex: 1; }
.nav-button .count { margin-left: 0; }
.nav-section { font-size: 9px; letter-spacing: 1.3px; }
.sidebar-foot { padding: 12px 10px 0; font-size: 11px; }
.topbar { position: sticky; top: 0; z-index: 20; }
.topbar-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.breadcrumb { min-width: 0; font-size: 11px; }
.user-chip { display: block; line-height: 1.25; }
.user-chip small { margin-top: 3px; }
.environment-banner { font-size: 11px; align-items: center; }
.environment-banner strong { font-size: 9px; letter-spacing: 1px; margin-right: 8px; }
.mobile-menu { display: none !important; }
.page-heading { align-items: center; }
.page-heading .eyebrow { margin-bottom: 4px; font-size: 9px; }
.page-heading p.muted { font-size: 12px; }
.page-heading h1 { letter-spacing: -.55px; }
.page-heading .actions { justify-content: flex-end; flex-shrink: 0; }
h2 { font-size: 14px; }
.metric-link { color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.metric-link:hover { border-color: #8abfb8; background: #f8fcfb; color: var(--ink); }
.metric-label { margin-bottom: 4px; }
.metric-note { font-size: 11px; }
.metric-value { font-size: 26px; }
.metric-link .metric-label > span { color: var(--accent); font-size: 17px; }
.quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.quick-actions > .label { margin: 0 8px 0 0; font-size: 11px; }
.access-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 13px; background: #e9f0f3; border-radius: 6px; font-size: 12px; margin-bottom: 16px; }
.access-note a { margin-left: auto; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 16px; align-items: start; }
.dashboard-grid > div { min-width: 0; }
.dashboard-grid .panel { margin-bottom: 14px; }
.dashboard-grid td { font-size: 11px; padding: 10px 12px; }
.dashboard-grid .cell-sub { font-size: 10px; }
.attention-list { display: flex; flex-direction: column; }
.attention-row { display: flex; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 12px 15px; color: var(--ink); text-align: left; width: 100%; }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: #f5faf9; }
.attention-row > span:nth-child(2) { flex: 1; min-width: 0; }
.attention-row strong { display: block; font-size: 12px; font-weight: 600; }
.attention-row small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.attention-marker { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #fff2d9; color: #936519; font-weight: 700; }
.trial-help { padding: 13px 16px; font-size: 12px; }
.trial-help p { display: grid; grid-template-columns: 135px 1fr; gap: 9px; margin-bottom: 10px; }
.trial-help p span { color: var(--muted); font-size: 11px; }
.trial-help > a { font-size: 11px; }
.setup-disclosure { font-size: 11px; background: #fffdf6; border-color: #eadfbd; }
.setup-disclosure summary { padding: 10px 14px; }
.setup-disclosure li { margin-bottom: 7px; }
.section-tabs, .record-tabs { display: flex; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); overflow-x: auto; margin: 0 0 13px; }
.section-tab { border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 12px; font-weight: 550; }
.section-tab.active { border-bottom-color: var(--accent); color: var(--accent-dark); background: #e9f3f0; }
.section-tab:hover { background: #edf2f3; color: var(--ink); }
.register-toolbar { margin-bottom: 12px; }
.register-toolbar .toolbar { gap: 10px; margin-bottom: 9px; justify-content: flex-start; }
.register-toolbar .toolbar > .actions { margin-left: auto; }
.register-toolbar .search { width: min(350px, 100%); }
.search input { padding-left: 33px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tab { padding: 6px 12px; font-size: 11px; border: 1px solid #d6e1e4; border-radius: 5px; background: white; color: var(--muted); }
.filter-tab.active { color: var(--accent-dark); border-color: #a6cec6; background: #eaf5f2; font-weight: 650; }
.table-wrap { max-height: calc(100vh - 285px); scrollbar-width: thin; }
th { position: sticky; top: 0; z-index: 1; font-size: 10px; letter-spacing: .4px; }
td { line-height: 1.45; }
tbody tr:hover { background: #f2f8f6; }
.dashboard-grid .table-wrap { max-height: 340px; }
.empty { font-size: 12px; }
.empty p { margin: 0; }
.empty-symbol { font-size: 20px; margin-bottom: 5px; }
dialog.modal { max-height: 92vh; border-radius: 9px; }
dialog.record-dialog { width: min(1120px, calc(100vw - 36px)); }
.modal-head { position: sticky; top: 0; z-index: 5; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head .pill { margin-top: 5px; }
.modal-foot { position: sticky; bottom: 0; z-index: 4; }
.modal-foot > .field-hint { margin: 0 auto 0 0; }
.record-back { display: block; font-size: 11px; margin-bottom: 10px; }
.record-action-bar { padding: 12px 20px; display: flex; align-items: flex-start; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #f9fbfc; }
.more-actions { min-width: 120px; }
.more-actions > summary { padding: 8px 12px; line-height: 1.35; }
.more-actions > .actions { max-width: 700px; margin: 10px; }
.more-actions .actions > button { flex-grow: 1; }
.case-control { display: flex; align-items: center; gap: 14px; font-size: 11px; padding: 10px 20px; background: #eaf5f2; color: #296454; }
.case-control.manual { background: #fff2d9; color: #855a19; border-bottom: 1px solid #ead9b6; }
.record-tabs { margin: 0; padding: 0 10px; background: #fff; }
.record-tabs .section-tab { padding: 11px 13px; }
.record-summary { border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.record-summary > .key-value-list { grid-template-columns: minmax(100px,.65fr) minmax(0,1.4fr) minmax(100px,.65fr) minmax(0,1.4fr); gap: 12px 17px; align-items: start; }
.record-summary dd .key-value-list { display: block; }
.record-summary dd .key-value-list dt { margin-top: 5px; }
.next-step { display: flex; gap: 14px; align-items: baseline; border-left: 3px solid var(--accent); background: #eff7f5; padding: 11px 14px; margin-bottom: 15px; font-size: 12px; }
.next-step strong { white-space: nowrap; color: var(--accent-dark); }
.record-lines { margin-top: 17px; }
.record-lines:empty { display: none; }
.record-summary + .record-lines h3 { margin-bottom: 10px; }
.attachment-upload { display: block; padding-top: 16px; }
.attachment-upload input { display: block; margin-top: 7px; }
.record-dialog .thread { padding: 0; gap: 12px; }
.record-dialog .metric-grid { margin-bottom: 14px; }
.form-grid { align-items: start; }
.modal-body > .notice { margin-bottom: 14px; }
@media (min-width: 701px) and (max-height: 800px) {
 .sidebar { padding-top: 11px; }
 .brand { padding-bottom: 8px; }
 .nav-section { margin-top: 9px; margin-bottom: 3px; }
 .nav-button { min-height: 30px; padding-block: 5px; }
 .sidebar-foot { padding-top: 9px; }
}
@media (min-width: 701px) and (max-width: 1150px) {
 .sidebar { width: 192px; flex-basis: 192px; }
 .content { padding: 17px 18px 25px; }
 .topbar, .environment-banner { padding-inline: 18px; }
 .metric { padding: 12px 14px; }
 .grid-two { grid-template-columns: 1fr 1fr; }
 .dashboard-grid { grid-template-columns: 1fr; }
 .page-heading { flex-direction: row; }
}
@media (max-width: 900px) {
 .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .record-summary > .key-value-list { grid-template-columns: minmax(100px,.7fr) minmax(0,1.4fr); }
 .breadcrumb { display: none; }
 .topbar-actions { margin-left: auto; }
 .page-heading { flex-wrap: wrap; }
}
@media (max-width: 700px) {
 .shell { display: flex; flex-direction: column; }
 .workspace { width: 100%; }
 .sidebar { display: none; position: fixed; inset: 53px auto 0 0; width: 245px; height: calc(100dvh - 53px); z-index: 30; padding: 14px 10px; box-shadow: 8px 0 25px #30212c33; }
 .sidebar.mobile-open { display: flex; flex-direction: column; }
 .sidebar nav { display: block; overflow: auto; }
 .sidebar .nav-section { display: block; }
 .sidebar .nav-button { width: 100%; }
 .sidebar-foot { display: block; }
 .topbar { min-height: 53px; padding: 8px 12px; gap: 10px; }
 .mobile-menu { display: inline-flex !important; }
 .topbar-actions { gap: 9px; font-size: 11px; }
 .topbar #refresh { font-size: 0 !important; padding: 6px 8px; }
 .topbar #refresh::after { content: '↻'; font-size: 17px; }
 .user-chip { font-size: 11px; max-width: 125px; }
 .user-chip small { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .environment-banner { padding: 6px 12px; flex-direction: row; font-size: 10px; align-items: flex-start; gap: 8px; }
 .environment-banner a { white-space: nowrap; font-size: 10px; }
 .environment-banner strong { display: block; }
 .content { padding: 14px 12px 24px; }
 .page-heading { margin-bottom: 12px; gap: 10px; }
 .page-heading .actions { justify-content: flex-start; }
 .page-heading h1 { font-size: 23px; }
 .metric-grid { gap: 8px; margin-bottom: 12px; }
 .metric { padding: 11px; }
 .metric-value { font-size: 24px; }
 .metric-note { font-size: 10px; }
 .metric-label { font-size: 10px; }
 .quick-actions { gap: 7px; }
 .quick-actions > .label { width: 100%; }
 .quick-actions > button { flex: 1 1 40%; }
 .dashboard-grid, .grid-two { grid-template-columns: 1fr; gap: 12px; }
 .section-tab { padding: 9px 11px; }
 .register-toolbar .search { width: auto; flex: 1; min-width: 140px; }
 .register-toolbar .toolbar > .actions { margin-left: 0; }
 .attention-row { gap: 7px; padding: 11px; }
 .attention-row small { max-width: 22ch; }
 .trial-help p { grid-template-columns: 120px 1fr; }
 .table-wrap { max-height: 65vh; }
 dialog.modal, dialog.record-dialog { width: calc(100vw - 16px); max-height: 95dvh; }
 .modal-head, .modal-body { padding: 14px; }
 .modal-head h2 { font-size: 18px; overflow-wrap: anywhere; }
 .modal-foot { padding: 10px 14px; }
 .record-action-bar { padding: 10px 14px; }
 .record-action-bar > button { flex-grow: 1; }
 .record-summary { padding: 12px; }
 .record-tabs { padding-inline: 3px; }
 .case-control, .next-step { flex-direction: column; gap: 4px; }
 .next-step { font-size: 11px; }
 .more-actions { flex: 1 1 100%; }
 .form-grid, .editor-row-fields { grid-template-columns: 1fr; }
 .record-summary > .key-value-list { grid-template-columns: minmax(90px,.7fr) minmax(0,1.3fr); gap: 10px; }
 .login-screen > .login-aside { padding: 20px 26px; }
 .login-aside .notice { margin-top: 10px; font-size: 11px; }
 .login-screen > .login-card { padding: 24px 26px; }
}
@media print {
 .topbar, .record-action-bar, .record-tabs, .register-toolbar, .section-tabs, .quick-actions { display: none !important; }
 .table-wrap { max-height: none; overflow: visible; }
}

/* Usability update: strong contrast without using colour as the only signal. */
.sidebar .nav-section { color: #d4bfcb; }
.brand:hover { color: #fff; }
.nav-button.active { background: #773149; color: #fff; box-shadow: inset 3px 0 #f09ab8; }
.nav-button:hover { background: #503443; }
.brand-mark { background: #ad3057; }
.status-dot { background: #6ce0a3; }
.field-hint, .cell-sub, .muted { color: #625b66; }
input::placeholder, textarea::placeholder { color: #766b78; }
.page-heading .muted { max-width: 90ch; font-size: 13px; }
.page-help { margin: -3px 0 13px; border-left: 3px solid var(--accent); padding: 6px 12px; background: #fff; border-radius: 0 6px 6px 0; font-size: 12px; }
.page-help summary { cursor: pointer; color: var(--accent-dark); font-weight: 650; }
.page-help > div { padding-top: 9px; max-width: 110ch; }
.page-help p { margin: 0 0 6px; }
.rag-legend { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.pill { border: 1px solid transparent; font-weight: 650; font-size: 11px; }
.pill-green { color: #166534; background: #e9f8ee; border-color: #8dcaa2; }
.pill-red { color: #a51624; background: #ffeded; border-color: #eba0a7; }
.pill-amber { color: #754500; background: #fff4d6; border-color: #d8b35e; }
.pill-blue { color: #344c75; background: #eef3fb; border-color: #b1c4e2; }
.metric[data-tone] { border-top-width: 4px; }
.metric[data-tone="red"] { border-top-color: #c12638; }
.metric[data-tone="amber"] { border-top-color: #b97700; }
.metric[data-tone="green"] { border-top-color: #22854b; }
.metric[data-tone="red"] .metric-value { color: #a51624; }
.metric[data-tone="amber"] .metric-value { color: #754500; }
.metric[data-tone="green"] .metric-value { color: #166534; }
.table-meta { padding: 7px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: #625b66; background: #faf8fa; border-bottom: 1px solid var(--line); }
.table-meta label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.table-meta select { width: 65px; min-height: 27px; padding: 3px 5px; }
.table-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 9px 13px; border-top: 1px solid var(--line); font-size: 12px; }
th { color: #504453; background: #f4f0f4; }
th:has(button) { padding: 0; }
th button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; color: inherit; background: transparent; border: 0; font-size: inherit; text-transform: inherit; letter-spacing: inherit; font-weight: 700; white-space: nowrap; text-align: left; }
th button:hover { background: #ece2e9; color: #651d38; }
th[aria-sort="ascending"], th[aria-sort="descending"] { background: #ead9e2; color: #651d38; }
td { font-size: 12px; border-bottom-color: #e5dfe6; }
tbody tr:nth-child(even) { background: #fcfafc; }
tbody tr:hover { background: #f9edf2; }
td .cell-sub { max-width: 42ch; }
.panel-note { padding: 11px 15px; margin: 0; background: #faf8fa; border-bottom: 1px solid var(--line); font-size: 12px; color: #625b66; }
.panel-padding > p { max-width: 95ch; }
.practice-guide { display: grid; gap: 0; }
.practice-step { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 11px 15px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--accent-dark); }
.practice-step:hover { background: #f9edf2; }
.practice-step small { color: #625b66; }
.availability-detail { margin-top: 4px; max-width: 310px; }
.availability-detail summary { cursor: pointer; color: var(--accent); }
.availability-detail[open] { max-height: 180px; overflow: auto; }
.availability-detail div { font-size: 11px; padding: 3px 0; }
.permission-details { margin: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.permission-details summary { cursor: pointer; font-weight: 600; }
.permission-details .permission-grid { margin-top: 10px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-filter { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; font-size: 12px; }
.category-filter select { width: auto; max-width: 220px; min-height: 30px; padding: 4px 8px; }
.form-section { grid-column: 1 / -1; margin: 5px 0 0; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--accent-dark); font-size: 13px; }
.field .permission-details { margin: 0; }
@media (max-width: 700px) {
 .page-help { margin-bottom: 10px; }
 .table-meta { padding: 6px 10px; align-items: flex-start; }
 .table-meta > span { max-width: 66%; }
 .category-filter { margin-left: 0; flex-wrap: wrap; }
 .rag-legend { gap: 5px; }
 .rag-legend .pill { font-size: 10px; }
 .page-heading .muted { font-size: 12px; }
 .section-tabs { max-width: 100%; }
}

.practice-panel { margin-bottom: 14px; }
.practice-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.practice-step { border-right: 1px solid var(--line); }
.practice-step:last-child { border-right: 0; }
@media (max-width: 700px) { .practice-guide { grid-template-columns: 1fr; } .practice-step { border-right: 0; } }

/* Next-generation operational controls */
.context-value{padding:8px 10px;border:1px solid var(--line);border-radius:5px;background:#f8f5f7;font-weight:600}
.search-select{position:relative;min-width:0}.search-select>input{width:100%;padding-right:35px!important}.native-selection{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none;overflow:hidden}.choice-clear{position:absolute;right:4px;top:4px;width:28px;height:28px;border:0;background:transparent;color:var(--muted);font-size:20px}.search-options{position:absolute;z-index:20;left:0;right:0;top:100%;max-height:260px;overflow:auto;background:white;border:1px solid var(--accent);border-radius:5px;box-shadow:0 4px 15px #30212c22}.search-options>[role=option]{display:block;width:100%;border:0;border-bottom:1px solid var(--line);background:white;padding:8px;text-align:left;color:var(--ink)}.search-options>[aria-selected=true]{background:var(--accent-light);box-shadow:inset 3px 0 var(--accent)}.choice-count,.no-match{padding:10px;margin:0;font-size:12px}.multi-search{width:100%;margin-bottom:6px}.multi-options{max-height:240px;overflow:auto}.detail-section{border-top:1px solid var(--line);padding:12px 0}.detail-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}.detail-section-head h3{margin:0}.diff-table{min-width:420px;width:100%;font-size:12px}.diff-table td,.diff-table th{white-space:normal;max-width:300px;overflow-wrap:anywhere}.diff-table .key-value-list{display:block}.diff-table .key-value-list dt{font-weight:600}.diff-table .key-value-list dd{margin-left:0}.balance-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:10px 0}.balance-strip>div{padding:8px;background:var(--canvas);border:1px solid var(--line);border-radius:5px}.balance-strip dt{font-size:11px;color:var(--muted)}.balance-strip dd{margin:3px 0 0;font-weight:700}.batch-confirmation{border:1px solid var(--line);padding:12px;border-radius:6px;margin-bottom:14px}.batch-confirmation h3{margin-bottom:5px}.receipt-line{border:1px solid var(--line);border-radius:6px;margin:12px 0}.receipt-line-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;background:var(--canvas);font-size:12px}.receipt-line [data-line-body]{padding:10px}.receipt-batch{border:1px solid var(--line);padding:10px;margin-bottom:8px;border-radius:5px}.receipt-batch .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.receipt-batch .field.full{grid-column:1/-1}.receipt-batch textarea{min-height:55px}.evidence-checklist{margin:10px 0}.evidence-choice{display:grid;grid-template-columns:1.3fr 1fr 1.4fr;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.evidence-choice>small{grid-column:3}.evidence-choice input[type=file]{width:100%;font-size:11px}.evidence-choice label{font-size:12px}.filter-grid{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:12px 0}.filter-grid>label{display:flex;flex-direction:column;min-width:130px;flex:1;gap:4px;font-size:12px;font-weight:600}.filter-grid input,.filter-grid select{min-height:34px;width:100%;border:1px solid var(--line);border-radius:5px;padding:6px;background:white}.schedule-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 12px}.compact-problems{margin:0;padding-left:16px;color:var(--red);max-width:330px;font-size:11px}.capacity-chart{padding:8px 12px;max-height:560px;overflow:auto}.capacity-day,.chart-bar-row{display:grid;grid-template-columns:110px minmax(80px,1fr) 230px;align-items:center;gap:10px;width:100%;border:0;border-bottom:1px solid var(--line);background:white;padding:6px 0;text-align:left;font-size:12px;color:var(--ink)}.capacity-day:hover,.chart-bar-row:hover{background:var(--accent-light)}meter{width:100%;height:17px;accent-color:var(--accent)}meter::-webkit-meter-optimum-value{background:var(--accent)}.chart-legend{font-size:11px;color:var(--muted);margin-bottom:8px}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.report-metric{min-width:0}.report-metric .panel-header strong{font-size:15px}.bar-chart{padding:8px 12px;max-height:300px;overflow:auto}.chart-bar-row{grid-template-columns:minmax(90px,1fr) minmax(70px,1fr) minmax(60px,.6fr);font-size:11px}.chart-bar-row strong{text-align:right}.report-metric>details{border-top:1px solid var(--line);padding:9px 12px}.report-period{font-size:12px;color:var(--muted)}.report-metric .notice{margin:8px 12px}.permission-row{gap:10px}.record-summary>.detail-section:first-child{border-top:0}.table-wrap thead th{position:sticky;top:0;z-index:1;background:#f8f5f7}.table-wrap td{padding-top:7px;padding-bottom:7px}.panel-header{min-height:42px}.modal-body{overflow-wrap:anywhere}.settings-group>.form-grid{padding:12px}.page-heading{margin-bottom:10px}.secondary{color:#573c4b}.table-meta{font-size:11px}.field[data-type=hidden]{display:none}.record-action-bar{padding-top:9px;padding-bottom:9px}.capacity-day>span:last-child{font-variant-numeric:tabular-nums}.report-metric .table-wrap{max-width:100%}
@media(max-width:1000px){.report-grid{grid-template-columns:1fr}.balance-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.receipt-line-heading{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.receipt-batch .form-grid{grid-template-columns:1fr}.evidence-choice{grid-template-columns:1fr}.evidence-choice>small{grid-column:auto}.balance-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.capacity-day{grid-template-columns:90px 1fr}.capacity-day>span:last-child{grid-column:1/-1}.report-grid{display:block}.filter-grid>label{min-width:140px}.detail-section-head{align-items:flex-start}.search-options{max-height:220px}}
.row-editor{overflow:visible}.search-select.opens-up .search-options{top:auto;bottom:100%}.evidence-checklist>.evidence-choice{margin:0 10px;padding:7px 0;grid-template-columns:1fr}.evidence-choice>.check-field{min-height:24px;align-items:center}.evidence-item-detail{display:grid;grid-template-columns:1fr 2fr;gap:6px 10px;padding:3px 0 7px 24px}.evidence-item-detail>small{grid-column:2}.evidence-item-detail>.other-evidence-name{grid-column:1/-1}.report-row-detail{border:0;min-width:100px}.report-row-detail>summary{padding:4px}.report-row-detail>.key-value-list{display:block;min-width:180px;margin:8px}.report-row-detail dd{margin:0 0 8px}.report-metric>.panel-header{gap:15px;align-items:flex-start}.report-metric>.panel-header strong{white-space:normal;text-align:right;font-size:13px;max-width:45%}.replace-file{display:flex;align-items:center;gap:10px;padding:6px 12px;font-size:12px}.replace-file input{max-width:300px}.modal-head>button.secondary{width:auto;min-width:34px}.receipt-batch .field textarea{min-height:55px;height:55px}.report-grid .panel{margin-bottom:0}.report-grid{margin-top:12px}
@media(max-width:600px){.evidence-item-detail{grid-template-columns:1fr}.evidence-item-detail>small{grid-column:1}.evidence-choice>.check-field{min-height:36px}.replace-file{align-items:flex-start;flex-direction:column}}
.action-help-wrap{display:inline-flex;position:relative;align-items:center;gap:3px}.action-help{width:23px;height:23px;border:1px solid var(--line);border-radius:50%;background:white;color:var(--accent);font-size:12px;font-weight:700;padding:0}.action-tooltip{position:absolute;z-index:25;left:0;top:100%;width:280px;max-width:80vw;padding:10px;background:#30212c;color:white;border-radius:5px;box-shadow:0 3px 12px #30212c33;font-size:12px;font-weight:400}.record-action-bar{overflow:visible}

/* Reports and quantity clarity, 1.1.1 */
.stock-quantity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}
.stock-quantity-grid>div{border:1px solid var(--line);border-radius:6px;padding:12px;background:#fff}
.stock-quantity-grid>div:first-child{border-top:3px solid var(--accent)}
.stock-quantity-grid dt{font-size:12px;font-weight:650;color:#534251;min-height:32px}
.stock-quantity-grid dd{margin:5px 0;display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.stock-quantity-grid dd strong{font-size:26px;font-variant-numeric:tabular-nums}
.stock-quantity-grid dd span{font-size:13px;color:var(--muted)}
.stock-quantity-grid p,.stock-equation{font-size:12px;line-height:1.5;margin:6px 0 0}
.stock-equation{padding:10px 0 14px;color:#534251}
.settings-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:0}
.settings-card-grid>section{padding:16px;border-bottom:1px solid var(--line);border-right:1px solid var(--line)}
.settings-card-grid h3{font-size:15px;margin:0 0 8px}.settings-card-grid p{font-size:13px;line-height:1.5;margin:6px 0 12px}.setting-current{font-weight:600}
.report-presets{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.report-section-title{font-size:16px;margin:14px 0 4px}.report-caption{font-size:12px;color:var(--muted);margin:6px 0 12px}
.report-attention{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.attention-tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;padding:12px;border:1px solid var(--line);border-top:3px solid #498368;border-radius:6px;background:#fff;color:var(--ink);text-decoration:none;min-width:0}
.attention-tile:hover{background:#fbf5f8}.attention-tile.needs-attention{border-top-color:#ad6920}.attention-tile span{font-size:12px;min-height:32px}.attention-tile strong{font-size:26px;line-height:1.1}.attention-tile small{font-size:11px;color:#73344a;line-height:1.4}
.report-summary-line{display:flex;gap:20px;flex-wrap:wrap;padding:14px 0;font-size:12px}.report-summary-line span{display:flex;flex-direction:column;gap:3px}.report-summary-line b{font-weight:500;color:var(--muted)}
.line-chart{padding:10px 12px 0}.line-chart svg{width:100%;height:auto;display:block;overflow:visible}.line-chart text{font-size:11px;fill:#625b66}.chart-grid-line{stroke:#e4dce2;stroke-width:1}.chart-trend{fill:none;stroke:#972747;stroke-width:2.5}.chart-capacity{fill:none;stroke:#597a94;stroke-width:2;stroke-dasharray:6 4}.chart-point{fill:#972747;stroke:#fff;stroke-width:1.5;cursor:pointer}.chart-point:hover,.chart-point:focus{fill:#3a1522;stroke:#d993ae;stroke-width:4;outline:none}.report-definition p{font-size:12px;line-height:1.5;margin:8px 0}.report-metric>details>summary{padding:5px 0}.report-metric .panel-header h2{font-size:14px}.report-metric .empty-state{padding:18px}.report-attention+.report-grid{margin-top:12px}
/* Static headings are not editors; retain focus rings and text selection. */
h1,h2,h3,.page-heading,.section-tab,main[tabindex]{caret-color:transparent}h1,h2,h3{cursor:default}input,textarea,[contenteditable=true]{caret-color:auto}
@media(max-width:1000px){.report-attention{grid-template-columns:repeat(2,minmax(0,1fr))}.stock-quantity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.settings-card-grid{grid-template-columns:1fr}.stock-quantity-grid dt{min-height:0}.report-grid{display:grid;grid-template-columns:1fr}.report-summary-line{gap:12px}.line-chart{padding-inline:6px}.stock-quantity-grid dd strong{font-size:22px}}

.report-grid>.panel{margin:0}.report-grid>section>details{border-radius:0;box-shadow:none}

/* Bounded query controls retain the existing burgundy visual language. */
.bounded-pagination { flex-wrap: wrap; gap: .75rem; }
.bounded-sort { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; font-size: .85rem; color: var(--muted, #66555c); }
.bounded-sort select { width: auto; min-width: 10rem; }
.selected-reference { display: block; padding: .35rem .1rem; font-size: .8rem; overflow-wrap: anywhere; color: var(--muted, #66555c); }
.remote-multi-wrapper { display: grid; gap: .6rem; }
.remote-multi { max-height: 14rem; overflow: auto; }
.multi-search-results { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 16rem; overflow: auto; }
.multi-search-results button { text-align: left; white-space: normal; }
.search-options [data-more-choices], .search-options [data-first-choices] { font-weight: 700; color: #972747; border-top: 1px solid #e4d9dd; }

/* Figma presentation: Stock 3:94 and shared mobile action view 3:95.
   Uses the existing components and local DM Sans font. Screen-only so the
   established print layout and all application interactions remain intact. */
.mobile-record-summary { display: none; }
@media screen {
  :root {
    --sidebar: #fff;
    --sidebar-deep: #eef1f4;
    --accent: #803b62;
    --accent-dark: #652b4c;
    --accent-light: #f5ebf1;
    --ink: #202731;
    --muted: #596473;
    --line: #d4dae1;
    --canvas: #f4f5f7;
    --red: #be123c;
    --red-soft: #fff1f2;
    --amber: #b45309;
    --amber-soft: #fff4d6;
    --green: #15803d;
    --green-soft: #ecfdf3;
    --review: #1d4ed8;
    --review-soft: #eff6ff;
    --review-border: #93c5fd;
    --focus: #4f46e5;
    --radius: 6px;
    --shadow: none;
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.4;
  }
  h1, .page-heading h1 { font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: -.35px; }
  h2, .modal-head h2, .report-metric .panel-header h2 { font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
  h3, .settings-card-grid h3 { font-size: 14px; font-weight: 600; line-height: 1.4; }
  small, .label, .field-hint, .cell-sub, .metric-label, .metric-note,
  .table-meta, .report-caption, .report-period, .chart-legend { font-size: 12px; }
  .muted, .field-hint, .cell-sub, .metric-note, .report-caption,
  .report-period, .chart-legend, .table-meta { color: var(--muted); }
  .cell-title, .field > label, .field > .label, .login-form label.field,
  .section-title, .stock-quantity-grid dt, .stock-equation { color: var(--ink); }

  .sidebar { width: 216px; flex-basis: 216px; padding: 16px 12px; border-right: 1px solid var(--line); color: var(--ink); }
  .sidebar .brand, .sidebar .brand:hover { color: var(--ink); }
  .brand { padding: 4px 8px 20px; gap: 10px; font-size: 16px; }
  .brand-mark { width: 34px; height: 24px; border-radius: 0; background: transparent; color: var(--accent); }
  .brand small { color: var(--accent); font-size: 10px; letter-spacing: .2px; }
  .sidebar .nav-section { margin: 16px 12px 4px; color: var(--muted); font-size: 10px; letter-spacing: .65px; }
  .nav-button { min-height: 40px; margin: 2px 0; padding: 9px 12px; gap: 8px; border-radius: 6px; color: var(--ink); font-size: 12px; line-height: 18px; font-weight: 500; }
  .nav-button > span:first-child { color: var(--muted); font-size: 15px; }
  .nav-button:hover { color: var(--accent-dark); background: var(--canvas); }
  .nav-button.active { color: var(--accent-dark); background: var(--accent-light); box-shadow: none; font-weight: 650; }
  .nav-button.active > span:first-child { color: var(--accent); }
  .nav-button .count { min-width: 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); text-align: center; }
  .sidebar-foot { padding: 16px 8px 0; color: var(--muted); border-color: var(--line); font-size: 12px; }
  .sidebar-foot strong, .sidebar-foot small { color: var(--muted); }
  .status-dot { background: var(--green); }
  .topbar { min-height: 64px; padding: 12px 24px; gap: 16px; }
  .breadcrumb, .user-chip, .user-chip small { font-size: 12px; }
  .breadcrumb { min-width: 0; flex-wrap: wrap; gap: 4px 8px; }
  .topbar-actions { gap: 16px; }
  .topbar .link-button { min-height: 36px; padding: 8px 0; }
  .environment-banner { padding: 8px 24px; gap: 12px; font-size: 12px; }
  .environment-banner strong { font-size: 11px; letter-spacing: .4px; }
  .environment-banner a { font-size: 12px; flex-shrink: 0; }
  .content { padding: 24px; }
  .page-heading { align-items: center; margin-bottom: 16px; gap: 12px 24px; }
  .page-heading > div:first-child { min-width: 0; }
  .page-heading .eyebrow { display: none; }
  .page-heading .muted { margin-top: 4px; font-size: 14px; line-height: 1.4; }
  .eyebrow { font-size: 11px; letter-spacing: .7px; margin-bottom: 8px; }
  .page-help { margin: 0 0 16px; padding: 0; border: 0; border-radius: 6px; background: transparent; font-size: 13px; }
  .page-help > summary { display: list-item; width: fit-content; padding: 2px 0; font-size: 12px; }
  .page-help[open] { padding: 12px 16px; border: 1px solid var(--line); background: #fff; }

  .toolbar, .actions, .quick-actions { gap: 8px; min-width: 0; }
  .register-toolbar { margin-bottom: 16px; }
  .register-toolbar .toolbar { align-items: center; gap: 12px; margin-bottom: 12px; }
  .register-toolbar .search { display: block; width: auto; flex: 1 1 280px; min-width: min(100%, 220px); max-width: 440px; }
  .register-toolbar .toolbar > .actions { min-width: 0; margin-left: auto; }
  .register-toolbar [data-clear-search] { flex: 0 0 auto; min-height: 40px; }
  .search > span { display: grid; place-items: center; left: 12px; top: 50%; width: 18px; height: 18px; font-size: 22px; line-height: 1; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
  .search input { padding-left: 38px; }
  .quick-actions { margin-bottom: 16px; }
  .quick-actions > .label { font-size: 12px; }
  .button, button.primary, button.secondary, button.danger {
    min-height: 40px; padding: 9px 12px; border-radius: 6px; font-size: 12px;
    font-weight: 600; line-height: 20px; box-shadow: none;
  }
  .primary { color: #fff; background: var(--accent); border-color: var(--accent); }
  .primary:hover { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }
  .secondary { color: var(--ink); border-color: var(--line) !important; background: #fff; }
  .secondary:hover { color: var(--accent-dark); border-color: #aeb9c5 !important; background: var(--canvas); }
  .danger { color: var(--red); background: var(--red-soft); border-color: var(--red) !important; }
  .button-small { min-height: 36px !important; padding: 7px 12px !important; font-size: 12px !important; line-height: 20px !important; }
  .link-button { color: var(--accent); font-weight: 600; border-radius: 3px; }
  button:disabled { opacity: .55; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
  textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
  .input, input:where(:not([type="checkbox"]):not([type="radio"]):not([type="range"])), select, textarea,
  .filter-grid input, .filter-grid select { min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; }
  .search input { padding-left: 38px; }
  input::placeholder, textarea::placeholder { color: var(--muted); }
  input:hover, select:hover, textarea:hover { border-color: #8c99aa; }
  input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 2px #eef2ff; }
  input:disabled, select:disabled, textarea:disabled { color: var(--muted); background: #eef1f4; }
  .field > label, .field > .label, .login-form label.field { margin-bottom: 8px; font-size: 12px; font-weight: 600; }
  .field-hint { margin-top: 8px; line-height: 1.4; }
  .form-grid { gap: 16px 24px; }
  .form-section { padding-bottom: 8px; color: var(--ink); font-size: 16px; }
  .check-field { gap: 8px; color: var(--ink); font-size: 14px; }
  .search-select { --choice-height: 40px; }
  .native-selection { min-height: 0 !important; }
  .choice-clear { top: calc((var(--choice-height) - 28px) / 2); }
  .search-options { border-radius: 6px; box-shadow: 0 6px 18px rgb(32 39 49 / 12%); }
  .search-options > [role=option] { padding: 10px 12px; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .context-value { background: var(--canvas); border-radius: 6px; }
  .bounded-sort { gap: 12px; padding: 12px 16px; font-size: 12px; flex-wrap: wrap; }

  .metric-grid, .grid-two, .dashboard-grid, .report-grid { gap: 16px; }
  .metric-grid { gap: 12px; margin-bottom: 16px; }
  .grid-two, .dashboard-grid { margin-bottom: 16px; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric { min-height: 108px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-radius: 6px; }
  .metric-label { margin: 0; color: inherit; font-size: 12px; font-weight: 600; }
  .metric-value { font-size: 30px; line-height: 1.2; letter-spacing: -.5px; font-weight: 700; }
  .metric-note { margin: 0; line-height: 1.4; }
  .metric[data-tone] { border-width: 1px; }
  .metric[data-tone=red] { color: var(--red); border-color: var(--red); background: var(--red-soft); }
  .metric[data-tone=amber] { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
  .metric[data-tone=green] { color: var(--green); border-color: var(--green); background: var(--green-soft); }
  .metric[data-tone=blue] { color: var(--review); border-color: var(--review-border); background: var(--review-soft); }
  .metric[data-tone] .metric-value, .metric[data-tone] .metric-label > span { color: inherit; }
  .metric-link:hover { box-shadow: inset 0 0 0 1px currentColor; }
  .metric.metric-brand { overflow: hidden; isolation: isolate; color: var(--accent); border-color: #d4baca; background: var(--accent-light); }
  .metric-brand .metric-note { color: var(--accent-dark); }
  .metric-brand > :not(.summary-arcs) { position: relative; z-index: 1; }
  .summary-arcs { position: absolute; right: -64px; bottom: -93px; width: 180px; height: 180px; border: 1px solid rgb(128 59 98 / 9%); border-radius: 50%; box-shadow: 0 0 0 22px rgb(128 59 98 / 5%), 0 0 0 44px rgb(128 59 98 / 4%); pointer-events: none; }
  .panel { border-radius: 6px; }
  .panel + .panel { margin-top: 16px; }
  .grid-two > .panel + .panel, .report-grid > .panel { margin-top: 0; }
  .panel-header { min-height: 56px; padding: 16px; gap: 12px; border-color: var(--line); }
  .panel-header p { margin-top: 4px; font-size: 12px; }
  .panel-padding, .panel > .stack, .panel > .detail-grid, .panel > .form-grid,
  .panel > .settings-group, .panel > .key-value-list { padding: 16px; }
  .dashboard-grid .panel { margin-bottom: 0; }
  .stack { gap: 16px; }
  .detail-grid { gap: 16px 24px; }
  .key-value-list { font-size: 14px; gap: 12px 24px; }
  .value { font-size: 14px; }
  .section-tabs, .record-tabs { gap: 4px; }
  .section-tabs { margin-bottom: 16px; }
  .section-tab { min-height: 40px; padding: 10px 12px; font-size: 12px; line-height: 20px; }
  .section-tab.active { color: var(--accent-dark); background: var(--accent-light); }
  .section-tab:hover { color: var(--ink); background: var(--canvas); }
  .filter-tab { min-height: 36px; padding: 7px 12px; border-radius: 6px; font-size: 12px; border-color: var(--line); }
  .filter-tab.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-light); }
  .filter-grid > label { min-width: min(100%,160px); }

  table, td, .dashboard-grid td, .diff-table { font-size: 14px; line-height: 1.4; }
  th, .table-wrap thead th { padding: 10px 12px; color: var(--muted); background: #eef1f4; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; border-color: var(--line); }
  th:has(button) { padding: 0; }
  th button { min-height: 40px; padding: 10px 12px; font-weight: 600; }
  th button:hover { color: var(--accent-dark); background: var(--accent-light); }
  th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--accent-dark); background: var(--accent-light); }
  td, .table-wrap td, .dashboard-grid td { min-height: 48px; padding: 12px; border-bottom-color: var(--line); }
  .table-wrap td:first-child { min-width: 156px; }
  tbody tr:nth-child(even) { background: var(--canvas); }
  tbody tr:hover { background: var(--accent-light); }
  .dashboard-grid .cell-sub { font-size: 12px; }
  .table-meta, .panel-note { color: var(--muted); background: #fff; }
  .table-meta { padding: 8px 12px; gap: 12px; }
  .table-meta select { min-height: 32px; padding: 4px 8px; }
  .table-pagination { padding: 12px 16px; gap: 12px; font-size: 12px; }
  .pill { min-height: 28px; padding: 4px 10px; justify-content: center; border: 1px solid; border-radius: 6px; font-size: 12px; line-height: 18px; font-weight: 600; }
  .pill-red { color: #fff; background: var(--red); border-color: var(--red); }
  .pill-amber { color: var(--amber); background: var(--amber-soft); border-color: var(--amber); }
  .pill-green { color: #fff; background: var(--green); border-color: var(--green); }
  .pill-blue { color: var(--review); background: var(--review-soft); border-color: var(--review-border); }
  .pill-grey { color: var(--muted); background: #eef1f4; border-color: var(--line); }
  .rag-legend { margin-bottom: 12px; gap: 8px; }
  .rag-legend .pill { min-height: 24px; padding: 2px 8px; font-size: 11px; }
  .empty, .empty strong { font-size: 14px; }
  .empty strong { color: var(--ink); }
  .notice { padding: 12px 16px; border-radius: 6px; font-size: 14px; }
  .notice-danger { color: var(--red); background: var(--red-soft); border-color: var(--red); }
  .notice-warning { color: var(--amber); background: var(--amber-soft); border-color: var(--amber); }
  .notice-success { color: var(--green); background: var(--green-soft); border-color: var(--green); }
  .priority-panel { margin-bottom: 16px; }
  .attention-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,180px) minmax(110px,auto) 80px; min-height: 64px; gap: 12px; padding: 16px; }
  .attention-row:nth-child(even) { background: var(--canvas); }
  .attention-row[data-tone=red] > .pill { color: #fff; background: var(--red); border-color: var(--red); }
  .attention-row:hover { background: var(--accent-light); }
  .attention-copy { min-width: 0; }
  .attention-row strong { font-size: 14px; font-weight: 500; }
  .attention-row small { max-width: none; white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
  .attention-row > .attention-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
  .attention-meta time { font-weight: 600; color: var(--ink); }
  .attention-open { display: flex; min-height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 600; }
  .attention-tile { padding: 16px; border-radius: 6px; }
  .attention-tile small { color: var(--muted); font-size: 12px; }
  .report-attention { gap: 16px; }
  .report-section-title { font-size: 18px; margin-top: 24px; }
  .report-summary-line { padding: 16px 0; gap: 24px; font-size: 14px; }
  .stock-quantity-grid > div, .record-summary { padding: 16px; border-radius: 6px; }
  .stock-quantity-grid { gap: 12px; }
  .settings-card-grid > section { padding: 16px; }
  .mobile-record-summary { display: none; }

  dialog.modal { border-color: var(--line); border-radius: 6px; box-shadow: 0 20px 60px rgb(32 39 49 / 18%); }
  dialog::backdrop { background: rgb(32 39 49 / 40%); }
  .modal-head { padding: 16px 24px; }
  .modal-head > button:not(.button), .modal-head > button.secondary { width: auto; min-width: 40px; height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 12px; }
  .modal-body { padding: 24px; }
  .modal-foot { padding: 16px 24px; gap: 8px; background: var(--canvas); }
  .record-action-bar { padding: 12px 24px; gap: 8px; background: var(--canvas); }
  .record-tabs { padding-inline: 12px; }
  .record-tabs .section-tab { padding: 12px; }
  .next-step { padding: 12px 16px; border-radius: 0 6px 6px 0; background: var(--accent-light); font-size: 14px; }
  .record-back { font-size: 12px; }
  .row-editor, .receipt-line, .receipt-batch, .multi-options, .evidence-row { border-radius: 6px; }
  .editor-header { padding: 12px 16px; background: var(--canvas); }
  .editor-row { padding: 16px; gap: 12px; }
  .editor-row .field label { font-size: 12px; }
  .receipt-batch .form-grid { gap: 12px; }
  .receipt-line-heading, .receipt-line [data-line-body], .receipt-batch { padding: 12px; }
  .action-tooltip { padding: 12px; border-radius: 6px; background: var(--ink); line-height: 1.4; }
  .login-screen { background: var(--canvas); }
  .login-screen > .login-card { border: 1px solid var(--line); box-shadow: none; }
  .login-screen > .login-aside { color: var(--ink); background: var(--accent-light); border: 1px solid var(--line); border-right: 0; }
  .login-aside::after { border-color: #d4baca; box-shadow: 0 0 0 40px rgb(128 59 98 / 3%),0 0 0 80px rgb(128 59 98 / 2%); }
  .login-aside .brand { color: var(--ink); }
  .login-aside h1 { font-size: 28px; letter-spacing: -.4px; }
  .login-aside p, .login-aside small { color: var(--muted); }
  .login-aside .notice { color: var(--accent-dark); border-color: #d4baca; background: #fff; }
  .login-form label.field { margin-bottom: 16px; }
  .login-form .primary { min-height: 40px; }
  .login-card > pre { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
  #mfa-security { display: grid; gap: 16px; }
  #mfa-security .field { display: grid; gap: 8px; font-size: 12px; font-weight: 600; }
  #mfa-cancel, #mfa-recovery { min-height: 40px; margin-right: 12px; }
  .toast { border-radius: 6px; font-size: 14px; }
}
@media screen and (min-width: 701px) and (max-height: 800px) {
  .sidebar { padding-top: 12px; }
  .sidebar .brand { padding-bottom: 12px; }
  .sidebar .nav-section { margin-top: 12px; }
  .nav-button { min-height: 36px; padding-block: 7px; }
}
@media screen and (max-width: 1100px) {
  .topbar { gap: 12px; }
  .topbar-actions { gap: 12px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading .actions { flex-wrap: wrap; }
  .attention-row { grid-template-columns: minmax(0,1fr) 120px 100px 72px; }
}
@media screen and (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .attention-row { grid-template-columns: minmax(0,1fr) 110px 72px; }
  .attention-row .attention-meta { grid-column: 1; grid-row: 2; }
  .attention-row .attention-meta:empty { display: none; }
  .attention-row > .pill { grid-column: 2; grid-row: 1; }
  .attention-open { grid-column: 3; grid-row: 1; }
}
@media screen and (max-width: 700px) {
  .content { padding: 16px; }
  h1, .page-heading h1 { font-size: 26px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
  .page-heading .actions { width: auto; }
  .page-heading .muted { font-size: 14px; }
  .topbar { min-height: 104px; padding: 10px 12px; align-items: center; }
  .topbar-actions { min-width: 0; flex: 1; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
  .topbar .user-chip { order: -1; flex: 1 0 100%; max-width: none; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .user-chip small { max-width: none; }
  .topbar .link-button { min-height: 44px; }
  .sidebar { width: 216px; inset: 104px auto 0 0; height: calc(100dvh - 104px); box-shadow: 8px 0 24px rgb(32 39 49 / 12%); }
  .sidebar .nav-button { min-height: 44px; }
  .environment-banner { padding: 8px 16px; gap: 8px; font-size: 11px; }
  .environment-banner a, .environment-banner strong { font-size: 11px; }
  .metric-grid, .report-attention { gap: 12px; }
  .metric { min-height: 108px; padding: 12px 16px; }
  .metric-label { min-height: 34px; align-items: flex-start; }
  .metric-value { font-size: 30px; }
  .grid-two, .dashboard-grid, .report-grid { gap: 16px; }
  .button, button.primary, button.secondary, button.danger, .button-small, .login-form .primary { min-height: 44px !important; }
  td .button-small { min-height: 36px !important; }
  .input, input:where(:not([type="checkbox"]):not([type="radio"]):not([type="range"])), select,
  .filter-grid input, .filter-grid select { min-height: 44px; font-size: 16px; }
  .register-toolbar .search { flex: 1 0 100%; max-width: none; min-width: 0; width: 100%; }
  .register-toolbar .toolbar > .actions { margin-left: 0; }
  .register-toolbar [data-clear-search] { min-height: 44px; }
  .search-select { --choice-height: 44px; }
  .section-tab, .filter-tab { min-height: 44px; }
  .form-grid, .editor-row-fields { gap: 16px; }
  .modal-head, .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; flex-wrap: wrap; }
  .modal-head > button:not(.button), .modal-head > button.secondary { min-width: 44px; height: 44px; }
  .record-action-bar { padding: 12px 16px; }
  .table-pagination { padding: 12px; flex-wrap: wrap; }
  .table-meta { flex-wrap: wrap; align-items: center; }
  .table-meta > span { max-width: none; }
  .table-meta select { min-height: 36px; font-size: 14px; }
  .table-wrap td:first-child { min-width: 172px; }
  .mobile-record-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
  .mobile-record-summary small { color: var(--muted); }
  .priority-panel > .panel { overflow: visible; border: 0; background: transparent; }
  .priority-panel .panel-header { border: 0; padding: 0 0 12px; min-height: 40px; }
  .attention-list { gap: 12px; }
  .attention-row, .attention-row:nth-child(even) { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
  .attention-row:last-child { border-bottom: 1px solid var(--line); }
  .attention-copy { grid-column: 1 / -1; grid-row: 2; }
  .attention-row > .pill { grid-row: 1; grid-column: 2; max-width: 100%; white-space: normal; }
  .attention-row .attention-meta { grid-row: 3; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px 12px; }
  .attention-open { grid-column: 1 / -1; grid-row: 4; min-height: 40px; }
  .attention-row strong { font-size: 14px; }
  .attention-row small { max-width: none; }
  .trial-help p { display: block; }
  .trial-help p strong, .trial-help p span { display: block; }
  .trial-help p span { margin-top: 4px; }
  .login-screen > .login-aside { border-right: 1px solid var(--line); border-bottom: 0; }
  .login-screen > .login-card { padding: 24px; }
}

/* Consinova: distinct CN tones and an inset menu rail; no layout-width change. */
@media screen {
  :root { --cn-mark-secondary: #B57499; }
  .sidebar {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 5px 100%;
    background-position: left top;
    background-repeat: no-repeat;
  }
}

/* Shared SME register controls: stable search position, explicit global sorting. */
.page-heading { min-height: 88px; align-items: flex-start; }
.heading-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.heading-tools .page-help { margin: 0; max-width: 440px; }
.heading-tools .page-help[open] { position: relative; }
.register-toolbar .toolbar { align-items: flex-end; }
.register-toolbar .search { flex: 1 1 220px; max-width: 440px; }
.bounded-sort { display: flex; align-items: flex-end; gap: 12px; padding: 0; margin: 0; }
.bounded-sort label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.bounded-sort select { min-height: 40px; min-width: 130px; width: auto; }
.bounded-table-tools { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 12px 16px; }
.bounded-table-tools .bounded-pagination { margin: 0 0 0 auto; padding: 0; border: 0; }
@media(max-width:760px) { .page-heading { min-height: 0; } .heading-tools { align-items: flex-start; } .bounded-sort { flex-wrap: wrap; width: 100%; } .bounded-sort label { flex: 1; } .bounded-sort select { width: 100%; min-width: 0; } .bounded-table-tools { gap: 12px; } }

/* Only the cross-tool navigation. Existing system styles are untouched. */
.sidebar nav.cn-tools,.rail nav.cn-tools {
  display:block; flex:0 0 auto; width:auto; min-width:0; max-width:100%;
  margin:14px 0 0; padding:12px 0 6px; border:0;
  border-top:1px solid #e1e5eb; background:transparent; color:#344054;
  overflow:visible; box-sizing:border-box;
}
.cn-tools .cn-tools-heading {
  display:block; margin:0 10px 7px; padding:0; color:#667085;
  font-family:inherit; font-size:10px;
  font-weight:600; line-height:1.4; letter-spacing:.07em; text-transform:uppercase;
}
.cn-tools .cn-tools-links { display:grid; grid-template-columns:minmax(0,1fr); gap:2px; }
.sidebar .cn-tools a,.rail .cn-tools a {
  display:flex; align-items:center; gap:9px; min-height:40px; width:100%;
  margin:0; padding:8px 9px; box-sizing:border-box; border:0; border-radius:6px;
  background:transparent; color:#344054; font-family:inherit; font-size:12px;
  font-weight:500; line-height:1.35; text-decoration:none; text-align:left;
}
.cn-tools a>svg { display:block; flex:0 0 28px; width:28px; height:20px; stroke:none; }
.cn-tools a>span { min-width:0; overflow-wrap:break-word; }
.sidebar .cn-tools a:hover,.rail .cn-tools a:hover { background:#f0f2f6; color:#1d2939; }
.sidebar .cn-tools a:focus-visible,.rail .cn-tools a:focus-visible { outline:2px solid #6d4aa6; outline-offset:-2px; background:#f4effa; }
@media(max-width:900px){.sidebar .cn-tools a,.rail .cn-tools a { min-height:44px; }}
/* CMMS has a fixed desktop rail and a horizontal menu on small screens. */
@media(min-width:761px){.sidebar:has(> .cn-tools-cmms) { overflow-y:auto; }}
@media(max-width:760px){
  .cn-tools-cmms .cn-tools-links { display:flex; overflow-x:auto; gap:4px; }
  .sidebar .cn-tools-cmms a { width:auto; flex:0 0 auto; white-space:nowrap; }
}
/* Keep Forms' existing horizontal mobile rail one control high. */
@media(max-width:640px){
  .rail nav.cn-tools { display:flex; align-items:center; gap:8px; max-width:none; margin:0; padding:0 8px; border-top:0; border-left:1px solid #e1e5eb; }
  .rail .cn-tools-heading { margin:0; white-space:nowrap; }
  .rail .cn-tools-links { display:flex; gap:2px; }
  .rail .cn-tools a { width:auto; flex:0 0 auto; white-space:nowrap; }
}
@media print{.cn-tools { display:none!important; }}
