/* UI refresh: warm paper, rose actions, quiet tables and contextual details. */
[hidden], .column-hidden { display: none !important; }
:root { --railw: 208px; --r: 8px; --r-lg: 9px; --r-xl: 10px; --shadow-1: none; }
.rail { background: var(--rail); }
.rail-brand { padding: 22px 12px; }
.rail-item.is-on { background: var(--brand); }
.rail-item { min-height: 42px; font-size: 13px; }
.rail-cap { padding-top: 17px; }
.rail-toggle { width: 24px; }
.rail-name { font-size: 14px; }
.appbar { background: var(--surface); backdrop-filter: none; }
.appbar-row { height: 56px; padding-inline: 30px; }
.crumb { font-size: 12px; color: var(--ink-2); font-weight: 400; gap: 12px; }
.crumb button { min-height: 40px; }
.today-pill { background: none; border: 0; font-weight: 400; }
.page-main { max-width: 1560px; padding: 30px 32px 48px; }
.page-main h2 { font-size: 25px; letter-spacing: .02em; color: var(--ink); }
.page-main > .workspace-heading { margin-bottom: 26px; }
.workspace-heading h2 > i, .page-main > h2 > i { display: none; }
.workspace-heading .btn { min-height: 42px; }
.page-main .shadow, .page-main .shadow-sm { box-shadow: none; border: 1px solid var(--line); }
.page-main .bg-white { background: var(--surface); }
.page-main .border-gray-200 { border-color: var(--line); }
.data-table { font-size: 13px; }
table.data-table th { background: #f4f2f3; color: #71686b; font-weight: 500; font-size: 12px; padding: 13px 12px; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 17px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13px; }
table.data-table.table-dense th, table.data-table.table-dense td { padding: 12px 10px; font-size: 12px; line-height: 1.6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fcf5f6; }
.data-table tbody tr.is-selected td { background: #fbe9ee; }
.data-table tr[tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.data-table .btn-sm { min-height: 34px; padding: 0 9px; }
.data-table .btn-danger { color: #946f78; background: transparent; border-color: transparent; }
.data-table .btn-danger:hover { color: var(--bad); background: var(--bad-bg); }
.badge { font-weight: 500; border-radius: 4px; font-size: 11px; }
.form-input { border-radius: 5px; box-shadow: none; min-height: 42px; }
.btn { border-radius: 5px; font-weight: 600; font-size: 13px; }
.btn-secondary { color: var(--brand-ink); border-color: var(--brand-line); background: var(--surface); }
.btn-secondary:hover { background: var(--brand-bg); }
.text-blue-800, .text-blue-900 { color: var(--brand-ink) !important; }
.bg-blue-600, .bg-blue-700, .bg-blue-800 { background-color: var(--brand) !important; }
.bg-blue-50 { background-color: var(--brand-bg) !important; }
.workspace-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 0; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; padding: 0 !important; margin-bottom: 20px; }
.workspace-tabs button { min-height: 46px; padding: 10px 22px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-2); font-weight: 500; box-shadow: none; }
.workspace-tabs button.is-active, .workspace-tabs .btn-primary { border-bottom-color: var(--brand); color: var(--brand-ink); background: transparent; font-weight: 700; }
.workspace-tabs button:hover { background: var(--brand-bg); }
.record-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 294px; gap: 22px; align-items: start; }
.record-workspace > :first-child { min-width: 0; border: 0; border-radius: 0; }
.record-workspace > :first-child > .bg-white { border: 0; border-radius: 0; }
.record-detail { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 23px 20px; }
.record-detail-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 19px; margin-bottom: 17px; }
.record-detail-head small { display: block; color: var(--ink-2); font-size: 12px; margin-bottom: 5px; overflow-wrap: anywhere; }
.record-detail h3 { font-size: 18px; line-height: 1.55; font-weight: 700; overflow-wrap: anywhere; }
.detail-status { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; color: var(--brand-ink); font-size: 12px; }
.detail-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.record-fields { display: grid; gap: 17px; font-size: 13px; }
.record-fields > div { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 10px; }
.record-fields dt { color: var(--ink-2); }
.record-fields dd { text-align: right; overflow-wrap: anywhere; }
.record-progress { margin-top: 23px; font-size: 12px; }
.record-progress > div { display: flex; justify-content: space-between; gap: 8px; }
.record-progress small { display: block; text-align: right; color: var(--ink-2); }
progress { appearance: none; width: 100%; height: 7px; border: 0; border-radius: 9px; overflow: hidden; background: var(--line-soft); }
progress::-webkit-progress-bar { background: var(--line-soft); }
progress::-webkit-progress-value { background: var(--brand); }
progress::-moz-progress-bar { background: var(--brand); }
.record-detail h4 { margin: 22px 0 8px; font-weight: 600; font-size: 13px; }
.detail-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.detail-warning { margin-top: 20px; background: var(--warn-bg); color: var(--warn); padding: 12px; font-size: 13px; }
.record-actions { margin-top: 27px; display: grid; gap: 10px; }
.record-actions .btn { white-space: normal; padding-block: 10px; }
.workorder-workspace { grid-template-columns: 245px minmax(0, 1fr); }
.workorder-list { display: grid; background: var(--surface); border: 1px solid var(--line); }
.workorder-list-item { display: grid; gap: 6px; padding: 21px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.workorder-list-item:last-child { border: 0; }
.workorder-list-item strong { font-size: 15px; }
.workorder-list-item small, .workorder-list-item span { color: var(--ink-2); }
.workorder-list-item.is-selected { background: var(--brand-bg-2); }
.workorder-list-item:hover { background: var(--brand-bg); }
.workorder-workspace .record-detail { position: static; }
.inline-workorder { margin-top: 24px; }
.inline-check-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft); font-size: 13px; cursor: pointer; }
.inline-check-row small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.inline-check-row input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.inline-check-row select { width: 94px; flex: none; }
.check-step { margin-top: 18px; padding: 8px 10px; background: var(--bg-2); font-weight: 600; font-size: 13px; }
.inline-check-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; font-size: 12px; }
#job-list :is(th, td):nth-child(-n+2), #wo-body :is(th, td):nth-child(3), #wo-body :is(th, td):nth-child(5), #wo-body :is(th, td):nth-child(6), #wo-body :is(th, td):nth-child(8) { display: none; }
#job-list td[colspan], #wo-body td[colspan] { display: table-cell; }
@media (min-width: 761px) {
  .record-workspace:has(#inquiry-list) { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
  #inquiry-list :is(th, td):nth-child(1), #inquiry-list :is(th, td):nth-child(2), #inquiry-list :is(th, td):nth-child(4), #inquiry-list :is(th, td):nth-child(5), #inquiry-list :is(th, td):nth-child(6) { display: none; }
  #inquiry-list td[colspan] { display: table-cell; }
}
.detail-total { margin-top: 23px; padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); }
.detail-total strong { font-size: 26px; color: var(--ink); }
.detail-empty { text-align: center; padding: 35px 0; color: var(--ink-2); }
.detail-empty i { font-size: 26px; margin-bottom: 14px; }
.detail-empty small { display: block; margin-top: 8px; }
.settings-workspace { display: grid; grid-template-columns: 185px minmax(0, 800px); gap: 30px; align-items: start; }
.settings-nav { display: grid; gap: 3px; padding-top: 6px; }
.settings-nav button { text-align: left; min-height: 46px; padding: 10px 18px; font-size: 14px; border-radius: 4px; color: var(--ink-2); }
.settings-nav .is-active { color: var(--brand-ink); background: var(--brand-bg-2); font-weight: 600; }
.modal-box { position: relative; border-radius: 9px; }
.modal-box:has(> h3):not(.document-editor) { padding: 26px; }
.dialog-close { position: absolute; right: 10px; top: 10px; }
.workflow-steps { display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); color: var(--brand-ink); font-size: 13px; font-weight: 600; }
.bulk-dialog { width: min(1050px, 96vw); max-width: 1050px; }
.document-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; width: min(1360px, 97vw); max-width: 1360px; padding: 28px; }
.document-editor > h3 { grid-column: 1/-1; margin: 0; }
.document-editor #doc-form { min-width: 0; }
.document-preview { background: var(--bg-2); padding: 18px; border-radius: 5px; min-width: 0; align-self: start; position: sticky; top: 0; }
.preview-caption { font-size: 12px; color: var(--ink-2); margin-bottom: 15px; display: flex; justify-content: space-between; }
.preview-caption span { color: var(--brand-ink); }
.document-paper { background: white; min-height: 580px; padding: 32px 24px; box-shadow: 0 1px 5px #322a2b12; font-size: 11px; }
.document-paper h2 { font-size: 22px; text-align: center; letter-spacing: .4em; font-weight: 700; margin-bottom: 24px; }
.document-paper h3 { font-size: 15px; font-weight: 600; }
.document-paper .preview-date, .preview-issuer { text-align: right; margin: 15px 0; }
.preview-amount { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); margin: 22px 0; padding: 8px 0; }
.preview-amount strong { font-size: 18px; }
.document-paper table { width: 100%; border-collapse: collapse; font-size: 10px; }
.document-paper th { background: var(--bg-2); }
.document-paper td, .document-paper th { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.document-paper td:first-child, .document-paper th:first-child { text-align: left; }
.document-paper dl { margin: 15px 0 20px auto; width: 180px; }
.document-paper dl > div { display: flex; justify-content: space-between; margin-bottom: 7px; }
.login-wrap { background: var(--bg); }
.login-card { padding: 42px 36px; border-radius: 9px; box-shadow: 0 8px 32px #322a2b08; }
.login-brand p { margin-top: 10px; line-height: 1.8; }
.appgrid-btn { border-radius: 7px; box-shadow: none; min-height: 116px; justify-content: center; gap: 13px; }
.appgrid-cap { font-size: 14px; margin-bottom: 12px; letter-spacing: .02em; color: var(--ink); }
.appgrid-sec { margin-bottom: 24px; }
.appgrid-nm { color: var(--ink); font-size: 12px; }
.appgrid-ico { border-radius: 9px; }
#home-summary { margin-top: 25px; margin-bottom: 30px; }
.dashboard-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin: 26px 0; }
.dashboard-priorities, .dashboard-deadlines { padding: 22px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.dashboard-priorities h3, .dashboard-deadlines h3 { font-size: 16px; font-weight: 700; margin-bottom: 15px; }
.dashboard-priorities .alert-row { border: 0 !important; border-bottom: 1px solid var(--line-soft) !important; border-radius: 0; background: transparent !important; min-height: 62px; }
.deadline-item { display: block; text-align: left; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.deadline-item strong { display: block; font-size: 14px; }
.deadline-item small { color: var(--ink-2); }
#portal .bg-blue-900 { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
#portal .text-blue-200 { color: var(--ink-2); }
#portal input[type=number] { min-width: 0; width: 100%; }
#portal .bg-white\/15 { background: var(--brand-bg); color: var(--brand-ink); }
.portal-assignment-picker { border: 1px solid var(--line); border-radius: 6px; background: white; padding: 14px; }
.portal-assignment-picker label { display: block; font-weight: 600; margin-bottom: 8px; }
.portal-job-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 20px; }
.portal-job-card { border: 1px solid var(--line); padding: 20px; border-radius: 6px; }
.portal-job-card h3 { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.portal-job-card p { margin-top: 8px; font-size: 13px; }
.portal-stage { display: flex; justify-content: space-between; gap: 6px; margin-top: 18px; font-size: 11px; color: var(--ink-3); }
.portal-stage span { padding-top: 9px; border-top: 3px solid var(--line); flex: 1; }
.portal-stage .is-done { color: var(--brand-ink); border-color: var(--brand); }
@media (min-width: 1100px) { .appgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; } }
@media (max-width: 1250px) { .record-workspace:not(.workorder-workspace) { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; } .page-main { padding-inline: 22px; } }
@media (max-width: 1023px) { .page-main { padding: 22px 18px calc(var(--navh) + 30px); } .appbar-row { padding-inline: 16px; } .record-workspace:not(.workorder-workspace) { grid-template-columns: minmax(0, 1fr) 275px; } }
@media (max-width: 760px) {
  .page-main h2 { font-size: 22px; }
  .page-main > .workspace-heading { gap: 15px; margin-bottom: 20px; }
  .record-workspace, .record-workspace:not(.workorder-workspace), .settings-workspace, .dashboard-workspace { grid-template-columns: minmax(0, 1fr); }
  .record-detail { position: static; padding: 20px; }
  .record-fields > div { grid-template-columns: 100px minmax(0, 1fr); }
  .workspace-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .workspace-tabs button { padding-inline: 17px; white-space: nowrap; flex-shrink: 0; }
  .settings-nav { display: flex; overflow-x: auto; gap: 4px; }
  .settings-nav button { white-space: nowrap; }
  .document-editor { display: block; padding: 20px; }
  .document-preview { margin-top: 24px; position: static; padding: 12px; }
  .document-editor > h3 { margin-bottom: 20px; }
  .workflow-steps { gap: 9px; font-size: 11px; padding: 14px; }
  .portal-job-cards { grid-template-columns: 1fr; padding: 14px; }
  .appgrid-btn { min-height: 110px; padding-inline: 4px; }
  .appgrid-nm { font-size: 11px; }
  .show-sp { display: block; }
  .modal-box:has(> h3):not(.document-editor) { padding: 20px; }
}
@media print {
  body:has(.modal-box .print-area) .app-shell { display: none !important; }
  .record-detail, .workspace-tabs, .settings-nav, .workflow-steps, .dialog-close { display: none !important; }
  .page-main, .modal-box { padding: 0; }
  .record-workspace { display: block; }
  .column-hidden { display: table-cell !important; }
  .data-table tr.is-selected td { background: white; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
