:root {
  color-scheme: light;
  --ink: #182522;
  --muted: #68736f;
  --faint: #8d9692;
  --paper: #f5f2ea;
  --surface: #fffefb;
  --surface-2: #eeece5;
  --line: #dedbd1;
  --line-strong: #cac6ba;
  --green-950: #16191c;
  --green-900: #1b1f23;
  --green-800: #20252a;
  --green-700: #2b3137;
  --green-600: #454e57;
  --green-100: #e5e7e9;
  --gold: #c4923f;
  --gold-soft: #f3e5c4;
  --red: #a9433d;
  --red-soft: #f6dfdc;
  --blue: #3a6580;
  --blue-soft: #e0edf3;
  --shadow-sm: 0 1px 2px rgb(24 37 34 / 0.06), 0 4px 12px rgb(24 37 34 / 0.04);
  --shadow-lg: 0 24px 70px rgb(14 34 30 / 0.2);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="green"] { --green-950: #0c2926; --green-900: #103530; --green-800: #173f3a; --green-700: #20534c; --green-600: #2d6c62; --green-100: #deece7; }
:root[data-theme="blue"] { --green-950: #12365f; --green-900: #17477b; --green-800: #1d5794; --green-700: #2463a8; --green-600: #3779bd; --green-100: #e2edf8; }
:root[data-theme="yellow"] { --green-950: #5f4509; --green-900: #7a5a0c; --green-800: #9b7110; --green-700: #b38313; --green-600: #c79416; --green-100: #fff2cf; }
:root[data-theme="orange"] { --green-950: #6a2f05; --green-900: #8a3f08; --green-800: #ad5109; --green-700: #c86108; --green-600: #d97706; --green-100: #ffead3; }
:root[data-theme="red"] { --green-950: #671d24; --green-900: #842831; --green-800: #9e313a; --green-700: #b63c45; --green-600: #c9565e; --green-100: #f9e1e3; }
:root[data-theme="gray"] { --green-950: #34404a; --green-900: #46535e; --green-800: #596671; --green-700: #6f7b86; --green-600: #84909a; --green-100: #eaedef; }
:root[data-theme="pink"] { --green-950: #6b2448; --green-900: #87305b; --green-800: #a23d70; --green-700: #b94f86; --green-600: #c9699a; --green-100: #f8e3ed; }

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% -10%, rgb(196 146 63 / 0.08), transparent 34rem),
    var(--paper);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: white;
  background: var(--green-800);
  border-radius: var(--radius-sm);
}
.skip-link:focus { transform: none; }

.app-shell { min-height: 100vh; }
.app-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 264px;
  display: flex;
  flex-direction: column;
  color: #f6f4ed;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 28%),
    var(--green-950);
  border-right: 1px solid rgb(255 255 255 / 0.08);
}

.panel.work-folders { margin-bottom: 22px; overflow: visible; }
.work-folders .panel-header { flex-wrap: wrap; gap: 14px; }
.work-folder-header-actions, .work-folder-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.work-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.work-folder-grid > .empty-state { grid-column: 1 / -1; }
.work-folder-card { min-width: 0; text-align: left; }
.work-folder-card > strong { display: block; margin: 12px 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.work-folder-record { min-width: 0; padding: 0; text-align: left; background: transparent; border: 0; cursor: pointer; }
.work-folder-record:hover .table-code { text-decoration: underline; }
.work-folder-record:focus-visible { outline: 2px solid var(--green-600); outline-offset: 4px; border-radius: 4px; }
.work-folder-row .work-folder-record strong, .work-folder-record small, .mini-row .work-folder-search-copy strong, .work-folder-search-copy small { display: block; white-space: normal; overflow-wrap: anywhere; }
.work-folder-search-copy { min-width: 0; }
.work-folder-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 16px; font-size: 11px; }
.work-folder-note { position: relative; color: var(--ink); }
.work-folder-note > button { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 10px; padding: 7px; border: 0; border-radius: var(--radius-sm); background: var(--gold-soft); }
.work-folder-note > div { display: none; position: absolute; z-index: 8; top: calc(100% + 8px); right: 0; width: min(290px, 75vw); max-height: 240px; overflow-y: auto; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff7dc; box-shadow: var(--shadow-sm); font-size: 12px; line-height: 1.5; }
.work-folder-note[data-note-expanded="true"] > div, .work-folder-note:has(> button:focus-visible) > div { display: block; }
@media (hover: hover) { .work-folder-row:hover .work-folder-note > div { display: block; } }
#work-folder-search-results { margin-top: 18px; }
.workflow-row.work-folder-row { overflow: visible; grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 720px) {
  .workflow-row.work-folder-row { grid-template-columns: auto minmax(0, 1fr); }
  .work-folder-item-actions { grid-column: 2; justify-content: flex-start; position: relative; }
  .work-folder-note { position: static; }
  .work-folder-note > div { left: 0; right: auto; width: min(290px, 100%); }
  .work-folder-header-actions .button { min-height: 38px; }
}

.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.brand img { width: 38px; height: 38px; }
.brand-name { display: block; font-family: 'Newsreader', Georgia, serif; font-size: 20px; letter-spacing: .04em; }
.brand-version { display: block; margin-top: 1px; color: #a9b9b4; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

.sidebar-context { margin: 2px 14px 15px; padding: 12px 13px; color: #dce5e1; background: rgb(255 255 255 / 0.055); border: 1px solid rgb(255 255 255 / 0.08); border-radius: 12px; }
.sidebar-context span { display: block; color: #93aaa3; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-context strong { display: block; margin-top: 4px; overflow: hidden; font-size: 12px; font-weight: 500; line-height: 1.35; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.unit-switcher { padding: 0; }
.unit-switcher summary { position: relative; padding: 12px 34px 12px 13px; list-style: none; cursor: pointer; }
.unit-switcher summary::-webkit-details-marker { display: none; }
.unit-switcher summary > .icon { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }
.unit-switcher[open] summary > .icon { transform: translateY(-50%) rotate(90deg); }
.unit-switcher-menu { display: grid; padding: 6px; border-top: 1px solid rgb(255 255 255 / .08); }
.unit-switcher-menu button { display: flex; align-items: center; gap: 7px; padding: 8px; color: #cbd8d4; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 10px; line-height: 1.35; text-align: left; }
.unit-switcher-menu button:hover, .unit-switcher-menu button.active { color: #fff; background: rgb(255 255 255 / .08); }
.unit-switcher-menu button .icon { flex: 0 0 auto; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 0 10px 18px; }
.nav-group-label { margin: 17px 12px 7px; color: #78938b; font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #b9c8c3;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.nav-item:hover { color: white; background: rgb(255 255 255 / 0.055); }
.nav-item.active { color: white; background: var(--green-700); box-shadow: inset 3px 0 var(--gold); }
.nav-item .icon { flex: 0 0 auto; }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 15px 17px max(15px, env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / 0.08); }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green-950); background: var(--gold-soft); border-radius: 50%; font-size: 11px; font-weight: 700; }
.avatar.has-photo { overflow: hidden; background: var(--surface-2); }
.avatar.has-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { color: #fff; font-size: 12px; }
.user-copy span { margin-top: 2px; color: #8ea59e; font-size: 10px; }

.main-area { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; gap: 18px; padding: 0 clamp(20px, 3vw, 42px); background: rgb(245 242 234 / 0.9); border-bottom: 1px solid rgb(202 198 186 / .7); backdrop-filter: blur(16px); }
.icon-button.mobile-menu { display: none; }
.global-search { position: relative; width: min(440px, 42vw); }
.global-search .icon { position: absolute; top: 50%; left: 14px; color: var(--faint); transform: translateY(-50%); pointer-events: none; }
.global-search input { width: 100%; height: 40px; padding: 0 42px; color: var(--ink); background: rgb(255 254 251 / .75); border: 1px solid var(--line); border-radius: 10px; outline: none; }
.global-search input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgb(45 108 98 / .12); }
.search-shortcut { position: absolute; top: 9px; right: 10px; padding: 3px 6px; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; font-size: 9px; }
.topbar-spacer { flex: 1; }
.icon-button { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: var(--red); border: 2px solid var(--paper); border-radius: 50%; }
.notification-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: var(--red); border: 2px solid var(--paper); border-radius: 99px; font-size: 8px; font-weight: 800; }
.notification-count + .notification-dot, .notification-button:has(.notification-count) .notification-dot { display: none; }

.content { width: min(1440px, 100%); margin: 0 auto; padding: 34px clamp(20px, 3vw, 42px) 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--green-600); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(28px, 3vw, 38px); font-weight: 650; line-height: 1.08; letter-spacing: -.025em; }
.page-subtitle { max-width: 700px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1; transition: transform .12s, background .12s, border-color .12s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { color: white; background: var(--green-700); border-color: var(--green-700); box-shadow: 0 4px 12px rgb(23 63 58 / .13); }
.button.primary:hover { background: var(--green-800); }
.button.secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.button.ghost { color: var(--green-700); background: transparent; border-color: transparent; }
.button.danger { color: var(--red); background: var(--red-soft); }
.button.small { min-height: 32px; padding: 7px 10px; font-size: 11px; }
.button.full { width: 100%; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.local-dashboard { display: grid; gap: 18px; min-width: 0; }
.local-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.local-metrics small { display: block; margin-top: 12px; color: var(--muted); }
.local-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.local-chart-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, 1fr) 3ch; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; padding: 10px 4px; cursor: pointer; }
.local-chart-bar > span:first-child { overflow-wrap: anywhere; }
.local-chart-bar:hover { background: var(--green-100); }
.local-chart-bar:focus-visible, .local-attention-list button:focus-visible { outline: 3px solid var(--green-600); outline-offset: 1px; }
.local-bar-track { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.local-bar-track > span { display: block; height: 100%; background: var(--green-600); border-radius: inherit; }
.local-attention-list { padding-left: 22px; }
.local-attention-list li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.local-attention-list .button, .local-attention-list .status-pill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.local-attention-list .status-pill { margin: 4px 2px; }
.local-attention-list .local-stale { border: 1px solid var(--red); color: var(--red); font-weight: 700; }
@media (max-width: 1000px) { .local-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .local-metrics, .local-charts { grid-template-columns: minmax(0, 1fr); } }
.metric-card { min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric-card.metric-link { width: 100%; color: inherit; cursor: pointer; font: inherit; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.metric-card.metric-link:hover { border-color: var(--green-600); box-shadow: 0 8px 22px rgb(24 37 34 / .09); transform: translateY(-1px); }
.metric-card.metric-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--green-600) 25%, transparent); outline-offset: 2px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.metric-icon { width: 33px; height: 33px; display: grid; place-items: center; color: var(--green-700); background: var(--green-100); border-radius: 9px; }
.metric-icon.gold { color: #885d18; background: var(--gold-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-value { display: block; margin-top: 13px; font-size: 31px; line-height: 1; }
.metric-note { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--faint); font-size: 10px; }
.metric-note.emphasis { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 16px; }
.stack { display: grid; align-content: start; gap: 16px; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 13px; font-weight: 700; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px; }
.panel-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.panel-footer > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.public-registry-search { margin-bottom: 16px; }
.public-registry-detail { margin-top: 16px; }
.expedient-signer-grid { display: grid; gap: 9px; }
.expedient-signer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .45fr); align-items: center; gap: 12px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.expedient-signer-person { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.expedient-signer-person input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--green-700); }
.expedient-signer-person span { min-width: 0; display: grid; gap: 3px; }
.expedient-signer-person strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.expedient-signer-row small { color: var(--muted); font-size: 9px; font-weight: 500; }
.expedient-signer-method { gap: 5px; }
.expedient-signer-row select { width: 100%; min-height: 40px; padding: 9px 30px 9px 11px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; outline: none; }
.expedient-signer-row select:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgb(45 108 98 / .1); }
.expedient-signer-row select:disabled { color: var(--faint); background: var(--surface-2); cursor: not-allowed; opacity: .75; }
.expedient-document-row { flex-wrap: wrap; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.choice-card { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice-card:hover { border-color: var(--green-600); }
.choice-card input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--green-700); }
.choice-card span { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 8px; }
.choice-card .icon { grid-row: 1 / span 2; color: var(--green-700); }
.choice-card strong, .choice-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-card strong { font-size: 10px; }
.choice-card small { color: var(--muted); font-size: 9px; }
.choice-card.disabled { cursor: not-allowed; opacity: .55; }

.procedure-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) 108px 108px 76px 28px; gap: 16px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.procedure-row:last-child { border-bottom: 0; }
.procedure-row:hover { background: #faf9f4; }
.procedure-main { min-width: 0; }
.procedure-number { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--green-700); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.procedure-title { display: block; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.procedure-meta, .table-secondary { margin-top: 4px; color: var(--faint); font-size: 10px; }
.progress-track { height: 5px; margin-top: 7px; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.progress-fill { height: 100%; background: var(--green-600); border-radius: inherit; }
.status-pill { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 99px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pill.green { color: var(--green-700); background: var(--green-100); }
.status-pill.gold { color: #7b5518; background: var(--gold-soft); }
.status-pill.red { color: var(--red); background: var(--red-soft); }
.status-pill.neutral { color: var(--muted); background: var(--surface-2); }
.priority-mark { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.priority-mark::before { width: 6px; height: 6px; content: ''; background: var(--green-600); border-radius: 50%; }
.priority-mark.urgent::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.task-list { display: grid; }
.task-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-check { width: 22px; height: 22px; display: grid; place-items: center; color: var(--green-700); background: transparent; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; }
.task-check:hover { background: var(--green-100); border-color: var(--green-600); }
.task-title { margin: 0; font-size: 11px; font-weight: 600; }
.task-meta { margin-top: 3px; color: var(--faint); font-size: 9px; }
.due-badge { color: var(--muted); font-size: 9px; white-space: nowrap; }
.due-badge.overdue { color: var(--red); font-weight: 700; }

.chart-bars { height: 175px; display: flex; align-items: end; justify-content: space-around; gap: 10px; padding: 18px 6px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 42px, rgb(222 219 209 / .5) 43px); }
.chart-column { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.chart-value { color: var(--muted); font-size: 9px; font-weight: 700; }
.chart-bar { width: min(32px, 60%); min-height: 3px; background: var(--green-600); border-radius: 5px 5px 0 0; }
.chart-label { margin-bottom: -18px; color: var(--faint); font-size: 8px; }
.chart-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; color: var(--muted); font-size: 9px; }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action { min-height: 82px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px; color: var(--ink); background: #faf9f5; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; text-align: left; }
.quick-action:hover { border-color: var(--green-600); background: var(--green-100); }
.quick-action .icon { color: var(--green-700); }
.quick-action span { font-size: 10px; font-weight: 700; line-height: 1.25; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.toolbar-search { position: relative; min-width: 220px; flex: 1; }
.toolbar-search .icon { position: absolute; left: 12px; top: 50%; color: var(--faint); transform: translateY(-50%); }
.toolbar-search input { width: 100%; height: 40px; padding: 0 12px 0 39px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; outline: none; }
.toolbar-search input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgb(45 108 98 / .1); }
.advanced-filters { margin: -6px 0 16px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.advanced-filters summary { min-height: 42px; display: flex; align-items: center; gap: 8px; color: var(--green-700); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.advanced-filters summary::-webkit-details-marker { display: none; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 0 14px; }
.date-range-field { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.date-range-field legend, .date-range-field label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.date-range-field input { width: 100%; height: 38px; margin-top: 5px; padding: 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.advanced-filter-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 0 14px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.toolbar select { height: 40px; min-width: 155px; padding: 0 34px 0 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }

.data-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 11px 15px; color: var(--faint); background: #f8f6f0; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-open] { cursor: pointer; }
.data-table tbody tr[data-open]:hover { background: #faf9f4; }
.table-primary { display: block; color: var(--ink); font-size: 11px; font-weight: 700; }
.table-code { color: var(--green-700); font-size: 10px; font-weight: 700; }
.empty-state { display: grid; place-items: center; padding: 64px 20px; color: var(--muted); text-align: center; }
.empty-state-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 13px; color: var(--green-700); background: var(--green-100); border-radius: 50%; }
.empty-state h3 { margin-bottom: 6px; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 380px; margin-bottom: 18px; font-size: 11px; line-height: 1.5; }

.person-cell { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.person-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green-700); background: var(--green-100); border-radius: 10px; font-size: 10px; font-weight: 700; }
.person-avatar.org { color: #7b5518; background: var(--gold-soft); }
.role-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.asset-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.asset-summary.legal-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-box { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.summary-box span { display: block; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; }
.summary-box strong { display: block; margin-top: 6px; font-size: 23px; }

.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr); gap: 16px; }
.donut-layout { display: flex; align-items: center; gap: 22px; }
.donut { width: 128px; height: 128px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; position: relative; }
.donut::after { width: 76px; height: 76px; content: ''; background: var(--surface); border-radius: 50%; }
.donut-center { position: absolute; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 22px; }
.donut-center span { color: var(--faint); font-size: 8px; text-transform: uppercase; }
.legend-list { min-width: 0; flex: 1; display: grid; gap: 9px; }
.legend-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }

.audit-timeline { position: relative; padding-left: 20px; }
.audit-timeline::before { position: absolute; top: 5px; bottom: 6px; left: 5px; width: 1px; content: ''; background: var(--line); }
.audit-event { position: relative; padding: 0 0 20px 13px; }
.audit-event:last-child { padding-bottom: 0; }
.audit-event::before { position: absolute; top: 4px; left: -18px; width: 7px; height: 7px; content: ''; background: var(--green-600); border: 3px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--green-600); }
.audit-event-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.audit-event strong { font-size: 11px; }
.audit-event time { color: var(--faint); font-size: 9px; white-space: nowrap; }
.audit-event p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.hash-text { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }

.overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: stretch; justify-content: flex-end; background: rgb(6 24 21 / .48); }
.drawer { width: min(720px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-lg); }
.drawer.narrow { width: min(540px, 100%); }
.drawer.wide { width: min(920px, 100%); }
.drawer.fullscreen { width: 100vw; max-width: none; }
.drawer-header { min-height: 74px; display: flex; align-items: center; gap: 15px; padding: 15px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-header-copy { min-width: 0; flex: 1; }
.drawer-header h2 { margin: 0; overflow: hidden; font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.drawer-content { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }

.tabs { display: flex; gap: 2px; margin: -22px -22px 20px; padding: 0 19px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); }
.tab { min-height: 44px; padding: 0 11px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tab.active { color: var(--green-700); border-bottom-color: var(--green-700); }

.detail-hero { padding: 19px; margin-bottom: 15px; color: white; background: linear-gradient(130deg, var(--green-800), var(--green-700)); border-radius: var(--radius); }
.detail-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.detail-hero .status-pill { background: rgb(255 255 255 / .15); color: white; }
.detail-hero h3 { margin: 13px 0 6px; font-size: 23px; font-weight: 650; }
.detail-hero p { margin: 0; color: #c9dbd5; font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
.detail-field { min-width: 0; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.detail-field.full { grid-column: 1 / -1; }
.detail-field span { display: block; color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-field strong { display: block; margin-top: 5px; overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.person-detail .detail-field strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title h3 { margin: 0; font-size: 12px; }
.mini-list { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row-main { min-width: 0; flex: 1; }
.mini-row-main strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.people-directory .table-primary, .people-directory .table-secondary, .people-directory td { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.people-directory .person-cell > div { min-width: 0; }
.people-directory .data-table { min-width: 720px; }
.mini-row-main span { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; }
.procedure-item-link { max-width: 100%; display: block; padding: 0; overflow: hidden; color: var(--green-700); background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: rgb(45 108 98 / .35); text-underline-offset: 2px; text-overflow: ellipsis; white-space: nowrap; }
.procedure-item-link:hover { color: var(--green-900); text-decoration-color: currentColor; }
.procedure-item-link:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }
.interactive-mini-list > .notification-link,
.drawer-content > .notification-link { width: 100%; min-height: 58px; color: inherit; background: var(--surface); border: 0; border-radius: 0; cursor: pointer; font: inherit; text-align: left; }
.interactive-mini-list > .notification-link:hover,
.drawer-content > .notification-link:hover { background: var(--green-100); }
.interactive-mini-list > .notification-link:focus-visible,
.drawer-content > .notification-link:focus-visible { position: relative; outline: 2px solid var(--green-600); outline-offset: -2px; }
.interactive-mini-list > .notification-link:first-child { border-radius: 10px 10px 0 0; }
.interactive-mini-list > .notification-link:last-child { border-radius: 0 0 10px 10px; }
.interactive-mini-list > .notification-link:only-child { border-radius: 10px; }

.form-section { margin-bottom: 22px; }
.form-section-title { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.required::after { margin-left: 3px; color: var(--red); content: '*'; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; outline: none; }
.field textarea { min-height: 100px; overflow-x: hidden; resize: vertical; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgb(45 108 98 / .1); }
.field input[readonly] { color: var(--muted); background: var(--surface-2); cursor: not-allowed; }
.field-hint { color: var(--faint); font-size: 9px; line-height: 1.4; }
.field-error { color: var(--red); font-size: 9px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; }
.checkbox-row input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--green-700); }
.checkbox-row label { color: var(--muted); font-size: 10px; line-height: 1.45; }

.photo-upload { position: relative; min-height: 150px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #f8f6f0; border: 1px dashed var(--line-strong); border-radius: 11px; cursor: pointer; text-align: center; }
.photo-upload:hover { color: var(--green-700); border-color: var(--green-600); background: var(--green-100); }
.photo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-upload img { width: 100%; height: 190px; object-fit: contain; background: #ddd9ce; }
.photo-upload-copy { display: grid; justify-items: center; gap: 7px; padding: 18px; }
.photo-upload-copy strong { font-size: 10px; }
.photo-upload-copy span { max-width: 260px; font-size: 9px; line-height: 1.4; }
.optional-tag { margin-left: 5px; padding: 2px 5px; color: var(--faint); background: var(--surface-2); border-radius: 4px; font-size: 8px; font-weight: 500; text-transform: none; }

.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.method-card { position: relative; min-height: 105px; display: flex; flex-direction: column; gap: 9px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.method-card:hover { border-color: var(--green-600); }
.method-card.selected { background: var(--green-100); border-color: var(--green-600); box-shadow: inset 0 0 0 1px var(--green-600); }
.method-card input { position: absolute; opacity: 0; }
.method-card .icon { color: var(--green-700); }
.method-card strong { font-size: 10px; }
.method-card span { color: var(--muted); font-size: 9px; line-height: 1.4; }

.signature-pad-wrap { margin-top: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.signature-pad { width: 100%; height: 190px; display: block; touch-action: none; background: #fff; border: 1px dashed var(--line-strong); border-radius: 8px; cursor: crosshair; }
.signature-pad-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; color: var(--faint); font-size: 9px; }
.signature-review { margin: 16px 0; overflow: hidden; background: #fbfaf6; border: 1px solid var(--line); border-radius: 11px; }
.signature-review header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.signature-review header h3 { margin: 3px 0 0; font-size: 12px; }
.signature-review article { max-width: 100%; max-height: 320px; overflow-x: hidden; overflow-y: auto; padding: 18px; color: var(--text); font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.document-signature-footer { margin-top: 24px; padding-top: 14px; border-top: 2px solid var(--line-strong); }
.document-signature-footer h4 { margin: 0 0 11px; color: var(--ink); font-size: 11px; text-transform: uppercase; }
.document-signature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.document-signature-box { min-width: 0; padding: 13px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; }
.document-signature-box > strong { display: block; margin-bottom: 9px; color: var(--green-800); font-size: 11px; text-transform: uppercase; }
.document-signature-box dl { display: grid; gap: 6px; margin: 0; }
.document-signature-box dl div { min-width: 0; }
.document-signature-box dt { color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.document-signature-box dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: 9px; }
.document-signature-box figure { margin: 11px 0 0; padding-top: 9px; border-top: 1px solid var(--line); }
.document-signature-box img { width: 100%; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.document-signature-box figcaption, .signature-privacy-note { margin: 5px 0 0; color: var(--faint); font-size: 8px; line-height: 1.45; }
.external-link-box { margin-top: 13px; padding: 13px; background: var(--gold-soft); border: 1px solid #dec48d; border-radius: 10px; }
.external-link-box strong { display: block; color: #6e4c15; font-size: 10px; }
.external-link-box code { display: block; margin-top: 7px; overflow-wrap: anywhere; color: #75551e; font-size: 9px; }

.info-banner { display: flex; gap: 11px; padding: 13px; margin-bottom: 15px; color: var(--blue); background: var(--blue-soft); border: 1px solid #c5dce7; border-radius: 10px; font-size: 10px; line-height: 1.5; }
.info-banner.warning { color: #744f14; background: var(--gold-soft); border-color: #dfc58b; }
.info-banner.error { color: var(--red); background: var(--red-soft); border-color: #ebc1bd; }
.info-banner .icon { flex: 0 0 auto; }

.toast-root { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; color: white; background: var(--green-950); border: 1px solid rgb(255 255 255 / .14); border-radius: 11px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease; }
.toast.error { background: #752f2a; }
.toast .icon { flex: 0 0 auto; color: var(--gold-soft); }
.toast strong { display: block; font-size: 10px; }
.toast span { display: block; margin-top: 3px; color: #c7d4d0; font-size: 9px; line-height: 1.4; }

.demo-ribbon { position: fixed; z-index: 35; right: -34px; bottom: 55px; width: 150px; padding: 5px; color: #65440f; background: var(--gold-soft); border: 1px solid #d5b775; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-align: center; text-transform: uppercase; transform: rotate(-45deg); pointer-events: none; }
.mobile-dock { display: none; }

.draft-panel { margin-bottom: 16px; background: #fffaf0; border: 1px solid #dfc58b; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.draft-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid #ead8af; }
.draft-panel h2 { margin: 0; font-size: 13px; }
.draft-panel .eyebrow { margin-bottom: 3px; color: #8a621f; }
.draft-list { display: grid; }
.draft-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; border-bottom: 1px solid #eee0c0; }
.draft-row:last-child { border-bottom: 0; }
.draft-row > div:first-child { min-width: 0; }
.draft-row > div:last-child { display: flex; align-items: center; gap: 5px; }
.draft-row strong, .draft-row span { display: block; }
.draft-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.draft-row span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.bop-form { padding-top: 0; }
.autosave-banner { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 -22px 22px; padding: 9px 22px; color: var(--green-700); background: #e8f1ed; border-bottom: 1px solid #c7ddd5; font-size: 9px; }
.autosave-state { display: inline-flex; align-items: center; gap: 6px; }
.step-number { width: 21px; height: 21px; display: inline-grid; place-items: center; margin-right: 7px; color: white; background: var(--green-700); border-radius: 50%; font-size: 9px; }
.search-action-row { display: flex; align-items: stretch; gap: 8px; }
.combobox-wrap { position: relative; min-width: 0; flex: 1; }
.combobox-wrap > .icon { position: absolute; top: 50%; left: 12px; z-index: 1; color: var(--faint); transform: translateY(-50%); pointer-events: none; }
.combobox-wrap input:not([type="hidden"]) { padding-left: 38px; }
.autocomplete-field { position: relative; }
.autocomplete-results { position: absolute; z-index: 20; top: calc(100% - 1px); right: 0; left: 0; max-height: 280px; display: none; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; box-shadow: 0 15px 35px rgb(18 47 42 / .16); }
.autocomplete-results.open { display: block; }
.autocomplete-results button { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.autocomplete-results button:last-child { border-bottom: 0; }
.autocomplete-results button:hover, .autocomplete-results button:focus { background: var(--green-100); outline: none; }
.autocomplete-results button > span:nth-last-child(2), .autocomplete-results button > span:first-child:not(.person-avatar) { min-width: 0; flex: 1; }
.autocomplete-results strong, .autocomplete-results small { display: block; }
.autocomplete-results strong { font-size: 10px; }
.autocomplete-results small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.autocomplete-results button > .icon:last-child { margin-left: auto; color: var(--faint); }
.procedure-origin-results { position: static; margin: 12px 0; max-height: 320px; }
.asset-reference-results { overflow: hidden auto; font-family: inherit; }
.asset-reference-results button { border-radius: 0; font: inherit; }
.asset-reference-results button:first-child { border-radius: 8px 8px 0 0; }
.asset-reference-results button:last-child { border-radius: 0 0 8px 8px; }
.asset-reference-results button:only-child { border-radius: 8px; }
.asset-reference-results button > span { min-width: 0; display: block; flex: 1; color: var(--muted); font-size: 9px; line-height: 1.4; }
.asset-reference-results button > strong { min-width: 150px; color: var(--ink); font-family: inherit; }
#asset-reference-selected { margin-top: 10px; font-family: inherit; }
#asset-reference-selected .mini-row { border-radius: 10px; }
.autocomplete-empty { padding: 15px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.bop-map { height: 290px; overflow: hidden; background: #e8ece7; border: 1px solid var(--line-strong); border-radius: 11px; }
.map-fallback { height: 100%; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 20px; color: var(--muted); text-align: center; }
.map-fallback span { font-size: 10px; }
.map-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--faint); font-size: 8px; }
.native-map { position: relative; width: 100%; height: 100%; overflow: hidden; background: #dfe8e4; outline: none; cursor: crosshair; touch-action: none; user-select: none; }
.native-map:focus-visible { box-shadow: inset 0 0 0 3px rgb(45 108 98 / .35); }
.native-map.dragging { cursor: grabbing; }
.native-map-tiles { position: absolute; inset: 0; overflow: hidden; }
.native-map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; user-select: none; }
.native-map-grid { position: absolute; inset: 0; opacity: 0; pointer-events: none; background-image: linear-gradient(rgb(23 63 58 / .12) 1px, transparent 1px), linear-gradient(90deg, rgb(23 63 58 / .12) 1px, transparent 1px); background-size: 32px 32px; transition: opacity .2s ease; }
.native-map.tiles-unavailable .native-map-grid { opacity: 1; }
.native-map.tiles-unavailable::before { position: absolute; z-index: 2; top: 10px; right: 48px; left: 48px; padding: 7px 10px; color: #704d15; background: rgb(255 246 220 / .94); border: 1px solid #d9bd7e; border-radius: 7px; content: 'Camada cartográfica indisponível. A seleção de coordenadas continua ativa.'; font-size: 8px; text-align: center; }
.native-map-crosshair { position: absolute; z-index: 3; top: 50%; left: 50%; width: 22px; height: 22px; display: grid; place-items: center; color: rgb(23 63 58 / .7); background: rgb(255 255 255 / .72); border: 1px solid rgb(23 63 58 / .25); border-radius: 50%; font-size: 15px; transform: translate(-50%, -50%); pointer-events: none; }
.native-map-marker { position: absolute; z-index: 5; width: 33px; height: 33px; display: none; place-items: center; color: white; background: var(--green-700); border: 3px solid white; border-radius: 50% 50% 50% 8px; box-shadow: 0 4px 12px rgb(10 38 34 / .32); transform: translate(-50%, -92%) rotate(-45deg); pointer-events: none; }
.native-map-marker.visible { display: grid; }
.native-map-marker .icon { transform: rotate(45deg); }
.native-map-controls { position: absolute; z-index: 6; top: 10px; left: 10px; display: grid; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-sm); }
.native-map-controls button { width: 34px; height: 34px; padding: 0; color: var(--green-800); background: var(--surface); border: 0; cursor: pointer; font-size: 18px; font-weight: 700; }
.native-map-controls button + button { border-top: 1px solid var(--line); }
.native-map-controls button:hover, .native-map-controls button:focus { background: var(--green-100); outline: none; }
.native-map-status, .native-map-attribution { position: absolute; z-index: 4; bottom: 7px; padding: 4px 7px; color: #274a44; background: rgb(255 255 255 / .84); border-radius: 5px; font-size: 7px; pointer-events: none; }
.native-map-status { left: 8px; }
.native-map-attribution { right: 8px; }
.native-map-attribution a { color: inherit; pointer-events: auto; }

.inline-action-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.inline-action-card > div { display: flex; align-items: center; gap: 10px; }
.inline-action-card > div > .icon { flex: 0 0 auto; color: var(--green-700); }
.inline-action-card strong, .inline-action-card small { display: block; }
.inline-action-card strong { font-size: 10px; }
.inline-action-card small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.document-source-options { display: grid; gap: 12px; }
.document-source-card { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px; color: var(--text); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.document-source-card:hover, .document-source-card:focus-visible { border-color: var(--green-600); box-shadow: 0 8px 24px rgba(23, 63, 58, .1); transform: translateY(-1px); outline: none; }
.document-source-card > .icon:first-child { color: var(--green-700); }
.document-source-card strong, .document-source-card small { display: block; }
.document-source-card strong { font-size: 11px; }
.document-source-card small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.document-draft-preview { scroll-margin-top: 16px; }
.document-preview-sheet { min-height: 220px; padding: 28px; color: #20252a; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 26px rgba(18, 28, 32, .08); overflow-wrap: anywhere; }
.document-preview-sheet h4 { margin: 0 0 8px; font-size: 15px; text-align: center; }
.document-preview-sheet .document-preview-meta { margin-bottom: 22px; color: #657078; font-size: 9px; text-align: center; }
.document-preview-sheet .document-preview-content { font-size: 11px; line-height: 1.6; }
.inline-field-action { display: flex; align-items: stretch; gap: 8px; }
.inline-field-action select { min-width: 0; flex: 1 1 auto; }
.inline-field-action .button { flex: 0 0 auto; }

.rich-editor-shell { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.rich-editor-shell:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgb(45 108 98 / .1); }
.rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 7px; overflow: visible; background: #f3f1ea; border-bottom: 1px solid var(--line); }
.rich-toolbar > span { width: 1px; height: 22px; flex: 0 0 auto; margin: 0 3px; background: var(--line-strong); }
.rich-toolbar button { min-width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; padding: 0 7px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 10px; }
.rich-toolbar button:hover { color: var(--green-700); border-color: var(--green-600); }
.rich-toolbar select { height: 30px; flex: 0 0 auto; padding: 0 24px 0 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 9px; }
.rich-toolbar > span { display: none; }
.rich-toolbar button { min-width: 28px; }
.rich-toolbar select { max-width: 125px; }
.bop-report-section .rich-editor { min-height: 220px; max-height: 390px; overflow-x: hidden; overflow-y: auto; }
.nested-form-panel { position: relative; margin-top: 9px; padding: 13px; background: #f7f7f4; border: 1px solid var(--line); border-radius: 10px; }
.nested-form-panel[hidden] { display: none; }
.bop-object-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.bop-object-fields[hidden] { display: none; }
.hearing-form #hearing-reference-suggestions { position: relative; top: auto; margin-top: 8px; }
#procedure-lawyer-suggestions { position: relative; top: auto; margin-top: 8px; }
.rich-editor { width: 100%; min-width: 0; max-width: 100%; min-height: 260px; overflow-x: hidden; padding: 16px; outline: none; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.rich-editor *, .document-rendered-content *, .bop-narrative * { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.rich-editor.preserve-case { text-transform: none; }
.rich-editor:empty::before { color: var(--faint); content: attr(data-placeholder); pointer-events: none; }
.rich-editor p { margin: 0 0 10px; }
.bop-narrative { min-width: 0; max-width: 100%; min-height: 160px; overflow-x: hidden; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; word-break: break-word; }
.bop-narrative p:last-child { margin-bottom: 0; }

.legal-source-list { max-height: 330px; display: grid; gap: 0; overflow-y: auto; padding-top: 5px; padding-bottom: 5px; }
.legal-source-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.legal-source-list > div:last-child { border-bottom: 0; }
.legal-source-list p { min-width: 0; flex: 1; margin: 0; }
.legal-source-list strong, .legal-source-list small { display: block; }
.legal-source-list strong { font-size: 10px; }
.legal-source-list small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.legal-source-list a { color: var(--green-700); }

.external-mode { background: var(--green-950); }
.external-mode .app-shell { width: 100%; min-height: 100vh; }
.external-shell { width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; padding: 24px 16px; background: radial-gradient(circle at 50% 10%, #26564e, var(--green-950) 55%); }
.external-brand { width: min(620px, 100%); display: flex; align-items: center; gap: 11px; color: white; }
.external-brand img { width: 38px; height: 38px; }
.external-brand strong, .external-brand span { display: block; }
.external-brand strong { font-family: 'Newsreader', Georgia, serif; font-size: 17px; letter-spacing: .05em; }
.external-brand span { margin-top: 1px; color: #9eb5ae; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.external-card { width: min(620px, 100%); min-width: 0; max-width: 620px; justify-self: center; margin: 32px 0; padding: clamp(22px, 5vw, 42px); background: var(--surface); border: 1px solid rgb(255 255 255 / .2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.external-card h1 { font-size: clamp(28px, 6vw, 38px); }
.external-shell > footer { color: #8ea59e; font-size: 9px; text-align: center; }
.external-document { margin: 22px 0 16px; overflow: hidden; background: #f7f5ef; border: 1px solid var(--line); border-radius: 11px; }
.external-document > div { display: grid; gap: 3px; padding: 13px 15px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.external-document span { color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.external-document strong { font-size: 11px; }
.external-document small { color: var(--muted); font-size: 9px; }
.external-document article { max-width: 100%; max-height: 210px; overflow-x: hidden; overflow-y: auto; padding: 18px; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.external-trust { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 22px; color: var(--faint); font-size: 9px; }
.external-success { text-align: center; }
.external-success-icon { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 20px; color: var(--green-700); background: var(--green-100); border-radius: 50%; }
.external-validation { margin-top: 23px; padding: 13px; background: var(--surface-2); border-radius: 9px; text-align: left; }
.external-validation span, .external-validation code { display: block; }
.external-validation span { color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.external-validation code { margin-top: 6px; overflow-wrap: anywhere; color: var(--green-700); font-size: 9px; }

.asset-scanner-content { display: grid; align-content: start; gap: 16px; }
.asset-scanner-stage { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; color: #d6e3df; background: #07110f; border: 1px solid #29453f; border-radius: 16px; }
.asset-scanner-stage video { width: 100%; height: 100%; min-height: 360px; display: block; object-fit: cover; opacity: 0; transition: opacity .2s ease; }
.asset-scanner-stage.active video { opacity: 1; }
.asset-scanner-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 30px; text-align: center; }
.asset-scanner-placeholder strong { color: white; font-size: 15px; }
.asset-scanner-placeholder span { max-width: 280px; color: #9fb4ae; font-size: 10px; line-height: 1.5; }
.asset-scanner-frame { position: absolute; top: 50%; left: 50%; width: min(68%, 250px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.asset-scanner-frame::after { position: absolute; right: 10px; left: 10px; top: 50%; height: 1px; content: ''; background: #dbbd83; box-shadow: 0 0 12px rgb(219 189 131 / .65); }
.asset-scanner-frame i { position: absolute; width: 38px; height: 38px; border-color: white; border-style: solid; }
.asset-scanner-frame i:nth-child(1) { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 10px 0 0; }
.asset-scanner-frame i:nth-child(2) { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.asset-scanner-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.asset-scanner-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 3px 3px 0; border-radius: 0 0 10px; }
.asset-scanner-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.asset-scanner-manual { margin: 0; }

.procedure-deadline-warning { background: var(--gold-soft); }
.procedure-deadline-warning:hover { background: #ead6a8 !important; }
.procedure-deadline-warning .table-code { display: inline-flex; align-items: center; gap: 5px; color: #8a5b12; }
.procedure-deadline-warning .table-code .icon, .deadline-field-warning .icon { color: var(--gold); }
.procedure-deadline-overdue { background: var(--red-soft); }
.procedure-deadline-overdue td, .procedure-deadline-overdue .table-primary, .procedure-deadline-overdue .table-code, .procedure-deadline-overdue .table-secondary { color: var(--red); }
.procedure-deadline-overdue:hover { background: #f2d2ce !important; }
.procedure-deadline-overdue .progress-fill { background: var(--red); }
.deadline-copy { margin-top: 3px; }
.custody-badge { display: inline-flex; align-items: center; padding: 4px 8px; color: white; background: var(--red); border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.deadline-preview { display: flex; align-items: center; gap: 7px; padding: 12px 14px; color: var(--green-800); background: var(--green-100); border-radius: 9px; font-size: 10px; }
.deadline-preview span { margin-left: auto; color: var(--muted); font-size: 8px; }
.procedure-control-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 0; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.procedure-control-bar .checkbox-row { margin: 0; }
.hero-progress-label { display: block; margin-top: 7px; color: #dce9e5; font-size: 8px; }
.deadline-overdue-hero { box-shadow: inset 4px 0 var(--red); }
.deadline-field-overdue { color: var(--red); background: var(--red-soft); }
.deadline-field-warning { color: #795014; background: var(--gold-soft); }
.document-order-entry { min-width: 0; border-bottom: 1px solid var(--line); }
.document-order-entry:last-child { border-bottom: 0; }
.document-order-entry > .document-order-row { display: grid; width: 100%; grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; border-bottom: 0; cursor: default; }
.document-order-entry .mini-row-main { min-width: 0; overflow-wrap: break-word; }
.document-order-entry > .procedure-video-attachments { box-sizing: border-box; min-width: 0; width: 100%; margin: 0; padding: 0 13px 9px; }
.document-order-entry > .procedure-video-attachments > summary { width: fit-content; padding: 3px 0; cursor: pointer; }
.document-sequence { width: 24px; height: 24px; display: grid; place-items: center; color: var(--green-800); background: var(--green-100); border-radius: 50%; font-size: 9px; font-weight: 800; }
.order-buttons { display: flex; gap: 3px; }
.order-buttons .icon-button { width: 28px; height: 28px; color: var(--green-700); background: var(--surface-2); border: 1px solid var(--line); }
.order-buttons .icon-button:disabled { opacity: .3; cursor: default; }
.document-editor { min-height: 390px; font-family: Arial, sans-serif; }
.document-image-upload { display: flex; align-items: center; gap: 10px; padding: 14px; color: var(--green-800); background: var(--surface); border: 1px dashed var(--green-600); border-radius: 10px; cursor: pointer; }
.document-image-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.document-image-upload strong, .document-image-upload small { display: block; }
.document-image-upload strong { font-size: 10px; }
.document-image-upload small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.document-image-previews, .document-attachment-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; margin-top: 12px; }
.document-image-previews figure, .document-attachment-gallery figure { min-width: 0; margin: 0; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.document-image-previews img, .document-attachment-gallery img { width: 100%; height: 130px; display: block; object-fit: cover; }
.document-image-previews figcaption { display: flex; align-items: center; gap: 6px; padding: 7px; overflow: hidden; font-size: 8px; }
.document-image-previews figcaption .icon-button { margin-left: auto; }
.document-attachment-gallery figcaption { display: grid; gap: 3px; padding: 9px; }
.document-attachment-gallery figcaption strong { font-size: 9px; }
.document-attachment-gallery figcaption span, .document-attachment-gallery figcaption code { overflow-wrap: anywhere; color: var(--muted); font-size: 7px; }
.document-rendered-content { min-width: 0; max-width: 100%; min-height: 160px; overflow-x: hidden; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; word-break: break-word; }
.document-rendered-content p:first-child { margin-top: 0; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .95fr) minmax(430px, 1.05fr); background: var(--surface); }
.login-brand-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; gap: 50px; padding: clamp(30px, 6vw, 80px); color: white; background: radial-gradient(circle at 20% 5%, #2d665b, transparent 34rem), var(--green-950); }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand img { width: 50px; height: 50px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-family: 'Newsreader', Georgia, serif; font-size: 23px; letter-spacing: .08em; }
.login-brand span { max-width: 330px; margin-top: 3px; color: #a9bdb7; font-size: 9px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.login-brand-panel h1 { max-width: 650px; margin: 12px 0 18px; color: white; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; }
.login-brand-panel p { max-width: 570px; color: #b9cac5; font-size: 14px; line-height: 1.7; }
.login-brand-panel .eyebrow { color: #dbbd83; }
.login-trust { display: flex; align-items: center; gap: 8px; color: #9fb4ae; font-size: 10px; }
.login-form-panel { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--paper); }
.login-card { width: min(470px, 100%); padding: clamp(25px, 5vw, 45px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.login-card h2 { margin: 7px 0 7px; font-size: 31px; }
.login-card .field { margin: 22px 0 18px; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 92px; }
.password-visibility { position: absolute; top: 50%; right: 5px; min-height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: var(--green-700); background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: 9px; font-weight: 700; transform: translateY(-50%); }
.password-visibility:hover, .password-visibility:focus-visible { background: var(--green-100); outline: none; }
.text-button { width: 100%; margin-top: 15px; padding: 7px; color: var(--green-700); background: transparent; border: 0; cursor: pointer; font-size: 11px; font-weight: 700; text-align: center; }
.text-button:hover { text-decoration: underline; }
.demo-auth-hint { display: grid; gap: 3px; margin-top: 14px; padding: 10px 12px; color: var(--muted); background: var(--surface-2); border-radius: 8px; font-size: 9px; line-height: 1.45; }
.demo-auth-hint strong { color: var(--ink); }
.password-policy { display: grid; gap: 5px; margin: -4px 0 20px; padding-left: 20px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.totp-enrollment { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: center; margin: 20px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.totp-enrollment img { width: 180px; max-width: 100%; height: auto; background: white; border-radius: 8px; }
.totp-enrollment span, .totp-enrollment small { display: block; color: var(--muted); font-size: 8px; line-height: 1.45; }
.totp-enrollment code { display: block; margin: 8px 0; overflow-wrap: anywhere; color: var(--green-800); font-size: 11px; font-weight: 700; letter-spacing: .08em; }

.workflow-list { display: grid; }
.workflow-row { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid var(--line); }
.workflow-row:first-child { border-top: 0; }
.workflow-main { min-width: 0; display: grid; gap: 3px; }
.workflow-main strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-main small { color: var(--muted); font-size: 9px; }
.workflow-actions { display: flex; justify-content: flex-end; gap: 6px; }
.desk-sent { margin-top: 18px; }
.channel-options { display: flex; flex-wrap: wrap; gap: 9px; }
.channel-options .checkbox-row { min-width: 110px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.document-preview { min-height: 130px; padding: 18px; color: #25332f; background: #f7f4ec; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }

.video-card { width: min(900px, 100%); }
.video-stage { min-height: 310px; display: grid; place-items: center; margin: 22px 0 14px; overflow: hidden; color: #aabcb7; background: #091714; border: 1px solid #29453f; border-radius: 14px; }
.video-stage.active, .video-stage:has(video) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.video-stage figure { position: relative; width: 100%; height: 100%; min-height: 310px; margin: 0; background: #07110f; }
.video-stage video { width: 100%; height: 100%; min-height: 310px; display: block; object-fit: cover; }
.video-stage figcaption { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; color: white; background: rgb(6 20 17 / .75); border-radius: 6px; font-size: 9px; }
.hearing-watermark { position: absolute; left: 10px; bottom: 10px; z-index: 3; max-width: calc(100% - 115px); padding: 6px 8px; color: #fff; background: rgb(0 0 0 / .68); border: 1px solid rgb(255 255 255 / .22); border-radius: 5px; font-size: 7px; font-weight: 700; line-height: 1.35; letter-spacing: .02em; pointer-events: none; }
.video-placeholder { position: relative; }
.preview-watermark { right: 12px; bottom: 12px; left: 12px; max-width: none; text-align: left; }
.recording-indicator { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #8d111b; background: #ffe7e9; border: 1px solid #ffb6bd; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.recording-indicator[hidden] { display: none !important; }
.recording-indicator i { width: 8px; height: 8px; background: #d00012; border-radius: 50%; box-shadow: 0 0 0 4px rgb(208 0 18 / .12); animation: recording-pulse 1.4s infinite; }
@keyframes recording-pulse { 50% { opacity: .42; transform: scale(.82); } }
.video-placeholder { display: grid; place-items: center; gap: 8px; padding: 35px; text-align: center; }
.video-placeholder strong { color: white; font-size: 14px; }
.video-placeholder span { max-width: 390px; font-size: 10px; line-height: 1.5; }
.video-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.video-room { padding-top: 18px; }
.info-banner.full { grid-column: 1 / -1; }

.notification-list .notification-link { width: 100%; color: inherit; background: var(--surface); border: 0; cursor: pointer; font: inherit; text-align: left; }
.notification-list .notification-link:hover { background: var(--green-100); }
.notification-list .notification-link:focus-visible { position: relative; outline: 2px solid var(--green-600); outline-offset: -2px; }

.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.theme-option { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.theme-option:has(input:checked) { border-color: var(--green-600); box-shadow: inset 0 0 0 1px var(--green-600); }
.theme-option input { accent-color: var(--green-700); }
.theme-option strong { font-size: 10px; }
.theme-swatch { width: 25px; height: 25px; flex: 0 0 auto; background: var(--swatch); border: 1px solid rgb(0 0 0 / .12); border-radius: 8px; }
.profile-photo-editor { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.profile-photo-editor > div { min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.profile-photo-editor .field-hint { width: 100%; margin: 2px 0 0; }
.profile-avatar { width: 72px; height: 72px; font-size: 18px; }
.quick-action-options { display: grid; gap: 8px; margin-top: 12px; }
.quick-action-options .checkbox-row { align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.quick-action-options .checkbox-row span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 10px; }
.selection-count { margin-top: 9px; color: var(--muted); font-size: 9px; font-weight: 700; text-align: right; }
.preferences-page { max-width: 900px; }
.preferences-page .panel-body { padding: 22px; }
.preferences-page-footer { display: flex; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }
.admin-unit-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.signature-review-editor { margin-top: 16px; }
.signature-review-editor form { padding-top: 4px; }

.form-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.form-section-heading .form-section-title { margin: 0; padding: 0; border: 0; }
.form-section-heading > span { color: var(--faint); font-size: 9px; }
.contact-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.repeatable-list { display: grid; gap: 8px; margin-bottom: 8px; }
.repeatable-row { display: flex; align-items: end; gap: 7px; }
.repeatable-row .field { flex: 1; }
.person-address-list { margin-top: 13px; }
.person-form { scroll-behavior: smooth; }
/* SIGEPOL LOCAL 1.16.2 — person controls and expandable affordances. */
.person-form [hidden] { display: none !important; }
#diligence-draft-preview[hidden] { display: none !important; }
.person-form .field { align-content: start; grid-auto-rows: max-content; }
.person-form .field > input:not([type="checkbox"]),
.person-form .field > select { min-height: 44px; height: 44px; align-self: start; }
.person-form .field > .checkbox-row { align-self: start; }
.person-form .field > .checkbox-row > input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; padding: 0; }
details > summary { cursor: pointer; border-radius: 5px; }
details > summary:focus-visible { outline: 2px solid var(--green-600); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  details > summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}
.drawer.fullscreen .drawer-content { width: min(1240px, 100%); align-self: center; }
.drawer.fullscreen .drawer-footer { padding-left: max(22px, calc((100vw - 1240px) / 2)); padding-right: max(22px, calc((100vw - 1240px) / 2)); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(30px); opacity: .7; } }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .two-column { grid-template-columns: 1fr; }
  .asset-summary, .asset-summary.legal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: auto; padding: 30px; }
  .login-brand-panel > div:nth-child(2) { display: none; }
  .login-form-panel { min-height: calc(100vh - 150px); }
  .app-layout { display: block; }
  .sidebar { width: min(290px, 86vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; display: none; background: rgb(6 24 21 / .48); }
  .sidebar-scrim.open { display: block; }
  .main-area { min-height: 100vh; }
  .icon-button.mobile-menu { display: grid; }
  .topbar { height: 64px; gap: 8px; padding: 0 16px; }
  .global-search { width: auto; flex: 1; }
  .search-shortcut { display: none; }
  .desktop-new { display: none; }
  .content { padding: 25px 16px calc(104px + env(safe-area-inset-bottom)); }
  .procedure-row { grid-template-columns: minmax(160px, 1fr) 100px 24px; }
  .procedure-row > :nth-child(3), .procedure-row > :nth-child(4) { display: none; }
  .drawer { width: 100%; }
  .mobile-dock { position: fixed; right: 0; bottom: 0; left: 0; z-index: 24; min-height: 66px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px 7px max(7px, env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgb(15 35 31 / .1); backdrop-filter: blur(14px); }
  .mobile-dock-item { position: relative; min-width: 0; min-height: 52px; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 4px 2px; color: var(--faint); background: transparent; border: 0; border-radius: 10px; cursor: pointer; font: inherit; }
  .mobile-dock-item span { max-width: 100%; overflow: hidden; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-dock-item.active { color: var(--green-800); background: var(--green-100); }
  .mobile-dock-item b { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: white; background: var(--red); border: 2px solid white; border-radius: 999px; font-size: 7px; }
  .mobile-dock-scan { color: white; background: var(--green-800); }
}

@media (max-width: 520px) {
  .login-form-panel { padding: 16px; }
  .login-card { padding: 24px 20px; }
  .totp-enrollment { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .login-brand-panel { padding: 20px; }
  .login-brand img { width: 42px; height: 42px; }
  .external-shell { align-items: start; padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
  .external-card { margin: 18px 0; padding: 21px 17px; border-radius: 15px; }
  .external-document article { max-height: 34vh; padding: 15px; }
  .external-card .signature-pad { height: 220px; }
  .video-card { padding: 15px 12px; }
  .video-card .detail-grid { grid-template-columns: 1fr; }
  .video-controls { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 5; padding: 9px; background: rgb(255 255 255 / .94); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(12px); }
  .video-controls .button { min-height: 44px; flex: 1; }
  .asset-scanner-stage, .asset-scanner-stage video { min-height: min(58vh, 430px); }
}

@media (max-width: 620px) {
  .workflow-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .workflow-row > .status-pill, .workflow-actions { grid-column: 2; }
  .workflow-actions { justify-content: flex-start; flex-wrap: wrap; }
  .video-stage.active, .video-stage:has(video) { grid-template-columns: 1fr; }
  .video-stage figure, .video-stage video { min-height: 210px; }
  .procedure-control-bar { align-items: stretch; flex-direction: column; }
  .deadline-preview { align-items: flex-start; flex-direction: column; }
  .deadline-preview span { margin-left: 0; }
  .document-order-entry > .document-order-row { grid-template-columns: auto auto auto minmax(0, 1fr); }
  .document-order-row > .status-pill, .document-order-row > .order-buttons { grid-column: 4; justify-self: start; }
  .document-order-row > .status-pill { grid-row: 2; }
  .document-order-row > .order-buttons { grid-row: 3; }
  .document-order-entry .mini-row-main .procedure-item-link { white-space: normal; overflow-wrap: anywhere; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .heading-actions { width: 100%; justify-content: stretch; }
  .heading-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { padding: 15px; }
  .metric-value { font-size: 26px; }
  .metric-note { min-height: 24px; align-items: flex-start; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .toolbar-search { flex-basis: 100%; }
  .toolbar select { min-width: 0; flex: 1; }
  .asset-summary, .asset-summary.legal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .summary-box { padding: 13px; }
  .form-grid, .form-grid.three, .method-grid, .choice-grid { grid-template-columns: 1fr; }
  .contact-columns { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer-header, .drawer-content, .drawer-footer { padding-left: 16px; padding-right: 16px; }
  .tabs { margin-left: -16px; margin-right: -16px; }
  .drawer-footer { align-items: stretch; flex-wrap: wrap; }
  .drawer-footer .button {
    min-width: min(140px, 100%);
    flex: 1 1 calc(50% - 9px);
    white-space: normal;
    line-height: 1.25;
  }
  .donut-layout { align-items: flex-start; }
  .donut { width: 105px; height: 105px; }
  .donut::after { width: 63px; height: 63px; }
  .data-table th, .data-table td { padding-left: 11px; padding-right: 11px; }
  .draft-row, .inline-action-card, .inline-field-action { align-items: stretch; flex-direction: column; }
  .draft-row > div:last-child { justify-content: flex-end; }
  .search-action-row { flex-direction: column; }
  .expedient-signer-row { grid-template-columns: 1fr; }
  .bop-map { height: 240px; }
  .autosave-banner { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .drawer.fullscreen .drawer-content { width: 100%; }
  .drawer.fullscreen .drawer-footer { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 410px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-note { min-height: 0; }
  .topbar .notification-button { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .theme-options { grid-template-columns: 1fr; }
  .donut-layout { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .heading-actions, .toolbar, .demo-ribbon, .mobile-dock { display: none !important; }
  .app-layout { display: block; }
  .main-area { grid-column: auto; }
  .content { width: 100%; padding: 0; }
  .panel, .data-card, .metric-card { box-shadow: none; break-inside: avoid; }
}
.catalog-metadata {
  margin: 0;
}

.procedure-piece-catalog {
  margin-top: 18px;
  border: 1px solid var(--border, #dedbd1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.procedure-piece-catalog > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  cursor: pointer;
  background: #f7f5ef;
  font-weight: 700;
}

.procedure-piece-catalog > summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.procedure-piece-catalog > summary small {
  color: var(--muted, #6f716d);
  font-weight: 500;
}

.catalog-piece-list {
  display: grid;
}

.catalog-piece-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--border, #e5e1d8);
}

.catalog-piece-row > div:first-child {
  min-width: 0;
}

.catalog-piece-row strong,
.catalog-piece-row span,
.catalog-piece-row small {
  display: block;
}

.catalog-piece-row > div > span,
.catalog-piece-row > div > small {
  margin-top: 3px;
  color: var(--muted, #6f716d);
  font-size: 12px;
  line-height: 1.35;
}

.catalog-piece-done {
  background: #f6fbf7;
}

@media (max-width: 720px) {
  .admin-unit-options { grid-template-columns: 1fr; }
  .advanced-filter-grid { grid-template-columns: 1fr; }
  .procedure-piece-catalog > summary,
  .catalog-piece-row {
    align-items: flex-start;
  }

  .procedure-piece-catalog > summary {
    flex-direction: column;
  }

  .catalog-piece-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .catalog-piece-row .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* Global loading feedback */
body.is-loading { overflow: hidden; }
.global-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(244, 247, 245, .86);
  backdrop-filter: blur(8px);
  transition: opacity .16s ease, visibility .16s ease;
}
.global-loading.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.global-loading.is-immediate { transition: none; }
.global-loading-card {
  width: min(320px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 24px 26px 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.global-loading-emblem {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
}
.global-loading-emblem img {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.global-loading-ring {
  position: absolute;
  inset: 4px;
  border: 3px solid rgba(23, 63, 58, .13);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: sigepol-loading-spin .9s linear infinite;
}
.global-loading-card strong {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  letter-spacing: .01em;
}
.global-loading-card > span {
  max-width: 245px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
@keyframes sigepol-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .global-loading,
  .global-loading-ring { transition: none; animation: none; }
  .global-loading-ring { border-top-color: rgba(23, 63, 58, .45); }
}


/* Session countdown remains tied to the backend-authoritative idle/absolute deadlines. */
.session-countdown { flex: 0 0 auto; padding: 8px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.session-countdown.is-expiring { color: #7e3d00; border-color: #e1b576; background: #fff3db; }
.session-expiry-layer { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 20px; background: rgb(9 25 21 / .70); }
.session-expiry-dialog { width: min(440px, 100%); padding: clamp(22px, 4vw, 34px); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-lg); }
.session-expiry-dialog h2 { margin: 0 0 13px; font-size: clamp(20px, 3vw, 26px); line-height: 1.2; }
.session-expiry-dialog p { font-size: 13px; line-height: 1.6; }
.session-expiry-time { font-size: 18px !important; font-variant-numeric: tabular-nums; font-weight: 750; }
.session-expiry-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.session-expiry-actions .button { min-height: 42px; }
@media (max-width: 520px) {
  .session-countdown { font-size: 10px; padding: 8px 7px; }
  .session-expiry-actions .button { width: 100%; }
}


/* Browser-native recording playback plus an accessible, explicit timeline. */
.hearing-recording-player { margin: 12px 0 20px; padding: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hearing-playback-video { width: 100%; display: block; max-height: min(62vh, 650px); min-height: 230px; background: #101b19; border-radius: 9px; object-fit: contain; }
.hearing-playback-controls { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.hearing-playback-seek { flex: 1; min-width: 70px; accent-color: var(--green-600); cursor: pointer; }
.hearing-playback-seek:disabled { cursor: not-allowed; opacity: .5; }
.hearing-playback-clock { min-width: 96px; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hearing-playback-file { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.hearing-playback-error { padding: 9px; color: #8b1a1a; font-size: 12px; }
.hearing-playback-error[hidden] { display: none; }
@media (max-width: 520px) {
  .hearing-recording-player { padding: 9px; }
  .hearing-playback-controls { gap: 5px; flex-wrap: wrap; }
  .hearing-playback-clock { width: 100%; text-align: center; }
  .hearing-playback-video { min-height: 180px; }
}


/* Piloto 1.3: same usable workspace span across forms, records and details.
 * Desktop panels reach the fixed navigation rail, without overlaying it.
 * Mobile panels use all available width and keep responsive inner layouts.
 */
@media (min-width: 861px) {
  .overlay { left: 264px; }
  .overlay .drawer,
  .overlay .drawer.narrow,
  .overlay .drawer.wide,
  .overlay .drawer.fullscreen {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 100dvh;
  }
  .overlay .drawer.fullscreen .drawer-content { width: 100%; align-self: stretch; }
  .overlay .drawer.fullscreen .drawer-footer { padding-left: 22px; padding-right: 22px; }
  .content { width: 100%; max-width: none; }
}
@media (max-width: 860px) {
  .overlay { left: 0; }
  .overlay .drawer,
  .overlay .drawer.narrow,
  .overlay .drawer.wide,
  .overlay .drawer.fullscreen { width: 100%; max-width: none; height: 100dvh; }
}

/* SIGEPOL 1.3: calendário operacional, não editável */
.calendar-heading h2 { margin: 0 0 6px; font-size: 1.3rem; }
.calendar-heading p { margin: 0 0 12px; opacity: .8; }
.calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.calendar-controls strong { text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekday { text-align: center; font-size: .78rem; padding: 7px 0; }
.calendar-day, .calendar-empty { min-height: 92px; min-width: 0; border: 1px solid var(--border, #d7dde2); border-radius: 7px; padding: 5px; }
.calendar-day > strong { display: block; font-size: .82rem; padding: 2px; }
.calendar-event { border: 0; width: 100%; display: block; text-align: left; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; padding: 5px; margin: 3px 0; font-size: .72rem; color: inherit; background: rgba(68, 128, 149, .14); cursor: pointer; }
.calendar-event:hover, .calendar-event:focus-visible { outline: 2px solid currentColor; }
@media (max-width: 700px) { .calendar-grid { gap: 2px; } .calendar-day, .calendar-empty { min-height: 68px; padding: 2px; } .calendar-event { font-size: .62rem; padding: 3px; } }

/* Pesquisa auxiliar de seleções extensas, preservando o select nativo. */
.searchable-select-helper { position: relative; margin-bottom: 6px; }
.searchable-select-input { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border, #ccd3da); border-radius: 6px; color: inherit; background: transparent; }
.searchable-select-results { position: absolute; z-index: 45; top: 100%; left: 0; right: 0; max-height: 225px; overflow-y: auto; border: 1px solid var(--border, #ccd3da); border-radius: 6px; background: var(--surface, #fff); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.searchable-select-results[hidden] { display: none; }
.searchable-select-result { display: block; width: 100%; text-align: left; color: inherit; background: transparent; border: 0; padding: 9px 11px; cursor: pointer; }
.searchable-select-result:hover, .searchable-select-result:focus-visible { background: rgba(67,115,140,.15); }
.searchable-select-results > span { display: block; padding: 10px; }


/* SIGEPOL LOCAL 1.5.0 — legibilidade, acesso por teclado e erros contextuais. */
:root { --faint: #65716e; }
.field label, .field-label { font-size: 11px; line-height: 1.35; }
.field-hint, .field-error, .drawer-header p { font-size: 12px; line-height: 1.45; }
.nav-group-label { font-size: 11px; }
.checkbox-row label { font-size: 12px; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 3px;
}
.ux-invalid, .field .ux-invalid, .field .ux-invalid:focus { border-color: var(--red); }
.ux-field-error { display: block; margin-top: 4px; font-weight: 600; }
.notification-count { font-size: 10px; min-width: 19px; height: 19px; }
.notification-button { color: var(--green-800); }
.notification-button:focus-visible { outline-offset: 2px; }
.ux-confirm-layer {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  padding: 18px; background: rgb(6 24 21 / .65);
}
.ux-confirm-dialog {
  width: min(460px, 100%); padding: 24px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.ux-confirm-dialog h2 { margin: 0 0 12px; font-size: 21px; }
.ux-confirm-dialog p { margin: 0 0 20px; font-size: 14px; line-height: 1.55; }
.ux-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ux-confirm-actions .button { min-height: 44px; }
@media (max-width: 860px) {
  .mobile-dock-item span { font-size: 10px; }
  .mobile-dock-item b { font-size: 10px; }
  .notification-button { min-width: 40px; min-height: 44px; }
}
@media (max-width: 410px) {
  .topbar .notification-button { display: grid; flex-shrink: 0; }
  .topbar { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .topbar .icon-button { width: 35px; height: 40px; }
  .topbar .global-search { min-width: 0; }
  .topbar .global-search input { padding-left: 30px; padding-right: 6px; font-size: 12px; }
  .topbar .global-search .icon { left: 8px; }
  .topbar .session-countdown { padding: 6px 4px; font-size: 9px; white-space: nowrap; }
  .ux-confirm-actions { flex-direction: column; }
  .ux-confirm-actions .button { width: 100%; }
}

/* LOCAL 1.6.0 — UX-002, UX-009, UX-010 e UX-012 */
.topbar .global-search-wrap { position: relative; width: min(440px, 42vw); min-width: 0; }
.topbar .global-search-wrap .global-search { display: block; width: 100%; }
.ux-global-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(68vh, 470px); overflow-y: auto; z-index: 80; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); padding: 8px; }
.ux-global-results[hidden] { display: none; }
.ux-search-category + .ux-search-category { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.ux-search-category > strong { display: block; padding: 6px 10px 4px; color: var(--muted); font-size: 12px; }
.ux-search-category button { width: 100%; background: transparent; border: 0; border-radius: 7px; padding: 9px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: var(--ink); cursor: pointer; }
.ux-search-category button:hover, .ux-search-category button:focus-visible { background: var(--surface-2); outline: 2px solid transparent; }
.ux-search-category button span { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.ux-search-category button small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.ux-search-empty { margin: 8px; color: var(--muted); font-size: 13px; }
.ux-bop-index { position: sticky; top: 0; z-index: 8; background: var(--surface); box-shadow: 0 3px 14px rgb(0 0 0 / .06); padding: 8px; display: flex; gap: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.ux-bop-index button { flex: 0 0 auto; min-width: 118px; max-width: 156px; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.ux-bop-index button span, .ux-bop-index button small { display: block; }
.ux-bop-index button span { font-size: 11px; font-weight: 650; }
.ux-bop-index button small { margin-top: 4px; font-size: 10px; color: var(--muted); }
.ux-bop-index button.complete { border-color: var(--green-600); }
.ux-bop-index button.complete small { color: var(--green-600); }
.ux-bop-index button.error { border-color: var(--red); background: var(--red-soft); }
.ux-bop-index button.error small { color: var(--red); }
.ux-bop-index button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ux-bop-index + .form-section, [data-ux-bop-section] { scroll-margin-top: 92px; }
.ux-expedient-wizard { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ux-expedient-wizard button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 650; padding: 9px 12px; cursor: pointer; }
.ux-expedient-wizard button.active { background: var(--green-800); color: white; border-color: var(--green-800); }
.ux-expedient-step[hidden], .ux-model-row[hidden] { display: none !important; }
.ux-expedient-step > .form-section { margin-bottom: 16px; }
.ux-expedient-navigation { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0; }
.ux-expedient-summary-wrap { background: var(--surface-2); border-radius: 10px; padding: 16px; }
.ux-expedient-summary-wrap h3 { margin: 0 0 12px; font-size: 16px; }
.ux-expedient-summary { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ux-expedient-summary > div { min-width: 0; }
.ux-expedient-summary dt { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.ux-expedient-summary dd { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ux-model-picker { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); margin-bottom: 18px; }
.ux-model-picker h3 { margin: 0 0 12px; font-size: 16px; }
.ux-model-picker .field { display: block; color: var(--muted); font-size: 12px; }
.ux-model-picker input[type="search"] { margin-top: 5px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.ux-model-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.ux-model-tabs button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); cursor: pointer; }
.ux-model-tabs button.active { background: var(--green-800); color: #fff; }
.ux-model-results { max-height: 305px; overflow-y: auto; }
.ux-model-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ux-model-row > div { min-width: 0; flex: 1; }
.ux-model-row strong, .ux-model-row small { display: block; overflow-wrap: anywhere; }
.ux-model-row strong { font-size: 13px; }
.ux-model-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.ux-model-row .ux-favorite { border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--gold); font-size: 23px; width: 36px; height: 36px; flex-shrink: 0; cursor: pointer; }
.ux-model-empty { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .topbar .global-search-wrap { flex: 1; width: auto; }
  .ux-expedient-summary { grid-template-columns: 1fr; }
  .ux-bop-index button { min-width: 108px; }
  .ux-model-row { gap: 5px; }
}


/* SIGEPOL LOCAL 1.11.0 — assinatura ampla e video incorporado. */
.signature-expanded-actions { display: none; }
body.signature-drawing-mode { overflow: hidden !important; overscroll-behavior: none; }
.signature-pad-wrap.signature-expanded,
.signature-pad-wrap:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999;
  box-sizing: border-box;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 !important;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-radius: 0;
  background: #f5f8f7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  touch-action: none;
}
.signature-pad-wrap.signature-expanded .signature-pad,
.signature-pad-wrap:fullscreen .signature-pad {
  width: 100% !important;
  height: auto !important;
  flex: 1 1 0;
  min-height: 0 !important;
  display: block;
  background: #fff;
  touch-action: none;
  overscroll-behavior: contain;
}
.signature-pad-wrap.signature-expanded .signature-pad-actions,
.signature-pad-wrap:fullscreen .signature-pad-actions { display: none; }
.signature-pad-wrap.signature-expanded .signature-expanded-actions,
.signature-pad-wrap:fullscreen .signature-expanded-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.signature-orientation-tip {
  flex: 1 1 160px;
  min-width: 0;
  text-align: center;
  color: #37504a;
  font-size: 12px;
  line-height: 1.4;
}
.signature-pad-wrap.signature-expanded .signature-expanded-actions .button,
.signature-pad-wrap:fullscreen .signature-expanded-actions .button { min-height: 42px; }
@media (orientation: landscape) {
  .signature-pad-wrap.signature-expanded .signature-orientation-tip,
  .signature-pad-wrap:fullscreen .signature-orientation-tip { display: none; }
}
.template-applicability { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.template-applicability legend { font-weight: 650; color: var(--text); padding-inline: 6px; }
.template-species-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 6px 12px; margin-bottom: 8px; }
.procedure-hearing-recording { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.procedure-hearing-recording > .mini-row { width: 100%; }
.procedure-hearing-recording .hearing-recording-player { margin: 10px 0 2px; min-width: 0; }
.procedure-video-attachments { flex-basis: 100%; width: 100%; min-width: 0; margin-block: 8px; }
.procedure-video-attachments > summary { cursor: pointer; font-weight: 600; }
.procedure-video-attachments .hearing-recording-player { margin-block: 10px; }
/* SIGEPOL LOCAL 1.14.0 — legibilidade, WCAG AA e alvos móveis (somente UI na tela). */
@media screen {
  :root {
    --muted: #596460;
    --faint: #58635f;
    --focus-strong: var(--green-900);
    --text: var(--ink);
  }

  /* Leitura operacional: mantêm-se densidade e tamanho dos documentos/PDFs. */
  .data-table { font-size: 12px; }
  .data-table th { color: var(--faint); font-size: 11px; line-height: 1.4; letter-spacing: .035em; }
  .table-primary, .table-code { font-size: 12px; line-height: 1.4; }
  .table-code, .procedure-number { color: var(--green-900); }
  .procedure-number { font-size: 12px; }
  .procedure-meta, .table-secondary { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
  .status-pill { font-size: 11px; line-height: 1.35; }
  .status-pill.green { color: var(--green-900); }
  .mini-row-main strong { font-size: 12px; line-height: 1.45; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .mini-row-main span { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
  .procedure-item-link { color: var(--green-900); font-size: 12px; line-height: 1.45; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .detail-field span { font-size: 11px; line-height: 1.4; }
  .detail-field strong { font-size: 12px; line-height: 1.4; white-space: normal; text-overflow: clip; overflow: visible; overflow-wrap: anywhere; }
  .section-title h3, .form-section-title { font-size: 13px; line-height: 1.4; }
  .panel-header p, .panel-footer > span, .task-meta, .due-badge,
  .workflow-main small, .audit-event time, .hash-text { font-size: 11px; line-height: 1.45; }
  .metric-label, .metric-note, .task-title, .workflow-main strong { font-size: 12px; line-height: 1.45; }
  .date-range-field legend, .date-range-field label { font-size: 11px; line-height: 1.4; }
  .advanced-filters summary { min-height: 44px; color: var(--green-900); font-size: 12px; }
  .field label, .field-label { font-size: 12px; line-height: 1.4; }
  .field-error { font-weight: 650; }
  .info-banner { font-size: 12px; }
  .toast strong { font-size: 13px; }
  .toast span { font-size: 12px; line-height: 1.5; }
  .document-signature-box dt, .document-signature-box figcaption, .signature-privacy-note { font-size: 11px; line-height: 1.5; }
  .document-signature-box dd { font-size: 12px; line-height: 1.45; }
  .login-brand span { font-size: 11px; }
  .login-trust { font-size: 12px; }
  .drawer-header h2 { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
  .drawer-content { min-height: 0; overscroll-behavior-y: contain; }
  .mini-row { min-width: 0; }

  /* No tema amarelo/laranja, o tom 700 não sustenta texto branco ou links pequenos. */
  .button.primary, .mobile-dock-scan, .step-number, .ux-model-tabs button.active {
    color: #fff; background: var(--green-900); border-color: var(--green-900);
  }
  .button.primary:hover { background: var(--green-950); }
  .nav-item.active { color: #fff; background: var(--green-900); }
  .button.ghost, .tab.active, .eyebrow, .text-button, .password-visibility { color: var(--green-900); }
  .tab.active { border-bottom-color: var(--green-900); }
  .ux-model-row .ux-favorite { color: #795014; }

  /* Foco inequívoco, inclusive onde estilos antigos aplicavam outline: none/transparent. */
  :where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-strong);
    outline-offset: 2px;
  }
  .procedure-row:focus-visible, .data-table tr[data-open]:focus-visible,
  .procedure-item-link:focus-visible, .password-visibility:focus-visible,
  .document-source-card:focus-visible, .ux-search-category button:focus-visible,
  .notification-list .notification-link:focus-visible {
    outline: 3px solid var(--focus-strong);
    outline-offset: 2px;
  }
  .sidebar :where(button, a, summary, [tabindex]):focus-visible {
    outline-color: #f3e5c4;
  }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
    border-color: var(--focus-strong);
  }
  .field .ux-invalid:focus-visible { border-color: var(--red); outline-color: var(--red); }
  .data-table-wrap { max-width: 100%; overscroll-behavior-inline: contain; }
}

@media screen and (max-width: 860px) {
  /* Alvos prioritários de toque; a grade compacta de desktop permanece intacta. */
  .button, .button.small, .icon-button, .nav-item, .unit-switcher-menu button,
  .searchable-select-result { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  .nav-item { min-height: 44px; }
  .unit-switcher-menu button { font-size: 12px; }
  .procedure-item-link { display: inline-flex; align-items: center; min-height: 44px; }
  .order-buttons { flex-wrap: wrap; }
  .order-buttons .icon-button { width: 44px; height: 44px; }
  .task-check { width: 44px; height: 44px; }
  .password-visibility { min-height: 44px; padding-inline: 10px; font-size: 11px; }
  .password-input-wrap input { min-height: 44px; padding-right: 112px; }
  .field input, .field select { min-height: 44px; }
  .rich-toolbar button { min-width: 44px; min-height: 44px; font-size: 12px; }
  .rich-toolbar select { min-height: 44px; max-width: 170px; font-size: 12px; }
  .ux-model-row .ux-favorite { width: 44px; height: 44px; }
  .data-table-wrap .data-table { min-width: 720px; }
  .drawer-header .icon-button { min-width: 44px; }
  .drawer-header h2 { font-size: clamp(18px, 4vw, 22px); }
  .login-brand-panel { gap: 18px; }
  .login-brand-panel > div:nth-child(2) { display: block; }
  .login-brand-panel h1 { font-size: clamp(25px, 4vw, 36px); margin: 9px 0; line-height: 1.16; }
}

@media screen and (max-width: 620px) {
  /* Os três elementos da linha continuam visíveis em 320 px sem overflow horizontal. */
  .procedure-row { grid-template-columns: minmax(0, 1fr) 24px; grid-template-rows: auto auto; gap: 8px 10px; }
  .procedure-row > :first-child { min-width: 0; grid-column: 1; grid-row: 1; }
  .procedure-row > :nth-child(2) { min-width: 0; grid-column: 1; grid-row: 2; }
  .procedure-row > :nth-child(5) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .procedure-title { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .procedure-meta { white-space: normal; }
  .task-item { grid-template-columns: 44px minmax(0, 1fr); }
  .task-item .due-badge { grid-column: 2; grid-row: 2; white-space: normal; }
  .toolbar-search { min-width: 0; }
  .login-brand-panel p { display: none; }
}

@media screen and (max-width: 410px) {
  .topbar .icon-button { width: 44px; height: 44px; }
  .topbar .global-search-wrap { min-width: 0; }
  .topbar .global-search input { height: 44px; }
  .topbar .session-countdown { font-size: 10px; }
}

/* LOCAL 1.14.1 — touch hover não pode parecer uma segunda unidade ativa. */
@media screen and (hover: none) and (pointer: coarse) {
  .unit-switcher-menu button:not(.active):hover {
    color: #cbd8d4;
    background: transparent;
  }
}

/* LOCAL 1.17.1 — uniformidade exclusiva da tela Nova peça. */
#document-form .form-grid > .field { align-content: start; grid-auto-rows: max-content; }
#document-form .field > input:not([type="hidden"]):not([type="file"]),
#document-form .field > select { box-sizing: border-box; height: 48px; min-height: 48px; padding-top: 0; padding-bottom: 0; align-self: start; }
#document-form .document-related-optional { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
#document-form .document-related-optional > summary { min-height: 44px; padding: 13px; cursor: pointer; font-weight: 700; }
#document-form .document-related-optional > .field-hint { display: block; margin: 0 13px 12px; }
#document-form .document-related-optional > .form-grid { padding: 0 13px 13px; }

/* LOCAL 1.18.0 #109 — alinhar os controles sem esticar o campo vizinho. */
#diligence-form .form-grid > .field { align-content: start; align-self: start; grid-auto-rows: max-content; min-width: 0; }
#diligence-form .field > input:not([type="hidden"]):not([type="file"]),
#diligence-form .field > select { box-sizing: border-box; width: 100%; height: 48px; min-height: 48px; padding-top: 0; padding-bottom: 0; align-self: start; }

/* LOCAL 1.18.0 #110 — scrollbar integrada ao menu lateral somente no desktop. */
@media (min-width: 861px) {
  .nav-scroll { scrollbar-width: thin; scrollbar-color: rgb(190 204 199 / .45) transparent; }
  .nav-scroll::-webkit-scrollbar { width: 7px; }
  .nav-scroll::-webkit-scrollbar-track { background: transparent; }
  .nav-scroll::-webkit-scrollbar-thumb { background: rgb(190 204 199 / .38); border-radius: 99px; }
  .nav-scroll::-webkit-scrollbar-thumb:hover { background: rgb(210 223 217 / .62); }
}
@media (forced-colors: active) { .nav-scroll { scrollbar-color: auto; } }

/* LOCAL 1.18.0 #108 — botão de superfície como irmão, sem controles aninhados. */
.document-order-entry > .document-order-row { position: relative; transition: background .12s ease; }
.document-order-entry > .document-order-row:hover { background: var(--green-100); }
.document-order-row > .document-row-open-surface {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.document-order-row > :not(.document-row-open-surface) { position: relative; z-index: 1; pointer-events: none; }
.document-order-row :is(button, label, input, select, a, [role="button"]) { pointer-events: auto; }
.document-order-row:has(> .document-row-open-surface:focus-visible) {
  outline: 3px solid var(--green-600); outline-offset: -3px;
}

/* LOCAL 1.18.0 #105 — oficina e conferência operacional com hierarquia visual. */
#template-form .template-fields-workshop .field > button { width: 100%; min-height: 48px; }
#template-form #template-dynamic-field-status .mini-list { max-height: 320px; overflow-y: auto; }
#template-form #template-dynamic-field-status .mini-row-main { overflow-wrap: anywhere; }
#document-form .document-dynamic-operations { padding: 0 13px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
#document-form .document-dynamic-operations > summary { margin: 0 -13px; padding: 13px; cursor: pointer; font-weight: 700; }
#document-form .document-dynamic-operations > .field-hint { display: block; margin: 6px 0 12px; }
#document-form .document-dynamic-operations .form-grid { margin-top: 12px; }
.mission-objective-approval .panel-body > strong { display: block; margin-bottom: 6px; font-size: 13px; overflow-wrap: anywhere; }
.mission-objective-approval .checkbox-row { margin-top: 12px; }


/* SIGEPOL LOCAL 1.19.0 — dados relacionados exibidos no texto, sem marcador técnico. */
.document-assist-slot {
  display: inline;
  padding: 0 .12em;
  border-bottom: 1px dotted var(--text-muted, #717883);
  border-radius: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.document-assist-slot.document-assist-pending {
  color: var(--text, #333);
  background: var(--gold-soft, #fff4c9);
  border-bottom: 2px dashed var(--gold, #aa7315);
  cursor: help;
}
.document-assist-slot.document-assist-pending[role="button"] {
  cursor: text;
}
.document-assist-slot[role="button"]:focus-visible {
  outline: 2px solid var(--primary, #525b67);
  outline-offset: 2px;
}
#document-assisted-selections:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border, #dadde1);
  border-radius: 8px;
}
#document-assisted-selections[hidden] { display: none; }
#document-assisted-selections select {
  width: 100%;
  min-height: 44px;
}
.document-assist-options {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border, #dadde1);
  border-radius: 8px;
  padding: 8px 12px;
}
.document-assist-options legend { padding: 0 4px; font-weight: 600; }
.document-assist-options .checkbox-row { margin-top: 8px; }
@media (max-width: 600px) {
  #document-assisted-selections:not([hidden]) { grid-template-columns: 1fr; }
  .document-assist-options .checkbox-row { min-height: 44px; align-items: center; }
}


/* SIGEPOL LOCAL 1.20.0 — drag restrito à alça, separado da superfície de abertura. */
.document-order-entry { position: relative; }
.document-order-entry > .document-order-row {
  grid-template-columns: auto auto auto auto minmax(0, 1fr) auto auto;
}
.document-drag-handle, .document-drag-placeholder {
  width: 34px; height: 36px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; align-self: center;
  border-radius: 7px; box-sizing: border-box;
}
.document-drag-handle {
  border: 1px solid transparent; color: var(--muted);
  background: transparent; cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.document-drag-handle:hover {
  border-color: var(--line); color: var(--green-800);
  background: var(--surface-2);
}
.document-drag-handle:active { cursor: grabbing; }
.document-drag-handle:focus-visible {
  outline: 3px solid var(--green-600); outline-offset: 2px;
}
.document-order-entry.is-document-dragging { opacity: .67; }
.document-order-entry.document-drop-before::before,
.document-order-entry.document-drop-after::after {
  content: ""; position: absolute; left: 3px; right: 3px;
  border-top: 3px solid var(--green-600); z-index: 3;
  pointer-events: none;
}
.document-order-entry.document-drop-before::before { top: 0; }
.document-order-entry.document-drop-after::after { bottom: 0; }
.document-order-list[aria-busy="true"] .document-drag-handle { cursor: progress; }
#document-order-announcement.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;
}
@media (max-width: 620px) {
  .document-order-entry > .document-order-row {
    grid-template-columns: auto auto auto auto minmax(0, 1fr);
  }
  .document-order-row > .status-pill,
  .document-order-row > .order-buttons { grid-column: 5; }
  .document-drag-handle, .document-drag-placeholder {
    width: 44px; height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .document-order-entry.is-document-dragging { transition: none; }
}
