/* Staff workspace styling.
   Extends the approved ASPYRA design tokens; it does not replace or override them.
   Consultation mode inherits the prototype styling untouched. */

.route-loading,
.route-message { padding: 48px; color: var(--text-dim); }
.route-message h1 { font-family: 'Sora'; font-size: 22px; margin-bottom: 10px; color: var(--text); }
.route-message p { margin-bottom: 8px; }
.route-message a { color: var(--link); }

a.nav-item { text-decoration: none; }
a.nav-item:hover { text-decoration: none; }

/* ---------- Sign-in ---------- */
.signin-page { display: grid; place-items: center; min-height: 100vh; padding: 32px; background: var(--bg); }
.signin-card { width: min(440px, 100%); text-align: center; }
.signin-logo { height: 38px; margin-bottom: 8px; }
.signin-tagline { font-size: 12.5px; color: var(--text-faint); margin-bottom: 22px; }
.signin-card h1 { font-family: 'Sora'; font-size: 19px; margin-bottom: 16px; }
.signin-primary { width: 100%; margin-bottom: 8px; }
.signin-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.signin-divider::before, .signin-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.signin-users { display: grid; gap: 8px; margin-top: 14px; }
.signin-user { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; height: auto; }
.signin-foot { margin-top: 20px; }

/* ---------- Dashboard ---------- */
.dash-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; align-items: end; margin-bottom: 18px; }
.dash-search input { width: 100%; }
.dash-table { overflow-x: auto; }
.dash-table table { min-width: 860px; }
.dash-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dash-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dash-table tbody tr:hover { background: var(--accent-soft); }
.dash-table a { color: inherit; text-decoration: none; }
.dash-table a:hover strong { color: var(--link); }
.dash-actions { white-space: nowrap; text-align: right; }
.dash-actions .btn + .btn { margin-left: 6px; }
.cell-sub.warn { color: var(--warn); }

.status-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--text-dim); }
.s-ready-for-consultation, .s-signed, .s-completed { background: var(--success-soft); color: var(--success); }
.s-consultation-booked, .s-consultation-in-progress, .s-awaiting-client-signature { background: var(--warn-soft); color: var(--warn); }
.s-change-requested, .s-cancelled { background: var(--danger-soft); color: var(--danger); }
.s-on-hold { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.hold-text { color: var(--danger); }

.job-dialog { max-width: 680px; width: min(680px, 92vw); }
.job-dialog h2 { margin-bottom: 4px; }
.job-dialog > form > .hint { margin-bottom: 16px; }
.job-standard { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 11px 14px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--accent-soft); font-size: 12.5px; }
.job-standard span { white-space: nowrap; }

