:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172c27;
  background: #f4f6f2;
  font-synthesis: none;
  --ink: #172c27;
  --muted: #53665e;
  --line: #dce4dc;
  --green: #174e3f;
  --leaf: #dfede1;
  --panel: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid #498977; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
p, small { color: var(--muted); }
small { font-size: .79rem; }
a { color: var(--green); }
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 30px 16px 18px; background: #102f29; color: #f5faf6; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 33px; font-weight: 750; letter-spacing: -.07em; line-height: .95; }
.brand small { display: block; color: #a8c9bb; font-size: 8px; font-weight: 750; letter-spacing: .20em; margin: 6px 0 0 2px; }
.brand-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: none; color: #153b2e; border-radius: 15px; background: #bbebaa; }
.sidebar .brand { margin-left: 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; margin-top: 48px; }
.nav-label { color: #a3c0b4; font-size: 10px; font-weight: 750; letter-spacing: .15em; padding: 0 12px 9px; }
.sidebar nav button { border: 0; background: transparent; display: flex; align-items: center; gap: 11px; text-align: left; color: #c9ddd4; padding: 12px; border-radius: 8px; font-size: .88rem; min-height: 44px; }
.sidebar nav button:hover, .sidebar nav .nav-active { background: #23483e; color: #fff; }
.sidebar nav .nav-active svg { color: #b9e8a9; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #345449; padding: 16px 2px 0; display: flex; align-items: center; gap: 10px; font-size: .79rem; min-width: 0; }
.sidebar-bottom strong, .sidebar-bottom small { display: block; }
.sidebar-bottom small { color: #b1cbbf; font-size: .69rem; }
.sidebar-bottom button { background: transparent; color: #cfe3d9; border: 0; padding: 7px; margin-left: auto; }
.avatar, .top-avatar { width: 34px; height: 34px; border-radius: 50%; background: #dcece1; color: #245342; display: grid; place-items: center; flex: none; font-size: .72rem; font-weight: 800; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); font-size: .83rem; }
.topbar > div { display: flex; gap: 11px; align-items: center; }
.crumb, .slash { color: var(--muted); }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 30px; padding: 5px 9px; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.demo-badge i { width: 7px; height: 7px; border-radius: 50%; background: #498664; }
.main { max-width: 1600px; margin: 0 auto; padding: 32px 34px 60px; }
.page-heading, .shift-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(1.8rem, 3.5vw, 2.65rem); letter-spacing: -.045em; line-height: 1.12; margin-bottom: 7px; font-weight: 720; }
.page-heading p, .shift-heading p { font-size: .92rem; line-height: 1.5; }
.eyebrow { color: var(--green); font-size: .68rem; font-weight: 800; letter-spacing: .13em; margin-bottom: 8px; }
.button { border: 1px solid #cddad0; border-radius: 8px; min-height: 36px; padding: 7px 11px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; background: #fff; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.button:hover { background: #edf5ee; }
.button.primary { background: var(--green); color: #fff; border-color: var(--green); min-height: 40px; padding: 8px 14px; }
.button.primary:hover { background: #22614f; }
.button.small { min-height: 32px; font-size: .75rem; }
.button.quiet { border-color: transparent; font-size: 1.2rem; }
.text-link { border: 0; padding: 0; color: #235d4b; font-size: .82rem; font-weight: 680; background: transparent; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; text-align: left; }
.text-link:hover { text-decoration: underline; }
.filters { background: #fff; border: 1px solid var(--line); padding: 14px 16px 16px; border-radius: 12px; margin-bottom: 19px; }
.filter-head, .filter-head span { display: flex; align-items: center; gap: 6px; }
.filter-head { justify-content: space-between; font-size: .85rem; font-weight: 720; margin-bottom: 11px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.filter-field, .field { display: flex; flex-direction: column; gap: 5px; color: #364b43; font-size: .79rem; font-weight: 650; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #ced9cf; border-radius: 7px; color: var(--ink); background: #fcfdfb; min-height: 37px; padding: 7px 9px; }
textarea { resize: vertical; }
.field small { font-weight: 450; }
.content { display: flex; flex-direction: column; gap: 19px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 15px 16px; min-width: 0; }
.metric-icon, .project-icon { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 10px; color: #286452; background: #e8f2e8; }
.metric > span:nth-child(2) { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.metric strong { font-size: clamp(1.2rem, 2.5vw, 2rem); letter-spacing: -.045em; line-height: 1.12; overflow-wrap: anywhere; }
.metric small { line-height: 1.4; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(220px, 1fr); gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 17px; }
.panel-head h2, .dialog h2 { font-size: 1.05rem; letter-spacing: -.015em; margin-bottom: 4px; }
.panel-head p { font-size: .8rem; line-height: 1.4; }
.panel-foot { padding: 13px 17px; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .82rem; }
th { background: #f6f8f4; color: #486057; white-space: nowrap; font-size: .72rem; font-weight: 700; padding: 9px 12px; }
td { border-top: 1px solid #ebefea; padding: 11px 12px; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 17px; }
td:last-child, th:last-child { padding-right: 17px; }
td small { display: block; margin-top: 3px; line-height: 1.32; }
td > .text-link { margin-top: 3px; }
td .button + .button { margin-left: 5px; }
.nowrap { white-space: nowrap; }
.pill { display: inline-flex; align-items: center; border-radius: 30px; background: #edf0eb; color: #42564d; padding: 4px 8px; font-weight: 700; font-size: .69rem; white-space: nowrap; }
.pill.present, .pill.approved, .pill.closed, .pill.passed, .pill.active, .pill.paid, .pill.released { background: #dff1e4; color: #235737; }
.pill.submitted, .pill.calculated { background: #e2eef6; color: #28536d; }
.pill.inspecting, .pill.ready { background: #fbefcf; color: #694d14; }
.pill.failed, .pill.absent, .pill.open { background: #f9e7e3; color: #853e37; }
.stages { padding: 0 17px 10px; }
.stage { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .84rem; }
.stage b { margin-left: auto; }
.stage-num { width: 31px; height: 31px; border-radius: 8px; background: #eef2ec; display: grid; place-items: center; font-size: .71rem; color: #4e655a; font-weight: 700; }
.stage-submitted { background: #e2eef6; }
.stage-inspecting { background: #fbefcf; }
.stage-approved { background: #dff1e4; }
.project-grid, .report-grid { padding: 0 17px 17px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.project-card { border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: #fbfcfa; text-align: left; display: flex; align-items: center; gap: 10px; }
.project-card:hover { background: #eef5ec; }
.project-card > span:nth-child(2) { flex: 1; }
.project-card small, .project-card strong { display: block; margin: 2px 0; }
.empty { padding: 18px 17px; background: #fafbf8; border-top: 1px solid #ebefea; border-radius: 0 0 12px 12px; color: var(--muted); font-size: .85rem; }
.shift-heading { margin: -5px 0 0; align-items: center; }
.shift-heading h2 { font-size: 1.55rem; margin: 3px 0; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hintbar { padding: 11px 13px; border: 1px solid #d3e4d7; border-radius: 8px; background: #edf5ed; font-size: .84rem; line-height: 1.4; }
.inside { margin: 0 16px 14px; }
.check-list { padding: 0 17px; }
.check-row { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #ebefea; font-size: .86rem; }
.check-row > div { flex: 1; }
.check-row small { display: block; margin: 3px 0; }
.check-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: none; background: #edf0eb; color: #4c665b; border-radius: 8px; font-size: .75rem; }
.check-icon.done { background: #dff1e4; color: #235737; }
.report-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.report-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.report-card h3 { font-size: 1.12rem; margin-top: 3px; }
.report-card p { margin: 11px 0; font-size: .85rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card ul { padding: 0; margin: 0; list-style: none; }
.report-card li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .75rem; padding: 7px 0; border-top: 1px solid var(--line); }
.report-card li b { white-space: nowrap; }
.cost-grid { display: flex; flex-wrap: wrap; gap: 13px; padding: 0 17px 15px; }
.cost-grid > div { flex: 1 1 120px; background: #f6f8f4; border-radius: 8px; padding: 11px; font-size: .83rem; }
.cost-grid dt { color: var(--muted); margin-bottom: 5px; }
.cost-grid dd { font-weight: 700; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.segmented button { border: 0; padding: 6px 9px; background: transparent; font-size: .77rem; border-radius: 5px; }
.segmented .selected { background: #e3efe4; color: var(--green); font-weight: 700; }
.erp-toolbar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.erp-toolbar .segmented { flex-wrap: wrap; background: #fff; }
.erp-detail { display: grid; gap: 12px; padding: 0 17px 17px; font-size: .87rem; }
.erp-detail p { overflow-wrap: anywhere; }
.staffing-section { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.staffing-section .panel { width: 100%; }
.pill.eligible { background: #dff1e4; color: #235737; }
.pill.excluded { background: #fbefcf; color: #694d14; }
.offer-options { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.offer-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 9px; }
.pwa-actions { position: fixed; right: max(15px,env(safe-area-inset-right)); bottom: max(15px,env(safe-area-inset-bottom)); z-index: 18; display: flex; gap: 6px; }
.pwa-ready { align-self: center; background: #fff; border: 1px solid var(--line); color: var(--muted); border-radius: 30px; padding: 5px 9px; font-size: .68rem; }
.booking-cards { display: none; }
.pill.confirmed, .pill.converted, .pill.done { background: #dff1e4; color: #235737; }
.pill.quoted, .pill.requested { background: #e2eef6; color: #28536d; }
.catalog-picker, .template { margin: 0 17px 12px; font-size: .85rem; }
.catalog-picker p { margin: 6px 0; }
.template { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.template summary { cursor: pointer; }
.template li { margin: 5px 0; }
.assignment { display: flex; gap: 8px; align-items: center; }
.error { padding: 9px 11px; border-radius: 8px; background: #fae9e7; color: #7a2d26; margin: 8px 0; font-size: .86rem; }
.error-text { color: #8d382c; }
.scrim { position: fixed; inset: 0; z-index: 20; background: #102f2988; display: grid; place-items: center; padding: 14px; }
.dialog { width: min(100%, 505px); max-height: 92dvh; overflow-y: auto; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 15px 60px #102f2955; }
.dialog .panel-head { border-bottom: 1px solid var(--line); }
.dialog form { padding: 15px 17px; }
.dialog-fields { display: grid; gap: 12px; }
.dialog footer { display: flex; justify-content: end; gap: 8px; margin-top: 15px; }
.multi { border: 1px solid var(--line); margin: 0; border-radius: 7px; font-size: .82rem; max-height: 180px; overflow: auto; }
.multi label { display: flex; align-items: center; gap: 6px; padding: 3px; }
.multi input { width: auto; min-height: 0; }
.toast { z-index: 19; position: fixed; bottom: 17px; right: 18px; background: #174e3f; color: white; display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 11px 14px; font-size: .86rem; }
.center { display: grid; min-height: 100vh; align-content: center; justify-items: center; gap: 15px; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; background: #fbfcf9; }
.login-banner { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 38px; overflow: hidden; padding: clamp(24px, 5vw, 74px); background: #102f29; color: white; }
.login-banner > :not(.login-art) { z-index: 1; }
.login-banner > small { color: #a8c9bb; letter-spacing: .12em; font-size: .67rem; font-weight: 700; }
.login-message h1 { font-size: clamp(2.35rem, 6vw, 6rem); letter-spacing: -.065em; line-height: 1; margin: 10px 0 17px; }
.login-message p { color: #d4e8df; max-width: 330px; line-height: 1.55; }
.login-message .eyebrow { color: #c1eab4; }
.login-art { position: absolute; width: 520px; height: 520px; top: 5%; right: -240px; transform: rotate(-25deg); }
.login-art span { position: absolute; inset: calc(10px + var(--offset, 0px)); border: 1px solid #77ad8d43; border-radius: 47% 52% 40% 65%; }
.login-art span:nth-child(2) { --offset: 18px; }
.login-art span:nth-child(3) { --offset: 36px; }
.login-art span:nth-child(4) { --offset: 54px; }
.login-art span:nth-child(5) { --offset: 72px; }
.login-art span:nth-child(6) { --offset: 90px; }
.login-side { display: grid; place-items: center; padding: 35px; }
.login-box { width: min(100%, 390px); }
.login-box h2 { font-size: 2.2rem; letter-spacing: -.04em; }
.login-box p { font-size: .89rem; margin: 6px 0; }
.login-form { display: grid; gap: 13px; margin: 20px 0; }
.demo-access { border-top: 1px solid var(--line); padding-top: 15px; }
.demo-access h3 { font-size: 1rem; }
.demo-access > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (max-width: 1220px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 950px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .main, .topbar { padding-left: 19px; padding-right: 19px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 12px; gap: 12px; }
  .sidebar .brand { margin: 0; font-size: 26px; }
  .brand-icon { width: 35px; height: 35px; border-radius: 10px; }
  .sidebar nav { margin: 0; grid-column: 1 / -1; grid-row: 2; flex-direction: row; overflow: auto; }
  .sidebar nav button { white-space: nowrap; padding: 7px 9px; min-height: 35px; font-size: .75rem; }
  .nav-label, .sidebar-bottom > .avatar, .sidebar-bottom > span:not(.avatar) { display: none; }
  .sidebar-bottom { margin: 0; padding: 0; border: 0; }
  .topbar { min-height: 46px; padding: 0 12px; }
  .top-avatar { display: none; }
  .main { padding: 19px 12px max(48px,env(safe-area-inset-bottom)); }
  .page-heading, .shift-heading, .panel-head { flex-wrap: wrap; align-items: start; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { grid-template-columns: 1fr; }
  .login-banner { padding: 22px; gap: 20px; }
  .login-banner > small { display: none; }
  .login-message h1 { margin: 6px 0; }
  .login-message h1 br { display: none; }
  .login-side { padding: 24px 18px; }
  .dialog { max-height: min(92dvh,calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px)); }
  .dialog input, .dialog select, .dialog textarea, .login-form input { font-size: 16px; }
  .erp-toolbar .segmented { min-width: 0; }
  .booking-table { display: none; }
  .booking-cards { display: grid; gap: 9px; padding: 0 12px 12px; }
}
.language-picker { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; white-space: nowrap; }
.language-picker select { width: auto; }
.login-preferences { display: flex; align-items: center; gap: 9px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.checkbox-field { display: grid; gap: 8px; font-size: .88rem; }
.checkbox-field input { width: auto; min-height: auto; }
.privacy-notice { border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.privacy-notice p { margin-block: 8px; }
[dir=rtl] table, [dir=rtl] .sidebar nav button, [dir=rtl] .project-card, [dir=rtl] .text-link { text-align: start; }
[dir=rtl] .sidebar-bottom button, [dir=rtl] .stage b { margin-left: 0; margin-inline-start: auto; }
[dir=rtl] input[type=email], [dir=rtl] input[type=password], [dir=rtl] input[type=date], [dir=rtl] input[type=time] { direction: ltr; }
@media (max-width: 680px) { .topbar { flex-wrap: wrap; } .topbar .demo-badge { display: none; } }
.history-comparison { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 12px; }
.history-snapshot { min-width: 0; }
.history-snapshot pre { margin: 6px 0; background: #f4f6f2; padding: 9px; border-radius: 8px; max-height: 24rem; overflow: auto; }

.chat-workspace { max-width: 65rem; margin-inline: auto; }
.chat-form { display: grid; gap: .75rem; margin-block: 1rem; }
.chat-form label { display: grid; gap: .35rem; }
.chat-form .button { justify-self: start; }
.chat-guidance { padding: 1rem; border: 1px solid currentColor; border-radius: .75rem; margin-block: .75rem; }
.chat-thread { display: grid; gap: .6rem; max-height: 34rem; overflow: auto; padding: .75rem; }
.chat-message { max-width: min(84%, 42rem); justify-self: start; padding: .65rem .9rem; border: 1px solid currentColor; border-radius: .9rem; }
.chat-message.own { justify-self: end; }
.chat-message p { margin-block: .35rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.marketing-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
