:root {
  --bg: #17191b;
  --sidebar: #202224;
  --surface: #24272a;
  --surface-2: #2b2e31;
  --surface-3: #32363a;
  --line: #3a3e42;
  --line-soft: #303438;
  --text: #f0f2f3;
  --muted: #a3aaaf;
  --muted-2: #929a9f;
  --brand: #ef0b35;
  --brand-dark: #bf082a;
  --green: #55b981;
  --amber: #e4b85c;
  --red: #e26464;
  --blue: #6e9fda;
  color-scheme: dark;
}

* { box-sizing: border-box; }
.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; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 20px; border-right: 1px solid #35383b; background: var(--sidebar); }
.brand { display: block; padding: 0 5px 24px; text-decoration: none; }
.brand img { display: block; width: 100%; height: 72px; object-fit: cover; object-position: 52% 37%; border: 1px solid #393c3f; border-radius: 10px; background: #070809; }
.brand span { display: block; margin-top: 9px; color: #c3c8cb; font-size: 10px; font-weight: 700; letter-spacing: .17em; text-align: center; text-transform: uppercase; }
.main-nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.nav-heading { margin: 5px 11px 9px; color: #737b80; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-heading-secondary { margin-top: 22px; }
.nav-item { min-height: 43px; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 0 11px; border-radius: 8px; color: #b0b7bb; font-size: 12px; font-weight: 650; text-decoration: none; }
.nav-item:hover, .nav-item:focus-visible { color: #fff; background: #2d3033; outline: none; }
.nav-item.active { color: #fff; background: #34373a; box-shadow: inset 3px 0 var(--brand); }
.nav-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #45494d; border-radius: 7px; color: #d7dbdd; font-size: 8px; font-weight: 850; }
.nav-item.active .nav-icon { border-color: #82404e; color: #fff; background: #522934; }
.sidebar-status { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 10px 0; border-top: 1px solid var(--line-soft); }
.sidebar-status div { display: grid; gap: 3px; }
.sidebar-status strong { color: #d8dcde; font-size: 10px; }
.sidebar-status small { color: #777f84; font-size: 8px; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgb(85 185 129 / 14%); }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 68px; display: flex; align-items: center; gap: 20px; padding: 0 clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--line-soft); background: rgb(32 34 36 / 94%); backdrop-filter: blur(12px); }
.mobile-menu { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.global-search { width: min(520px, 48vw); height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #1b1d1f; }
.global-search > span { color: #858d92; font-size: 21px; transform: rotate(-12deg); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
input::placeholder, textarea::placeholder { color: #6f777c; }
.account-chip { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fcecef; background: #542a34; font-size: 9px; font-weight: 850; }
.avatar.large { width: 49px; height: 49px; border-radius: 13px; font-size: 12px; }
.account-copy { min-width: 110px; display: grid; gap: 2px; }
.account-copy strong { font-size: 10px; }
.account-copy small { color: var(--muted-2); font-size: 8px; }
.logout-button { width: 30px; height: 30px; border: 0; border-radius: 7px; color: #8f979c; background: transparent; cursor: pointer; }
.logout-button:hover { color: white; background: var(--surface-3); }

.content { width: min(1480px, 100%); margin: 0 auto; padding: 34px clamp(20px, 3vw, 42px) 52px; }
.page-heading { margin-bottom: 24px; }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 7px; color: #c87082; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.025em; }
.lead { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
h2 { margin: 0; font-size: 15px; }
h3 { margin: 0; font-size: 12px; }

.primary-button, .secondary-button, .ghost-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border-radius: 8px; font-size: 10px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid #fc2850; color: #fff; background: var(--brand); box-shadow: 0 7px 18px rgb(239 11 53 / 15%); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { border: 1px solid #4b5054; color: #e5e8ea; background: var(--surface-3); }
.secondary-button:hover { background: #3a3e42; }
.ghost-button { border: 1px solid transparent; color: var(--muted); background: transparent; }
.ghost-button:hover { color: white; background: var(--surface-3); }
.full { width: 100%; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.text-link { color: #e48da0; font-size: 9px; font-weight: 800; text-decoration: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { min-height: 94px; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; color: inherit; background: var(--surface); box-shadow: 0 8px 22px rgb(0 0 0 / 9%); text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.metric-card:hover { border-color: #61686d; background: #292c2f; transform: translateY(-1px); }
.metric-card:focus-visible { outline: 2px solid #9f4d60; outline-offset: 2px; }
.metric-value { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.metric-value.amber { color: #f0ca7b; background: #4b3e26; }
.metric-value.red { color: #f08a8a; background: #4d2d2f; }
.metric-value.blue { color: #8eb7e5; background: #293c51; }
.metric-value.green { color: #7bd29f; background: #294438; }
.metric-card > div { min-width: 0; display: grid; gap: 5px; }
.metric-card strong { font-size: 10px; }
.metric-card small { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.metric-chevron { margin-left: auto; color: #8f979c; font-size: 21px; line-height: 1; }

.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 8px 22px rgb(0 0 0 / 8%); overflow: hidden; }
.panel-head { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head > div { display: grid; gap: 4px; }
.panel-head p { margin: 0; color: var(--muted-2); font-size: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 14px; }
.order-row { min-height: 63px; display: grid; grid-template-columns: 4px minmax(230px, 1fr) auto minmax(90px, 150px) 15px; align-items: center; gap: 13px; padding: 8px 15px 8px 0; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: #292c2f; }
.priority-bar { align-self: stretch; width: 3px; border-radius: 0 3px 3px 0; background: #71787d; }
.priority-bar.red { background: var(--red); }.priority-bar.orange { background: #dd914f; }.priority-bar.amber { background: var(--amber); }.priority-bar.blue { background: var(--blue); }
.order-copy { min-width: 0; display: grid; gap: 2px; }
.order-copy > small { color: #8e969b; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.order-copy > strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-copy > span { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.order-assignee { overflow: hidden; color: #aab0b4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.chevron, .row-link { color: #868e93; font-size: 18px; text-decoration: none; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 0 8px; border-radius: 6px; color: #cdd2d5; background: #3b3f43; font-size: 8px; font-weight: 800; white-space: nowrap; }
.status-pill.large { min-height: 30px; padding: 0 12px; font-size: 9px; }
.work-order-heading-copy { display: grid; justify-items: start; }
.work-order-heading-copy h1 { font-size: clamp(23px, 2.3vw, 30px); }
.work-order-heading-status { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.work-order-heading-status small { color: var(--muted-2); font-size: 9px; }
.status-pill.work-order-status { min-height: 35px; padding: 0 14px; border-radius: 8px; font-size: 11px; }
.status-pill.green, .status-pill.teal { color: #8ad9ad; background: #29473a; }
.status-pill.amber, .status-pill.orange { color: #edc878; background: #4a3e28; }
.status-pill.red { color: #ef9999; background: #4b2e30; }
.status-pill.blue, .status-pill.indigo { color: #94b9e3; background: #2b3e53; }
.status-pill.slate { color: #c3c9cc; background: #3a3e42; }
.schedule-list { padding: 6px 17px; }
.schedule-row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-soft); border-radius: 7px; color: inherit; text-decoration: none; transition: background .16s ease; }
.schedule-row:hover { background: #292c2f; }
.schedule-row:focus-visible { outline: 2px solid #9f4d60; outline-offset: 2px; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row time { width: 42px; height: 46px; display: grid; place-items: center; align-content: center; border-radius: 9px; color: #e8c57a; background: #463b27; }
.schedule-row time strong { font-family: Georgia, serif; font-size: 16px; line-height: 1; }
.schedule-row time span { margin-top: 3px; font-size: 7px; }
.schedule-row > div { min-width: 0; display: grid; gap: 3px; }
.schedule-row > div strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-row > div span, .schedule-row > div small { color: var(--muted-2); font-size: 8px; }
.panel-button { width: calc(100% - 34px); margin: 8px 17px 16px; }
.system-note { min-height: 58px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 15px; border: 1px solid #464a4d; border-radius: 10px; background: #292c2f; }
.system-note.important { margin-top: 0; }
.system-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #ffd2da; background: #542a34; font-size: 9px; font-weight: 850; }
.system-note > div { display: grid; gap: 3px; }
.system-note strong { font-size: 9px; }
.system-note p { margin: 0; color: var(--muted-2); font-size: 8px; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 11px 13px; border: 1px solid #50555a; border-radius: 8px; color: #dfe3e5; background: #303438; font-size: 10px; }
.flash.success { border-color: #3e7057; color: #9fe0ba; background: #294237; }
.flash.error { border-color: #794047; color: #f2a5ac; background: #452b2e; }
.empty-state { padding: 42px 20px; color: var(--muted); text-align: center; }
.empty-state.small { padding: 24px 16px; }
.empty-state strong { display: block; color: var(--text); font-size: 11px; }
.empty-state p { margin: 7px 0 16px; font-size: 9px; }

.mini-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.mini-stats span { min-width: 125px; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 8px; }
.mini-stats strong { color: var(--text); font-family: Georgia, serif; font-size: 18px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line-soft); }
.filter-search { display: flex; align-items: center; gap: 8px; }
.filter-search span { color: #8b9398; font-size: 18px; }
.filter-search input { width: 100%; border: 0; background: transparent; outline: 0; }
input, select, textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #454a4e; border-radius: 7px; color: var(--text); background: #1c1e20; outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #a94c61; box-shadow: 0 0 0 3px rgb(239 11 53 / 9%); }
select { width: auto; min-width: 145px; }
.filter-search { min-height: 39px; padding: 0 11px; border: 1px solid #454a4e; border-radius: 7px; background: #1c1e20; }
.asset-tree-result { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 15px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-size: 9px; }
.asset-tree-result strong { color: var(--text); font-size: 10px; }
.asset-tree, .asset-tree-children { margin: 0; padding: 0; list-style: none; }
.asset-tree-item { border-top: 1px solid var(--line-soft); }
.asset-tree > .asset-tree-item:first-child { border-top: 0; }
.asset-tree-branch > summary { list-style: none; }
.asset-tree-branch > summary::-webkit-details-marker { display: none; }
.asset-tree-row { min-height: 62px; display: grid; grid-template-columns: minmax(260px, 1fr) 105px 82px 56px 18px; align-items: center; gap: 12px; padding: 8px 15px; }
.asset-tree-row:hover { background: #292c2f; }
.asset-tree-main { min-width: 0; display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 10px; }
.asset-tree-label { min-width: 0; display: grid; gap: 3px; }
.asset-tree-label a { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.asset-tree-label a:hover { color: #f0a4b4; }
.asset-tree-label small { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.asset-tree-kind, .asset-tree-orders { color: #abb2b6; font-size: 9px; }
.asset-tree-orders { text-align: right; }
.asset-tree-expand { color: #8f979c; font-size: 19px; line-height: 1; transition: transform .18s ease; }
.asset-tree-branch[open] > summary .asset-tree-expand { transform: rotate(180deg); }
.asset-tree-children { margin: 0 0 0 28px; padding-left: 13px; border-left: 1px solid #4a4e52; background: #1f2224; }
.asset-tree-children .asset-tree-row { min-height: 58px; }
.asset-tree-item.matched > .asset-tree-row,
.asset-tree-item.matched > .asset-tree-branch > .asset-tree-row { box-shadow: inset 3px 0 #9f4d60; background: rgb(103 48 61 / 12%); }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 9px; }
th { height: 38px; padding: 0 12px; color: #7f888d; background: #292c2f; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { max-width: 320px; min-height: 51px; padding: 11px 12px; border-top: 1px solid var(--line-soft); color: #c8cdd0; vertical-align: middle; }
tbody tr:hover { background: #292c2f; }
.archived-row { opacity: .68; }
.archived-row:hover { opacity: 1; }
.archived-accounts { width: 100%; }
.archived-accounts-summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; color: #c8cdd0; background: #242729; cursor: pointer; list-style: none; }
.archived-accounts-summary::-webkit-details-marker { display: none; }
.archived-accounts-summary:hover { background: #292c2f; }
.archived-accounts-summary > div { display: grid; gap: 3px; }
.archived-accounts-summary strong { font-size: 10px; }
.archived-accounts-summary small { color: var(--muted-2); font-size: 8px; }
.archived-accounts-expand { color: #8f979c; font-size: 19px; line-height: 1; transition: transform .18s ease; }
.archived-accounts[open] > .archived-accounts-summary .archived-accounts-expand,
.active-accounts[open] > .archived-accounts-summary .archived-accounts-expand { transform: rotate(180deg); }
.user-create-panel { max-width: 980px; }
.collapsible-panel-summary { border-bottom: 0; cursor: pointer; list-style: none; }
.collapsible-panel-summary::-webkit-details-marker { display: none; }
.user-create-panel[open] > .collapsible-panel-summary { border-bottom: 1px solid var(--line-soft); }
.collapsible-panel-expand { color: #8f979c; font-size: 19px; line-height: 1; transition: transform .18s ease; }
.user-create-panel[open] > .collapsible-panel-summary .collapsible-panel-expand { transform: rotate(180deg); }
.collapsible-panel-body { padding: 21px; }
.account-identity-editor { min-width: 205px; margin-top: 6px; }
.account-identity-editor .compact-form { margin-top: 9px; }
.account-delete-editor { min-width: 225px; margin-top: 8px; }
.account-delete-editor .compact-form { margin-top: 9px; padding: 10px; border: 1px solid #66363d; border-radius: 6px; background: #2b2224; }
.account-delete-editor p { margin: 0; color: #caaeb2; font-size: 8px; line-height: 1.45; }
.danger-text { color: #e59a9a; }
.danger-button { min-height: 34px; padding: 0 12px; border: 1px solid #81414b; border-radius: 5px; color: #fff; background: #6b3039; font-size: 8px; font-weight: 800; cursor: pointer; }
.danger-button:hover { background: #813b46; }
.archive-button { color: #e59a9a; }
.archive-button:hover { color: #fff; background: #633139; }
td > small { display: block; overflow: hidden; max-width: 330px; margin-top: 3px; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.table-title { color: #f0f2f3; font-size: 9px; font-weight: 750; text-decoration: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.priority-label { font-size: 8px; }.priority-label.red { color: #ef9999; }.priority-label.orange { color: #e8a56d; }.priority-label.amber { color: #e9c77e; }.priority-label.blue { color: #8db7e5; }

.form-panel { max-width: 980px; padding: 21px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .form-stack label { display: grid; gap: 7px; color: #bdc3c6; font-size: 9px; font-weight: 700; }
.form-grid label small, .form-stack label small { color: var(--muted-2); font-size: 8px; font-weight: 400; }
.form-grid select, .form-stack select { width: 100%; }
.form-grid .span-two { grid-column: 1 / -1; }
.checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.checkbox input { width: 16px; min-height: 16px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line-soft); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 14px; }
.detail-grid.wide-left { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .7fr); align-items: start; }
.stack { display: grid; gap: 14px; }
.section-gap { margin-top: 14px; }
.detail-card { align-self: start; }
.asset-image-panel { min-height: 360px; display: flex; flex-direction: column; margin: 0; background: #17191b; }
.asset-image-panel > a { min-height: 300px; flex: 1; display: grid; place-items: center; overflow: hidden; background: #111315; }
.asset-image-panel img { display: block; width: 100%; height: 100%; max-height: 470px; object-fit: contain; }
.asset-image-panel figcaption { display: grid; gap: 3px; padding: 12px 15px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.asset-image-panel figcaption strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.asset-image-panel figcaption small { color: var(--muted-2); font-size: 10px; }
.detail-list { margin: 0; padding: 8px 18px 15px; }
.detail-list > div { min-height: 39px; display: grid; grid-template-columns: minmax(110px, .8fr) minmax(130px, 1.2fr); align-items: center; gap: 15px; border-bottom: 1px solid var(--line-soft); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted-2); font-size: 8px; }
.detail-list dd { margin: 0; color: #d7dbdd; font-size: 9px; text-align: right; }
.detail-copy { padding: 17px 18px; color: #c2c8cb; font-size: 10px; line-height: 1.7; white-space: pre-line; }
.detail-copy > p { min-height: 72px; margin: 0; padding: 10px 11px; border: 1px solid #454a4e; border-radius: 7px; color: var(--text); background: #1c1e20; font-size: 12px; line-height: 1.6; }
.detail-description-form { display: grid; gap: 10px; }
.detail-description-form textarea { min-height: 116px; font-size: 12px; line-height: 1.6; }
.detail-description-form .secondary-button { justify-self: end; }
.detail-copy h3 { margin-bottom: 8px; }
.root-cause-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 18px; }
.root-cause-grid > div { padding: 11px; border: 1px solid var(--line-soft); border-radius: 8px; background: #202326; }
.root-cause-grid small { color: var(--muted-2); font-size: 7px; text-transform: uppercase; }
.root-cause-grid p { margin: 5px 0 0; font-size: 8px; }
.simple-list > a, .person-line { min-height: 57px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 15px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.simple-list > a:last-child, .person-line:last-child { border-bottom: 0; }
.simple-list > a:hover { background: #292c2f; }
.simple-list > a > span:nth-child(2), .person-line > span:nth-child(2) { display: grid; gap: 3px; }
.simple-list strong, .person-line strong { font-size: 9px; }
.simple-list small, .person-line small { color: var(--muted-2); font-size: 8px; }
.type-chip { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #e8a4b3; background: #492a32; font-size: 7px; font-weight: 850; }

.task-list { padding: 3px 16px; }
.task-row { min-height: 52px; display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.task-row:last-child { border-bottom: 0; }
.task-copy { display: grid; gap: 3px; }
.task-row-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.task-row strong { font-size: 9px; }
.task-row span { color: var(--muted-2); font-size: 8px; }
.task-row.done strong { color: #7e878c; text-decoration: line-through; }
.task-check { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #51575b; border-radius: 6px; color: #85d8a9; background: #1d2022; font-size: 10px; cursor: pointer; }
.task-row.done .task-check { border-color: #3d7255; background: #294238; }
.task-delete { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #858d92; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; }
.task-delete:hover, .task-delete:focus-visible { color: #fff; background: #6b3038; outline: none; }
.work-order-delete { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #633940; border-radius: 8px; color: #d58b96; background: #2b2325; font-size: 21px; line-height: 1; cursor: pointer; }
.work-order-delete svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.work-order-delete:hover, .work-order-delete:focus-visible { border-color: #8a424d; color: #fff; background: #6b3038; outline: none; }
.result-pill { padding: 4px 6px; border-radius: 5px; background: var(--surface-3); }
.inline-add { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(180px, 260px) auto; gap: 8px; padding: 12px 16px 15px; border-top: 1px solid var(--line-soft); }
.inline-add select { width: 100%; }
.primary-assignee-picker { border-bottom: 1px solid var(--line-soft); }
.primary-assignee-picker > summary { border-bottom: 0; cursor: pointer; list-style: none; }
.primary-assignee-picker > summary::-webkit-details-marker { display: none; }
.primary-assignee-picker > summary:hover { background: #292c2f; }
.assignee-picker-chevron { color: #929a9e; font-size: 16px; transition: transform .16s ease; }
.primary-assignee-picker[open] .assignee-picker-chevron { transform: rotate(180deg); }
.assignee-option-list { display: grid; gap: 5px; max-height: 310px; padding: 8px; overflow-y: auto; border-top: 1px solid var(--line-soft); background: #1c1f21; }
.assignee-option-list form { min-width: 0; }
.assignee-option { width: 100%; min-height: 48px; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.assignee-option:hover, .assignee-option:focus-visible { border-color: #4d5357; background: #292d30; outline: none; }
.assignee-option.selected { border-color: #704550; background: #35272b; }
.assignee-option > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.assignee-option strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.assignee-option small { color: var(--muted-2); font-size: 8px; }
.assignee-option > b { color: #aeb5b9; }
.assignee-option.selected > b { color: #85d8a9; }
.assignee-clear-form { padding-top: 4px; border-top: 1px solid var(--line-soft); }
.assignee-clear { width: 100%; min-height: 37px; border: 0; border-radius: 7px; color: #d28b95; background: transparent; font-size: 8px; font-weight: 750; cursor: pointer; }
.assignee-clear:hover, .assignee-clear:focus-visible { color: #fff; background: #5d3037; outline: none; }
.attachment-upload { min-width: 34px; }
.attachment-upload > summary { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #51575b; border-radius: 8px; color: #d5dadd; background: #25282a; font-size: 19px; line-height: 1; cursor: pointer; list-style: none; }
.attachment-upload > summary::-webkit-details-marker { display: none; }
.attachment-upload > summary:hover, .attachment-upload > summary:focus-visible { border-color: #7a4b56; color: #fff; background: #3a2a2e; outline: none; }
.attachment-upload[open] { width: min(330px, 55vw); }
.attachment-upload[open] > summary { margin-left: auto; }
.attachment-upload form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 9px; }
.attachment-upload label { display: grid; gap: 5px; color: #bdc3c6; font-size: 8px; font-weight: 700; }
.attachment-upload input[type="file"] { min-height: 36px; padding: 6px; font-size: 8px; }
.attachment-row { min-height: 57px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line-soft); }
.attachment-row:last-child { border-bottom: 0; }
.attachment-main { min-width: 0; min-height: 56px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 8px 9px 15px; color: inherit; text-decoration: none; }
a.attachment-main:hover { background: #292c2f; }
.attachment-main > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.attachment-main strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-main small { color: var(--muted-2); font-size: 8px; }
.attachment-unavailable { color: #8e969a; }
.attachment-delete-form { padding-right: 10px; }
.attachment-delete { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #858d92; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; }
.attachment-delete:hover, .attachment-delete:focus-visible { color: #fff; background: #6b3038; outline: none; }
.report-presets { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.report-presets a { min-height: 31px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #454a4e; border-radius: 7px; color: #c8ced1; background: #25282a; font-size: 8px; font-weight: 750; text-decoration: none; }
.report-presets a:hover, .report-presets a:focus-visible { border-color: #79505a; color: #fff; background: #33282b; outline: none; }
.report-filter-form { display: grid; gap: 19px; padding: 18px; }
.report-date-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 260px)); gap: 12px; }
.report-date-grid label { display: grid; gap: 7px; color: #bdc3c6; font-size: 9px; font-weight: 700; }
.report-type-fieldset { margin: 0; padding: 0; border: 0; }
.report-type-fieldset legend { margin-bottom: 10px; color: #bdc3c6; font-size: 9px; font-weight: 700; }
.report-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.report-type-option { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #41464a; border-radius: 8px; color: #cbd0d3; background: #202326; font-size: 8px; font-weight: 700; cursor: pointer; }
.report-type-option:has(input:checked) { border-color: #754653; color: #fff; background: #35272b; }
.report-type-option input { width: 16px; min-height: 16px; accent-color: #9f4d60; }
.report-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.report-preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 25px 0 12px; }
.report-preview-heading h2 { margin-top: 4px; font-family: Georgia, serif; font-size: 18px; }
.report-preview-heading > span { color: var(--muted-2); font-size: 8px; }
.report-metrics .metric-card { cursor: default; }
.report-metrics .metric-value { width: auto; min-width: 52px; flex: 0 0 auto; box-sizing: border-box; padding: 0 10px; white-space: nowrap; }
.report-metrics .metric-card > div { flex: 1 1 auto; }
.report-metrics .metric-card strong { line-height: 1.3; overflow-wrap: anywhere; }
.report-metrics .metric-card:hover { border-color: var(--line); background: var(--surface); transform: none; }
.report-preview-grid { grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); }
.report-explanation .detail-copy { display: grid; gap: 11px; }
.report-explanation .detail-copy p { margin: 0; }
.ai-readonly-badge { min-height: 33px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #3d6651; border-radius: 8px; color: #9bd9b3; background: #25382f; font-size: 9px; font-weight: 800; }
.ai-readonly-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #68c78e; box-shadow: 0 0 0 3px rgb(104 199 142 / 12%); }
.ai-chat-panel { min-height: min(680px, calc(100vh - 170px)); display: grid; grid-template-rows: minmax(360px, 1fr) auto auto; overflow: hidden; }
.ai-messages { display: flex; flex-direction: column; gap: 13px; max-height: calc(100vh - 315px); min-height: 360px; padding: 20px; overflow-y: auto; }
.ai-message { max-width: min(760px, 88%); display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; }
.ai-message.user { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.ai-message > div { min-width: 0; display: grid; gap: 6px; padding: 11px 13px; border: 1px solid #3d4245; border-radius: 10px 10px 10px 3px; background: #25282a; }
.ai-message.user > div { border-color: #704653; border-radius: 10px 10px 3px 10px; background: #3a292e; }
.ai-message strong { color: #e1e4e6; font-size: 9px; }
.ai-message p { margin: 0; color: #c0c6c9; font-size: 11px; line-height: 1.6; }
.ai-message-avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #754653; border-radius: 9px; color: #efb3bf; background: #3c2930; font-size: 9px; font-weight: 900; }
.ai-message.loading .ai-answer { color: #90989d; animation: ai-pulse 1.2s ease-in-out infinite; }
.ai-message.error > div { border-color: #733b43; background: #352427; }
.ai-answer { color: #cbd0d3; font-size: 11px; line-height: 1.6; }
.ai-answer > :first-child { margin-top: 0; }.ai-answer > :last-child { margin-bottom: 0; }
.ai-answer ul, .ai-answer ol { margin: 4px 0; padding-left: 20px; }
.ai-answer table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 9px; }
.ai-answer th, .ai-answer td { padding: 7px 8px; border: 1px solid #4a4f52; text-align: left; }
.ai-answer th { color: #fff; background: #3e2c31; }
.ai-suggestions { display: flex; gap: 7px; flex-wrap: wrap; padding-left: 44px; }
.ai-suggestions button { min-height: 34px; padding: 0 11px; border: 1px solid #444a4e; border-radius: 8px; color: #bfc5c8; background: #202326; font-size: 8px; cursor: pointer; }
.ai-suggestions button:hover, .ai-suggestions button:focus-visible { border-color: #79505a; color: #fff; background: #33282b; outline: none; }
.ai-question-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; padding: 13px; border-top: 1px solid var(--line-soft); background: #202326; }
.ai-question-form textarea { min-height: 53px; max-height: 150px; resize: vertical; font-size: 11px; line-height: 1.45; }
.ai-question-form .primary-button { min-height: 53px; }
.ai-data-note { margin: 0; padding: 0 14px 12px; color: #7f888d; background: #202326; font-size: 8px; }
@keyframes ai-pulse { 50% { opacity: .45; } }
.timeline { padding: 14px 18px; }
.timeline article { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 10px; padding-bottom: 15px; }
.timeline article::before { content: ''; position: absolute; left: 5px; top: 11px; bottom: -1px; width: 1px; background: #454a4e; }
.timeline article:last-child::before { display: none; }
.timeline article > span { z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 2px solid #232628; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px #71404b; }
.timeline article > div { display: grid; gap: 3px; }
.timeline strong { font-size: 9px; }.timeline p { margin: 0; color: #aeb5b9; font-size: 8px; }.timeline small { color: var(--muted-2); font-size: 7px; }
.action-panel { border-color: #60404a; }
.form-stack { display: grid; gap: 14px; }
.compact-form { padding: 15px; }

.card-grid { display: grid; gap: 13px; }
.plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.maintenance-asset-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: start; }
.maintenance-asset-group { min-width: 0; background: #202326; }
.maintenance-asset-group[open] { grid-column: 1 / -1; }
.maintenance-asset-summary { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 17px; cursor: pointer; list-style: none; }
.maintenance-asset-summary::-webkit-details-marker { display: none; }
.maintenance-asset-summary:hover { background: #292c2f; }
.maintenance-asset-summary > div:first-child { min-width: 0; display: grid; gap: 5px; }
.maintenance-asset-summary h2 { overflow: hidden; font-family: Georgia, serif; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-asset-summary p { margin: 0; overflow: hidden; color: var(--muted-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-asset-type { color: #c87082; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.maintenance-asset-actions { display: flex; align-items: center; gap: 13px; }
.maintenance-expand-icon { color: #9ca3a7; font-size: 20px; line-height: 1; transition: transform .18s ease; }
.maintenance-asset-group[open] .maintenance-expand-icon { transform: rotate(180deg); }
.maintenance-group-body { border-top: 1px solid var(--line-soft); background: #1b1d1f; }
.maintenance-group-toolbar { display: flex; justify-content: flex-end; padding: 12px 14px 0; }
.maintenance-group-grid { padding: 14px; }
.maintenance-plan-card { display: block; border-color: #383d40; color: inherit; background: var(--surface); text-decoration: none; }
.maintenance-plan-card:hover, .maintenance-plan-card:focus-visible { border-color: #79505a; background: #2a2e31; outline: none; transform: translateY(-1px); }
.maintenance-edit-form { max-width: none; }
.maintenance-edit-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.maintenance-edit-fields:disabled { opacity: .82; }
.plan-card { padding: 17px; }
.plan-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card header > small { color: var(--muted-2); font-size: 8px; }
.plan-card h2 { margin-top: 17px; font-family: Georgia, serif; font-size: 17px; }
.plan-card > p { min-height: 37px; margin: 8px 0 16px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.45; }
.plan-card dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.plan-card dl > div { display: grid; gap: 3px; padding: 9px; border-radius: 7px; background: #1f2224; }
.plan-card dt { color: var(--muted-2); font-size: 7px; }.plan-card dd { margin: 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.person-card { min-height: 135px; display: grid; grid-template-columns: 50px 1fr; gap: 14px; padding: 17px; }
.person-card > div { min-width: 0; }.person-card h2 { margin: 10px 0 5px; }.person-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.person-card small { display: block; margin-top: 12px; color: var(--muted-2); font-size: 8px; }
.attention-row { background: rgb(95 66 29 / 12%); }
.warning-text { color: #e7bb65; }
.stock-value { font-weight: 800; }.stock-value.low { color: #e8bd69; }
.adjust-popover { position: relative; }
.adjust-popover summary { color: #e293a4; font-size: 8px; font-weight: 800; cursor: pointer; }
.adjust-popover form { position: absolute; z-index: 5; right: 0; width: 240px; display: grid; gap: 9px; margin-top: 8px; padding: 13px; border: 1px solid #53585c; border-radius: 9px; background: #202326; box-shadow: 0 14px 35px rgb(0 0 0 / 38%); }
.adjust-popover label { display: grid; gap: 5px; font-size: 8px; }
.runs .run-row { min-height: 62px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.run-row > div { display: grid; gap: 3px; }.run-row strong { font-size: 9px; }.run-row small { color: var(--muted-2); font-size: 8px; }
.issue-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
.issue-row > div { display: grid; gap: 3px; }.issue-row strong { font-size: 9px; }.issue-row p { margin: 0; color: var(--muted); font-size: 8px; }.issue-row small { color: var(--muted-2); font-size: 7px; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 12%, #33373a 0, #1d1f21 40%, #151719 100%); }
.auth-card { width: min(520px, 100%); padding: 27px; border: 1px solid #45494d; border-radius: 14px; background: rgb(35 38 40 / 96%); box-shadow: 0 24px 70px rgb(0 0 0 / 35%); }
.auth-card.compact { width: min(430px, 100%); }
.auth-logo { width: 100%; height: 142px; margin-bottom: 24px; border: 1px solid #3e4245; border-radius: 10px; object-fit: cover; object-position: 50% 45%; background: #08090a; }
.auth-card h1 { font-size: 30px; }.auth-card .lead { margin-bottom: 22px; }
.auth-alternative { display: grid; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); text-align: center; }
.auth-alternative strong { font-size: 11px; }
.auth-alternative p { margin: 0 0 3px; color: var(--muted-2); font-size: 9px; line-height: 1.5; }

/* Compact like Fiix, but large enough for workshop displays and touch screens. */
table { font-size: 12px; }
th { font-size: 10px; }
td > small, .mono, .priority-label { font-size: 10px; }
.table-title, .form-grid label, .form-stack label, .detail-list dd,
.simple-list strong, .person-line strong, .task-row strong, .timeline strong,
.run-row strong, .issue-row strong { font-size: 12px; }
.form-grid label small, .form-stack label small, .detail-list dt,
.simple-list small, .person-line small, .task-row span, .timeline p,
.timeline small, .run-row small, .issue-row p, .issue-row small,
.system-note p, .system-note strong { font-size: 10px; }
.primary-button, .secondary-button, .ghost-button { font-size: 11px; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 80px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { padding-inline: 0; }.brand img { height: 48px; object-position: 50% 35%; }.brand span { display: none; }
  .nav-heading, .nav-item > span:last-child, .sidebar-status > div { display: none; }
  .nav-item { justify-content: center; padding: 0; }.nav-icon { width: 32px; height: 32px; }
  .sidebar-status { justify-content: center; padding-inline: 0; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plans-grid, .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maintenance-asset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -250px; width: 238px; transition: left .2s ease; box-shadow: 12px 0 40px rgb(0 0 0 / 45%); }
  .sidebar.open { left: 0; }
  .sidebar .brand span, .sidebar .nav-heading, .sidebar .nav-item > span:last-child, .sidebar .sidebar-status > div { display: block; }
  .sidebar .nav-item { justify-content: flex-start; padding: 0 11px; }
  .sidebar .sidebar-status { justify-content: flex-start; padding-inline: 10px; }
  .mobile-menu { display: grid; place-items: center; }
  .topbar { gap: 10px; }.global-search { flex: 1; width: auto; }.account-copy { display: none; }
  .dashboard-grid, .detail-grid, .detail-grid.wide-left { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }.filter-search { grid-column: 1 / -1; }
  .asset-tree-row { grid-template-columns: minmax(210px, 1fr) 82px 18px; }
  .asset-tree-kind, .asset-tree-orders { display: none; }
  .order-row { grid-template-columns: 4px 1fr auto 15px; }.order-assignee { display: none; }
}

@media (max-width: 600px) {
  .content { padding-top: 25px; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid, .plans-grid, .people-grid { grid-template-columns: 1fr; }
  .report-type-grid, .report-date-grid, .report-preview-grid { grid-template-columns: 1fr; }
  .report-form-actions { align-items: stretch; flex-direction: column; }
  .report-form-actions .primary-button, .report-form-actions .secondary-button { justify-content: center; }
  .ai-chat-panel { min-height: calc(100vh - 130px); }
  .ai-messages { max-height: none; padding: 14px; }
  .ai-message { max-width: 95%; }
  .ai-suggestions { padding-left: 0; }
  .ai-question-form { grid-template-columns: 1fr; }
  .ai-question-form .primary-button { min-height: 42px; justify-content: center; }
  .maintenance-asset-list { grid-template-columns: 1fr; }
  .maintenance-asset-summary { min-height: 92px; align-items: flex-start; flex-direction: column; }
  .maintenance-asset-actions { width: 100%; justify-content: space-between; }
  .form-grid.two { grid-template-columns: 1fr; }.form-grid .span-two { grid-column: auto; }
  .filter-bar { grid-template-columns: 1fr; }.filter-search { grid-column: auto; }.filter-bar select { width: 100%; }
  .asset-tree-row { grid-template-columns: minmax(180px, 1fr) 18px; padding-inline: 10px; }
  .asset-tree-row > .status-pill { display: none; }
  .asset-tree-children { margin-left: 14px; padding-left: 6px; }
  .system-note { grid-template-columns: 34px 1fr; }.system-note > .status-pill { display: none; }
  .detail-list > div { grid-template-columns: 1fr; align-items: start; gap: 4px; padding: 10px 0; }
  .detail-list dd { text-align: left; }
  .asset-image-panel { min-height: 300px; }.asset-image-panel > a { min-height: 240px; }
  .inline-add { grid-template-columns: 1fr; }
  .root-cause-grid { grid-template-columns: 1fr; }
  .auth-shell { padding: 14px; }.auth-card { padding: 20px; }.auth-logo { height: 110px; }
}