/* ---------- Job overview ---------- */
.job-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.job-grid h3 { font-family: 'Sora'; font-size: 14.5px; margin-bottom: 12px; }
.job-history { grid-column: 1 / -1; }
.job-dl { display: grid; grid-template-columns: 140px 1fr; gap: 7px 14px; font-size: 13.5px; margin-bottom: 14px; }
.job-dl dt { color: var(--text-faint); font-size: 12px; }
.job-next { font-family: 'Sora'; font-size: 15px; margin-bottom: 16px; }
.job-versions, .job-history-list, .release-list, .next-steps { list-style: none; display: grid; gap: 9px; margin-bottom: 14px; }
.job-history-list li { display: flex; gap: 10px; align-items: center; }
.job-replies-list { list-style: none; display: grid; gap: 10px; margin-bottom: 0; }
.job-replies-list li { background: var(--bg-soft, #f5f5f5); border-radius: 10px; padding: 8px 12px; }
.job-replies-list p { margin: 3px 0 0; font-size: 13.5px; }
.next-steps { list-style: disc; padding-left: 20px; gap: 7px; }
.next-steps li { font-size: 14px; }

/* ---------- Mode marker: internal work is always labelled as internal ---------- */
.mode-chip { margin-left: 10px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.mode-chip.internal { background: var(--warn-soft); color: var(--warn); }

/* ---------- Plan surface: stamps, selection bar, allowance ---------- */
.ps-stamps { gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.ps-select { margin-right: 6px; }
.ps-stamp { display: inline-flex; align-items: center; gap: 7px; }
.ps-stamp.active { border-color: var(--stamp-colour); box-shadow: inset 0 0 0 1px var(--stamp-colour); }
.ps-stamp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--stamp-colour); flex: none; }

.ps-selected[hidden] { display: none; }
.ps-selected { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ps-selected-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.ps-zone-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.zone-pill { border: 1px solid var(--border); background: var(--surface); color: var(--zone-colour, var(--text-dim));
  border-radius: 8px; padding: 5px 11px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.zone-pill:hover { border-color: var(--zone-colour, var(--text-dim)); }
.zone-pill.armed { background: var(--zone-colour, var(--text-dim)); border-color: var(--zone-colour, var(--text-dim)); color: #fff; }

.ps-allowance { margin-top: 10px; padding: 9px 14px; border-radius: var(--radius); font-size: 12.5px;
  background: var(--accent-soft); color: var(--text-dim); }
.ps-allowance.over { background: var(--warn-soft); color: var(--warn); }

.ps-inline { margin: 0; white-space: nowrap; }
.ps-keys { margin-top: 10px; }
.ps-keys kbd { display: inline-block; padding: 1px 5px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; background: var(--surface); font-family: ui-monospace, monospace; font-size: 11px; }

.ps-handle { cursor: grab; }
.ps-handle:active { cursor: grabbing; }
.ps-stamp-mark { cursor: pointer; }
.ps-floor-note { user-select: none; }

/* The room details box can be dragged clear of the room behind it. */
.ps-movable { position: fixed; }
.ps-drag-handle { cursor: move; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ps-drag-hint { font-family: inherit; font-size: 10.5px; font-weight: 500; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- A zone's share of the system ---------- */
.zone-share { margin-top: 9px; }
.zone-share-bar { height: 5px; border-radius: 99px; background: var(--neutral-soft); overflow: hidden; }
.zone-share-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.zone-share-value { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-dim); }

/* ---------- Review: the zone makeup under the priced line ---------- */
.review-zones { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.review-zones-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 8px; }
.review-zones ul { list-style: none; display: grid; gap: 6px; }
.review-zones li { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.review-zones li span { color: var(--text-dim); }

.zone-stepper { display: flex; align-items: center; gap: 12px; }
.zone-stepper strong { font-family: 'Sora'; font-size: 15px; min-width: 72px; text-align: center; }
.floor-tabs { display: flex; gap: 8px; margin-bottom: 14px; }

.zone-reassign { margin-top: 16px; }
.zone-reassign summary { cursor: pointer; font-size: 13px; color: var(--text-dim); }
.zone-reassign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.zone-reassign-grid .field span { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.zone-reassign-grid select { width: 100%; }

/* ---------- Zones ---------- */
.zone-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--zone-colour, var(--accent)) 16%, transparent); color: var(--zone-colour, var(--accent)); font-weight: 700; font-size: 11.5px; }
.zone-descriptions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.zone-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.zone-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.zone-block-head .cell-sub { display: block; }
.zone-block-total { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.zone-block td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.zone-block tr:last-child td { border-bottom: 0; }
.zone-block select { min-width: 120px; }

/* Client-facing zone presentation: no factors, no airflow, no schedule. */
.zone-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.zone-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.zone-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.zone-card-head strong { font-family: 'Sora'; font-size: 14.5px; }
.zone-card-rooms { font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.zone-card-meta { font-size: 12px; color: var(--text-faint); }

.release-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.release-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.release-list .cell-sub { grid-column: 1; }
.release-list .mono { grid-row: 1 / span 2; align-self: center; }
.warn { color: var(--warn); }

@media (max-width: 1100px) {
  .dash-filters { grid-template-columns: 1fr; }
  .job-grid { grid-template-columns: 1fr; }
  .zone-descriptions { grid-template-columns: 1fr 1fr; }
}

/* ---------- Administration: catalogue and pricing ---------- */
.cat-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-scroll { overflow-x: auto; }
.cat-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.cat-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cat-table th.cat-num { text-align: right; width: 116px; }
.cat-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cat-table td.mono { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.cat-table td.cat-note { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.cat-table input { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; background: var(--surface, #fff); color: inherit; }
.cat-table input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.cat-table input.cat-price { text-align: right; font-variant-numeric: tabular-nums; }
.cat-table input.cat-trade { background: #f6f2ea; }
.cat-table input.cat-desc { min-width: 260px; }

@media (max-width: 820px) {
  .cat-actions { width: 100%; }
}

/* ---------- Reading a Henley consult request ---------- */
.job-paste { padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); }
.job-paste textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 12.5px; background: var(--surface, #fff); color: inherit; resize: vertical; }
.job-paste-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.job-paste-actions .hint { flex: 1 1 220px; min-width: 0; line-height: 1.5; }
/* Beats the input[type=...] rule, which is more specific than a bare class. */
.job-dialog input.filled-from-email,
.job-dialog select.filled-from-email { background: #eef7f2; border-color: #8fc4ae; }
/* What the paste could not do is something to attend to, not an error. */
.job-paste-actions .hint.needs-you { color: #8a5a12; }
.tender-flags { margin: 6px 0 0; padding-left: 18px; }
.tender-flags li { margin: 4px 0; }
.tender-flags em { color: var(--text-dim); font-style: italic; }
.ht-table input.ht-code { width: 100%; min-width: 150px; max-width: 170px; text-align: left; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; background: var(--surface, #fff); color: inherit; }
.ht-table td.ht-read { white-space: nowrap; font-size: 12px; }
.ht-derived { color: var(--text-dim); }
.ht-bad { color: var(--danger); }

/* Staff access admin */
.staff-table { min-width: 900px; }
.staff-table input[type="email"], .staff-table input[type="text"] { width: 100%; min-width: 170px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; background: var(--surface, #fff); color: inherit; }
.staff-table input[readonly] { background: var(--bg-soft, #f5f5f5); color: var(--text-dim); }
.staff-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 160px; }
.staff-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; white-space: nowrap; }
.staff-check input[type="checkbox"] { width: auto; margin: 0; }
.staff-row-actions { display: flex; gap: 6px; white-space: nowrap; }

/* House types table, compact enough that Standard plans fits without scrolling sideways.
   Here, after the .cat-table / .ht-table rules above, so these win at equal specificity. */
.ht-table td{padding:6px 6px}
.ht-table th{padding:8px 6px}
.ht-table input.cat-desc{min-width:0}
.ht-table input[data-field="houseType"]{width:175px}
.ht-table input[data-field="zoneRecommendation"]{width:150px}
.ht-table input.ht-code{min-width:0;width:125px}
.ht-table th.cat-num{width:auto}
.ht-table input[data-field="standardZones"]{width:48px;padding:7px 4px;text-align:center}
.ht-table td.ht-read{white-space:normal;font-size:11.5px;min-width:110px;max-width:150px;line-height:1.35}
.ht-plan{padding:3px 7px;margin:2px 3px 2px 0}
.ht-table td.ht-plans{white-space:normal;min-width:130px;max-width:160px}

/* Dashboard fits the page (Ebony, 25 Sep 2026): wider than other screens, the five tiles
   on one line, long statuses on two lines like Send Booking Invite. */
.screen.dash-screen { max-width: 1560px; }
.dash-screen .stat-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dash-screen .stat-tile { padding: 10px 14px; }
.dash-screen .stat-tile .n { font-size: 22px; }
.dash-screen .stat-tile .l { margin-top: 4px; }
@media (max-width: 880px) { .dash-screen .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-table .status-pill { white-space: normal; max-width: 96px; line-height: 1.2; padding: 3px 9px; border-radius: 10px; text-align: center; }
.dash-table table { min-width: 0; }

/* Plan toolbar (Ebony, 25 Sep 2026): Full screen at the right of the first line, plan sheet
   crop starting the second, Drafting notes at the right of the outlets line. */
.ps-push-right { margin-left: auto; }
.ps-toolbar-second { margin-top: 8px; }
.ps-allowance-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ps-allowance-row .ps-allowance { flex: 1 1 auto; margin-top: 0; }
.ps-allowance-actions { margin-left: auto; flex: none; }
/* The row's buttons stacked, so the table never runs off the page. */
.dash-screen .dash-actions { white-space: normal; width: 150px; }
.dash-screen .dash-actions .btn { display: block; width: 100%; margin: 0 0 6px; text-align: center; }
.dash-screen .dash-actions .btn + .btn { margin-left: 0; }
.dash-screen .dash-actions .btn:last-child { margin-bottom: 0; }
/* First floor and standard plan overlays side by side, on one line (Ebony, 26 Sep 2026). */
.ps-overlay-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.ps-overlay-row > .ps-floor-bar { flex: 0 1 auto; gap: 5px; padding: 7px 9px; align-items: center; }
.ps-overlay-row .ps-check { margin: 0; }
.ps-overlay-row .ps-floor-bar input[type=range] { width: 70px; }
.ps-overlay-row .ps-overlay-src { min-width: 0; max-width: 160px; }
.ps-overlay-row #ps-std-kind { max-width: 165px; min-width: 0; }
.ps-overlay-row #ps-std-hint:empty { display: none; }
.ps-overlay-row #ps-overlay-hint:empty { display: none; }
