/* Workstation: shared controls and application surfaces. */
:root {
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  --light: #f5f6f7;
  --paper: #fff;
  --ink: #202226;
  --brand: #c44408;
  --brand-dark: #a73705;
  --secondary: #c44408;
  --info: #b13e08;
  --muted: #6b7078;
  --line: #e0e2e5;
  --focus: #c44408;
  --danger: #b32635;
  --radius: 4px;
  --shadow: none;
  --shadow-raised: 0 8px 28px #2022261a;
  background: var(--light);
}
body { color: var(--ink); }
.shell.workstation-shell { display: flex; flex-direction: column; min-width: 0; }
.app-header {
  height: 56px; flex: none; display: flex; align-items: stretch; gap: 28px; padding: 0 26px;
  background: #242629; color: #fff; position: sticky; top: 0; z-index: 10;
}
.app-header .brand { flex: none; font-size: 17px; letter-spacing: -.025em; }
.app-header .brand-mark, .app-header .brand small { display: none; }
.app-header .brand-text { display: flex; align-items: center; }
.app-header .nav {
  display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.app-header .nav button {
  width: auto; flex: none; min-height: 56px; padding: 0 15px; border-radius: 0;
  color: #c4c7cb; font-size: 15px; font-weight: 500; gap: 7px; white-space: nowrap;
}
.app-header .nav button > .icon { display: none; }
.app-header .nav button:hover { color: #fff; background: #ffffff09; }
.app-header .nav button[aria-current="page"] { color: #fff; background: transparent; box-shadow: inset 0 -3px #ed641e; }
.app-header .nav button:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.app-header .nav-count { position: static; background: #ffffff1a; color: #d9dce0; font-size: 10px; border-radius: 3px; }
.app-header .account {
  margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; flex: none;
}
.app-header .account strong { font-size: 12px; font-weight: 600; }
.app-header .account small { display: block; color: #a5a9af; font-size: 11px; }
.app-header .account .avatar { width: 30px; height: 30px; font-size: 10px; background: #44474b; color: #fff; }
.app-header .account .icon-button { color: #c4c7cb; }
.app-header .account .icon-button:hover { color: #fff; background: #ffffff12; }
.content { width: 100%; max-width: none; padding: 28px 32px 44px; }
.content-workstation { padding: 0; }
.content-workstation > #metrics, .content-workstation > #toolbar { display: none; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.page-heading { margin-bottom: 24px; }
.page-heading p { margin-top: 6px; }
.button {
  min-height: 40px; padding: 8px 14px; border: 1px solid #cbd0d5; border-radius: 4px;
  background: #fff; color: #353940; font-weight: 600; box-shadow: none;
}
.button:hover { background: #f4f5f6; border-color: #aeb4bb; }
.button:active { transform: none; }
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none; }
.button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button.ghost { color: #5e646d; background: transparent; border-color: transparent; }
.button.ghost:hover { color: var(--ink); background: #f0f1f3; }
.button.danger { color: var(--danger); border-color: #e4c5c8; }
.icon-button { border-radius: 4px; }
.icon-button:hover { background: #eceef0; color: var(--ink); }
.link-button, a { color: var(--brand-dark); }
input, select, textarea {
  min-height: 42px; border: 1px solid #cbd0d5; border-radius: 4px; color: var(--ink);
  background: #fff; padding: 9px 12px; font-size: 14px; box-shadow: none; width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: #a2a8b0; }
input::placeholder, textarea::placeholder { color: #858a91; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #c4440826; outline-offset: 1px; border-color: var(--brand);
}
input:disabled, select:disabled, textarea:disabled { background: #f6f7f8; color: #646a73; opacity: 1; cursor: default; }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; accent-color: var(--brand); }
.search { background: #fff; border-color: #cbd0d5; border-radius: 4px; color: #7c828a; }
.search input { min-width: 0; }
.search:focus-within { border-color: var(--brand); outline: 2px solid #c444081c; }
.search input:focus-visible { outline: none; }
.toolbar { gap: 10px; margin-bottom: 20px; }
.toolbar select { color: #4c525b; }
.toolbar > input { width: auto; }
.inline-select > span { white-space: nowrap; }
.inline-select select { width: auto; }
.segmented { padding: 0; background: #fff; border: 1px solid #d5d8dc; border-radius: 4px; gap: 0; overflow: hidden; }
.segmented button { min-height: 38px; padding: 7px 12px; border-radius: 0; color: #6b7078; font-weight: 500; }
.segmented button + button { border-left: 1px solid #e5e7e9; }
.segmented button[aria-pressed="true"] { color: var(--brand-dark); background: #fcf0e8; box-shadow: none; }
.segmented button:hover { background: #f6f7f8; }
.table-panel, .project-panel, .report-panel { border-color: var(--line); border-radius: 4px; box-shadow: none; }
th { background: #f6f7f8; color: #666d76; font-size: 12px; text-transform: none; }
th, td { padding: 14px 16px; }
tbody tr:hover { background: #faf7f4; }
.board { gap: 16px; }
.lane { background: #eceef0; border-color: #e3e5e8; border-radius: 4px; padding: 8px; }
.lane-heading { margin: 0 2px 10px; padding-bottom: 12px; border-bottom-width: 2px; }
.count { background: #e0e3e6; color: #656c75; border-radius: 3px; }
.card { border-radius: 4px; padding: 16px; border-color: #dee1e5; box-shadow: none; }
.card:hover { border-color: #b9bec5; box-shadow: 0 2px 6px #2022260a; transform: none; }
.card strong { font-size: 14px; }
.card-footer { border-color: #eceef0; }
.card-footer .avatar, .avatar { background: #e9ebee; color: #535a65; }
.badge { border-radius: 3px; font-size: 11px; }
.badge.direct { background: #f7ecf1; color: #9b3b64; }
.badge.ads { background: #eaf0fa; color: #3a6197; }
.card-activity { background: #f7f8f9; border-radius: 3px; }
.card-activity.overdue { color: var(--danger); background: #fcf0f1; }
.card-activity.missing { background: #fff7e9; color: #8d601f; }
.lead-workstation { display: grid; grid-template-columns: 390px minmax(0, 1fr); min-height: calc(100dvh - 56px); }
.lead-queue {
  background: #f5f6f8; border-right: 1px solid #dfe2e6; display: flex; flex-direction: column;
  height: calc(100dvh - 56px); position: sticky; top: 56px; min-width: 0;
}
.queue-heading { padding: 26px 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-heading h1 { font-size: 28px; }
.queue-heading h1 > span { margin-left: 8px; font-size: 15px; font-weight: 400; color: #858a91; vertical-align: middle; }
.queue-create { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.queue-create .icon { width: 14px; height: 14px; }
.queue-search { padding: 0 22px; }
.queue-search .search { width: 100%; }
.queue-search input { width: 100%; font-size: 14px; }
.queue-tabs, .editor-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.queue-tabs { margin: 16px 22px 0; gap: 26px; }
.queue-tabs button, .editor-tabs button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 0 11px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent;
  color: #707680; font-weight: 500;
}
.queue-tabs button { min-height: 42px; padding-bottom: 8px; font-size: 15px; }
.queue-tabs button[aria-pressed="true"], .editor-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.queue-tabs button span, .editor-tabs button span { font-size: 11px; color: #7e848d; font-weight: 500; }
.queue-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 22px; }
.queue-filter-disclosure { padding-block: 8px; }
.queue-filter-disclosure summary { color: #6b727d; font-size: 11px; margin-inline: 22px; cursor: pointer; width: fit-content; }
.queue-filters select { font-size: 11px; padding: 6px 7px; min-height: 32px; background: transparent; color: #666d76; }
.queue-list { flex: 1; overflow-y: auto; padding: 0 12px; scrollbar-width: thin; }
.queue-row {
  position: relative; width: 100%; display: grid; gap: 5px; padding: 15px 10px 13px; background: transparent;
  color: var(--ink); text-align: left; border: 0; border-bottom: 1px solid #e0e3e7; border-radius: 0;
}
.queue-row:hover { background: #eceef1; }
.queue-row.selected { background: #fcf0e6; }
.queue-row.selected::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); }
.queue-row-top, .queue-row-meta, .queue-row-stage { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.queue-row-top strong { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.queue-row-top time { font-size: 11px; white-space: nowrap; color: #7b8189; flex: none; }
.queue-row-meta { color: #747b84; font-size: 13px; }
.queue-row-meta > span { min-width: 0; }
.queue-row-meta > span:last-child { text-align: right; }
.queue-row-stage { color: #737a83; font-size: 11px; }
.queue-attention { color: #a36a21; }
.queue-footer { padding: 14px 22px 18px; border-top: 1px solid #e1e4e8; background: #f5f6f8; }
.queue-footer > span { display: block; color: #858a91; font-size: 10px; margin-bottom: 7px; }
.queue-footer .segmented { display: flex; width: 100%; }
.queue-footer .segmented button { flex: 1; min-height: 32px; padding: 5px 7px; font-size: 11px; white-space: nowrap; }
.lead-editor { min-width: 0; background: #fff; }
.editor-context {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 28px;
  min-height: 62px; border-bottom: 1px solid var(--line); color: #7b818a; font-size: 14px;
}
.editor-next { display: inline-flex; align-items: center; gap: 8px; }
.editor-next .icon { width: 15px; height: 15px; }
.editor-next strong { color: var(--brand); font-weight: 600; }
.editor-next.overdue, .editor-next.overdue strong { color: var(--danger); }
.editor-updated { margin-left: auto; white-space: nowrap; font-size: 11px; }
.editor-content { padding: 26px 28px 0; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.editor-heading h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.eyebrow { font-size: 9px; font-weight: 600; letter-spacing: .12em; color: #9a9ea5; margin-bottom: 5px; }
.editor-heading .button { font-size: 12px; min-height: 34px; }
.editor-content .stage-strip {
  position: static; padding: 0; margin: 0 0 24px; border: 0; gap: 3px; background: #fff;
}
.stage-step { background: #eceef1; color: #626974; min-height: 42px; font-weight: 500; font-size: 14px; }
.stage-step:first-child { border-radius: 4px 0 0 4px; }
.stage-step.passed { background: #f6e1d4; color: #9d451b; }
.stage-step.current { background: var(--brand); color: #fff; }
.stage-step[aria-disabled="true"]:not(.passed):not(.current) { background: #eceef1; color: #767d87; }
.stage-step[data-click]:hover { background: #eac5af; color: #65331a; }
.stage-finish { background: #f4f5f7; color: #6f7680; box-shadow: none; }
.stage-finish:hover { background: #e9ebee; }
.stage-finish, .stage-final { border-radius: 0 4px 4px 0; }
.editor-tabs { margin-bottom: 29px; gap: 28px; }
.editor-tabs button { font-size: 16px; }
.editor-section { padding: 0; margin: 0 0 32px; border: 0; min-width: 0; }
.editor-section legend { padding: 0 0 12px; margin-bottom: 18px; width: 100%; border-bottom: 1px solid var(--line); font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.editor-section > label, .editor-field { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 16px; }
.editor-section > label > span:first-child, .editor-field > span:first-child { font-size: 15px; color: #656c75; padding-top: 10px; font-weight: 400; }
.editor-section input, .editor-section select, .editor-section textarea { font-size: 16px; }
.editor-section textarea { resize: vertical; min-height: 112px; }
.editor-input-stack { display: grid; gap: 7px; }
.editor-input-stack small { font-size: 10px; color: #8a9099; }
.static-field { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; border-bottom: 1px solid #f0f1f3; }
.static-field .avatar { width: 23px; height: 23px; font-size: 8px; border-radius: 3px; }
.static-field .button { margin-left: auto; }
.field-caption { color: #989da5; font-size: 10px; margin-left: auto; }
.editor-actions {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 18px 0; margin-top: 8px; background: #fff; border-top: 1px solid var(--line);
}
.editor-actions .button { min-height: 40px; padding-inline: 18px; font-size: 13px; }
.save-indicator { color: #9298a0; font-size: 10px; margin-left: 6px; }
.save-indicator.is-dirty { color: #9e6624; }
.convert-action { margin-left: auto; }
.queue-back { display: none; }
.readonly-notice { padding: 12px; margin-bottom: 24px; border-left: 3px solid #c7ccd3; background: #f5f6f8; color: #646c77; font-size: 13px; }
.workspace-empty { padding: 80px 30px; }
.workspace-empty .empty-state { border: 0; background: transparent; }
.form-grid { gap: 20px 18px; }
.form-grid label, .field { font-size: 13px; font-weight: 500; color: #4c535e; gap: 7px; }
.form-grid textarea { min-height: 112px; }
.form-grid .required-mark { margin-left: 4px; }
.form-actions { margin-top: 24px; gap: 10px; }
.form-error { border-radius: 4px; font-weight: 400; }
dialog { border-radius: 6px; border-color: #d7dce2; box-shadow: 0 20px 80px #12151933; }
dialog::backdrop { background: #171b2366; backdrop-filter: none; }
.dialog-head { border-bottom: 1px solid var(--line); background: #fff; padding: 20px 24px; margin-bottom: 0; }
.dialog-head h2 { font-size: 20px; letter-spacing: -.02em; }
.dialog-body { padding: 24px; }
dialog.side-panel { inset: 56px 0 0 auto; height: calc(100dvh - 56px); border-radius: 0; background: #fff; }
dialog.side-panel::backdrop { background: #171b2366; }
dialog.side-panel .dialog-head { padding: 20px 24px; }
dialog.side-panel .dialog-body { padding: 24px; }
dialog.side-panel .stage-strip { background: #fff; margin-top: -24px; }
.deal-fields > *, .deal-feed { border-radius: 4px; box-shadow: none; }
.deal-fields > section:not(.booking-panel), .deal-feed { border: 0; background: #fff; padding: 14px 0; }
.deal-fields > section + section { border-top: 1px solid var(--line); }
.deal-layout { gap: 28px; }
.deal-feed { border-left: 1px solid var(--line); padding-left: 24px; }
.details div { background: #f5f6f8; border-radius: 3px; padding: 11px 12px; }
.details dt { color: #7c838d; font-size: 11px; margin-bottom: 4px; }
.next-activity { border-radius: 4px; background: #f5f6f8; }
.next-activity.missing { background: #fff8ed; border-color: #f1dfc1; }
.next-activity.overdue { background: #fdf2f3; border-color: #eeced2; }
.note-form textarea { border-radius: 4px; }
.timeline-icon { border-radius: 4px; }
.timeline { border-color: var(--line); }
.timeline h3 { font-size: 16px; }
.timeline-item { padding-block: 14px; }
.stage-pill { border-radius: 3px; }
.lot, .lot.tile, .lot-gap, .lot-plan, .lot-preview, .finish-option, .payment-list, .payment-gap, .selection-banner { border-radius: 4px; }
.project-panel, .report-panel { border-radius: 4px; }
.lot.selected { outline-color: var(--brand); }
.lot:hover { border-color: var(--brand); transform: none; }
.floor-row:not(.section-row):hover, .floor-row:not(.section-row):hover .floor-label { background: #f0f2f4; box-shadow: none; }
.legend-chip, .feature-chips li, .code-chip { border-radius: 3px; }
.legend-chip { color: #535b66; }
.legend-chip[aria-pressed="true"] { border-color: var(--brand); background: #fcf0e8; color: var(--brand-dark); box-shadow: none; }
.selection-banner { background: #fcf0e8; border-color: #edd7c8; }
.lot-table tr.picked { background: #fcf0e8; }
.contract-preview { background: #f5f6f8; border-color: #cbd0d5; border-radius: 4px; }
.switch-track { background: #c7ccd3; }
.login-aside { background: #242629; color: #fff; }
.login-aside .brand-mark, .login-art { display: none; }
.login-aside p { color: #aeb3bb; }
.login-main .field { margin-top: 22px; }
.login-main h2 { margin-bottom: 8px; }
#toast { background: #292d33; border-radius: 4px; }
@media (min-width: 1500px) {
  .lead-workstation { grid-template-columns: 390px minmax(0, 1fr); }
  .editor-content { padding-inline: 40px; max-width: 1260px; margin-inline: auto; }
  .editor-context { margin-inline: 40px; }
  .editor-section > label, .editor-field { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 1180px) {
  .app-header { gap: 20px; padding-inline: 20px; }
  .app-header .brand { font-size: 15px; }
  .app-header .nav button { padding-inline: 10px; font-size: 13px; }
  .app-header .account > div, .app-header .account > .avatar { display: none; }
  .lead-workstation { grid-template-columns: 300px minmax(0, 1fr); }
  .editor-section > label, .editor-field { grid-template-columns: 135px minmax(0, 1fr); gap: 16px; }
  .editor-updated { display: none; }
  .save-indicator { flex-basis: 100%; order: 3; margin: 0; }
}
@media (max-width: 800px) {
  .app-header { padding: 0 16px; gap: 18px; height: auto; min-height: 60px; flex-wrap: wrap; }
  .app-header .brand { height: 50px; flex: 1; font-size: 16px; }
  .app-header .account { height: 50px; }
  .app-header .nav { order: 3; flex-basis: calc(100% + 32px); margin: -4px -16px 0; padding: 0 6px; }
  .app-header .nav button { min-height: 44px; padding: 0 12px; font-size: 12px; }
  .app-header .nav-text { display: inline; }
  .app-header .nav-count { min-width: 14px; height: 16px; padding-inline: 4px; }
  .content { padding: 22px 18px; }
  .content-workstation { padding: 0; }
  .lead-workstation { display: block; min-height: calc(100dvh - 90px); }
  .lead-queue { height: calc(100dvh - 90px); position: static; border-right: 0; }
  .has-selection .lead-queue { display: none; }
  .has-selection.show-queue .lead-queue { display: flex; }
  .has-selection.show-queue .lead-editor { display: none; }
  .queue-back { display: inline-flex; white-space: nowrap; font-size: 12px; }
  .editor-context { margin-inline: 20px; min-height: 54px; }
  .editor-next { font-size: 11px; gap: 5px; }
  .editor-next .icon { display: none; }
  .editor-content { padding: 22px 20px 0; }
  .editor-heading { align-items: start; gap: 12px; margin-bottom: 20px; }
  .editor-heading h2 { font-size: 23px; }
  .editor-heading .button { font-size: 11px; padding: 6px 8px; }
  .editor-heading .button .icon { display: none; }
  .editor-content .stage-strip { overflow-x: auto; margin-bottom: 20px; scrollbar-width: none; }
  .editor-content .stage-step { min-width: 110px; min-height: 38px; flex: 1 0 110px; }
  .editor-tabs { margin-bottom: 24px; }
  .editor-section > label, .editor-field { grid-template-columns: 135px minmax(0, 1fr); }
  .deal-feed { border: 0; padding-left: 0; }
  dialog.side-panel { inset: 0; height: 100dvh; }
  dialog.side-panel .dialog-body { padding: 20px; }
  .form-grid { gap: 18px; }
  .toolbar > input { max-width: 100%; }
}
@media (max-width: 480px) {
  input, select, textarea, .editor-section input, .editor-section select, .editor-section textarea { font-size: 16px; }
  .editor-section > label, .editor-field { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 18px; }
  .editor-section > label > span:first-child, .editor-field > span:first-child { padding-top: 0; font-size: 12px; }
  .editor-context { gap: 12px; }
  .editor-next { display: block; font-size: 10px; text-align: right; }
  .editor-next strong { display: block; }
  .editor-section legend { font-size: 16px; margin-bottom: 16px; }
  .editor-actions .button { min-height: 42px; padding-inline: 12px; }
  .convert-action { font-size: 11px !important; padding-inline: 4px !important; }
  .convert-action .icon { display: none; }
  .editor-tabs button { font-size: 13px; }
  .editor-content { padding-inline: 16px; }
  .editor-context { margin-inline: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dialog-head, .dialog-body { padding: 20px; }
  .field-caption { display: none; }
}
