/* ============================================================
   The NS Design — Project Register V3
   Design system: quiet enterprise, blue accent, soft surfaces · V3
   ============================================================ */

:root {
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #15803d;
  --green-bg: #ecfdf3;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --rose: #be123c;
  --rose-bg: #fff1f2;
  --violet: #6d28d9;
  --violet-bg: #f5f3ff;
  --teal: #0f766e;
  --teal-bg: #f0fdfa;
  --slate-bg: #f1f5f9;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .06);
  --sidebar-w: 250px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.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; }

/* Layout */
.app { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: rgba(255,255,255,.92);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8 70%);
  color: #fff; display: grid; place-items: center;
  font-weight: 750; letter-spacing: .02em; font-size: 14px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .24);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-copy strong { font-size: 14.5px; letter-spacing: -.01em; }
.brand-copy span { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.sidebar-close { display: none; margin-left: auto; }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); font-weight: 650; padding: 10px 10px 7px; }
.nav-label-spaced { margin-top: 14px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: #475569; font-weight: 500; font-size: 13.5px;
  border: 0; background: none; width: 100%; text-align: left;
  margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav-item:hover { background: #f1f5f9; color: var(--ink); }
.nav-item.active { background: var(--blue-50); color: var(--blue-700); font-weight: 650; }
.nav-item.active .icon { stroke-width: 2; }
.nav-count {
  margin-left: auto; font-size: 11px; font-weight: 650; color: var(--muted);
  background: #f1f5f9; border-radius: 20px; padding: 1px 7px; min-width: 22px; text-align: center;
}
.nav-count.accent { color: var(--blue-700); background: var(--blue-100); }
.nav-button { font-family: inherit; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line-soft); }
.user-card { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; cursor: pointer; }
.user-card:hover { background: #f8fafc; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex: none;
}
.avatar-blue { background: #dbeafe; color: #1d4ed8; }
.avatar-violet { background: #ede9fe; color: #6d28d9; }
.avatar-green { background: #dcfce7; color: #15803d; }
.avatar-amber { background: #fef3c7; color: #b45309; }
.avatar-rose { background: #ffe4e6; color: #be123c; }
.avatar-teal { background: #ccfbf1; color: #0f766e; }
.avatar-lg { width: 42px; height: 42px; font-size: 13px; }
.user-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-copy strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy span { font-size: 10.5px; color: var(--muted); }
.user-card > .icon { margin-left: auto; }
.signout {
  width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 11.5px; padding: 7px 10px 2px; border-radius: 7px;
}
.signout:hover { color: var(--rose); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 76px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 30px; background: rgba(245,247,251,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 25;
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; letter-spacing: -.02em; font-weight: 680; }
.topbar-title p { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

.global-search { position: relative; display: flex; align-items: center; gap: 7px; width: 280px; }
.global-search > .icon { position: absolute; left: 11px; color: var(--muted); }
.global-search input {
  width: 100%; height: 38px; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; padding: 0 42px 0 34px; outline: none; font-size: 12.5px;
  transition: border-color .15s, box-shadow .15s;
}
.global-search input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.global-search kbd {
  position: absolute; right: 9px; font-family: var(--font); font-size: 10px; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; line-height: 17px; background: #f8fafc;
}
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; max-height: 320px; overflow: auto; z-index: 60;
}
.search-result { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; cursor: pointer; }
.search-result:hover { background: var(--blue-50); }
.search-result .prs { font-family: var(--mono); font-size: 11px; color: var(--blue-700); }
.search-result small { color: var(--muted); font-size: 11px; }
.search-empty { padding: 14px; color: var(--muted); font-size: 12px; text-align: center; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: #475569; flex: none;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.bell-btn { position: relative; }
.bell-btn .dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: #f43f5e; border: 1.5px solid #fff; }

.btn {
  height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: 0 2px 4px rgba(37,99,235,.18); }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn-danger { color: var(--rose); border-color: #fecdd3; background: #fff; }
.btn-danger:hover { background: var(--rose-bg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.view { flex: 1; padding: 24px 30px 34px; max-width: 1500px; width: 100%; margin: 0 auto; outline: none; }
.app-footer { padding: 0 30px 20px; color: var(--muted-2); font-size: 10.5px; text-align: center; }
.app-footer span { color: var(--blue-600); font-weight: 600; }

/* Typography helpers */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 23px; letter-spacing: -.025em; font-weight: 700; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.page-head-actions { display: flex; gap: 8px; align-items: center; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h3 { font-size: 14.5px; font-weight: 680; letter-spacing: -.01em; }
.section-title p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.link { color: var(--blue-700); font-weight: 650; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi {
  padding: 17px 18px 15px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-700); }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-icon.violet { background: var(--violet-bg); color: var(--violet); }
.kpi-value { font-size: 30px; leading-trim: both; line-height: 1; font-weight: 720; letter-spacing: -.04em; }
.kpi-note { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-note .up { color: var(--green); font-weight: 650; display: inline-flex; align-items: center; gap: 2px; }
.kpi-bar { height: 4px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.kpi-bar i { display: block; height: 100%; border-radius: 4px; background: var(--blue-500); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.two-col > *, .three-col > *, .info-grid > *, .kpi { min-width: 0; }

/* Prototype banner */
.prototype-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 13px; margin-bottom: 16px;
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; color: #1e40af; font-size: 11.5px;
}
.prototype-banner .icon { color: #2563eb; }
.prototype-banner strong { font-weight: 700; }
.prototype-banner > span { min-width: 0; }
.prototype-banner button { margin-left: auto; background: none; border: 0; color: #1d4ed8; font-weight: 650; font-size: 11.5px; text-decoration: underline; }

/* Lists */
.attention-list { display: flex; flex-direction: column; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.attention-item:first-child { border-top: 0; }
.attention-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.attention-icon.cake { background: #fdf2f8; color: #be185d; }
.attention-icon.heart { background: #fff1f2; color: #e11d48; }
.attention-icon.star { background: #fffbeb; color: #b45309; }
.attention-copy { min-width: 0; flex: 1; }
.attention-copy strong { display: block; font-size: 12.8px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attention-copy span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.attention-meta { text-align: right; flex: none; }
.date-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 20px; background: #f1f5f9; color: #475569; }
.date-chip.today { background: #fff1f2; color: #be123c; }
.date-chip.soon { background: #fffbeb; color: #b45309; }
.auto-line { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 10px; color: var(--green); margin-top: 4px; }
.card-foot { padding: 11px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10.5px; display: flex; align-items: center; gap: 6px; }
.card-foot .icon { color: var(--green); }

/* Drawing schedule */
.schedule-list { display: flex; flex-direction: column; }
.schedule-item { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.schedule-item:first-child { border-top: 0; }
.schedule-time { width: 50px; flex: none; font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding-top: 2px; }
.schedule-rail { width: 3px; border-radius: 3px; background: var(--blue-100); flex: none; }
.schedule-rail.done { background: #bbf7d0; }
.schedule-rail.progress { background: #bfdbfe; }
.schedule-copy { min-width: 0; flex: 1; }
.schedule-copy strong { display: block; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-copy span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.schedule-right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mini-owner { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.mini-owner .avatar { width: 18px; height: 18px; font-size: 7.5px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 650; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.badge-soft { background: #f1f5f9; color: #475569; }
.badge-blue { background: var(--blue-50); color: var(--blue-700); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-rose { background: var(--rose-bg); color: var(--rose); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-teal { background: var(--teal-bg); color: var(--teal); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-lg { font-size: 11.5px; padding: 5px 10px; }

/* Toolbar / filters */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; }
.toolbar .search-field { flex: 1; min-width: 220px; position: relative; }
.toolbar .search-field .icon { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.toolbar input[type="search"], .toolbar input[type="text"] {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 0 12px 0 33px; font-size: 12px; outline: none;
}
.toolbar input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.select, .input {
  height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 0 30px 0 11px; font-size: 12px; outline: none; color: #334155;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select:focus, .input:focus, textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.input { background-image: none; padding-right: 11px; }
textarea.input { height: auto; min-height: 78px; padding: 9px 11px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label { font-size: 11.5px; font-weight: 650; color: #334155; }
.field .hint { font-size: 10.5px; color: var(--muted); }
.field .req { color: var(--rose); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
.form-section { padding: 18px; border-bottom: 1px solid var(--line-soft); }
.form-section:last-child { border-bottom: 0; }
.form-section-head { margin-bottom: 14px; }
.form-section-head h3 { font-size: 13.5px; font-weight: 700; }
.form-section-head p { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 10px 13px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--blue-700); border-bottom-color: var(--blue-600); }
.tab .count { font-size: 10px; background: #f1f5f9; padding: 1px 6px; border-radius: 20px; color: var(--muted); }
.tab.active .count { background: var(--blue-50); color: var(--blue-700); }
.segmented { display: inline-flex; padding: 3px; background: #eef2f7; border-radius: 10px; gap: 2px; }
.segmented button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Table */
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 780px; }
table.data th {
  text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line);
  background: #fbfcfe; white-space: nowrap;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 12px; vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data .cell-main { font-weight: 650; font-size: 12.2px; color: var(--ink); }
table.data .cell-sub { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.prs-tag { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--blue-700); background: var(--blue-50); border: 1px solid #dbeafe; padding: 2px 6px; border-radius: 6px; display: inline-block; }
.checkbox { width: 15px; height: 15px; accent-color: var(--blue-600); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.pager { display: flex; gap: 4px; }
.pager button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 11px; color: var(--muted); }
.pager button.active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pager button:disabled { opacity: .4; }

/* Status select */
.status-select {
  appearance: none; border: 0; border-radius: 20px; padding: 3px 22px 3px 9px; font-size: 10.5px; font-weight: 650;
  cursor: pointer; outline: none; background-repeat: no-repeat; background-position: right 6px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  border: 1px solid transparent;
}
.status-select:focus { box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.status-Registered { background-color: #eff6ff; color: #1d4ed8; }
.status-Execution { background-color: #fffbeb; color: #b45309; }

/* Contacts */
.contact-name { display: flex; align-items: center; gap: 9px; }
.contact-name .avatar { width: 30px; height: 30px; font-size: 9px; }
.family-list { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.45; color: var(--muted); white-space: normal; min-width: 190px; }
.family-list b { color: #334155; font-weight: 600; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.subtab { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 11px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.subtab.active { border-color: #bfdbfe; background: var(--blue-50); color: var(--blue-700); }
.subtab .count { font-size: 9.5px; opacity: .75; margin-left: 3px; }

/* Project detail */
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.back-link:hover { color: var(--blue-700); }
.detail-hero { padding: 20px; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-hero .hero-main { min-width: 0; flex: 1; }
.detail-hero h2 { font-size: 22px; letter-spacing: -.025em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-hero .sub { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-hero .hero-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); }
.detail-meta > div { background: #fff; padding: 12px 16px; }
.detail-meta span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.detail-meta strong { display: block; font-size: 12px; margin-top: 3px; font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.info-card { padding: 17px 18px; }
.info-card h3 { font-size: 12.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.info-card h3 .icon { color: var(--blue-600); }
.info-rows { display: flex; flex-direction: column; gap: 8px; }
.info-row { display: flex; justify-content: space-between; gap: 14px; font-size: 11.5px; }
.info-row dt { color: var(--muted); flex: none; }
.info-row dd { margin: 0; text-align: right; font-weight: 550; color: #1e293b; min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.chip { font-size: 10px; background: #f1f5f9; border-radius: 6px; padding: 2px 7px; color: #475569; }
.chip.blue { background: var(--blue-50); color: var(--blue-700); }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.violet { background: var(--violet-bg); color: var(--violet); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.chip.rose { background: var(--rose-bg); color: var(--rose); }

.timeline { padding: 18px; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 17px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 27px; height: 27px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; flex: none; z-index: 1; }
.timeline-copy { font-size: 12px; }
.timeline-copy strong { font-weight: 650; }
.timeline-copy span { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* Drawing schedule detail */
.ds-head { padding: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
.ds-head h3 { font-size: 15px; }
.ds-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.progress-wrap { min-width: 180px; margin-left: auto; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.progress { height: 6px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue-500); border-radius: 6px; }
table.schedule-table { width: 100%; border-collapse: collapse; min-width: 700px; }
table.schedule-table th { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; padding: 9px 12px; background: #fbfcfe; border-bottom: 1px solid var(--line); }
table.schedule-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; vertical-align: middle; }
table.schedule-table tr:last-child td { border-bottom: 0; }
.phase-tag { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: #e2e8f0; color: #334155; }
.ds-empty { padding: 36px 20px; text-align: center; }
.ds-empty .icon-wrap { width: 46px; height: 46px; border-radius: 13px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; margin: 0 auto 10px; }
.ds-empty h3 { font-size: 14px; }
.ds-empty p { font-size: 11.5px; color: var(--muted); max-width: 420px; margin: 5px auto 0; }

/* Reminders */
.reminder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.reminder-card { padding: 16px 17px; display: flex; flex-direction: column; gap: 10px; }
.reminder-card .top { display: flex; align-items: center; gap: 9px; }
.reminder-card h3 { font-size: 12.5px; flex: 1; }
.reminder-card .big { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.reminder-card p { font-size: 10.5px; color: var(--muted); }
.switch { position: relative; width: 34px; height: 19px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 15px; height: 15px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue-600); }
.switch input:checked + span::before { transform: translateX(15px); }
.reminder-list { display: flex; flex-direction: column; }
.reminder-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.reminder-row:first-child { border-top: 0; }
.reminder-date { width: 42px; flex: none; text-align: center; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line-soft); padding: 4px 0; }
.reminder-date b { display: block; font-size: 14px; line-height: 1.1; }
.reminder-date span { font-size: 8.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.reminder-copy { flex: 1; min-width: 0; }
.reminder-copy strong { font-size: 12.3px; display: block; }
.reminder-copy span { font-size: 10.5px; color: var(--muted); display: block; margin-top: 1px; }
.reminder-status { text-align: right; flex: none; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.member-card { padding: 16px 17px; display: flex; align-items: center; gap: 11px; }
.member-card .copy { flex: 1; min-width: 0; }
.member-card strong { display: block; font-size: 12.5px; }
.member-card span { display: block; font-size: 10.5px; color: var(--muted); }
.member-card .select { height: 30px; font-size: 10.5px; padding-left: 8px; }
.permission-note { font-size: 10.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 5px; align-items: flex-start; }

/* PRS bank */
.bank-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bank-card { padding: 14px 15px; }
.bank-card .year { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--blue-700); }
.bank-card .range { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.bank-card .meter { height: 5px; border-radius: 5px; background: #eef2f7; margin: 9px 0 6px; overflow: hidden; }
.bank-card .meter i { display: block; height: 100%; background: var(--blue-500); border-radius: 5px; }
.bank-card .stats { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); }
.bank-note { padding: 14px 16px; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; font-size: 11px; color: var(--muted); display: flex; gap: 8px; }
.bank-note .icon { color: var(--blue-600); }

/* Wizard */
.wizard { max-width: 1180px; margin: 0 auto; }
.wizard-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.wizard-head .title { flex: 1; min-width: 200px; }
.wizard-head h2 { font-size: 22px; letter-spacing: -.025em; }
.wizard-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.steps { display: flex; gap: 0; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; overflow-x: auto; }
.step { display: flex; align-items: center; gap: 7px; flex: 1; padding: 8px 10px; border-radius: 8px; min-width: 140px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.step .num { width: 21px; height: 21px; border-radius: 50%; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.step.active { background: var(--blue-50); color: var(--blue-700); }
.step.active .num { background: var(--blue-600); color: #fff; }
.step.done .num { background: var(--green-bg); color: var(--green); }
.wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.wizard-panel { overflow: hidden; }
.wizard-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }
.wizard-foot .spacer { flex: 1; }
.summary-card { padding: 17px; position: sticky; top: 92px; }
.summary-card .prs-preview { font-family: var(--mono); font-size: 25px; font-weight: 700; color: var(--blue-700); letter-spacing: -.02em; }
.summary-card .prs-label { font-size: 9px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.summary-card h3 { font-size: 12px; margin: 14px 0 7px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: 10.8px; padding: 4px 0; border-top: 1px dashed var(--line-soft); }
.summary-row span { color: var(--muted); }
.summary-row b { font-weight: 600; text-align: right; }
.summary-tip { margin-top: 14px; padding: 10px; border-radius: 8px; background: var(--blue-50); color: #1e40af; font-size: 10px; display: flex; gap: 6px; }
.summary-tip .icon { flex: none; margin-top: 1px; }

.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.check {
  display: flex; align-items: center; gap: 7px; font-size: 11px; color: #334155;
  border: 1px solid var(--line-soft); background: #fbfcfe; border-radius: 7px; padding: 7px 8px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.check:hover { background: #f8fafc; border-color: #cbd5e1; }
.check input { accent-color: var(--blue-600); width: 14px; height: 14px; margin: 0; flex: none; }
.check.checked { background: var(--blue-50); border-color: #bfdbfe; color: var(--blue-700); }
.floor-block { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.floor-head { display: flex; align-items: center; gap: 8px; background: #fbfcfe; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.floor-head strong { font-size: 11.5px; flex: 1; }
.floor-body { padding: 11px 12px; }
.floor-body .check-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.add-floor { width: 100%; border: 1px dashed #cbd5e1; background: #fff; border-radius: 9px; padding: 9px; font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; }
.add-floor:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }

.review-block { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.review-block:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.review-head h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; }
.review-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 5px; }
.review-row span { color: var(--muted); }
.review-row b { text-align: right; font-weight: 600; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(15,23,42,.25); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; animation: modalIn .16s ease-out; }
.modal.wide { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.modal-head p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 13px 18px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }
.modal-foot .spacer { flex: 1; }

/* Toast */
.toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #0f172a; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.25); display: flex; align-items: center; gap: 8px; animation: toastIn .18s ease-out; max-width: 340px; }
.toast .icon { color: #86efac; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Notification panel */
.notification-panel { position: fixed; top: 66px; right: 30px; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-md); z-index: 80; overflow: hidden; }
.notification-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.notification-head strong { font-size: 12px; }
.notification-list { max-height: 300px; overflow: auto; }
.notification-item { display: flex; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; }
.notification-item:last-child { border-bottom: 0; }
.notification-item .icon { margin-top: 1px; color: var(--blue-600); }
.notification-item span { color: var(--muted); display: block; font-size: 10px; }
.notification-foot { display: flex; align-items: center; gap: 4px; padding: 10px 14px; font-size: 11px; font-weight: 650; color: var(--blue-700); background: #fbfcfe; }

/* Empty state */
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.empty .icon-wrap { width: 44px; height: 44px; border-radius: 12px; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; margin: 0 auto 9px; }
.empty strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }

/* Responsive */
@media (max-width: 1180px) {
  .global-search { width: 220px; }
  .kpi-grid { gap: 12px; }
  .three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; width: 260px; box-shadow: 0 20px 60px rgba(15,23,42,.2); }
  .sidebar.open { transform: none; }
  .sidebar-close { display: grid; }
  .main { margin-left: 0; }
  .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 35; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 18px; height: 68px; gap: 10px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { display: none; }
  .global-search { width: 200px; }
  .view { padding: 18px; }
  .two-col, .info-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; order: -1; }
  .wizard-layout .summary-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
  .wizard-layout .summary-card .summary-tip { grid-column: 1 / -1; }
  .team-grid { grid-template-columns: 1fr; }
  .reminder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-actions .global-search { display: none; }
  .topbar-actions .btn-primary span { display: none; }
  .topbar-actions .btn-primary { padding: 0 11px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { grid-column: span 2; }
  .three-col { grid-template-columns: 1fr; }
  .bank-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .check-grid, .floor-body .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; }
  .detail-hero { padding: 16px; }
  .detail-hero h2 { font-size: 19px; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  .wizard-layout .summary-card { display: block; }
  .wizard-foot { flex-wrap: wrap; }
  .wizard-foot .spacer { display: none; }
  .wizard-foot .btn { flex: 1; }
  .notification-panel { right: 12px; left: 12px; width: auto; top: 62px; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { max-height: 94vh; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi:nth-child(3) { grid-column: auto; }
  .bank-grid { grid-template-columns: 1fr 1fr; }
  .page-head-actions { width: 100%; flex-wrap: wrap; }
  .page-head-actions .badge { width: 100%; justify-content: center; }
  .prototype-banner button { margin-left: 0; }
  .topbar { gap: 8px; }
  .topbar-title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { gap: 6px; }
}
@media (max-width: 440px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi:nth-child(3) { grid-column: auto; }
  .bank-grid { grid-template-columns: 1fr; }
  .check-grid, .floor-body .check-grid { grid-template-columns: 1fr; }
}

/* Print sheet */
.print-page { max-width: 900px; margin: 0 auto; }
.print-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.print-toolbar .spacer { flex: 1; }
.paper {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 10px 40px rgba(15,23,42,.08); padding: 34px 38px;
  color: #111827; font-size: 11.5px;
}
.paper-head { display: flex; align-items: flex-start; gap: 14px; border-bottom: 2px solid #111827; padding-bottom: 14px; }
.paper-logo { width: 42px; height: 42px; border-radius: 8px; background: #1d4ed8; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.paper-head .copy { flex: 1; }
.paper-head h1 { font-size: 20px; letter-spacing: .06em; font-weight: 800; }
.paper-head p { font-size: 9.5px; color: #4b5563; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.paper-prs { text-align: right; font-size: 10px; color: #4b5563; }
.paper-prs b { display: block; font-family: var(--mono); font-size: 20px; color: #111827; letter-spacing: -.02em; }
.paper-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-bottom: 1px solid #d1d5db; }
.paper-meta > div { padding: 9px 0; border-right: 1px solid #e5e7eb; }
.paper-meta > div:last-child { border-right: 0; }
.paper-meta span { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; color: #6b7280; }
.paper-meta b { display: block; font-size: 11px; margin-top: 2px; }
.paper-section { padding: 13px 0; border-bottom: 1px solid #e5e7eb; }
.paper-section h2 { font-size: 9px; letter-spacing: .13em; text-transform: uppercase; color: #6b7280; margin-bottom: 7px; font-weight: 700; }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.paper-row { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; padding: 2px 0; }
.paper-row span { color: #6b7280; }
.paper-row b { font-weight: 600; text-align: right; }
.paper-req { font-size: 10.5px; line-height: 1.65; white-space: pre-wrap; }
.paper-note { background: #f9fafb; border: 1px solid #e5e7eb; padding: 9px 11px; font-size: 10.5px; line-height: 1.55; color: #374151; }
.paper-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 34px; padding-bottom: 12px; }
.paper-sign > div { border-top: 1px dashed #6b7280; padding-top: 6px; font-size: 9px; color: #6b7280; }
.paper-sign b { display: block; color: #111827; font-size: 10px; }
.paper-foot { margin-top: 18px; font-size: 8px; color: #9ca3af; text-align: center; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .app-footer, .print-toolbar, .notification-panel, #modalRoot, .toast-root { display: none !important; }
  .main { margin: 0; }
  .view { padding: 0; max-width: none; }
  .paper { border: 0; box-shadow: none; padding: 0; }
  @page { size: A4; margin: 16mm; }
}

/* ============================================================
   UPDATE 2 — client review of 30 Oct 2026
   ============================================================ */

/* Dashboard: the two bottom sections share the width equally (p1). */
[hidden] { display: none !important; }
.two-col-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* New status + badge tones (p2). */
.badge-indigo { background: #eef2ff; color: #4338ca; }
.status-Quotation { background-color: #f0fdfa; color: #0f766e; }
.status-Agreement { background-color: #f5f3ff; color: #6d28d9; }
.status-Planning { background-color: #eef2ff; color: #4338ca; }
.status-Complete { background-color: #ecfdf3; color: #15803d; }
.status-Hold { background-color: #fff1f2; color: #be123c; }

/* Topbar “Add new” menu (p1). */
.add-new-wrap { position: relative; }.add-new-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 292px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
}
.menu-label { font-size: 9px; letter-spacing: .13em; text-transform: uppercase; color: #94a3b8; font-weight: 700; padding: 5px 8px 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.menu-item:hover { background: #f1f5f9; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 5px 6px; }
.mi-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; flex: none; }
.mi-icon .icon { width: 15px; height: 15px; }
.mi-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mi-copy strong { font-size: 12px; font-weight: 650; color: var(--ink); }
.mi-copy small { font-size: 10px; color: var(--muted); }

/* Team & access — role switcher and access gating (p6). */
.view-as { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 15px; }
.view-as .label { font-size: 9px; letter-spacing: .13em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.view-as .hint { font-size: 10.5px; color: var(--muted); }
.view-as .subtab { cursor: pointer; }
.view-as-top { display: flex; align-items: center; gap: 6px; padding: 0 10px 7px; justify-content: space-between; }
.view-as-top label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.view-as-select { appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 7px; font-size: 10.5px; font-weight: 600; color: #475569; cursor: pointer; flex: 1; max-width: 132px; }
body[data-role="Professional"] [data-nav="projects"],
body[data-role="Professional"] [data-nav="contacts"],
body[data-role="Professional"] [data-nav="quotations"],
body[data-role="Professional"] [data-nav="prs-bank"],
body[data-role="Professional"] [data-nav="analytics"],
body[data-role="Professional"] [data-nav="settings"],
body[data-role="Professional"] [data-nav="team"],
body[data-role="Professional"] .add-new-wrap,
body[data-role="Professional"] #exportNav,
body[data-role="Professional"] [data-admin-only],
body[data-role="Manager"] #exportNav,
body[data-role="Manager"] [data-admin-only] { display: none !important; }

/* Team & access is a standalone page: no global search / bell / add-new (p6). */
body.page-unlinked .topbar-actions { display: none; }
body.page-unlinked .topbar { justify-content: flex-start; }

/* Quotation / proposal / agreement (p7). */
.quote-sheet { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qs-head { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.qs-brand { display: flex; gap: 9px; align-items: center; }
.qs-logo { width: 32px; height: 32px; border-radius: 7px; background: var(--blue-600); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.qs-brand strong { display: block; font-size: 12px; }
.qs-brand span { display: block; font-size: 9.5px; color: var(--muted); }
.qs-doc { text-align: right; }
.qs-doc h4 { font-size: 10px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.qs-doc b { font-family: var(--mono); font-size: 14px; }
.qs-doc span { display: block; font-size: 9.5px; color: var(--muted); }
.qs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.qs-meta > div { padding: 8px 12px; border-right: 1px solid var(--line-soft); }
.qs-meta > div:last-child { border-right: 0; }
.qs-meta span { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.qs-meta b { font-size: 11px; }
.qs-table { width: 100%; border-collapse: collapse; }
.qs-table th { text-align: left; font-size: 8.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.qs-table td { font-size: 10.5px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.qs-totals { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.qs-totals > div { display: flex; gap: 18px; min-width: 215px; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.qs-totals b { color: var(--ink); }
.qs-totals .grand { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 5px; font-size: 12px; font-weight: 700; color: var(--ink); }
.qs-note { border-top: 1px solid var(--line); background: #fbfcfe; padding: 9px 14px; }
.qs-note strong { font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.qs-note p { font-size: 10px; color: #475569; margin-top: 2px; }
.qs-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 26px 14px 12px; }
.qs-sign > div { border-top: 1px dashed #94a3b8; padding-top: 4px; font-size: 9px; color: var(--muted); }

/* PRS print sheet — studio form layout (p9), true A4 portrait. */
.print-page { max-width: 210mm; margin: 0 auto; }
.paper.fs-sheet { width: 210mm; min-height: 296mm; padding: 12mm; box-sizing: border-box; font-size: 10px; display: flex; flex-direction: column; }
.fs-head { display: flex; align-items: flex-start; gap: 14px; border: 1px solid #111827; padding: 10px 12px; }
.fs-brand { display: flex; gap: 9px; align-items: center; width: 196px; }
.fs-logo { width: 36px; height: 36px; border-radius: 7px; background: #1d4ed8; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.fs-brand-copy strong { display: block; font-size: 10.5px; letter-spacing: .1em; }
.fs-brand-copy span { display: block; font-size: 7px; letter-spacing: .09em; color: #4b5563; }
.fs-title { flex: 1; text-align: center; align-self: center; font-size: 16px; letter-spacing: .08em; font-weight: 800; }
.fs-prs { text-align: right; width: 108px; }
.fs-prs span { display: block; font-size: 7px; letter-spacing: .1em; color: #4b5563; }
.fs-prs b { display: block; font-family: var(--mono); font-size: 16px; line-height: 1.2; }
.fs-prs small { font-size: 7.5px; color: #4b5563; }

.fs-grid { border: 1px solid #111827; border-top: 0; }
.fs-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #d1d5db; }
.fs-row:last-child { border-bottom: 0; }
.fs-row.fs-full { grid-template-columns: 1fr; }
.fs-cell { padding: 6px 10px; border-right: 1px solid #d1d5db; display: flex; flex-direction: column; gap: 1px; }
.fs-cell.fs-end { border-right: 0; }
.fs-label { font-size: 6.8px; letter-spacing: .13em; color: #6b7280; font-weight: 700; }
.fs-value { font-size: 10.5px; font-weight: 600; }
.fs-value small { font-weight: 500; color: #4b5563; }

.fs-body { display: grid; grid-template-columns: 1.22fr 1fr; border: 1px solid #111827; border-top: 0; height: 166mm; flex: none; }
.fs-panel { padding: 8px 10px; display: flex; flex-direction: column; }
.fs-sketch-panel { border-right: 1px solid #111827; }
.fs-panel-label { font-size: 6.8px; letter-spacing: .13em; color: #6b7280; font-weight: 700; }
.fs-canvas { position: relative; flex: 1; min-height: 0; margin: 9px 14px 8px; }
.fs-plot { position: absolute; inset: 20px 22px; border: 1px solid #111827; }
.fs-dim { position: absolute; font-size: 8px; color: #374151; background: #fff; padding: 0 3px; }
.fs-dim-top { top: 4px; left: 50%; transform: translateX(-50%); }
.fs-dim-left { left: -4px; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: center; }
.fs-facing { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: flex; gap: 5px; align-items: baseline; border: 1px solid #111827; background: #fff; padding: 1px 7px; font-size: 6.8px; letter-spacing: .1em; color: #6b7280; font-weight: 700; }
.fs-facing b { font-size: 9px; color: #111827; letter-spacing: 0; }
.fs-area { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; border-top: 1px solid #d1d5db; padding-top: 6px; }
.fs-area b { display: block; font-size: 12px; }
.fs-area small { display: block; font-size: 7px; color: #6b7280; }
.fs-dims { display: flex; gap: 7px; font-size: 7.5px; color: #4b5563; }
.fs-req-list { margin-top: 7px; display: flex; flex-direction: column; gap: 6px; }
.fs-floor b { display: inline-block; min-width: 70px; font-size: 9px; }
.fs-floor span { font-size: 9.5px; line-height: 1.5; }
.fs-floor em { display: block; font-style: normal; color: #6b7280; font-size: 8px; margin-top: 1px; }
.fs-req-note { margin-top: auto; padding-top: 8px; }
.fs-req-note p { font-size: 8.5px; line-height: 1.5; color: #374151; margin-top: 2px; }
.fs-line { border: 1px solid #111827; border-top: 0; padding: 6px 10px; display: flex; gap: 10px; align-items: baseline; }
.fs-line b { font-size: 10px; }
.fs-note { border: 1px solid #111827; border-top: 0; padding: 7px 10px; }
.fs-note p { font-size: 8px; line-height: 1.55; color: #374151; margin-top: 3px; }
.fs-foot { display: grid; grid-template-columns: 1fr 1.25fr .55fr; gap: 22px; margin-top: auto; padding-top: 26px; }
.fs-sign { border-top: 1px solid #111827; padding-top: 4px; font-size: 6.8px; letter-spacing: .1em; color: #6b7280; font-weight: 700; }
.fs-sign b { display: block; font-size: 9px; letter-spacing: 0; color: #111827; margin-top: 1px; }

/* Responsive additions. */
@media (max-width: 980px) {
  .two-col-even { grid-template-columns: 1fr; }
  .fs-body { grid-template-columns: 1fr; }
  .fs-sketch-panel { border-right: 0; border-bottom: 1px solid #111827; }
  .qs-meta { grid-template-columns: 1fr 1fr; }
  .qs-meta > div:nth-child(2n) { border-right: 0; }
  .qs-meta > div { border-bottom: 1px solid var(--line-soft); }
  .paper.fs-sheet { width: 100%; min-height: 0; padding: 22px; }
  .fs-body { height: auto; }
  .fs-canvas { min-height: 180px; }
  .print-page { max-width: 100%; }
}
@media (max-width: 720px) {
  .add-new-menu { width: min(88vw, 292px); }
  .fs-head { flex-wrap: wrap; }
  .fs-title { order: 3; width: 100%; text-align: left; font-size: 14px; }
  .fs-brand { width: auto; flex: 1; }
  .fs-foot { grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }
}

@media print {
  .paper.fs-sheet { width: 210mm; min-height: 271mm; padding: 12mm; border: 0; box-shadow: none; }
  .fs-sheet { break-inside: avoid; page-break-inside: avoid; }
  .print-page { max-width: none; }
  @page { size: A4 portrait; margin: 0; }
}

/* ============================================================
   PREMIUM WORKSPACE THEME — "Architectural Luxury"
   Navy #17253B · Sandstone #C19A6B · Ivory #F5F3EE
   Supersedes the V3 blue/slate palette. Appended last so it wins.
   ============================================================ */

:root {
  --navy: #17253B;
  --navy-deep: #101B2C;
  --graphite: #29364A;
  --sand: #C19A6B;
  --sand-600: #A9825A;
  --sand-700: #8F6C48;
  --sand-100: #E8D8C2;
  --sand-50: #F7F1E8;
  --ivory: #F5F3EE;
  --white: #ffffff;

  --blue-700: #17253B;
  --blue-600: #1E3049;
  --blue-500: #C19A6B;
  --blue-100: #E6E1D8;
  --blue-50: #F3EFE7;

  --ink: #17253B;
  --ink-2: #29364A;
  --muted: #6E7683;
  --muted-2: #87909C;

  --line: #E6E1D8;
  --line-soft: #EFEBE3;
  --bg: #F5F3EE;
  --card: #ffffff;

  --green: #2F6B4F;
  --green-bg: #E8F1EA;
  --amber: #9A6B22;
  --amber-bg: #FBF1DF;
  --rose: #A03A47;
  --rose-bg: #F9E9EA;
  --violet: #5B4A7A;
  --violet-bg: #EFEAF5;
  --teal: #2C6B6B;
  --teal-bg: #E6F1F1;
  --slate-bg: #F1EFEA;

  --radius: 18px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(16, 27, 44, .05);
  --shadow-md: 0 12px 32px rgba(16, 27, 44, .07);
  --sidebar-w: 262px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Manrope", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

body {
  background: var(--ivory);
  color: var(--ink-2);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .kpi-value, .big, .ws-title h1 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -.015em;
}

.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;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  background: var(--navy);
  color: #E9ECF1;
  border-right: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  gap: 11px;
}

.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(193, 154, 107, .14);
  border: 1px solid rgba(193, 154, 107, .45);
  color: var(--sand);
  display: grid; place-items: center;
  font-size: 0; /* icon replaces letters */
}
.brand-mark svg { width: 26px; height: 26px; }

.brand-copy strong {
  font-family: var(--display);
  font-size: 13.5px; font-weight: 800; letter-spacing: .13em; color: #fff;
}
.brand-copy span {
  font-size: 8.6px; letter-spacing: .16em; color: rgba(233, 236, 241, .55);
  font-weight: 600; margin-top: 2px;
}

.nav { padding: 14px 12px 10px; overflow-y: auto; flex: 1; min-height: 0; }
.nav::-webkit-scrollbar { width: 0; }

.nav-label {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(233, 236, 241, .42); font-weight: 700;
  padding: 8px 10px 7px;
}
.nav-label-spaced { margin-top: 14px; }

.nav-item {
  color: rgba(233, 236, 241, .78);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 10px;
  gap: 11px;
  margin-bottom: 2px;
}
.nav-item .icon { width: 17px; height: 17px; stroke-width: 1.7; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: var(--sand);
  color: var(--navy-deep);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(193, 154, 107, .22);
}
.nav-item.active .icon { stroke-width: 2; opacity: 1; }

.nav-count {
  margin-left: auto;
  background: rgba(255, 255, 255, .1);
  color: rgba(233, 236, 241, .8);
  font-size: 10.5px; font-weight: 600;
  padding: 1px 7px; min-width: 21px;
}
.nav-item.active .nav-count { background: rgba(16, 27, 44, .16); color: var(--navy-deep); }
.nav-count.accent { background: rgba(193, 154, 107, .22); color: #EBCBA4; }
.nav-item.active .nav-count.accent { background: rgba(16, 27, 44, .16); color: var(--navy-deep); }

.sidebar-art {
  color: rgba(193, 154, 107, .38);
  padding: 0 10px 6px;
  opacity: .75;
  pointer-events: none;
}
.sidebar-art svg { width: 100%; height: auto; display: block; }

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 12px 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(0,0,0,.18));
}
.view-as-top { padding: 0 4px 8px; }
.view-as-top label { color: rgba(233, 236, 241, .45); }
.view-as-select {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #E9ECF1;
}
.view-as-select option { color: #17253B; }

.user-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 9px 10px;
  border-radius: 11px;
}
.user-card:hover { background: rgba(255, 255, 255, .1); }
.user-card .avatar { background: var(--sand); color: var(--navy-deep); font-weight: 700; }
.user-copy strong { color: #fff; font-size: 12.5px; }
.user-copy span { color: rgba(233, 236, 241, .55); font-size: 10.5px; }

.signout {
  color: rgba(233, 236, 241, .55);
  padding: 9px 10px;
  font-size: 11.5px;
  margin-top: 4px;
}
.signout:hover { color: #fff; background: rgba(255, 255, 255, .06); }

/* ---------------- Topbar ---------------- */

.topbar {
  background: rgba(245, 243, 238, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
  padding: 0 26px;
  height: 72px;
}
.menu-btn { color: var(--graphite); }

.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs a {
  font-size: 13px; color: var(--muted-2); font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.crumbs a:hover { color: var(--sand-700); }
.crumb-sep { color: #C9C2B6; font-size: 12px; }
.crumbs h1 {
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--display);
}

.global-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 38px;
  width: 300px;
}
.global-search input { font-size: 12.5px; color: var(--ink-2); }
.global-search input::placeholder { color: var(--muted-2); }
.global-search kbd {
  background: var(--ivory); border: 1px solid var(--line);
  color: var(--muted-2); border-radius: 5px;
}

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--graphite);
  border-radius: 10px;
}
.icon-btn:hover { border-color: var(--sand-100); color: var(--sand-700); background: #fff; }
.bell-btn .dot { background: var(--sand); }

/* ---------------- Buttons ---------------- */

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--graphite);
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  padding: 0 13px;
  height: 36px;
  box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--sand-100); color: var(--ink); background: #FFFDF9; }
.btn-sm { height: 32px; font-size: 11.5px; padding: 0 11px; }
.btn-primary {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--navy-deep);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(193, 154, 107, .24);
}
.btn-primary:hover { background: var(--sand-600); border-color: var(--sand-600); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--sand-50); color: var(--sand-700); border-color: transparent; }
.btn-danger { background: #fff; border-color: #E7C9C9; color: var(--rose); }
.btn-danger:hover { background: var(--rose-bg); border-color: #DDB3B3; color: var(--rose); }

.link { color: var(--sand-700); font-weight: 600; }
.link:hover { color: var(--graphite); }

/* ---------------- Surfaces ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-foot {
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

.page-head h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.page-head p { color: var(--muted); font-size: 12.5px; }

.section-title h3 { font-family: var(--display); font-size: 14.5px; font-weight: 700; }
.section-title p { color: var(--muted); font-size: 11px; }

.prototype-banner {
  background: #FFFDF8;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 12px;
}
.prototype-banner strong { color: var(--ink); }
.prototype-banner button { color: var(--sand-700); }

/* ---------------- Badges, chips, PRS tag ---------------- */

.badge {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .01em;
}
.badge-soft { background: #F1EFEA; color: #5E6673; }
.badge-blue { background: #E8EDF3; color: #2A4A6B; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-rose { background: var(--rose-bg); color: var(--rose); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-indigo { background: #E9ECF3; color: #3A4A63; }
.badge-teal { background: var(--teal-bg); color: var(--teal); }
.badge .dot { background: currentColor; opacity: .75; }

.prs-tag {
  font-family: var(--mono);
  background: var(--sand-50);
  border: 1px solid var(--sand-100);
  color: var(--sand-700);
  border-radius: 7px;
  font-size: 11px;
  letter-spacing: .01em;
}

.chip {
  background: #F6F4EF;
  border: 1px solid var(--line);
  color: var(--graphite);
  border-radius: 999px;
  font-size: 10.5px;
}
.chip.blue { background: var(--sand-50); border-color: var(--sand-100); color: var(--sand-700); }
.chip.violet { background: var(--violet-bg); border-color: #E3DCEB; color: var(--violet); }
.chip.amber { background: var(--amber-bg); border-color: #F0E0C6; color: var(--amber); }
.chip.green { background: var(--green-bg); border-color: #D8E6DC; color: var(--green); }

/* ---------------- Tables ---------------- */

table.data thead th {
  background: #FBFAF7;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--line);
}
table.data td { border-bottom: 1px solid var(--line-soft); color: var(--graphite); }
table.data tbody tr:hover { background: #FCFAF6; }
table.data .cell-main { color: var(--ink); font-weight: 600; }

/* ---------------- Forms ---------------- */

.input, .select, textarea.input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--sand);
  box-shadow: 0 0 0 3px rgba(193, 154, 107, .16);
  outline: none;
}
.field label { color: var(--graphite); font-weight: 600; font-size: 11.5px; }
.hint { color: var(--muted-2); }

/* ---------------- Tabs (generic) ---------------- */

.tabs { border-bottom: 1px solid var(--line); }
.tab { color: var(--muted); font-weight: 600; }
.tab.active { color: var(--ink); border-bottom-color: var(--sand); }
.tab .count { background: #F1EFEA; color: var(--muted); }
.tab.active .count { background: var(--sand-50); color: var(--sand-700); }

.subtab { border-radius: 9px; border-color: var(--line); color: var(--muted); background: #fff; }
.subtab.active { border-color: var(--sand-100); background: var(--sand-50); color: var(--sand-700); }

/* ---------------- Modals and toasts ---------------- */

.modal { border-radius: 18px; box-shadow: 0 30px 80px rgba(16, 27, 44, .28); }
.modal-head { border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-family: var(--display); font-size: 17px; }
.modal-foot { background: #FBFAF7; border-top: 1px solid var(--line-soft); }
.modal-backdrop { background: rgba(16, 27, 44, .5); }

.toast { background: var(--navy); color: #fff; border-radius: 12px; }
.toast .icon { color: var(--sand); }

/* ---------------- Dashboard bits that already exist ---------------- */

.kpi { border-radius: var(--radius); }
.kpi-label { color: var(--muted-2); letter-spacing: .08em; }
.kpi-icon { background: var(--sand-50); color: var(--sand-700); border-radius: 10px; }
.kpi-icon.violet { background: var(--violet-bg); color: var(--violet); }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-bar { background: #F1EFEA; }
.kpi-bar i { background: var(--sand) !important; }

.attention-item, .schedule-item { border-bottom: 1px solid var(--line-soft); }
.attention-icon { border-radius: 10px; }

/* ============================================================
   PROJECT WORKSPACE
   ============================================================ */

.ws { display: flex; flex-direction: column; gap: 16px; }

/* Header ---------------------------------------------------- */

.ws-head { display: flex; align-items: flex-start; gap: 18px; padding: 2px 2px 0; }

.ws-thumb {
  width: 148px; height: 112px; flex: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #EFEAE1 0%, #E4DED2 100%);
  position: relative; overflow: hidden;
}
.ws-thumb svg { width: 100%; height: 100%; display: block; color: #B7AD9C; }
.ws-thumb::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  border-radius: 14px;
}

.ws-title { min-width: 0; flex: 1; }
.ws-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ws-badges .pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  border: 1px solid transparent;
}
.pill-sand { background: var(--sand-50); border-color: var(--sand-100); color: var(--sand-700); font-family: var(--mono); letter-spacing: .01em; }
.pill-soft { background: #F1EFEA; color: #5E6673; }

.ws-title h1 {
  font-size: 30px; font-weight: 800; letter-spacing: -.025em;
  line-height: 1.15; margin: 0 0 8px;
}
.ws-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.ws-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ws-meta .icon { width: 13px; height: 13px; color: var(--muted-2); }
.ws-meta .sep { width: 1px; height: 12px; background: var(--line); }

.ws-actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 4px; }
.ws-actions .status-select {
  height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background-color: #fff; font-size: 11.5px; font-weight: 600; padding: 0 30px 0 12px;
  color: var(--graphite);
}
.ws-more { position: relative; }
.ws-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 6px; min-width: 190px;
}
.ws-more-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; background: none; padding: 8px 9px; border-radius: 8px;
  font-size: 12px; color: var(--graphite); text-align: left; cursor: pointer;
}
.ws-more-menu button:hover { background: var(--sand-50); color: var(--sand-700); }

/* Tabs ------------------------------------------------------ */

.ws-tabs {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 8px; box-shadow: var(--shadow-sm);
}
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; cursor: pointer;
  padding: 9px 12px 12px; border-radius: 9px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  white-space: nowrap; position: relative;
}
.ws-tab .icon { width: 15px; height: 15px; opacity: .8; }
.ws-tab:hover { background: #FBFAF7; color: var(--graphite); }
.ws-tab.active { color: var(--ink); background: var(--sand-50); }
.ws-tab.active .icon { color: var(--sand-700); opacity: 1; }
.ws-tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--sand);
}

/* Overview grid --------------------------------------------- */

.ws-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.stat {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 16px; border-radius: 14px;
  border: 1px solid rgba(23, 37, 59, .06);
}
.stat-ico {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .6); color: var(--graphite);
}
.stat-ico .icon { width: 17px; height: 17px; }
.stat span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6E7683; font-weight: 600; }
.stat b { display: block; font-family: var(--display); font-size: 15.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.stat small { display: block; font-size: 10.5px; color: #7A8290; margin-top: 1px; }
.stat-blue { background: #EAF0F6; }
.stat-peach { background: #F8EFE2; }
.stat-mint { background: #E9F2EC; }
.stat-lilac { background: #F0ECF7; }

.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) 292px;
  gap: 16px;
  align-items: start;
}
.ws-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.panel { padding: 0; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 9px;
  padding: 15px 18px 12px;
}
.panel-head .icon { width: 16px; height: 16px; color: var(--sand-700); }
.panel-head h3 {
  font-family: var(--display); font-size: 13.5px; font-weight: 700; color: var(--ink);
  margin: 0;
}
.panel-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-body { padding: 0 18px 16px; }
.panel .table-wrap table.data, .table-wrap.table-fit table.data { min-width: 0; }
.panel .table-wrap { -webkit-overflow-scrolling: touch; }
.panel-sep { height: 1px; background: var(--line-soft); margin: 0 18px; }

.kv { display: flex; flex-direction: column; }
.kv-row {
  display: grid; grid-template-columns: 42% 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 12px; align-items: baseline;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--muted); }
.kv-row dd { color: var(--ink); font-weight: 500; text-align: right; }
.kv-row dd .badge { font-size: 10px; }

/* Progress -------------------------------------------------- */

.stepper { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 14px; }
.step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; position: relative; }
.step::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0;
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--sand-100); }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; z-index: 1;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: var(--muted-2);
}
.step-dot .icon { width: 12px; height: 12px; }
.step.done .step-dot { background: var(--navy); border-color: var(--navy); color: var(--sand); }
.step.current .step-dot { border-color: var(--sand); background: #fff; box-shadow: 0 0 0 4px rgba(193, 154, 107, .16); }
.step.current .step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sand); }
.step-label { font-size: 9.5px; color: var(--muted); margin-top: 7px; text-align: center; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; }
.step.current .step-label { color: var(--ink); }
.step-date { font-size: 8.5px; color: var(--muted-2); margin-top: 1px; text-align: center; font-family: var(--mono); white-space: nowrap; }

.progress-line { display: flex; align-items: center; gap: 12px; }
.progress-line .bar { flex: 1; height: 6px; border-radius: 99px; background: #F0EDE6; overflow: hidden; }
.progress-line .bar i { display: block; height: 100%; background: var(--sand); border-radius: 99px; }
.progress-line .stage { font-size: 10.5px; font-weight: 700; color: var(--sand-700); white-space: nowrap; }

.milestone {
  margin-top: 12px; padding: 11px 13px; border-radius: 11px;
  background: var(--sand-50); border: 1px solid var(--sand-100);
  display: flex; gap: 10px; align-items: flex-start;
}
.milestone .icon { color: var(--sand-700); margin-top: 1px; }
.milestone span { display: block; font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--sand-700); font-weight: 700; }
.milestone b { display: block; font-size: 12px; color: var(--ink); margin-top: 2px; font-weight: 600; }

/* Requirements list ----------------------------------------- */

.req-list { display: flex; flex-direction: column; gap: 2px; }
.req-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--graphite); }
.req-item:last-child { border-bottom: 0; }
.req-tick {
  width: 17px; height: 17px; border-radius: 50%; flex: none; margin-top: 1px;
  background: var(--sand-50); color: var(--sand-700);
  display: grid; place-items: center;
}
.req-tick .icon { width: 10px; height: 10px; stroke-width: 2.6; }
.req-empty { padding: 10px 0; font-size: 11.5px; color: var(--muted-2); }

/* Right rail ------------------------------------------------- */

.quick-list { display: flex; flex-direction: column; gap: 7px; }
.quick-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; font-weight: 600; color: var(--graphite);
  cursor: pointer; text-align: left;
}
.quick-btn .icon { width: 15px; height: 15px; color: var(--sand-700); }
.quick-btn:hover { border-color: var(--sand-100); background: #FFFDF8; }
.quick-btn.primary {
  background: var(--sand-50); border-color: var(--sand-100); color: var(--ink);
  font-weight: 700;
}
.quick-btn.primary:hover { background: #F3E9DA; }

.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.team-row:last-child { border-bottom: 0; }
.team-row .avatar { width: 32px; height: 32px; font-size: 10px; }
.team-copy strong { display: block; font-size: 12px; color: var(--ink); font-weight: 600; }
.team-copy span { display: block; font-size: 10.5px; color: var(--muted); }
.team-empty { font-size: 11.5px; color: var(--muted-2); padding: 6px 0 2px; line-height: 1.55; }

/* Client / quotations tabs ---------------------------------- */

.two-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wish-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.wish-row:last-child { border-bottom: 0; }
.wish-row .attention-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.wish-copy strong { display: block; font-size: 12px; color: var(--ink); }
.wish-copy span { display: block; font-size: 10.5px; color: var(--muted); }
.wish-when { margin-left: auto; font-size: 10.5px; color: var(--sand-700); font-weight: 600; white-space: nowrap; }

.q-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.q-row:last-child { border-bottom: 0; }
.q-no { font-family: var(--mono); font-size: 11px; color: var(--sand-700); background: var(--sand-50); border: 1px solid var(--sand-100); padding: 3px 7px; border-radius: 6px; }
.q-meta { min-width: 0; }
.q-meta strong { display: block; font-size: 12px; color: var(--ink); }
.q-meta span { display: block; font-size: 10.5px; color: var(--muted); }
.q-amount { margin-left: auto; text-align: right; font-size: 12px; font-weight: 700; color: var(--ink); font-family: var(--display); }

/* Responsive ------------------------------------------------ */

@media (max-width: 1280px) {
  .ws-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ws-rail { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .ws-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .ws-head { flex-wrap: wrap; }
  .ws-thumb { width: 96px; height: 78px; }
  .ws-title h1 { font-size: 24px; }
  .ws-actions { width: 100%; flex-wrap: wrap; padding-top: 0; }
  .ws-layout, .two-panel, .ws-rail { grid-template-columns: 1fr; }
  .ws-rail { display: flex; flex-direction: column; align-items: stretch; }
  .stepper { flex-wrap: wrap; row-gap: 14px; overflow: visible; }
  .step { flex: 0 0 33.333%; min-width: 0; }
  .step::before { display: none; }
}

@media (max-width: 720px) {
  .ws-stats { grid-template-columns: 1fr; }
  .ws-title h1 { font-size: 21px; }
  .ws-meta { gap: 8px; font-size: 11px; }
  .ws-meta .sep { display: none; }
  .ws-tab { padding: 8px 10px; font-size: 11.5px; }
  .ws-actions .btn span { display: inline; }
  .kv-row { grid-template-columns: 45% 1fr; }
}

@media (max-width: 520px) {
  .ws-head { gap: 12px; }
  .ws-thumb { display: none; }
  .ws-actions { gap: 6px; }
  .ws-actions .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   DOCUMENT GENERATOR — proposal / quotation / agreement sheets
   Appended last (2 Nov 2026). Screen: print preview stack.
   Print: each .doc-sheet starts on its own A4 page.
   ============================================================ */

.doc-check-list { display: flex; flex-direction: column; gap: 8px; }
.doc-check {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line, #e6e1d8); border-radius: 10px; cursor: pointer; background: #fff;
}
.doc-check:hover { border-color: var(--sand, #c19a6b); }
.doc-check input { width: 16px; height: 16px; accent-color: var(--sand, #c19a6b); flex: none; }
.doc-check .dc-copy { flex: 1; }
.doc-check .dc-copy strong { display: block; font-size: 13px; color: var(--navy, #17253b); }
.doc-check .dc-copy small { display: block; font-size: 11px; color: var(--muted, #6e7683); margin-top: 2px; }

.paper.doc-sheet {
  font-family: Georgia, 'Times New Roman', serif; color: #1a2233;
  width: 210mm; min-height: 271mm; padding: 14mm; background: #fff;
  border: 1px solid #e6e1d8; box-shadow: 0 12px 32px rgba(15, 23, 42, .10);
  margin: 0 auto 22px; display: flex; flex-direction: column;
}
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 2px solid #17253b; padding-bottom: 10px; }
.doc-head-title h1 { font-size: 15px; letter-spacing: .06em; margin: 0; text-transform: uppercase; }
.doc-head-title p { font-size: 10px; color: #6e7683; margin: 3px 0 0; }
.doc-body { flex: 1; font-size: 11.5px; line-height: 1.55; padding-top: 10px; }
.doc-body h2 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #17253b; margin: 14px 0 6px; border-bottom: 1px solid #e6e1d8; padding-bottom: 3px; }
.doc-p { margin: 6px 0; }
.doc-phase { margin: 4px 0; padding-left: 10px; }
.doc-ul { margin: 6px 0 6px 18px; padding: 0; }
.doc-ul li { margin: 3px 0; }
.doc-note { font-size: 10.5px; color: #444d5c; margin: 6px 0; }
.doc-sign { margin-top: 18px; font-weight: 700; }
.doc-sign small { font-weight: 400; color: #6e7683; }
.doc-kv { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc-kv th, .doc-kv td { border: 1px solid #d9d3c8; padding: 5px 8px; font-size: 11px; text-align: left; vertical-align: top; }
.doc-kv th { width: 32%; background: #f5f3ee; font-weight: 700; text-transform: uppercase; font-size: 9.5px; letter-spacing: .05em; }
.doc-table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc-table th, .doc-table td { border: 1px solid #d9d3c8; padding: 5px 8px; font-size: 10.5px; text-align: left; }
.doc-table th { background: #f5f3ee; text-transform: uppercase; font-size: 9.5px; letter-spacing: .05em; }
.doc-blank { color: #9aa2ae; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #d9d3c8; padding-top: 8px; margin-top: 14px; font-size: 10px; color: #6e7683; }
.doc-signrow { display: flex; gap: 40px; margin: 18px 0 8px; }
.doc-signrow div { flex: 1; }
.doc-signrow span { display: block; border-bottom: 1px solid #1a2233; height: 34px; }
.doc-signrow small { color: #6e7683; font-size: 10px; }
.doc-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.doc-cover h1 { font-size: 26px; letter-spacing: .14em; margin: 6px 0 0; }
.doc-cover-sub { font-size: 10px; letter-spacing: .2em; color: #6e7683; margin: 0 0 18px; }
.doc-cover-kv { width: 78%; text-align: left; }

@media print {
  .paper.doc-sheet, .paper.fs-sheet { page-break-after: always; break-after: page; }
  .print-page > article:last-child { page-break-after: auto; break-after: auto; }
  .paper.doc-sheet { border: 0; box-shadow: none; margin: 0; width: 210mm; min-height: 271mm; padding: 14mm; }
}

/* Cover photo on the workspace header (2 Nov 2026). */
.ws-thumb-photo { position: relative; cursor: pointer; overflow: hidden; }
.ws-thumb-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.ws-thumb-edit {
  position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 7px;
  background: rgba(16, 27, 44, .72); color: #fff; opacity: 0; transition: opacity .15s;
}
.ws-thumb-photo:hover .ws-thumb-edit, .ws-thumb-photo:focus .ws-thumb-edit { opacity: 1; }
.attention-meta .btn { padding: 3px 8px; font-size: 10.5px; }

/* ============================================================
   PRS FINAL EDITS (3 Nov 2026) — dashboard follow-ups, compact
   recent registrations, multi-site chips, agreement completion,
   document contact bar.
   ============================================================ */

.followup-list { display: flex; flex-direction: column; }
.followup-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--border, #e6e1d8);
}
.followup-item:last-child { border-bottom: 0; }
.followup-item .attention-copy { flex: 1; min-width: 0; }
.followup-item .attention-copy strong { display: block; font-size: 12.5px; color: var(--navy, #17253b); }
.followup-item .attention-copy span { display: block; font-size: 11px; color: var(--muted, #6e7683); margin-top: 1px; }
.fu-dot { background: #fff7ed; color: #c2410c; }

.compact-table th, .compact-table td { padding: 6px 8px; font-size: 10.5px; }
.compact-table .cell-main { font-size: 11px; }
.compact-table .cell-sub { font-size: 9.5px; }
.compact-table .prs-tag { padding: 2px 6px; font-size: 9.5px; }
.compact-table .badge { font-size: 9.5px; padding: 2px 7px; }

.site-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.site-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border, #e6e1d8); border-radius: 999px;
  padding: 5px 11px; cursor: pointer; font-size: 11.5px; background: #fff;
}
.site-chip input { width: 13px; height: 13px; accent-color: var(--sand, #c19a6b); margin: 0; }
.site-chip.checked { border-color: var(--sand, #c19a6b); background: #faf6ef; font-weight: 600; }

.ag-phase-dates { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ag-phase-row { display: flex; align-items: center; gap: 10px; }
.ag-phase-row .ag-phase-label { flex: 1; font-size: 11.5px; color: var(--graphite, #29364a); }
.ag-phase-row .input { width: 150px; flex: none; }

.doc-contact-bar {
  display: flex; justify-content: center; gap: 26px; flex-wrap: wrap;
  background: var(--navy, #17253b); color: #f5f3ee;
  border-radius: 999px; padding: 7px 18px; margin-top: 12px;
  font-size: 10.5px; letter-spacing: .02em;
}
.compact-table { min-width: 0 !important; }
.compact-table.data, table.data.compact-table { min-width: 0 !important; }


/* ============================================================
   SESSION — sign-in screen, session identity, feedback capture
   ============================================================ */

#loginRoot[hidden] { display: none !important; }
#loginRoot {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(160deg, #101B2C 0%, #17253B 55%, #1d3050 100%);
  display: grid; place-items: center; padding: 20px;
}
.login-card {
  width: 400px; max-width: 100%;
  background: #fff; border-radius: 20px; padding: 30px 30px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand .fs-logo { background: #17253B; color: #C19A6B; }
.login-brand strong { display: block; font-family: var(--font-head, 'Manrope', sans-serif); letter-spacing: .1em; font-size: 13px; color: #17253B; }
.login-brand span { display: block; font-size: 9px; letter-spacing: .18em; color: #87909C; margin-top: 2px; }
.login-card h1 { font-family: var(--font-head, 'Manrope', sans-serif); font-size: 19px; color: #17253B; margin: 0 0 6px; }
.login-sub { font-size: 12px; color: #6E7683; line-height: 1.6; margin: 0 0 16px; }
.login-foot { font-size: 10.5px; color: #87909C; text-align: center; margin: 14px 0 0; }

.feedback-btn { margin-right: 4px; white-space: nowrap; }

.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.welcome-grid > div {
  border: 1px solid var(--border, #E6E1D8); border-radius: 12px; padding: 10px 12px;
  font-size: 11px; color: #6E7683; line-height: 1.55;
}
.welcome-grid strong { display: block; font-size: 11.5px; color: var(--navy, #17253B); margin-bottom: 3px; }

.fb-list { margin-top: 14px; border-top: 1px solid var(--border, #E6E1D8); padding-top: 10px; }
.fb-list > label { font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #6E7683; }
.fb-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border, #E6E1D8); }
.fb-item:last-child { border-bottom: 0; }
.fb-copy { flex: 1; }
.fb-copy p { margin: 0; font-size: 12px; color: var(--graphite, #29364A); line-height: 1.5; }
.fb-copy small { color: #87909C; font-size: 10px; }

/* Master lists management (6 Nov 2026). */
.ml-block { border: 1px solid var(--border, #E6E1D8); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ml-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ml-head label { font-weight: 700; font-size: 11.5px; color: var(--navy, #17253B); text-transform: uppercase; letter-spacing: .05em; }
.ml-head span { font-size: 10.5px; color: #87909C; }
.ml-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px 5px 11px; font-size: 11.5px; }
.ml-x { border: 0; background: transparent; color: #87909C; font-size: 13px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ml-x:hover { color: #be123c; }
.ml-add { display: flex; gap: 8px; margin-top: 10px; }
.ml-add .input { flex: 1; }
.ml-line { font-size: 11.5px; color: #6E7683; margin-top: 6px; line-height: 1.5; }
.ml-line b { color: var(--navy, #17253B); }

/* Master lists: project types + reorder (M-3, 6 Nov 2026). */
.ml-type { border: 1px solid var(--border, #E6E1D8); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.ml-type-row { display: flex; align-items: center; gap: 8px; }
.ml-type-row .input { flex: 1; font-weight: 650; }
.ml-move, .ml-arrow { display: inline-flex; }
.ml-arrow {
  border: 1px solid var(--border, #E6E1D8); background: #fff; color: #6E7683;
  width: 18px; height: 16px; font-size: 8px; line-height: 1; cursor: pointer;
  display: inline-grid; place-items: center; border-radius: 4px; padding: 0;
}
.ml-arrow:hover { color: var(--navy, #17253B); border-color: var(--sand, #C19A6B); }
.ml-arrow.disabled { opacity: .3; cursor: default; }
.ml-subs { margin-top: 8px; padding-left: 26px; }
.ml-subs-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #87909C; margin-bottom: 5px; }

/* Reports & Analytics (M-8, 6 Nov 2026). */
.an-body { padding: 4px 18px 16px; }
.an-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.an-label { width: 130px; flex: none; font-size: 11.5px; color: var(--graphite, #29364A); text-align: right; }
.an-track { flex: 1; height: 14px; background: #f1ede6; border-radius: 999px; overflow: hidden; }
.an-track i { display: block; height: 100%; border-radius: 999px; }
.an-value { width: 40px; flex: none; text-align: right; font-size: 12px; color: var(--navy, #17253B); }
