:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #25352e;
  background: #f2f4f3;
  --border: #dce3df;
  --muted: #627069;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #24523c; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 24px; line-height: 1.3; margin-bottom: 8px; }
h2 { font-size: 16px; margin-bottom: 10px; }
p { line-height: 1.6; }
.internal-layout { min-width: 980px; }
.app-shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 12px; background: #20382d; color: #fff; }
.sidebar-brand { padding: 0 12px 24px; font-size: 24px; font-weight: 700; }
.sidebar-brand span { display: block; margin-top: 4px; color: #bdcbc3; font-size: 12px; font-weight: 400; }
.sidebar nav { display: grid; gap: 4px; }
.nav-link { display: grid; gap: 3px; padding: 10px 12px; color: #e6ede9; text-decoration: none; border-radius: 4px; }
.nav-link:hover { background: #2d493a; }
.nav-link.is-active { background: #40634d; color: #fff; font-weight: 600; }
.nav-note { font-size: 11px; color: #bdcbc3; font-weight: 400; }
.sidebar-note { margin: 28px 12px 0; color: #bdcbc3; font-size: 12px; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 14px 24px; background: white; border-bottom: 1px solid var(--border); }
.topbar-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 650; }
.account { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.account form { margin: 0; }
.main-content { padding: 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.eyebrow { margin-bottom: 6px; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: white; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; }
.details-list { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf0ee; }
.status-list li:last-child { border: 0; }
.badge { display: inline-block; padding: 4px 8px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.notice { padding: 16px 18px; border: 1px solid; border-radius: 5px; margin-bottom: 20px; }
.notice h2 { margin-bottom: 6px; }
.notice p { margin-bottom: 4px; }
.status-success { color: #24613e; background: #e8f4ec; border-color: #c4e1ce; }
.status-warning { color: #77560d; background: #fff5d8; border-color: #eedda6; }
.status-error { color: #942e2a; background: #fff0ee; border-color: #ebc7c3; }
.status-info { color: #245e81; background: #eaf3fa; border-color: #c8ddeb; }
.status-need-review { color: #714583; background: #f3ecf8; border-color: #dac8e7; }
.status-disabled { color: #637068; background: #edf0ee; border-color: #d9e0dc; }
.help-text { color: var(--muted); font-size: 12px; line-height: 1.6; }
.error-message { color: #942e2a; font-size: 13px; }
form, .form-field { display: grid; gap: 8px; }
form { gap: 16px; }
label { font-weight: 600; }
input:not([type="hidden"]), select, textarea { width: 100%; min-width: 0; font: inherit; padding: 9px 10px; color: inherit; border: 1px solid #b6c2ba; border-radius: 4px; background: white; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b23b33; }
.form-actions { display: flex; align-items: center; gap: 10px; }
button, .button { display: inline-block; font: inherit; font-weight: 600; padding: 9px 14px; border: 1px solid #294e38; border-radius: 4px; background: #294e38; color: white; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .button:hover { background: #365e45; }
.button-secondary { border-color: #c3cec7; background: white; color: #34483c; }
.button-secondary:hover { background: #f1f5f2; }
button:disabled, .button.is-disabled, input:disabled, select:disabled, textarea:disabled { background: #edf0ee; color: #79847d; border-color: #d9e0dc; cursor: not-allowed; }
.button.is-disabled { pointer-events: none; }
:focus-visible { outline: 3px solid #bd943b; outline-offset: 2px; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; }
.data-table { width: 100%; border-collapse: collapse; background: white; font-size: 13px; }
.data-table th { position: sticky; top: 0; background: #eaf0ec; color: #354a3d; font-weight: 650; text-align: left; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.data-table tbody tr:hover { background: #f6f9f7; }
.data-table .text-wrap { min-width: 200px; max-width: 420px; overflow-wrap: anywhere; white-space: normal; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .nowrap { white-space: nowrap; }
.placeholder-panel { max-width: 800px; }
.public-layout { padding: 60px 20px; }
.public-panel { width: 100%; max-width: 440px; margin: 0 auto; padding: 28px; background: white; border: 1px solid var(--border); border-radius: 6px; }
.public-brand { font-size: 20px; font-weight: 700; }
.public-panel h1 { font-size: 22px; }
.public-panel > form { margin: 20px 0; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 224px; top: 8px; z-index: 10; background: white; padding: 8px; }

.orders-controls { margin-bottom: 18px; }
.orders-filters { grid-template-columns: minmax(240px, 1fr) 160px auto; align-items: end; }
.summary-caption { margin: 18px 0 8px; }
.orders-summary { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.orders-summary strong { margin-left: 8px; font-variant-numeric: tabular-nums; }
.orders-table { min-width: 1320px; }
.orders-table .source-values { min-width: 120px; max-width: 240px; white-space: pre-wrap; overflow-wrap: anywhere; }
.source-values .badge { margin: 0 4px 4px 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted); }
.detail-summary { margin-bottom: 24px; }
.detail-summary .orders-summary { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.detail-section { margin: 24px 0; }
.order-records-table { min-width: 2300px; }
.source-reference { color: var(--muted); font-size: 12px; min-width: 200px; overflow-wrap: anywhere; }
.order-records-table .source-cell { min-width: 120px; max-width: 240px; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-records-table .notes-cell { min-width: 380px; max-width: 520px; }
.curtain-record { margin: 14px 0; }
.curtain-record h3 { font-size: 15px; margin: 0; }
.curtain-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 24px; margin: 0; }
.curtain-field { border-bottom: 1px solid #edf0ee; padding-bottom: 10px; min-width: 0; }
.curtain-field dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.curtain-field dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.curtain-notes { grid-column: 1 / -1; }

.curtain-edit-form { gap: 20px; }
.curtain-edit-form legend { padding: 0 8px; font-weight: 650; }
.curtain-edit-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 24px; }
.edit-notes { grid-column: 1 / -1; }
.conflict-value { white-space: pre-wrap; }

.change-history { margin-top: 20px; border-top: 1px solid #dce2e8; padding-top: 14px; }
.change-history summary { cursor: pointer; font-weight: 600; }
.audit-entry { margin-top: 18px; }
.audit-table { width: 100%; table-layout: fixed; }
.audit-table th:first-child { width: 18%; }
.audit-value { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Compact native selection controls in dense office tables. */
input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; vertical-align: middle; }
