:root {
  color-scheme: dark;
  --base: #131313;
  --s1: #1a1a1a;
  --s2: #202020;
  --s3: #282828;
  --line: #353535;
  --line2: #414141;
  --text: #f0f1f4;
  --muted: #a4abb7;
  --brand: #e091ff;
  --soft: #e091ff;
  --info: #9cbaff;
  --green: #8ce0bb;
  --red: #ffb3bc;
  --amber: #f4d594;
  --radius: 12px;
  font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; scrollbar-width: thin; scrollbar-color: #505050 #131313; }
body { margin: 0; background: var(--base); color: var(--text); }
button, input, select, textarea { font: inherit; }
input, textarea { caret-color: var(--brand); }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
a { color: var(--soft); text-underline-offset: 4px; }
a:hover { color: #f1c5ff; }
::selection { background: var(--brand); color: #27132e; }
:focus-visible { outline: 2px solid var(--soft); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Inter, "Segoe UI", Arial, sans-serif; line-height: 1.25; }
h1 { font-size: 36px; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
p { line-height: 1.6; }
small, .muted { color: var(--muted); }
svg { width: 18px; height: 18px; display: inline-block; flex: none; vertical-align: middle; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .58; cursor: not-allowed; }
button[aria-busy="true"] { cursor: progress; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 99; background: var(--s2); padding: 10px 14px; border: 1px solid var(--soft); }
.skip:focus { top: 12px; }

/* The workspace frame keeps navigation separate from task content. */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; }
#sidebar { position: sticky; top: 0; height: 100dvh; background: #181818; border-right: 1px solid #303030; display: flex; flex-direction: column; overflow: auto; scrollbar-width: thin; scrollbar-color: #505050 #1a1a1a; }
.brand { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 26px 22px 24px; min-height: 110px; text-decoration: none; }
.brand img { display: block; width: 102px; height: 24px; object-fit: contain; flex: none; }
.brand b { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.025em; line-height: 1.25; color: var(--brand); white-space: nowrap; }
.brand .brand-symbol { display: none; }
.sidebar-controls { padding: 0 16px 18px; }
.sidebar-controls .button { width: 100%; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; min-height: 36px; }
.sidebar-controls .sidebar-close { display: none; }
.sidebar-controls .button:hover, .sidebar-controls .button:focus-visible { color: var(--text); }
.nav { padding: 0 16px 24px; flex: 1; }
.nav details { margin: 2px 0 24px; }
.nav summary { list-style: none; user-select: none; font-size: 12px; font-weight: 500; letter-spacing: .025em; color: #a4abb7; padding: 8px 12px 12px; display: flex; justify-content: space-between; align-items: center; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary svg { width: 13px; height: 13px; }
.nav details:not([open]) summary svg { transform: rotate(-90deg); }
.nav a { color: #b8bec9; text-decoration: none; padding: 10px 12px; display: flex; gap: 12px; align-items: center; min-height: 44px; border-radius: 8px; font-size: 14px; line-height: 1.3; transition: background .15s, color .15s; }
.nav a svg { width: 17px; height: 17px; color: #a4abb7; }
.nav a:hover, .nav a:focus-visible { background: #282828; color: #fff; }
.nav a.active { background: #33273a; color: #f3e8f7; font-weight: 600; }
.nav a.active svg { color: var(--soft); }
.foot { padding: 22px 26px; border-top: 1px solid var(--line); font-size: 12px; color: #a4abb7; letter-spacing: .02em; }
.body { min-width: 0; }
#header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; border-bottom: 1px solid #303030; padding: 0 40px; background: #161616; }
.trail, .header-actions, .actions, .titleline, .rowflex { display: flex; align-items: center; gap: 10px; }
.trail { min-width: 0; color: #e1e5ec; }
.trail > svg { width: 13px; color: #9b9b9f; }
.trail span:last-child { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500; }
.trail small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.header-actions { gap: 14px; flex: none; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #594461; background: #33273a; color: #f3e8f7; border-radius: 50%; font-size: 10px; font-weight: 650; flex: none; }
.pill { padding: 6px 10px; border: 1px solid var(--line2); border-radius: 5px; color: #c4c7d0; font-size: 12px; white-space: nowrap; }
header .menu { display: none; }
main { padding: 40px 40px 44px; max-width: 1840px; margin: auto; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 34px; }
.pagehead > div:first-child { min-width: 0; }
.pagehead h1 { overflow-wrap: anywhere; }
.pagehead p { margin-top: 8px; color: var(--muted); max-width: 75ch; font-size: 15px; }
.pagehead > .actions { justify-content: flex-end; padding-top: 3px; }
.actions { flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 40px; border-radius: 8px; border: 1px solid var(--line2); background: #282828; color: #e1e5ec; padding: 10px 16px; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover { background: #343434; border-color: #656565; color: #fff; }
.button:active { background: #3b3b3b; }
.button.primary { border-color: var(--brand); background: var(--brand); color: #27132e; }
.button.primary:hover { background: #e5a5ff; border-color: #e5a5ff; color: #27132e; }
.button.primary:active { background: #ce57fd; }
.button.ghost { background: transparent; border-color: transparent; }
.button.ghost:hover { background: var(--s2); }
.button.compact { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.button svg { width: 16px; height: 16px; }
.hero { display: flex; align-items: flex-start; padding: 3px 0 25px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 36px; margin-bottom: 10px; }
.hero p { max-width: 70ch; color: var(--muted); font-size: 15px; }
.hero .actions { margin-top: 18px; }
.section-title { margin: 30px 0 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title h2 { font-size: 20px; }

/* Data summaries are intentionally quieter than the records below them. */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--s1); overflow: hidden; }
.metric-link { display: block; text-decoration: none; color: inherit; min-width: 0; }
.metric-link + .metric-link { border-left: 1px solid var(--line); }
.metric { min-width: 0; padding: 20px 22px; }
.metric .top { display: flex; align-items: center; justify-content: space-between; color: #b7bdc8; gap: 8px; font-size: 13px; font-weight: 500; }
.metric .top svg { width: 16px; height: 16px; color: #a4abb7; }
.metric strong { display: block; font-size: 28px; font-weight: 550; line-height: 1.25; letter-spacing: -.035em; margin: 10px 0 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--text); }
.metric small { font-size: 12px; }
.metric-link:hover { background: #242124; }
.module-metrics { display: flex; gap: 0; margin: 0 0 32px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.module-metrics .metric { flex: 1; padding: 0 24px; min-width: 0; }
.module-metrics .metric:first-child { padding-left: 0; }
.module-metrics .metric + .metric { border-left: 1px solid var(--line); }
.module-metrics strong { margin: 10px 0 0; font-size: 27px; }
.module-metrics .top { justify-content: flex-start; font-size: 13px; color: #b7bdc8; }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-head { padding: 24px 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h2 { font-size: 19px; letter-spacing: -.025em; }
.panel-head p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.cash { padding: 20px; display: grid; gap: 18px; }
.cash-row { display: grid; grid-template-columns: 78px minmax(30px, 1fr) minmax(100px, auto); align-items: center; gap: 14px; font-size: 12px; }
.cash-row b { text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.bar { height: 5px; background: #363636; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #e091ff; border-radius: 3px; }
.cash-row:nth-child(2) .bar i { background: #96aff0; }
.cash-row:nth-child(3) .bar i { background: #7fc6a6; }
.cash-row:nth-child(4) .bar i { background: #d1b57d; }
.tablewrap { overflow: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #505050 #1a1a1a; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { background: #202020; color: #b7bdc8; font-size: 12px; font-weight: 500; letter-spacing: .015em; }
th, td { padding: 18px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td { font-size: 14px; color: #d5d8e1; }
td:first-child { font-weight: 550; color: #f0f1f4; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #282828; }
td .button { background: transparent; border-color: #414141; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #c4c7d0; padding: 5px 9px; background: #303030; border-radius: 4px; font-weight: 500; line-height: 1.45; white-space: nowrap; }
.status i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; flex: none; }
.status.good { background: #19352d; color: #a0e8c8; }
.status.wait { background: #362f21; color: #f1d294; }
.status.run { background: #282e46; color: #bccbff; }
.status.bad { background: #3c2630; color: #ffc2cd; }
.counts { color: var(--muted); font-size: 13px; }

/* Filters stay attached to their result set. */
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; padding: 22px 24px; border-bottom: 1px solid var(--line); align-items: end; background: #1d1d1d; }
.toolbar label { flex: 1; min-width: 160px; }
.toolbar label.filterfield { display: grid; gap: 7px; flex: 0 1 145px; min-width: 125px; font-size: 12px; font-weight: 500; color: #b7bdc8; }
.toolbar label.search-field { flex: 1 1 220px; max-width: 440px; }
.toolbar input { width: 100%; max-width: 360px; }
.filterfield select, .filterfield input { width: 100%; min-width: 0; }
.toolbar > .button { margin-bottom: 1px; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select, .header-actions select, .share-field { background: #171717; border: 1px solid #4a444c; color: var(--text); border-radius: 8px; padding: 10px 12px; min-height: 44px; caret-color: var(--soft); transition: border-color .15s, background .15s; }
.field input:hover, .field select:hover, .field textarea:hover, .toolbar input:hover, .toolbar select:hover { border-color: #777077; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus { border-color: #e091ff; background: #211c23; outline: 2px solid #e091ff33; outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #a4abb7; opacity: 1; }
input[type="date"] { min-width: 0; }
input[type="file"] { max-width: 100%; font-size: 11px; padding: 8px; }
input[type="file"]::file-selector-button { border: 1px solid var(--line2); border-radius: 4px; background: var(--s2); color: var(--text); padding: 6px 9px; margin-right: 10px; cursor: pointer; }
.field [readonly] { background: #222222; color: #b8bec9; }
.field [aria-invalid="true"] { border-color: #f2a7b4; }
.empty, .loading { padding: 48px 24px; color: var(--muted); text-align: center; }
.empty h2 { color: var(--text); margin-bottom: 9px; font-size: 18px; }
.empty p { max-width: 58ch; margin: auto; font-size: 14px; }
.empty .button { margin-top: 20px; }
.list { padding: 0 26px; }
.listitem { display: flex; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.listitem:last-child { border-bottom: 0; }
.listitem b { font-size: 14px; font-weight: 550; }
.listitem small { display: block; font-size: 12px; margin-top: 4px; }
.listitem .iconbox { display: grid; place-items: center; width: 30px; height: 30px; color: #d6b3e2; flex: none; }
.listitem .status { margin-left: auto; }
.listitem > div:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice { padding: 13px 16px; margin-bottom: 18px; border: 1px solid #514735; border-radius: 6px; background: #262219; color: #efd49b; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.notice.error { border-color: #6d3e4a; background: #2d1d25; color: #ffc5ce; }
.below { margin-top: 22px; }
.mini { font-size: 11px; }
.screen-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #303030; color: #a4abb7; font-size: 12px; }

/* Forms use a full page for sustained work, with short confirmations in dialogs. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.field { display: grid; align-content: start; gap: 7px; color: #e1e5ec; font-size: 14px; font-weight: 500; min-width: 0; }
.field > input, .field > select, .field > textarea { width: 100%; font-size: 14px; font-weight: 400; }
.field.wide { grid-column: 1 / -1; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field small, .field-help, .section-help { color: #a4abb7; font-size: 12px; font-weight: 400; line-height: 1.6; }
.field .optional, .field-optional { color: #a4abb7; font-size: 12px; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.form-actions .button { min-width: 90px; }
.wizard { max-width: 1120px; }
.wizard-section { padding: 24px; margin-bottom: 18px; }
.wizard-section h2 { margin-bottom: 20px; }
.wizard-section > .actions { margin-top: 20px; }
.wizard-section .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 32px; align-items: start; }
.editor-nav { position: sticky; top: 22px; display: grid; gap: 3px; padding-top: 5px; }
.editor-nav h2, .editor-nav > p { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 10px; padding-left: 10px; }
.editor-nav a { padding: 12px 14px; display: block; font-size: 14px; text-decoration: none; color: #b8bec9; border-radius: 5px; line-height: 1.5; }
.editor-nav a:hover, .editor-nav a:focus-visible { background: #302634; color: var(--soft); }
.editor-nav a.active { background: #33273a; color: #f3e8f7; }
.editor-step { display: grid; gap: 4px; text-align: left; padding: 11px 12px; color: #e1e5ec; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 12px; line-height: 1.45; }
.editor-step small { color: #a4abb7; font-size: 12px; }
.editor-step:hover { background: #302634; border-color: #514357; }
.editor-step:active { background: #3a2b41; }
.record-context { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); min-width: 0; }
.record-context h2 { font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.record-context p { font-size: 13px; color: #a4abb7; line-height: 1.75; margin-top: 10px; }
.record-context .definition-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.detail-aside > .record-context { margin-top: 0; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--s1); }
.record-id { overflow-wrap: anywhere; font-size: 10px !important; line-height: 1.7; }
.required-mark { color: #e091ff; }
.optional { color: #a4abb7; font-weight: 400; font-size: 10px; }
.button.text-link { min-height: 0; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #e091ff; font-size: inherit; font-weight: inherit; text-align: left; display: inline; white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
.button.text-link:hover { color: #f1c5ff; text-decoration: underline; }
.tablewrap .button.text-link { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.team-composition { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 12px 0 0; border-top: 1px solid var(--line); color: #c4c7d0; font-size: 11px; }
.team-composition span + span::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: #a4abb7; display: inline-block; margin-right: 10px; vertical-align: middle; }
.detail-section { margin-bottom: 20px; }
.detail-section > .form-section-head { margin: 0; padding: 24px; }
.detail-section > .definition-list { padding: 24px; }
.detail-section > .roster-list { padding: 0 22px; }
.event-list { padding: 0 22px; }
.revision-entry { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.revision-entry:last-child { border-bottom: 0; }
.revision-entry h3 { font-size: 14px; margin-bottom: 20px; line-height: 1.5; }
.revision-entry dd small { display: block; margin: 12px 0 5px; color: var(--muted); font-size: 10px; }
.revision-entry dd small:first-child { margin-top: 0; }
.revision-entry dd > div { overflow-wrap: anywhere; }
.event-row { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.event-row:last-child { border-bottom: 0; }
.event-row > div:first-child { color: #d6b3e2; }
.event-row > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.event-row b { display: block; font-size: 14px; font-weight: 550; }
.event-row small { display: block; margin-top: 5px; font-size: 12px; }
.editor-main { min-width: 0; max-width: 1080px; }
.form-section { padding: 26px; margin: 0 0 20px; scroll-margin-top: 24px; }
fieldset.form-section { min-width: 0; }
.form-section > legend { float: left; width: 100%; padding: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.form-section > legend + * { clear: both; }
.form-section-head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-section-head h2 { font-size: 18px; }
.form-section-head p { font-size: 14px; color: var(--muted); margin-top: 7px; max-width: 70ch; }
.form-section .section-help { margin-bottom: 20px; }
.editor-footer { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 20px; margin-top: 22px; border: 1px solid var(--line2); border-radius: 7px; background: #202020; box-shadow: 0 12px 35px #0005; }
.editor-footer > .muted, .editor-footer p, .editor-footer small { font-size: 11px; color: var(--muted); margin-right: auto; }
.editor-footer .form-actions { margin: 0; }
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 30; max-width: min(450px, calc(100% - 44px)); padding: 14px 18px; background: #282828; border: 1px solid #5a505f; border-radius: 7px; color: #f3e8f7; font-size: 12px; box-shadow: 0 10px 30px #0005; }

/* Record detail pages expose context and relationships before secondary fields. */
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 26px; margin: 22px 0; }
.details-grid > div { overflow-wrap: anywhere; min-width: 0; font-size: 13px; }
.details-grid small { display: block; font-size: 10px; margin-bottom: 5px; }
.details-grid img { max-width: 100%; max-height: 260px; border-radius: 5px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 24px; align-items: start; }
.detail-main, .detail-aside { min-width: 0; }
.detail-aside { display: grid; gap: 18px; }
.detail-aside .panel { padding: 22px; }
.detail-aside h2, .detail-aside h3 { font-size: 17px; margin-bottom: 15px; }
.record-summary { padding: 23px 26px; margin-bottom: 22px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.record-summary > .titleline { justify-content: space-between; flex-wrap: wrap; }
.record-summary > p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.record-summary h2 { font-size: 24px; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px 28px; margin: 0 0 26px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-item { min-width: 0; padding: 0; }
.summary-item:first-child { padding-left: 0; }
.summary-item small, .summary-item > span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.summary-item strong + span { margin-top: 7px; margin-bottom: 0; line-height: 1.6; }
.summary-item strong { display: block; font-size: 20px; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.025em; overflow-wrap: normal; word-break: normal; }
.detail-tabs { display: flex; gap: 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); overflow: auto; scrollbar-width: thin; }
.detail-tabs a, .detail-tabs button { color: #b8bec9; text-decoration: none; display: block; padding: 14px 2px 16px; font-size: 14px; white-space: nowrap; background: transparent; border: 0; border-bottom: 2px solid transparent; }
.detail-tabs a:hover, .detail-tabs button:hover { color: #f3e8f7; }
.detail-tabs .active, .detail-tabs [aria-selected="true"] { color: #f3e8f7; border-bottom-color: #e091ff; }
.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 28px; margin: 0; }
.definition-list > div { min-width: 0; overflow-wrap: anywhere; }
.definition-list dt { font-size: 12px; color: #a4abb7; margin-bottom: 5px; }
.definition-list dd { margin: 0; font-size: 14px; color: #e1e5ec; line-height: 1.65; }
.definition-list .wide { grid-column: 1 / -1; }
.contract-amount { font-size: 27px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-weight: 550; margin: 9px 0; overflow-wrap: anywhere; }
.roster-list { display: grid; }
.roster-person { display: flex; gap: 13px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.roster-person:last-child { border-bottom: 0; }
.roster-person > div:nth-child(2) { min-width: 0; flex: 1; }
.roster-person b, .roster-person strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.roster-person p, .roster-person small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.roster-person .avatar { width: 36px; height: 36px; }
.roster-person .actions { margin-left: auto; }
.roster-person .status { margin-left: auto; }
.related-section { padding: 24px; margin-bottom: 20px; scroll-margin-top: 24px; }
.related-section > h2 { margin-bottom: 16px; }
.related-section > p { color: var(--muted); font-size: 14px; }
.related-section .tablewrap { margin: 0 -24px -24px; }
.related-section > .button { margin-top: 15px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.related-grid .wizard-section { margin: 0; }
.related-grid button { display: flex; margin: 9px 0; white-space: normal; max-width: 100%; text-align: left; justify-content: flex-start; }

/* Cards are reserved for objects with a distinct identity or lifecycle. */
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 20px; padding: 24px; }
.record-card { background: #202020; border: 1px solid #3b3b3b; border-radius: 12px; padding: 24px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.record-card .titleline { justify-content: space-between; flex-wrap: wrap; }
.record-card h3 { font-size: 20px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.record-card > p { font-size: 14px; color: #b8bec9; overflow-wrap: anywhere; }
.record-icon { display: grid; place-items: center; width: 26px; height: 26px; color: #d6b3e2; }
.record-card > button { justify-self: start; margin-top: 3px; }
.record-card dl, .record-card dd { margin: 0; }
.record-card dl { display: grid; gap: 10px; }
.record-card dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.record-card dt { color: #a4abb7; }
.record-card dd { text-align: right; overflow-wrap: anywhere; min-width: 0; color: #e1e5ec; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 16px; overflow: auto; padding: 20px; align-items: start; scrollbar-width: thin; scrollbar-color: #505050 #1a1a1a; }
.lane { display: grid; gap: 12px; min-height: 120px; padding: 0 0 6px; }
.lane > h3 { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 550; gap: 8px; padding: 2px 2px 8px; color: #d5d8e1; }
.lane > h3 span { background: #303030; color: #b8bec9; min-width: 22px; text-align: center; padding: 2px 6px; border-radius: 4px; font-size: 10px; }
.lane > p { color: #a4abb7; font-size: 13px; padding: 16px 8px; border: 1px dashed #484848; border-radius: 6px; }
.lane .record-card { padding: 17px; }
.lane .record-card h3 { font-size: 17px; }
.lane .record-card .record-icon { display: none; }
.record-timeline > section { padding: 22px 0 0; border-bottom: 1px solid var(--line); }
.record-timeline h3 { font-size: 14px; color: #dfbde9; padding: 0 20px; }
.pncp-summary { padding: 18px; }
.pncp-summary button { margin-right: 8px; }
.demo-journey { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 23px; }
.demo-journey .button { font-size: 10px; background: transparent; }
.share-field { width: 100%; max-width: 660px; margin: 12px 0 18px; font-size: 12px; }
.report { display: grid; gap: 18px; }
.report article { border-bottom: 1px solid var(--line); padding: 0 0 18px; }
.report article:last-child { border-bottom: 0; }
.report p { margin: 8px 0; color: #b8bec9; font-size: 12px; }
.report img { display: block; max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 5px; margin-top: 12px; }

/* The operational workspace joins context, records and decisions in one grid. */
.foot > span, .foot > small { display: block; }
.foot > span { color: #d9d3dc; }
.foot > small { margin-top: 6px; font-size: 11px; }
.workspace-mark { display: grid; place-items: center; width: 36px; height: 36px; background: #28212c; border: 1px solid #493b50; border-radius: 8px; color: #e5b5f5; }
.trail > div { min-width: 0; }
.user-context { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-context > span { color: #d4cfd7; font-size: 13px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-label { border-color: #54465c; color: #e0c3eb; background: #28212c; }
.workspace-panel { background: #191919; }
.workspace-panel-head { padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.workspace-panel-head > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px; }
.workspace-panel-head h2 { font-size: 18px; }
.workspace-panel-head span { color: var(--muted); font-size: 12px; }
.view-switch { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid #3b3b3b; border-radius: 9px; background: #141414; flex: none; }
.view-switch button { border: 1px solid transparent; background: transparent; color: #b6b2ba; min-height: 34px; padding: 6px 14px; border-radius: 6px; font-size: 13px; }
.view-switch button:hover { color: #f0f1f4; background: #252125; }
.view-switch button.active { background: #34283b; border-color: #66516f; color: #f3d9fc; }
.records-table .table-name { min-width: 260px; max-width: 440px; white-space: normal; }
.table-identity { display: grid; gap: 7px; }
.table-identity .text-link { color: #f0f1f4; font-weight: 550; line-height: 1.45; }
.table-identity .text-link:hover { color: var(--soft); }
.table-identity > small { color: var(--muted); font-size: 12px; font-weight: 400; max-width: 55ch; line-height: 1.5; }
.table-action { text-align: right; width: 1%; }
.records-table .table-action { position: sticky; right: 0; z-index: 1; min-width: 112px; background: var(--s1); box-shadow: -10px 0 16px -16px #000; }
.records-table th.table-action { background: #202020; }
.records-table tbody tr:hover .table-action { background: #222222; }
.record-card { transition: border-color 180ms ease-out, background 180ms ease-out; }
.record-card:hover { border-color: #66596a; background: #242124; }
.record-card > div > p { color: #b7bdc8; font-size: 14px; margin-top: 8px; }
.record-category { color: #c8b5cf; font-size: 12px; font-weight: 500; }
.project-card { background: #1c1c1c; }
.project-card .record-icon { color: #e1b6f0; background: #33273a; width: 38px; height: 38px; border-radius: 9px; }
.project-card .record-location { padding-bottom: 6px; }
.project-facts { border-top: 1px solid #3a3a3a; padding-top: 18px; }
.record-card-footer { border-top: 1px solid #3a3a3a; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.record-card-footer > span { font-size: 12px; color: var(--muted); }
.team-lead { display: flex; align-items: center; gap: 12px; }
.team-lead small, .team-lead strong { display: block; font-size: 12px; }
.team-lead strong { font-size: 14px; margin-top: 3px; font-weight: 500; }
.team-composition { font-size: 12px; }
.bid-values { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; border-top: 1px solid #3a3a3a; padding-top: 18px; }
.bid-values small { display: block; font-size: 12px; margin-bottom: 6px; }
.bid-values strong { font-size: 15px; font-weight: 550; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bid-modality { color: #d8c6df !important; font-size: 12px !important; }
.standalone-records { padding: 0; }
.overview-heading { padding-bottom: 6px; }
.demo-context { margin-bottom: 30px; padding: 18px 22px; border: 1px solid #4d3e56; border-radius: 10px; background: #261f2a; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.demo-context > div { display: flex; align-items: center; gap: 14px; }
.demo-context svg { color: #e4b6f3; width: 22px; height: 22px; }
.demo-context p { color: #d2bedb; font-size: 13px; max-width: 75ch; }
.demo-context strong { color: #f0d9fa; font-weight: 550; }
.demo-context .button { background: transparent; border-color: #65516f; color: #f0d9fa; flex: none; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 26px; align-items: start; }
.overview-primary, .overview-aside { display: grid; gap: 26px; min-width: 0; }
.portfolio-list { padding: 0 26px; }
.portfolio-row { display: flex; align-items: center; gap: 18px; padding: 26px 0; border-bottom: 1px solid #353535; min-width: 0; }
.portfolio-row:last-child { border-bottom: 0; }
.portfolio-symbol { display: grid; place-items: center; color: #e1b5f2; background: #2c2331; width: 44px; height: 48px; border-radius: 9px; flex: none; }
.portfolio-symbol svg { width: 23px; height: 23px; }
.portfolio-row > div:nth-child(2) { flex: 1; min-width: 0; }
.portfolio-row h3 { font-size: 17px; letter-spacing: -.02em; }
.portfolio-row h3 .text-link { color: #f0f1f4; }
.portfolio-row h3 .text-link:hover { color: var(--soft); }
.portfolio-row p { color: var(--muted); font-size: 12px; margin-top: 8px; }
.portfolio-row p span { padding: 0 8px; }
.portfolio-state, .portfolio-value { display: grid; gap: 9px; justify-items: end; }
.portfolio-state small, .portfolio-value small { font-size: 12px; }
.portfolio-value { min-width: 125px; }
.portfolio-value strong { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.priority-list { padding: 2px 26px; }
.priority-row { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid #353535; align-items: start; }
.priority-row:last-child { border-bottom: 0; }
.priority-date { width: 64px; flex: none; padding: 2px 0; }
.priority-date strong { font-size: 20px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; font-weight: 500; }
.priority-date small { display: block; margin-top: 4px; font-size: 11px; }
.priority-date.overdue strong, .priority-date.overdue small { color: #ffb3bc; }
.priority-row > div:last-child { min-width: 0; }
.priority-row > div > small { display: block; color: #bcaec3; font-size: 12px; margin-bottom: 5px; }
.priority-row .text-link { color: #f0f1f4; font-size: 14px; font-weight: 500; line-height: 1.5; }
.priority-row p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.financial-position { padding: 26px; }
.financial-main { padding-bottom: 24px; border-bottom: 1px solid #3a3a3a; }
.financial-main > span { font-size: 13px; color: #d1c5d7; }
.financial-main > strong { display: block; font-size: 32px; font-weight: 500; letter-spacing: -.04em; margin-top: 12px; color: #edc3fc; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.financial-main p { color: var(--muted); font-size: 12px; margin-top: 9px; }
.financial-position dl { margin: 0; padding: 20px 0 0; display: grid; gap: 17px; }
.financial-position dl > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.financial-position dt { color: var(--muted); }
.financial-position dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; }

/* Dialog headers remain visible while content scrolls, including on 320px screens. */
dialog { padding: 0; inline-size: min(620px, calc(100% - 24px)); max-block-size: calc(100dvh - 24px); border: 1px solid #514a54; border-radius: 10px; background: var(--s1); color: var(--text); box-shadow: 0 24px 90px #000a; overflow: hidden; overflow-wrap: anywhere; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #080808cc; }
.dialog-top { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dialog-top h2 { min-inline-size: 0; align-self: center; font-size: 18px; }
.dialog-top .button { flex: none; min-block-size: 36px; }
.dialog-body { min-block-size: 0; overflow: auto; overscroll-behavior: contain; scroll-padding-block: 12px; padding: 24px 24px 26px; }
.dialog-body .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dialog-body :is(input, select, textarea) { min-inline-size: 0; inline-size: 100%; }
.dialog-body .form-actions { flex-wrap: wrap; }
.dialog-body .form-actions .button { max-inline-size: 100%; white-space: normal; text-align: center; }
.dialog-body .report { grid-template-columns: minmax(0, 1fr); }
.dialog-body .report p { white-space: pre-line; }

@media (min-width: 701px) {
  .sidebar-collapsed .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar-collapsed .brand { min-height: 74px; padding: 26px 14px 16px; }
  .sidebar-collapsed .brand .brand-wordmark, .sidebar-collapsed .brand b { display: none; }
  .sidebar-collapsed .brand .brand-symbol { display: block; width: 32px; height: 20px; filter: brightness(0) invert(1); }
  .sidebar-collapsed .sidebar-controls { padding: 0 14px 18px; }
  .sidebar-collapsed .sidebar-toggle { width: 44px; min-height: 40px; padding: 10px; margin-inline: auto; }
  .sidebar-collapsed .sidebar-toggle span, .sidebar-collapsed .nav summary, .sidebar-collapsed .nav a span, .sidebar-collapsed .foot { display: none; }
  .sidebar-collapsed .nav { padding: 0 14px 20px; }
  .sidebar-collapsed .nav details { margin: 0 0 12px; }
  .sidebar-collapsed .nav details + details { border-top: 1px solid var(--line); padding-top: 12px; }
  .sidebar-collapsed .nav a { width: 44px; min-height: 44px; justify-content: center; gap: 0; padding: 12px; margin-inline: auto; }
  .sidebar-collapsed .nav a svg { width: 18px; height: 18px; }
}
@media (min-width: 1600px) {
  main { padding-left: 44px; padding-right: 44px; }
  #header { padding-left: 44px; padding-right: 44px; }
}
@media (max-width: 1200px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-aside { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .user-context > span { display: none; }
  .portfolio-row { gap: 14px; }

  .shell { grid-template-columns: 238px minmax(0, 1fr); }
  .brand { padding-left: 14px; padding-right: 12px; }
  .brand img { width: 90px; height: 22px; }
  main, #header { padding-left: 24px; padding-right: 24px; }
  .pagehead { flex-wrap: wrap; }
  .pagehead > .actions { justify-content: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 22px; }
  .metric { padding: 19px 17px; }
  .metric strong { font-size: 24px; }
  .header-actions { gap: 9px; }
  .header-actions .pill { display: none; }
}
@media (max-width: 900px) {
  .overview-aside { grid-template-columns: minmax(0, 1fr); }
  .workspace-panel-head { align-items: flex-start; flex-wrap: wrap; }
  .portfolio-value { min-width: 110px; }
  .portfolio-state small { display: none; }

  .editor-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .editor-nav { display: flex; flex-wrap: wrap; position: static; gap: 3px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
  .editor-nav h2, .editor-nav > p { display: none; }
  .editor-nav a, .editor-step { padding: 9px 12px; font-size: 13px; }
  .editor-nav .record-context { flex-basis: 100%; margin-top: 10px; padding-top: 14px; }
  .editor-nav .record-context h2 { margin-bottom: 4px; }
  .editor-nav .record-context p { margin-top: 5px; }
  .toolbar label.filterfield { flex: 1 1 135px; }
  .toolbar label.search-field { max-width: none; flex-basis: 100%; }
  .module-metrics { flex-wrap: wrap; row-gap: 18px; }
  .module-metrics .metric { flex-basis: 50%; padding-left: 20px; }
  .module-metrics .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-link:nth-child(3) { border-left: 0; }
  .metric-link:nth-child(n+3) { border-top: 1px solid var(--line); }

}
@media (max-width: 700px) {
  .workspace-mark, .user-context { display: none; }
  .workspace-panel-head { padding: 20px 18px; gap: 18px; }
  .workspace-panel-head > div:first-child { width: 100%; justify-content: space-between; }
  .view-switch { width: 100%; }
  .view-switch button { flex: 1; min-height: 38px; }
  .overview-grid, .overview-primary, .overview-aside { gap: 22px; }
  .demo-context { padding: 18px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .demo-context > div { align-items: flex-start; }
  .portfolio-list { padding: 0 20px; }
  .portfolio-row { flex-wrap: wrap; padding: 22px 0; gap: 14px; }
  .portfolio-row > div:nth-child(2) { flex-basis: calc(100% - 60px); }
  .portfolio-state { margin-left: 58px; justify-items: start; }
  .portfolio-value { margin-left: auto; }
  .portfolio-value strong { font-size: 14px; }
  .priority-list { padding: 0 20px; }
  .financial-position { padding: 22px 20px; }
  .financial-main > strong { font-size: 29px; }
  .record-card-footer { align-items: flex-start; flex-direction: column; }
  .bid-values { grid-template-columns: minmax(0,1fr); gap: 14px; }

  .shell { display: block; }
  #sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(270px, 90vw); z-index: 8; box-shadow: 18px 0 60px #0009; }
  .sidebar-open #sidebar { display: flex; }
  .sidebar-controls .sidebar-toggle { display: none; }
  .sidebar-controls .sidebar-close { display: inline-flex; }
  header .menu { display: inline-flex; min-width: 34px; padding: 6px; }
  #header { height: 60px; padding: 0 16px; gap: 12px; }
  .header-actions { gap: 8px; min-width: 0; }
  .header-actions .button { min-height: 34px; padding: 6px 9px; font-size: 10px; white-space: normal; }
  .trail { gap: 7px; }
  .trail small { display: none; }
  .trail > svg { display: none; }
  .trail span:last-child { font-size: 14px; }
  main { padding: 24px 16px 28px; }
  h1, .hero h1 { font-size: 26px; }
  .hero { padding: 0 0 23px; }
  .pagehead { gap: 18px; margin-bottom: 22px; }
  .pagehead .actions { gap: 7px; width: 100%; }
  .pagehead .actions .button { flex: 1 1 auto; }
  .pagehead p, .hero p { font-size: 14px; }
  .metric strong { font-size: 23px; }
  .metric .top { font-size: 12px; }
  .metric .top svg { display: none; }
  .metric { padding: 17px 14px; }
  .metric small { font-size: 12px; }
  .cash-row { grid-template-columns: 67px minmax(20px, 1fr) minmax(90px, auto); gap: 10px; font-size: 11px; }
  .cash, .panel-head { padding: 17px 16px; }
  .panel-head { flex-wrap: wrap; }
  th, td { padding: 12px 15px; }
  .toolbar { padding: 15px; gap: 12px; }
  .toolbar input { max-width: none; }
  .form-section, .wizard-section, .record-summary, .related-section { padding: 20px; }
  .form-section-head { margin-bottom: 20px; padding-bottom: 17px; }
  .form-grid, .wizard-section .form-grid, .definition-list, .details-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { gap: 20px; }
  .field input, .field select, .field textarea { min-height: 44px; font-size: 16px; }
  .field { font-size: 14px; }
  .field small { font-size: 12px; }
  .editor-footer { bottom: 8px; padding: 14px; gap: 10px; }
  .editor-footer > .muted, .editor-footer p, .editor-footer small { flex-basis: 100%; }
  .editor-footer .button { flex: 1; min-width: 0; }
  .detail-aside { grid-template-columns: minmax(0, 1fr); }
  .detail-tabs { gap: 22px; }
  .related-section .tablewrap { margin: 0 -20px -20px; }
  .roster-person { flex-wrap: wrap; }
  .detail-section > .form-section-head, .detail-section > .definition-list { padding: 20px; }
  .roster-person > div:nth-child(2) { flex-basis: calc(100% - 52px); }
  .roster-person .actions { margin-left: 49px; }
  .record-grid { padding: 16px; gap: 14px; }
  .record-card { padding: 18px; }
  .board { grid-auto-columns: minmax(250px, 85%); padding: 16px; }
  .screen-footer { margin-top: 28px; }
}
@media (max-width: 400px) {
  #header { padding: 0 12px; }
  main { padding-left: 12px; padding-right: 12px; }
  .header-actions .avatar { display: none; }
  .header-actions .button { max-width: 125px; font-size: 12px; }
  .module-metrics strong { font-size: 20px; }
  .metric strong { font-size: 21px; }
  .metric .top { line-height: 1.5; }

  .summary-item strong + span { margin-top: 7px; margin-bottom: 0; line-height: 1.6; }
.summary-item strong { font-size: 18px; }
  .form-section, .wizard-section, .record-summary, .related-section { padding: 17px; }
  .dialog-top { padding: 15px 14px; gap: 10px; }
  .dialog-top h2 { font-size: 16px; }
  .dialog-body { padding: 18px 15px 22px; }
}
@media (max-width: 550px) {
  .dialog-body .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dialog-top .button, .dialog-body .form-actions .button { min-block-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Operational histories keep decisions, evidence and corrections together. */
.operation-entry { padding: 22px; min-width: 0; }
.operation-entry + .operation-entry { border-top: 1px solid var(--line); }
.operation-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.operation-head h3 { font-size: 17px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.operation-entry .definition-list { padding: 0; gap: 18px 26px; margin: 18px 0; }
.operation-entry .actions { margin-top: 18px; }
.operation-change { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 19px; font-weight: 550; font-variant-numeric: tabular-nums; }
.operation-change svg { color: var(--muted); }
.operation-reason { color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 75ch; }
.operation-entry > p + small { display: block; margin-top: 12px; }
.dialog-body > .record-context:first-child { margin-top: 0; padding-top: 0; border-top: 0; margin-bottom: 22px; }
.dialog-body > .record-context .definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.dialog-body .operation-change { margin: 14px 0; }
.offline-actions { margin: 22px 0; }
.button.offline-pending { border-color: #80663d; color: #f5d19c; }
#offline-state { display: inline-flex; min-width: 0; }
.backup-body { padding: 22px; }
.backup-body > p { max-width: 75ch; color: var(--muted); margin-bottom: 22px; }
.backup-preview { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.backup-preview > h3 { font-size: 17px; margin-bottom: 14px; }
.backup-preview > p { margin-bottom: 14px; color: var(--muted); }
.backup-preview .tablewrap { margin: 20px 0; max-height: 330px; }
.backup-preview #restore-form { padding-top: 18px; border-top: 1px solid var(--line); }
.backup-preview #restore-form > p { margin-bottom: 14px; }
.field input[readonly] { color: var(--muted); background: var(--s1); cursor: default; }
@media (max-width: 900px) {
  .detail-aside { order: -1; }
  .detail-aside > .record-context .definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .detail-aside .record-id { font-size: 10px; }
}
@media (max-width: 700px) {
  #header { min-height: 64px; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .header-actions .avatar { display: none; }
  .header-actions .button { min-height: 44px; max-width: 110px; font-size: 12px; }
  .trail { flex: 1; min-width: 64px; }
  .trail span:last-child { max-width: 95px; }
  .header-actions { flex: 0 1 auto; }
  .operation-entry, .backup-body { padding: 18px; }
  .operation-entry .definition-list, .dialog-body > .record-context .definition-list { grid-template-columns: minmax(0, 1fr); }
  .operation-change { font-size: 17px; line-height: 1.7; }
  .operation-head .status { max-width: 100%; white-space: normal; }
  .offline-actions .button, .backup-panel .panel-head .button { width: 100%; }
  .operation-entry .actions .button { min-height: 44px; white-space: normal; }
}



.session-logout-mobile { display: none; }
@media (max-width: 700px) {
  .header-actions .session-logout { display: none; }
  .session-logout-mobile { display: flex; width: 100%; min-height: 44px; margin-top: 14px; }
}

/* The sign-in inherits MKORP Spaces: charcoal, Inter and its lilac accent. */
.auth-screen { min-height: 100dvh; background: var(--base); }
.auth-frame { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(460px, 1fr); min-height: 100dvh; margin: 0; }
.auth-intro { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 100dvh; padding: 44px clamp(36px, 3.2vw, 80px) 32px; background: #171717; }
.auth-photograph { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.auth-intro::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #0c0c1280 0%, #0c0c1208 30%, #0c0c1250 48%, #101014e8 78%, #101014fa 100%); }
.auth-brand { display: flex; align-items: center; gap: 18px; }
.auth-brand img { display: block; width: 138px; height: 30px; object-fit: contain; }
.auth-brand > span { border-left: 1px solid #ffffff45; padding-left: 18px; color: #f1c5ff; font-size: 19px; letter-spacing: -.025em; font-weight: 500; line-height: 26px; }
.auth-message { margin-top: auto; padding: clamp(160px, 22vh, 240px) 0 44px; max-width: 700px; }
.auth-message .auth-statement { font-size: clamp(40px, 3.2vw, 68px); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; color: #f0f1f4; text-wrap: balance; max-width: 18ch; }
.auth-statement > span { color: #e4b6f3; }
.auth-message > p + p { max-width: 43ch; margin-top: 24px; font-size: 16px; line-height: 1.7; color: #d7d4dd; }
.auth-capabilities { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 22px 0 0; margin: 28px 0 0; border-top: 1px solid #ffffff30; font-size: 12px; color: #c8c4d0; max-width: 600px; }
.auth-signature { font-size: 12px; color: #c8c4d0; }
.auth-signature strong { color: #f0f1f4; font-weight: 500; }
.auth-screen .auth-main { position: relative; width: 100%; max-width: none; margin: 0; padding: 72px 48px 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; background: #131313; border-left: 1px solid #353035; }
.auth-panel { width: 100%; max-width: 440px; min-width: 0; padding: 38px; background: #1a1a1a; border: 1px solid #3c343f; border-radius: 16px; box-shadow: 0 22px 64px #00000038; }
.auth-heading { margin-bottom: 30px; }
.auth-heading .auth-lock { display: block; width: 28px; height: 28px; color: var(--brand); margin-bottom: 24px; }
.auth-heading h1 { font-size: 36px; line-height: 1.14; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; }
.auth-heading p { color: #b7b1bb; margin-top: 14px; font-size: 15px; line-height: 1.65; max-width: 33ch; }
.auth-panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 22px; }
.auth-panel .field { font-size: 14px; gap: 9px; color: #e1dce6; }
.auth-panel .field input { width: 100%; min-height: 50px; font-size: 15px; background: #151316; border-color: #514a54; border-radius: 8px; }
.auth-panel .field input:hover { border-color: #807087; }
.auth-panel .field input:focus { border-color: var(--brand); outline-color: #e091ff40; background: #1d1920; }
.auth-panel .field small { font-size: 12px; color: #b7b1bb; }
.auth-password { position: relative; display: block; min-width: 0; }
.auth-password input { padding-right: 85px; }
.auth-show-password { position: absolute; inset: 1px 1px 1px auto; min-height: 48px; width: 78px; padding: 0 8px; border: 0; border-radius: 0 7px 7px 0; background: transparent; color: #e091ff; font-size: 12px; font-weight: 500; }
.auth-show-password:hover { background: #33273a; color: #f1c5ff; }
.auth-show-password:focus-visible { outline-offset: -4px; }
.auth-panel .auth-submit { min-height: 50px; width: 100%; margin-top: 3px; padding: 12px 16px; font-size: 14px; font-weight: 600; }
.auth-panel .notice { margin: 0; line-height: 1.6; font-size: 13px; }
.auth-footnote { margin-top: 24px; padding-top: 22px; border-top: 1px solid #393039; color: #b7b1bb; font-size: 12px; line-height: 1.7; }
.auth-copyright { position: absolute; bottom: 28px; margin: 0; padding: 0 24px; color: #a4abb7; font-size: 12px; text-align: center; }
.auth-status { font-size: 13px; line-height: 1.7; margin: 0 0 24px; color: var(--muted); }
.auth-status-pending { padding: 14px 16px; border: 1px solid #65553a; border-radius: 8px; background: #272319; color: #f1d39c; }
.auth-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1101px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .auth-photograph { animation: auth-arrive 900ms cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes auth-arrive { from { filter: brightness(.85); transform: scale(1.025); } to { filter: brightness(1); transform: scale(1); } }
}
@media (max-width: 1100px) {
  .auth-frame { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
  .auth-intro { padding: 32px; }
  .auth-brand { gap: 12px; }
  .auth-brand img { width: 115px; height: 25px; }
  .auth-brand > span { padding-left: 12px; font-size: 17px; }
  .auth-screen .auth-main { padding: 50px 28px 80px; }
  .auth-panel { padding: 30px; }
  .auth-message .auth-statement { font-size: 42px; }
  .auth-capabilities { display: grid; gap: 8px; }
}
@media (max-width: 820px) {
  .auth-frame { grid-template-columns: minmax(0, 1fr); }
  .auth-intro { min-height: 280px; padding: 24px; }
  .auth-photograph { object-position: 58% 46%; }
  .auth-intro::after { background: linear-gradient(180deg, #10101480, #10101435 30%, #101014ee 100%); }
  .auth-brand img { width: 115px; height: 25px; }
  .auth-brand > span { font-size: 17px; }
  .auth-message { padding: 40px 0 0; margin-top: auto; max-width: 480px; }
  .auth-message .auth-statement { font-size: 32px; line-height: 1.12; max-width: 22ch; }
  .auth-message > p + p, .auth-capabilities, .auth-signature { display: none; }
  .auth-screen .auth-main { padding: 32px 24px 28px; border-left: 0; border-top: 1px solid #393039; justify-content: flex-start; }
  .auth-panel { max-width: 440px; padding: 30px; }
  .auth-heading .auth-lock { width: 24px; height: 24px; margin-bottom: 18px; }
  .auth-heading h1 { font-size: 32px; }
  .auth-heading p { font-size: 15px; margin-top: 12px; }
  .auth-panel .field input { font-size: 16px; }
  .auth-copyright { position: static; margin-top: 28px; padding: 0; font-size: 11px; }
}
@media (max-width: 440px) {
  .auth-intro { min-height: 260px; padding: 22px; }
  .auth-message .auth-statement { font-size: 30px; max-width: 19ch; }
  .auth-screen .auth-main { padding: 28px 20px 24px; }
  .auth-panel { padding: 28px 22px; border-radius: 12px; }
  .auth-heading h1 { font-size: 30px; }
  .auth-heading { margin-bottom: 26px; }
}
@media (max-width: 350px) {
  .auth-intro { padding: 20px; }
  .auth-brand img { width: 106px; height: 23px; }
  .auth-brand > span { font-size: 16px; }
  .auth-message .auth-statement { font-size: 27px; }
  .auth-screen .auth-main { padding: 24px 14px; }
  .auth-panel { padding: 24px 18px; }
  .auth-heading h1 { font-size: 28px; }
}

@media print {
  #sidebar, #header, .actions, .toolbar, .screen-footer, .editor-nav, .editor-footer, .detail-tabs, .demo-journey { display: none !important; }
  .shell, .detail-layout { display: block; }
  body, main, .panel, .record-summary { background: white; color: black; }
  main { padding: 0; max-width: none; }
  .muted, small, p { color: #333; }
  th, td { white-space: normal; color: #111; background: white; border-color: #ddd; }
  .record-summary, .panel { border-color: #ddd; break-inside: avoid; }
  .details-grid, .definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .definition-list dd { color: #111; }
  body:has(dialog[open]) > .shell { display: none !important; }
  dialog[open] { display: block; position: static; inline-size: 100%; max-block-size: none; overflow: visible; border: 0; box-shadow: none; background: white; color: black; }
  dialog::backdrop { background: white; }
  .dialog-body { overflow: visible; }
  .dialog-top button, .form-actions { display: none !important; }
  .dialog-body .report { display: block; }
  .report p { color: #333; }
  .report article + article { margin-block-start: 16px; }
}
