:root {
  color-scheme: dark;
  --bg: #080912;
  --bg-soft: #0c0e19;
  --panel: rgba(19, 21, 35, .82);
  --panel-2: #151827;
  --panel-3: #1b1e31;
  --line: rgba(163, 170, 205, .12);
  --line-strong: rgba(163, 170, 205, .2);
  --ink: #f1f2fb;
  --ink-2: #c1c4d8;
  --muted: #81869f;
  --violet: #9475f5;
  --violet-bright: #ad95ff;
  --cyan: #51c7d9;
  --green: #53d4a1;
  --amber: #f4bd62;
  --rose: #ff8297;
  --red: #ff8297;
  --shadow: 0 18px 55px rgba(0, 0, 0, .28);
  --radius: 16px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eff0f7;
  --bg-soft: #e9ebf4;
  --panel: rgba(255, 255, 255, .88);
  --panel-2: #fff;
  --panel-3: #f3f4fa;
  --line: rgba(34, 41, 79, .1);
  --line-strong: rgba(34, 41, 79, .17);
  --ink: #171a2d;
  --ink-2: #414760;
  --muted: #737a91;
  --violet: #7351dc;
  --violet-bright: #5f40c7;
  --cyan: #078da1;
  --green: #118765;
  --amber: #a46705;
  --rose: #c84259;
  --red: #c84259;
  --shadow: 0 18px 48px rgba(34, 41, 79, .1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.45 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 2px;
}
.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.ambient::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 78% -5%, rgba(97, 72, 196, .16), transparent 38%), radial-gradient(ellipse at 17% 76%, rgba(28, 139, 160, .075), transparent 34%); }
.ambient i, .ambient b { position: absolute; display: block; width: 360px; height: 360px; border-radius: 50%; filter: blur(100px); opacity: .08; background: #815cf5; top: 18%; right: -180px; }
.ambient b { width: 250px; height: 250px; top: auto; bottom: -120px; left: 20%; background: #24c6cb; }
.login-page { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 24px; background: radial-gradient(circle at 50% 0%, rgba(118, 83, 224, .18), transparent 42%), var(--bg); }
.login-card { width: min(430px, 100%); position: relative; z-index: 1; padding: 34px; border: 1px solid var(--line-strong); border-radius: 22px; background: color-mix(in srgb, var(--panel-2) 88%, transparent); box-shadow: 0 28px 90px rgba(0, 0, 0, .34); backdrop-filter: blur(20px); }
.login-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.login-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(145deg, #a992ff, #7048dc); box-shadow: 0 8px 22px rgba(121, 82, 232, .28); }
.login-copy { margin: 38px 0 24px; }
.login-copy .eyebrow { margin-bottom: 11px; }
.login-copy h1 { margin-bottom: 9px; font-size: 30px; }
.login-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-form { display: grid; gap: 16px; }
.login-form .field { gap: 7px; }
.login-form .field label { font-size: 11px; }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.password-toggle { position: absolute; top: 50%; right: 10px; translate: 0 -50%; border: 0; color: var(--violet-bright); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.login-options a { color: var(--violet-bright); text-decoration: none; }
.login-options a:hover { text-decoration: underline; }
.remember-option { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.remember-option input { accent-color: var(--violet); }
.login-submit { width: 100%; min-height: 43px; margin-top: 3px; }
.login-footnote { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.5; }
.login-footnote strong { color: var(--ink-2); font-family: "JetBrains Mono", monospace; font-weight: 500; }
.login-error { display: flex; align-items: center; gap: 8px; margin: 0 0 17px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--red) 28%, transparent); border-radius: 10px; color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); font-size: 11px; }
.login-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(100px); opacity: .12; pointer-events: none; }
.login-glow-one { top: -160px; right: -100px; background: #815cf5; }
.login-glow-two { bottom: -180px; left: -110px; background: #24c6cb; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 76px minmax(0,1fr); }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 17px 10px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 83%, transparent); backdrop-filter: blur(18px); z-index: 8; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(145deg, #a992ff, #7048dc); box-shadow: 0 8px 22px rgba(121, 82, 232, .3); }
.brand-mark svg { width: 21px; height: 21px; }
.rail-nav { display: grid; gap: 9px; width: 100%; margin-top: 38px; }
.nav-item, .rail-action { appearance: none; border: 0; background: transparent; text-decoration: none; color: var(--muted); border-radius: 13px; width: 48px; height: 46px; display: grid; place-items: center; margin: auto; cursor: pointer; position: relative; transition: color .16s, background .16s, transform .16s; }
.nav-item svg, .rail-action svg { width: 19px; height: 19px; }
.nav-item:hover, .rail-action:hover { color: var(--ink); background: var(--panel-3); transform: translateY(-1px); }
.nav-item.active { color: var(--violet-bright); background: rgba(145, 111, 242, .14); box-shadow: inset 0 0 0 1px rgba(145, 111, 242, .1); }
.nav-item.active::before { content: ""; position: absolute; left: -11px; height: 22px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet-bright); }
.nav-item[data-tip]::after, .rail-action[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 13px); top: 50%; translate: 0 -50%; padding: 7px 10px; border-radius: 8px; color: var(--ink); background: var(--panel-3); border: 1px solid var(--line-strong); font-size: 12px; white-space: nowrap; opacity: 0; visibility: hidden; transition: .14s; box-shadow: var(--shadow); z-index: 40; }
.nav-item:hover::after, .rail-action:hover::after { opacity: 1; visibility: visible; }
.rail-bottom { margin-top: auto; display: grid; gap: 11px; justify-items: center; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; background: linear-gradient(145deg, #55bdc7, #7351dc); box-shadow: 0 5px 16px rgba(66, 141, 176, .22); }
.main-column { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 6; }
.topbar-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-brand .brand-mark { width: 32px; height: 32px; border-radius: 11px; }
.topbar-brand .brand-mark svg { width: 17px; }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: -.015em; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { border: 1px solid transparent; display: inline-grid; place-items: center; width: 36px; height: 36px; background: transparent; color: var(--muted); border-radius: 11px; cursor: pointer; position: relative; }
.icon-button:hover { background: var(--panel-3); color: var(--ink); border-color: var(--line); }
.icon-button svg { width: 17px; height: 17px; }
.user-pill { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); cursor: pointer; }
.user-pill:hover { border-color: var(--line-strong); }
.user-pill .avatar { width: 29px; height: 29px; font-size: 11px; }
.user-copy { text-align: left; }
.user-name { display: block; font-size: 12px; font-weight: 600; }
.user-role { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.content { width: min(1660px, 100%); padding: 29px clamp(20px, 3vw, 44px) 46px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.eyebrow { color: var(--violet-bright); font-size: 10px; line-height: 1; letter-spacing: .11em; text-transform: uppercase; font-weight: 700; margin-bottom: 9px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.14; letter-spacing: -.045em; font-weight: 650; }
.page-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.updated { color: var(--muted); font-size: 11px; margin-right: 4px; }
.button { border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-2); padding: 9px 13px; min-height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 12px; cursor: pointer; transition: .16s; white-space: nowrap; }
.button svg { width: 15px; height: 15px; }
.button:hover { border-color: rgba(157, 132, 245, .4); color: var(--ink); background: var(--panel-3); transform: translateY(-1px); }
.button.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #9575f1, #7351dc); box-shadow: 0 6px 19px rgba(113, 76, 212, .22); }
.button.primary:hover { filter: brightness(1.08); }
.button.danger { color: var(--rose); }
.button.ghost { background: transparent; border-color: transparent; }
.button.small { min-height: 29px; padding: 6px 9px; font-size: 11px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.stat-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; background: linear-gradient(150deg, var(--panel), color-mix(in srgb, var(--panel-2) 73%, transparent)); box-shadow: 0 6px 24px rgba(0, 0, 0, .08); min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--violet-bright); background: rgba(144, 113, 243, .12); }
.stat-icon svg { width: 15px; height: 15px; }
.stat-value { margin-top: 9px; font-size: 24px; line-height: 1; font-weight: 700; letter-spacing: -.045em; }
.stat-hint { margin-top: 7px; color: var(--muted); font-size: 10px; }
.panel { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(0,0,0,.09); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.panel-sub { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.panel-body { padding: 19px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 230px; min-width: 180px; max-width: 390px; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); width: 15px; height: 15px; pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 36px 0 36px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--bg-soft) 82%, transparent); outline: 0; }
.search input:focus { border-color: rgba(148, 117, 245, .55); box-shadow: 0 0 0 3px rgba(148, 117, 245, .1); }
.search input::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); }
.search-shortcut { position: absolute; right: 9px; top: 50%; translate: 0 -50%; color: var(--muted); border: 1px solid var(--line); background: var(--panel); border-radius: 5px; padding: 1px 5px; font: 10px "JetBrains Mono", monospace; }
.segmented { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--bg-soft) 75%, transparent); gap: 2px; }
.segment { border: 0; color: var(--muted); background: transparent; padding: 6px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.segment:hover { color: var(--ink); }
.segment.selected { color: var(--ink); background: var(--panel-3); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.table-wrap { overflow: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; min-width: 1030px; font-size: 11px; }
th { background: color-mix(in srgb, var(--panel-2) 78%, transparent); color: var(--muted); text-align: left; font-size: 9px; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; white-space: nowrap; padding: 11px 13px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
th button { border: 0; padding: 0; color: inherit; background: transparent; text-transform: inherit; letter-spacing: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }
td { padding: 12px 13px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
tbody tr:hover { background: rgba(135, 115, 220, .045); }
tbody tr:last-child td { border-bottom: 0; }
.primary-cell { color: var(--ink); font-weight: 600; }
.secondary-cell { color: var(--muted); font-size: 10px; margin-top: 3px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); background: var(--panel-3); font-size: 10px; font-weight: 600; }
.tag.green { color: var(--green); border-color: color-mix(in srgb, var(--green) 23%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.tag.cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 23%, transparent); background: color-mix(in srgb, var(--cyan) 9%, transparent); }
.tag.amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 23%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
.tag.rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 23%, transparent); background: color-mix(in srgb, var(--rose) 9%, transparent); }
.tag.violet { color: var(--violet-bright); border-color: color-mix(in srgb, var(--violet) 25%, transparent); background: color-mix(in srgb, var(--violet) 10%, transparent); }
.row-actions { display: flex; align-items: center; gap: 2px; }
.row-actions .icon-button { width: 29px; height: 29px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.page-buttons { display: flex; align-items: center; gap: 4px; }
.page-number { border: 1px solid transparent; color: var(--muted); background: transparent; min-width: 29px; height: 29px; border-radius: 8px; cursor: pointer; }
.page-number:hover, .page-number.current { color: var(--ink); border-color: var(--line); background: var(--panel-3); }
.empty-state { min-height: 210px; display: grid; place-content: center; text-align: center; padding: 30px; }
.empty-icon { margin: auto auto 12px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(145, 117, 243, .12); color: var(--violet-bright); }
.empty-icon svg { width: 20px; }
.empty-title { font-weight: 650; font-size: 13px; margin-bottom: 5px; }
.empty-copy { max-width: 360px; color: var(--muted); font-size: 11px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 14px; }
.listing-card { border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); padding: 15px; min-width: 0; transition: .16s; }
.listing-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.listing-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.listing-title { font-weight: 650; font-size: 13px; margin: 0; }
.listing-location { color: var(--muted); font-size: 11px; margin-top: 4px; }
.listing-price { color: var(--violet-bright); font-weight: 700; font-size: 16px; margin: 14px 0 12px; }
.listing-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 10px; }
.listing-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 13px; }
.connection-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 14px; }
.connection-status { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.connection-number { display: flex; align-items: center; gap: 12px; min-width: 0; }
.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px color-mix(in srgb, var(--muted) 10%, transparent); display: inline-block; flex: 0 0 auto; }
.connection-dot.green { background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 10%, transparent); }
.connection-dot.amber { background: var(--amber); box-shadow: 0 0 0 5px color-mix(in srgb, var(--amber) 10%, transparent); }
.connection-dot.red { background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 10%, transparent); }
.connection-number strong { display: block; font-size: 12px; }
.connection-number span { color: var(--muted); font-size: 10px; display: block; margin-top: 3px; }
.group-list { display: grid; gap: 6px; max-height: 325px; overflow: auto; margin-top: 12px; }
.group-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.group-row:hover { background: var(--panel-3); }
.group-row input { accent-color: var(--violet); }
.group-copy { min-width: 0; flex: 1; font-size: 11px; font-weight: 600; }
.group-copy small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 2px; }
.settings-stack { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea, .plain-input { width: 100%; min-width: 0; color: var(--ink); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg-soft) 84%, transparent); border-radius: 9px; padding: 9px 11px; outline: 0; }
.field input, .field select { min-height: 37px; }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .plain-input:focus { border-color: rgba(148, 117, 245, .56); box-shadow: 0 0 0 3px rgba(148, 117, 245, .1); }
.field-hint { color: var(--muted); font-size: 10px; }
.agent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.agent-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.agent-card-head { display: flex; align-items: center; gap: 11px; }
.agent-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, #4ab7c1, #7056d9); font-size: 12px; font-weight: 700; }
.agent-info { min-width: 0; flex: 1; }
.agent-info strong { display: block; font-size: 12px; }
.agent-info span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.agent-areas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.agent-area-entry { display: flex; gap: 8px; align-items: center; }
.agent-area-entry input { flex: 1; }
.agent-area-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.agent-area-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--violet) 28%, var(--line)); border-radius: 8px; color: var(--violet-bright); background: color-mix(in srgb, var(--violet) 10%, transparent); font-size: 10px; }
.agent-area-chip button { display: grid; place-items: center; padding: 0; border: 0; color: currentColor; background: transparent; cursor: pointer; }
.agent-statline { display: flex; justify-content: space-between; padding: 13px 0; margin-top: 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.agent-statline strong { color: var(--ink); }
.agent-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; color: var(--muted); font-size: 10px; }
.inquiry-card { display: grid; grid-template-columns: auto minmax(150px,1fr) minmax(140px,.9fr) minmax(110px,.7fr) auto; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.inquiry-card:hover { background: rgba(135, 115, 220, .045); }
.inquiry-card:last-child { border-bottom: 0; }
.inquiry-name { font-size: 12px; font-weight: 650; }
.inquiry-sub { color: var(--muted); font-size: 10px; margin-top: 3px; }
.star-button { color: var(--muted); border: 0; background: transparent; cursor: pointer; padding: 5px; }
.star-button.on { color: var(--amber); }
.star-button svg { width: 16px; height: 16px; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 30; background: rgba(3,4,10,.7); backdrop-filter: blur(7px); animation: fade-in .14s ease-out; }
.modal { width: min(620px, 100%); max-height: min(90vh, 900px); overflow: auto; border-radius: 17px; background: var(--panel-2); border: 1px solid var(--line-strong); box-shadow: 0 28px 90px rgba(0,0,0,.5); animation: rise-in .18s ease-out; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; margin: 0; }
.modal-head p { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
.modal-body { padding: 19px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px 18px; border-top: 1px solid var(--line); }
.modal-form { display: grid; gap: 13px; }
.modal-form .form-row { gap: 11px; }
.toast-root { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 50; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink); background: var(--panel-2); box-shadow: var(--shadow); font-size: 12px; animation: rise-in .18s ease-out; }
.toast svg { width: 16px; color: var(--green); }
.menu-pop { position: absolute; right: 28px; top: 58px; z-index: 15; padding: 6px; width: 190px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); box-shadow: var(--shadow); }
.account-menu { width: 330px; padding: 10px; background: linear-gradient(145deg, color-mix(in srgb, var(--panel-2) 94%, #126b85 6%), var(--panel-2)); }
.account-menu-profile { display: flex; align-items: center; gap: 11px; padding: 2px 4px 11px; }
.account-menu-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #24c6df, #6e4bdc); font-size: 16px; font-weight: 700; }
.account-menu-profile strong, .account-menu-profile span { display: block; }
.account-menu-profile strong { color: var(--ink); font-size: 15px; }
.account-menu-profile span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.account-warning { margin: 2px 0 9px; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--amber) 58%, transparent); border-radius: 11px; color: var(--ink-2); background: color-mix(in srgb, var(--amber) 12%, transparent); font-size: 11px; line-height: 1.45; }
.account-menu-divider { height: 1px; margin: 8px 0; background: var(--line); }
.account-menu button { min-height: 36px; gap: 11px; padding: 8px 9px; font-size: 12px; }
.account-menu button svg { width: 17px; height: 17px; color: var(--ink-2); }
.menu-pop button { display: flex; align-items: center; width: 100%; gap: 9px; border: 0; padding: 9px; color: var(--ink-2); background: transparent; text-align: left; border-radius: 8px; cursor: pointer; font-size: 11px; }
.menu-pop button:hover { background: var(--panel-3); color: var(--ink); }
.menu-pop svg { width: 15px; height: 15px; }
.subtle-note { color: var(--muted); font-size: 10px; line-height: 1.55; }
.split-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 14px; }
.pill-list { display: flex; gap: 7px; flex-wrap: wrap; }
.area-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 9px; align-items: center; margin-bottom: 8px; }
.area-row input { height: 36px; }
.notice { padding: 11px 13px; color: var(--ink-2); border: 1px solid rgba(81,199,217,.18); background: rgba(81,199,217,.07); border-radius: 10px; font-size: 10px; }
.notice strong { color: var(--cyan); }
.success-notice strong { color: var(--green); }
.capture-count { display: inline-block; margin-left: 7px; color: var(--ink-2); font-family: "JetBrains Mono", monospace; font-size: 10px; }
.error-notice { border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.error-notice strong { color: var(--red); }
.whatsapp-review-panel { margin-top: 14px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.review-list { display: grid; gap: 9px; }
.review-card { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb, var(--panel-3) 46%, transparent); }
.review-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.review-card-head > div { min-width: 0; }
.review-card-head strong, .review-card-head span:not(.tag) { display: block; }
.review-card-head strong { margin-top: 6px; color: var(--ink); font-size: 12px; }
.review-card-head span:not(.tag) { margin-top: 3px; color: var(--muted); font-size: 10px; }
.review-confidence { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.review-card p { margin: 10px 0; color: var(--ink-2); font-size: 10px; line-height: 1.5; }
.review-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.review-card-meta span { padding: 4px 7px; border-radius: 6px; color: var(--muted); background: var(--panel-3); font-size: 9px; }
.review-card-actions { justify-content: flex-end; margin-top: 10px; }
.whatsapp-pair-state { display: grid; place-items: center; text-align: center; padding: 28px 16px; }
.whatsapp-pair-state .empty-icon { margin-bottom: 12px; }
.whatsapp-qr-wrap { display: grid; justify-items: center; gap: 12px; padding: 4px 0 6px; }
.whatsapp-qr { width: min(280px, 72vw); height: min(280px, 72vw); padding: 12px; border-radius: 14px; background: white; image-rendering: pixelated; }
.qr-status { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11px; }
.qr-instructions { display: grid; gap: 4px; width: min(360px, 100%); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: left; }
.qr-instructions strong { color: var(--ink); font-size: 11px; }
.error-icon { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.followup-button { color: var(--violet-bright); background: transparent; border: 0; padding: 4px 0; cursor: pointer; font-size: 10px; }
.followup-button:hover { text-decoration: underline; }
.linkish { color: var(--violet-bright); cursor: pointer; }
.divider { height: 1px; background: var(--line); margin: 15px 0; }
.mono { font-family: "JetBrains Mono", monospace; }
.nowrap { white-space: nowrap; }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px) scale(.99) } to { opacity: 1; transform: translateY(0) scale(1) } }

/* Laptop: 1024px–1439px */
@media (max-width: 1439px) {
  .content { padding-left: clamp(18px, 2.4vw, 34px); padding-right: clamp(18px, 2.4vw, 34px); }
}

/* Tablet: 768px–1023px */
@media (max-width: 1023px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .connection-grid, .split-layout { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* Mobile: 320px–767px */
@media (max-width: 767px) {
  .app-shell { display: block; padding-bottom: 62px; }
  .rail { position: fixed; top: auto; bottom: 0; height: 58px; width: 100%; border-right: 0; border-top: 1px solid var(--line); padding: 5px 9px; flex-direction: row; justify-content: center; background: color-mix(in srgb, var(--bg) 91%, transparent); }
  .rail > .brand-mark, .rail-bottom { display: none; }
  .rail-nav { display: flex; margin: 0; gap: 4px; justify-content: space-around; }
  .nav-item { width: 43px; height: 43px; }
  .nav-item.active::before { left: 50%; top: -6px; height: 3px; width: 20px; translate: -50% 0; border-radius: 0 0 3px 3px; }
  .nav-item[data-tip]::after { display: none; }
  .topbar { height: 59px; padding: 0 16px; }
  .topbar-brand .brand-name { font-size: 12px; }
  .user-copy { display: none; }
  .user-pill { padding: 3px; border: 0; background: transparent; }
  .content { padding: 23px 14px 30px; }
  .page-heading { display: block; margin-bottom: 18px; }
  .heading-actions { justify-content: flex-start; margin-top: 14px; }
  .updated { margin-right: auto; }
  h1 { font-size: 25px; }
  .toolbar { gap: 8px; }
  .search { flex-basis: 100%; max-width: none; }
  .card-grid { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
  .inquiry-card { grid-template-columns: auto 1fr auto; gap: 9px; }
  .inquiry-card .inquiry-extra { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .area-row { grid-template-columns: 1fr; }
  .stat-card { padding: 13px; }
  .stat-value { font-size: 21px; }
  .stat-hint { font-size: 9px; }
  .connection-status { align-items: flex-start; flex-direction: column; }
  .panel-head, .panel-body { padding-left: 14px; padding-right: 14px; }
  .pagination { flex-wrap: wrap; }
}

.property-panel { position: relative; overflow: visible; }
.property-toolbar .search { flex: 1 1 240px; max-width: 340px; }
.toolbar-spacer { flex: 1 1 8px; }
.review-toggle { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 24%, var(--line)); }
.review-toggle:hover, .review-toggle.selected { color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); }
.property-table-wrap { border-radius: 0; }
.property-table { min-width: 1830px; font-size: 11px; }
.property-table th { padding: 12px 11px; text-transform: none; font-size: 10px; letter-spacing: 0; }
.property-table td { padding: 11px; }
.property-table tbody tr { cursor: pointer; }
.property-th { display: flex; align-items: center; gap: 4px; }
.property-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
.property-sort:hover { color: var(--ink); }
.property-sort span { color: var(--violet-bright); font-size: 12px; }
.column-arrange { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.column-arrange:hover { background: var(--panel-3); color: var(--ink); }
.phone-copy { display: block; padding: 2px 0; border: 0; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; text-align: left; white-space: nowrap; }
.phone-copy:hover { color: var(--violet-bright); text-decoration: underline; }
.source-cell { display: flex; align-items: center; gap: 6px; }
.source-cell .tag { padding: 3px 5px; font-size: 9px; }
.property-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.property-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); transition: border-color .16s, transform .16s; }
.property-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.property-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.property-card-title { color: var(--ink); font-size: 14px; font-weight: 650; }
.property-card-price { margin: 12px 0; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.property-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.property-card-meta span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); background: var(--panel-3); font-size: 10px; }
.property-card-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; padding: 12px 0; margin-top: 11px; border-top: 1px solid var(--line); }
.property-card-contact strong { flex-basis: 100%; font-size: 11px; }
.property-card-source { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.property-card-source .tag { margin-right: 4px; }
.property-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
.property-card-actions .button { margin-right: auto; }
.property-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.filter-caption { color: var(--muted); font-size: 10px; font-weight: 600; margin-right: 2px; }
.filter-chip select { max-width: 180px; height: 30px; padding: 4px 24px 4px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); background: var(--panel-2); font-size: 10px; cursor: pointer; }
.column-menu { position: absolute; z-index: 5; top: 58px; left: 12px; width: min(330px, calc(100% - 24px)); max-height: min(70vh, 570px); overflow-y: auto; padding: 10px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel-2); box-shadow: var(--shadow); }
.column-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 7px; border-bottom: 1px solid var(--line); font-size: 11px; }
.column-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 31px; padding: 3px 4px; color: var(--ink-2); font-size: 10px; }
.column-menu-row label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.column-menu-row input { accent-color: var(--violet); }
.column-menu-row span { display: flex; gap: 2px; }
.column-menu-row button { width: 24px; height: 23px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--panel-3); cursor: pointer; }
.column-menu-row button:hover:not(:disabled) { color: var(--ink); }
.column-menu-row button:disabled { opacity: .35; cursor: not-allowed; }
.property-form-grid { display: grid; gap: 12px; }
.property-form-grid > .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.property-form-grid .field-hint { line-height: 1.45; }
.choice-field { display: grid; gap: 7px; min-width: 0; }
.choice-label { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.choice-options { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: var(--panel-3); font-size: 11px; cursor: pointer; }
.choice-chip:has(input:checked) { border-color: color-mix(in srgb, var(--violet) 46%, var(--line)); color: var(--ink); background: color-mix(in srgb, var(--violet) 12%, var(--panel-3)); }
.choice-chip input { accent-color: var(--violet); }
.phone-list { display: grid; gap: 7px; }
.property-phone-row { display: flex; align-items: center; gap: 7px; }
.property-phone-row > span { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--panel-3); font-size: 11px; }
.property-phone-row input { flex: 1; min-width: 0; min-height: 37px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: color-mix(in srgb, var(--bg-soft) 84%, transparent); }
.phone-add { align-self: start; }
.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; }
.property-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.property-detail { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-3); }
.property-detail span, .property-detail-block > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.property-detail strong { display: block; color: var(--ink-2); font-size: 11px; font-weight: 550; overflow-wrap: anywhere; }
.property-detail-block { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.property-detail-block p { margin: 0; color: var(--ink-2); font-size: 11px; white-space: pre-wrap; }
.property-detail-actions { justify-content: flex-end; margin-top: 14px; }
.property-required-note { margin: 0; }

@media (max-width: 1000px) {
  .property-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .property-card-grid { grid-template-columns: 1fr; padding: 10px; }
  .property-toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .filter-chip select { max-width: 145px; }
  .property-form-grid > .form-row { grid-template-columns: 1fr; }
  .column-menu { top: 96px; }
  .property-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.requirements-heading { margin-bottom: 23px; }
.requirements-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.requirements-toolbar .search { flex: 1 1 230px; max-width: 340px; }
.requirements-panel { position: relative; overflow: visible; }
.requirements-table-wrap { border-radius: 0; }
.requirements-table { min-width: 1640px; font-size: 11px; }
.requirements-table th { padding: 12px 10px; text-transform: none; font-size: 10px; letter-spacing: 0; }
.requirements-table td { padding: 11px 10px; vertical-align: middle; }
.requirements-table th:first-child { min-width: 132px; }
.requirements-table th:nth-child(4) { min-width: 180px; }
.requirements-table th:nth-child(7) { min-width: 170px; }
.requirements-table th:nth-child(8) { min-width: 170px; }
.requirements-table th:nth-child(10), .requirements-table th:nth-child(11) { min-width: 140px; }
.requirements-table .property-th { gap: 4px; }
.requirements-table .req-th-label { color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.req-column-menu { top: 53px; left: 11px; }
.req-contact { min-width: 130px; }
.req-contact strong { display: block; margin-bottom: 3px; color: var(--ink-2); font-size: 10px; font-weight: 600; white-space: nowrap; }
.req-contact-phones { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.req-phone-copy { display: inline-block; }
.req-phone-more { color: var(--muted); font-size: 10px; }
.requirements-filters { border-top: 0; }
.req-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px; }
.req-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); transition: border-color .16s, transform .16s; }
.req-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.req-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.req-card-head h3 { margin: 0; font-size: 13px; font-weight: 650; }
.req-card-head .listing-location { max-width: 290px; }
.req-card-budget { margin: 13px 0 9px; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.req-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.req-card-tags span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); background: var(--panel-3); font-size: 10px; }
.req-card-matches { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; margin-top: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.req-card-contact { display: flex; align-items: flex-start; gap: 8px; padding: 11px 0; color: var(--muted); }
.req-card-contact > div { min-width: 0; }
.req-card-contact strong { display: block; margin-bottom: 3px; color: var(--ink-2); font-size: 11px; }
.req-card-followups { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.req-card-followups > div { display: grid; gap: 3px; min-width: 0; }
.req-card-followups > div > span { color: var(--muted); font-size: 9px; }
.req-card-source { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 11px; color: var(--muted); font-size: 9px; }
.req-card-source > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-card-source .tag { margin-right: 4px; }
.req-card-source time { white-space: nowrap; }
.req-card-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; margin-top: 9px; border-top: 1px solid var(--line); }
.req-match-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-3); }
.req-match-card h3 { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.pagination-ellipsis { padding: 0 3px; color: var(--muted); font-size: 11px; }

@media (max-width: 1439px) {
  .requirements-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .req-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .requirements-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requirements-toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .req-card-grid { grid-template-columns: 1fr; padding: 10px; }
  .req-column-menu { top: 95px; }
}
@media (max-width: 420px) {
  .requirements-stats { grid-template-columns: 1fr; }
}

.app-shell { display: block; min-height: 100vh; }
.site-header { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 clamp(16px, 3vw, 42px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 91%, transparent); backdrop-filter: blur(18px); }
.primary-nav { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav .nav-item { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: 38px; margin: 0; padding: 0 11px; border: 0; border-radius: 8px; color: var(--ink-2); white-space: nowrap; font-size: 12px; font-weight: 550; text-decoration: none; }
.primary-nav .nav-item:hover { transform: none; background: var(--panel-3); color: var(--ink); }
.primary-nav .nav-item.active { color: var(--ink); background: var(--panel-3); box-shadow: none; }
.primary-nav .nav-item.active::before { display: none; }
.primary-nav .nav-item svg { flex: 0 0 auto; width: 16px; height: 16px; }
.nav-badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, var(--panel)); font-size: 9px; font-weight: 700; }
.site-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.account-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); cursor: pointer; }
.account-button:hover { border-color: var(--line-strong); }
.account-button .avatar { width: 27px; height: 27px; font-size: 10px; }
.site-header .menu-pop { top: 55px; right: 24px; }
.main-column { min-width: 0; }
.content { width: min(1760px, 100%); }
.site-header .icon-button { width: 34px; height: 34px; border-color: var(--line); background: var(--panel); }

@media (max-width: 900px) {
  .site-header { gap: 8px; padding: 0 10px; }
  .primary-nav { gap: 2px; }
  .primary-nav .nav-item { gap: 6px; padding: 0 9px; font-size: 11px; }
}
@media (max-width: 700px) {
  .site-header { position: sticky; min-height: 56px; }
  .primary-nav .nav-item { height: 35px; padding: 0 8px; }
  .primary-nav .nav-item svg { display: none; }
  .site-actions { gap: 4px; }
  .site-header .icon-button, .account-button { width: 31px; height: 31px; }
  .content { padding-top: 21px; }
}

/* Matched properties dialog */
.match-backdrop { padding: 8px; place-items: center; }
.match-modal { display: flex; flex-direction: column; width: min(1500px, 100%); height: min(96vh, 1100px); max-height: 96vh; overflow: hidden; border-radius: 14px; background: #17192b; }
.match-header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 52px; padding: 8px 13px 7px; border-bottom: 1px solid rgba(163,170,205,.13); }
.match-header-copy { min-width: 0; }
.match-kicker { margin-bottom: 2px; color: #9197b0; font-size: 7px; line-height: 1.2; font-weight: 700; letter-spacing: .09em; }
.match-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.match-title-row h2 { margin: 0; color: #f1f2fb; font-size: 12px; line-height: 1.25; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.match-total, .match-scored { display: inline-flex; align-items: center; min-height: 17px; padding: 2px 6px; border: 1px solid rgba(163,170,205,.17); border-radius: 9px; color: #9ca2bd; background: rgba(255,255,255,.025); font-size: 7px; white-space: nowrap; }
.match-total { color: #b19aff; border-color: rgba(148,117,245,.25); background: rgba(148,117,245,.1); }
.match-requirement-line { margin-top: 3px; color: #8d93aa; font-size: 8px; line-height: 1.35; }
.match-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.match-refresh { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 0; border-radius: 6px; color: #abb0c5; background: transparent; font-size: 8px; cursor: pointer; }
.match-refresh:hover { color: #fff; background: rgba(255,255,255,.06); }
.match-refresh svg { width: 11px; height: 11px; }
.match-header .icon-button { width: 22px; height: 22px; border-radius: 6px; }
.match-header .icon-button svg { width: 12px; height: 12px; }
.match-description { flex: 0 0 auto; display: grid; grid-template-columns: 137px minmax(0,1fr); align-items: center; gap: 8px; min-height: 24px; padding: 5px 12px; border-bottom: 1px solid rgba(163,170,205,.14); border-left: 2px solid #986df6; color: #e4e1f8; background: linear-gradient(90deg, rgba(115,81,220,.18), rgba(115,81,220,.075)); }
.match-description > span { color: #aa8cff; font-size: 7px; font-weight: 750; letter-spacing: .075em; white-space: nowrap; }
.match-description > strong { overflow: hidden; color: #e3e1f0; font-size: 8px; line-height: 1.35; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.match-toolbar { flex: 0 0 auto; min-height: 34px; padding: 5px 11px 0; border-bottom: 1px solid rgba(163,170,205,.13); }
.match-tabs { display: flex; align-items: stretch; gap: 5px; height: 29px; }
.match-tabs button { min-width: 83px; padding: 5px 10px 6px; border: 1px solid rgba(163,170,205,.13); border-bottom-color: transparent; border-radius: 9px 9px 0 0; color: #969bb3; background: rgba(255,255,255,.018); font-size: 8px; cursor: pointer; }
.match-tabs button:hover { color: #e6e6f1; }
.match-tabs button.active { color: #f0eefb; border-color: rgba(163,170,205,.2); border-bottom-color: #1a1c2e; background: #1a1c2e; }
.match-results-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 9px 11px 12px; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.match-tier-section + .match-tier-section { margin-top: 9px; }
.match-tier-heading { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; min-height: 12px; }
.match-tier-heading > span:first-child { width: 13px; height: 1px; border-radius: 2px; background: #9b78f5; }
.match-tier-heading > span:first-child.medium { background: #e0a824; }
.match-tier-heading > span:first-child.low { background: #cb6377; }
.match-tier-heading h3 { margin: 0; color: #9298b2; font-size: 7px; line-height: 1; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.match-tier-count { display: inline-grid; place-items: center; min-width: 15px; height: 13px; padding: 0 4px; border: 1px solid rgba(163,170,205,.15); border-radius: 7px; color: #969bb3; background: rgba(255,255,255,.025); font-size: 7px; }
.matched-property-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.matched-property-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 133px; padding: 8px 8px 27px; overflow: visible; border: 1px solid rgba(163,170,205,.17); border-radius: 9px; background: #202235; transition: border-color .15s, background .15s, transform .15s; }
.matched-property-card:hover { border-color: rgba(175,153,255,.45); background: #24263c; transform: translateY(-1px); }
.matched-property-card.selected { border-color: rgba(148,117,245,.74); box-shadow: 0 0 0 1px rgba(148,117,245,.12); }
.match-select { position: absolute; z-index: 1; top: -6px; left: -6px; display: grid; width: 14px; height: 14px; place-items: center; cursor: pointer; }
.match-select input { appearance: none; width: 13px; height: 13px; margin: 0; border: 1px solid rgba(189,193,216,.48); border-radius: 50%; background: #26283c; cursor: pointer; }
.match-select input:checked { border-color: #aa8dff; background: #805ce4; }
.match-select input:checked::after { content: ""; display: block; width: 5px; height: 3px; margin: 3px 0 0 3px; border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; transform: rotate(-45deg); }
.match-card-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 16px; }
.match-type-label { padding: 2px 4px; border: 1px solid rgba(163,170,205,.17); border-radius: 3px; color: #b9bdd0; background: rgba(255,255,255,.04); font-size: 6px; line-height: 1; font-weight: 650; }
.match-score { padding: 3px 5px; border: 1px solid rgba(83,212,161,.36); border-radius: 10px; color: #54d4a2; background: rgba(37,176,128,.1); font-size: 7px; line-height: 1; font-weight: 700; }
.match-score.medium { color: #f2bd49; border-color: rgba(244,189,98,.34); background: rgba(191,135,30,.12); }
.match-score.low { color: #ef788c; border-color: rgba(255,130,151,.31); background: rgba(191,71,95,.12); }
.matched-property-card h3 { display: -webkit-box; overflow: hidden; margin: 5px 0 1px; color: #f0f1fa; font-size: 8px; line-height: 1.25; font-weight: 700; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.match-card-area { overflow: hidden; color: #a7abc0; font-size: 7px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.match-detail-tags { display: flex; flex-wrap: wrap; gap: 3px; min-height: 17px; margin-top: 5px; }
.match-detail-tag { max-width: 100%; overflow: hidden; padding: 2px 4px; border: 1px solid rgba(163,170,205,.13); border-radius: 4px; color: #bbc0d3; background: rgba(255,255,255,.025); font-size: 6px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.match-pill-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.match-tier-pill, .match-confidence { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 5px; overflow: hidden; border: 1px solid rgba(83,212,161,.28); border-radius: 8px; color: #5fd5a3; background: rgba(43,174,129,.11); font-size: 6px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.match-tier-pill.medium { color: #f0bd50; border-color: rgba(244,189,98,.3); background: rgba(190,135,28,.12); }
.match-tier-pill.low { color: #eb788a; border-color: rgba(255,130,151,.27); background: rgba(191,71,95,.11); }
.match-confidence { color: #54cce0; border-color: rgba(81,199,217,.3); background: rgba(33,156,174,.11); }
.match-reason { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: #9da2b8; font-size: 6.5px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.match-card-price { position: absolute; right: 8px; bottom: 6px; left: 8px; display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-top: 4px; border-top: 1px solid rgba(163,170,205,.12); }
.match-card-price strong { overflow: hidden; color: #a78aff; font-size: 8px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.match-card-price span { color: #7f849c; font-size: 6px; line-height: 1; }
.match-tier-empty { padding: 9px; border: 1px dashed rgba(163,170,205,.15); border-radius: 7px; color: #81869f; font-size: 8px; }
.match-no-results { display: grid; place-content: center; min-height: 170px; color: #e1e2ef; text-align: center; }
.match-no-results strong { font-size: 12px; }
.match-no-results span { margin-top: 4px; color: #9297ad; font-size: 9px; }
.match-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 6px 11px; border-top: 1px solid rgba(163,170,205,.16); background: #191b2c; }
.match-footer-left { display: flex; align-items: center; gap: 7px; }
.match-footer .button { min-height: 26px; padding: 5px 9px; border-radius: 7px; font-size: 8px; }
.match-footer .button svg { width: 12px; height: 12px; }
.match-send-button { margin-left: auto; }

/* Match result details overlay */
.match-modal { position: relative; }
.match-open-details { display: block; max-width: 100%; padding: 0; overflow: hidden; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.match-open-details:hover { color: #c4b5ff; }
.match-detail-backdrop { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(6,7,18,.76); backdrop-filter: blur(4px); }
.match-detail-dialog { display: flex; flex-direction: column; width: min(430px, calc(100vw - 28px)); max-height: min(465px, calc(100% - 12px)); overflow: hidden; border: 1px solid rgba(179,183,218,.27); border-radius: 14px; color: #e8e9f3; background: #17192d; box-shadow: 0 22px 70px rgba(0,0,0,.52); }
.match-detail-header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 13px 14px 11px; border-bottom: 1px solid rgba(163,170,205,.15); }
.match-detail-heading { min-width: 0; }
.match-detail-eyebrow { margin-bottom: 4px; color: #8187a4; font-size: 7px; line-height: 1.2; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.match-detail-header h2 { margin: 0; color: #f1f2fb; font-size: 12px; line-height: 1.25; font-weight: 750; }
.match-detail-header p { margin: 3px 0 0; color: #9da2b9; font-size: 8px; line-height: 1.3; }
.match-detail-header > .icon-button { flex: 0 0 auto; width: 21px; height: 21px; color: #878da7; }
.match-detail-header > .icon-button svg { width: 12px; height: 12px; }
.match-detail-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.match-detail-badges .match-score { font-size: 7px; }
.match-detail-badges .match-detail-tag { margin: 0; }
.match-detail-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 13px 12px; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.match-why-panel, .match-meta-card, .match-detail-description { border: 1px solid rgba(163,170,205,.18); border-radius: 8px; background: #202236; }
.match-why-panel { padding: 9px 10px; }
.match-why-panel h3, .match-meta-card h3, .match-detail-description h3 { margin: 0 0 6px; color: #7f86a5; font-size: 7px; line-height: 1.2; font-weight: 750; letter-spacing: .09em; }
.match-why-panel ul { margin: 0; padding-left: 14px; color: #e1e3ee; font-size: 8px; line-height: 1.48; }
.match-why-panel li { padding-left: 1px; }
.match-breakdown-line { margin: 6px 0 0; color: #7f86a1; font-size: 7px; line-height: 1.4; }
.match-overall-line { margin: 5px 0 0; color: #8990aa; font-size: 7px; }
.match-overall-line strong { color: #c2b2ff; font-weight: 700; }
.match-confidence-copy, .match-data-copy { margin: 5px 0 0; color: #858ba5; font-size: 7px; line-height: 1.4; }
.match-confidence-copy strong { color: #69d5ac; font-weight: 700; }
.match-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.match-meta-card { min-width: 0; min-height: 61px; padding: 8px; }
.match-meta-card h3 { margin-bottom: 5px; }
.match-meta-card strong { display: block; overflow-wrap: anywhere; color: #e1e3ee; font-size: 8px; line-height: 1.35; font-weight: 650; }
.match-meta-card p { margin: 3px 0 0; color: #8d93ac; font-size: 7px; line-height: 1.35; overflow-wrap: anywhere; }
.match-detail-description { margin-top: 8px; padding: 8px; }
.match-detail-description h3 { margin-bottom: 4px; }
.match-detail-description p { margin: 0; color: #a0a5ba; font-size: 8px; line-height: 1.45; }
.match-detail-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 5px 12px; border-top: 1px solid rgba(163,170,205,.16); background: #1d1f32; }
.match-detail-footer .button { min-height: 25px; padding: 4px 8px; border-radius: 6px; font-size: 8px; }
.match-detail-footer .button svg { width: 11px; height: 11px; }

/* Broker requirements reference layout */
body { background: radial-gradient(ellipse at 0% 32%, rgba(107,67,181,.30), transparent 43%), radial-gradient(ellipse at 100% 46%, rgba(0,146,166,.24), transparent 42%), #080912; }
.ambient::before { background: radial-gradient(ellipse at 0% 24%, rgba(105,67,181,.32), transparent 44%), radial-gradient(ellipse at 100% 44%, rgba(0,150,169,.28), transparent 43%), linear-gradient(115deg, rgba(8,9,18,.05), rgba(8,9,18,.18)); }
.site-header { width: min(1300px, calc(100% - 48px)); min-height: 54px; margin: 12px auto 0; padding: 0 14px; border: 1px solid rgba(157,145,211,.24); border-radius: 18px; background: linear-gradient(105deg, rgba(35,28,68,.93), rgba(17,20,39,.94) 48%, rgba(12,34,46,.94)); box-shadow: 0 8px 32px rgba(30,17,65,.27); }
.site-header .nav-item { height: 36px; padding: 0 10px; font-size: 11px; }
.site-header .primary-nav { padding: 3px 6px; border: 1px solid rgba(157,145,211,.17); border-radius: 15px; background: rgba(18,20,34,.42); }
.site-header .nav-item.active { border: 1px solid rgba(174,151,255,.28); border-radius: 9px; background: rgba(255,255,255,.075); }
.content { padding-top: 18px; }
.requirements-page { width: min(1080px, 100%); margin: 0 auto; }
.requirements-heading { align-items: center; margin-bottom: 28px; }
.requirements-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.requirements-heading .heading-actions { gap: 9px; }
.requirements-heading .updated { display: inline-flex; align-items: center; gap: 7px; margin-right: 2px; font-size: 9px; white-space: nowrap; }
.requirements-heading .updated i { width: 6px; height: 6px; border-radius: 50%; background: #37cf9b; box-shadow: 0 0 9px rgba(55,207,155,.7); }
.requirements-heading .button { min-height: 35px; padding: 8px 12px; border-radius: 10px; }
.requirements-heading .button.primary { background: linear-gradient(115deg, #a477f2, #7045d7); }
.requirements-stats { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.requirements-stats .stat-card { height: 72px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(145deg, rgba(21,22,35,.92), rgba(17,19,31,.88)); }
.requirements-stats .stat-card:nth-child(3) { border-color: rgba(128,91,219,.52); background: linear-gradient(145deg, rgba(27,22,46,.94), rgba(17,19,31,.91)); }
.requirements-stats .stat-top { justify-content: flex-start; gap: 7px; }
.requirements-stats .stat-icon { order: -1; width: 12px; height: 12px; color: #8790ae; background: transparent; }
.requirements-stats .stat-icon svg { width: 10px; height: 10px; }
.requirements-stats .stat-label { font-size: 8px; line-height: 1.2; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.requirements-stats .stat-value { margin-top: 6px; font-size: 25px; line-height: 1; }
.requirements-stats .stat-card:nth-child(3) .stat-value { color: #9663ff; }
.requirements-stats .stat-hint { display: none; }
.requirements-toolbar-panel { position: relative; overflow: visible; margin-bottom: 48px; border-radius: 17px; background: rgba(18,20,34,.9); }
.requirements-toolbar { flex-wrap: nowrap; gap: 8px; padding: 10px 11px; border: 0; }
.requirements-toolbar .search { flex: 1 1 0; min-width: 170px; max-width: none; }
.requirements-toolbar .search input { height: 35px; border-radius: 11px; font-size: 10px; }
.requirements-toolbar .segmented { flex: 0 0 auto; gap: 2px; padding: 3px; border-radius: 11px; }
.requirements-toolbar .segment { padding: 6px 9px; font-size: 9px; }
.requirements-toolbar .segment.selected { border: 1px solid rgba(183,184,211,.28); background: rgba(255,255,255,.1); }
.requirements-panel { position: relative; overflow: hidden; border-radius: 17px; background: rgba(18,20,34,.92); }
.requirements-table-wrap { border-radius: 0; overflow: auto; }
.requirements-table { width: 100%; min-width: 1640px; table-layout: auto; font-size: 10px; }
.requirements-table th { height: 33px; padding: 7px 9px; background: rgba(24,26,43,.97); font-size: 8px; letter-spacing: .055em; }
.requirements-table th { min-width: 92px; }
.requirements-table th:nth-child(1), .requirements-table th:nth-child(2), .requirements-table th:nth-child(4), .requirements-table th:nth-child(5) { min-width: 78px; }
.requirements-table th:nth-child(3), .requirements-table th:nth-child(6), .requirements-table th:nth-child(8), .requirements-table th:nth-child(9) { min-width: 130px; }
.requirements-table td { height: 50px; padding: 7px 9px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
.requirements-table .property-th { gap: 3px; }
.requirements-table .column-arrange { flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid rgba(167,174,206,.2); border-radius: 5px; background: rgba(255,255,255,.06); }
.requirements-table .column-arrange svg { width: 11px; height: 11px; }
.requirements-table .property-sort { gap: 3px; }
.requirements-table .property-sort span { font-size: 9px; }
.requirements-table .primary-cell { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
.requirements-table .tag { min-height: 20px; padding: 3px 7px; border-radius: 11px; font-size: 8px; }
.requirements-table .tag.green { color: #43d4ec; border-color: rgba(46,191,217,.4); background: rgba(31,163,194,.15); }
.requirements-table .req-contact { min-width: 0; }
.requirements-table .req-contact strong { max-width: 100%; margin-bottom: 1px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.requirements-table .req-contact-phones { gap: 1px; flex-wrap: nowrap; }
.requirements-table .req-phone-copy { max-width: 100%; padding: 0; overflow: hidden; color: #848ba4; font-size: 8px; text-overflow: ellipsis; }
.requirements-table .req-source-cell { display: grid; gap: 2px; min-width: 0; color: #858ba5; font-size: 8px; line-height: 1.2; }
.requirements-table .req-source-cell strong { overflow: hidden; color: #b0b4c7; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.requirements-table .followup-button[data-action="matches"] { padding: 5px 9px; border-radius: 12px; color: #fff; background: linear-gradient(105deg, #a553f2, #6862ed 64%, #24b9db); font-size: 8px; font-weight: 700; white-space: nowrap; }
.requirements-table .followup-button[data-action="matches"]:hover { filter: brightness(1.12); text-decoration: none; }
.requirements-panel .pagination { min-height: 43px; padding: 7px 12px; }
.requirements-panel .page-number { height: 26px; min-width: 26px; font-size: 9px; }
.req-column-menu { top: 53px; left: 11px; }

@media (max-width: 1100px) {
  .requirements-page { width: 100%; }
  .requirements-toolbar-panel { margin-bottom: 30px; }
}
@media (max-width: 700px) {
  .site-header { width: calc(100% - 16px); margin-top: 8px; min-height: 48px; padding: 0 7px; border-radius: 14px; }
  .site-header .nav-item { gap: 5px; padding: 0 7px; font-size: 9px; }
  .content { padding: 17px 12px 30px; }
  .requirements-heading { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
  .requirements-heading h1 { font-size: 23px; }
  .requirements-heading .heading-actions { justify-content: flex-end; gap: 5px; margin-top: 0; }
  .requirements-heading .updated { display: none; }
  .requirements-heading .button { min-height: 31px; padding: 6px 8px; font-size: 9px; }
  .requirements-stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-bottom: 12px; }
  .requirements-stats .stat-card { height: 66px; padding: 9px 10px; }
  .requirements-toolbar-panel { margin-bottom: 17px; }
  .requirements-toolbar { flex-wrap: wrap; padding: 8px; }
  .requirements-toolbar .search { flex: 1 0 100%; min-width: 0; }
  .requirements-toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .requirements-table { min-width: 1640px; }
}

@media (max-width: 700px) {
  .match-backdrop { padding: 0; }
  .match-modal { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .match-header { gap: 8px; padding: 8px 9px 7px; }
  .match-title-row h2 { font-size: 10px; }
  .match-description { grid-template-columns: 1fr; gap: 3px; padding: 5px 9px; }
  .match-description > strong { white-space: normal; }
  .match-toolbar { padding-left: 8px; }
  .match-results-scroll { padding: 8px; }
  .matched-property-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .matched-property-card { min-height: 132px; padding-right: 6px; padding-left: 6px; }
  .match-card-price { right: 6px; left: 6px; }
  .match-footer { padding: 6px 8px; }
  .match-footer-left { gap: 4px; }
  .match-footer .button { padding: 5px 7px; }
  .match-send-button { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
  .match-detail-backdrop { padding: 8px; }
  .match-detail-dialog { width: min(430px, 100%); max-height: calc(100% - 10px); }
}
@media (max-width: 460px) {
  .matched-property-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .match-title-row { gap: 4px; }
  .match-scored { display: none; }
}
@media (max-width: 360px) {
  .matched-property-grid { grid-template-columns: 1fr; }
  .match-send-button { font-size: 7px !important; }
}

/* Inquiries reference layout */
.inquiries-page { width: min(1320px, 100%); margin: 0 auto; }
.inquiry-heading { align-items: center; margin-bottom: 34px; }
.inquiry-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.inquiry-heading .heading-actions { flex-wrap: nowrap; gap: 10px; }
.inquiry-heading .updated { display: inline-flex; align-items: center; gap: 7px; margin-right: 0; font-size: 10px; white-space: nowrap; }
.inquiry-heading .updated i { width: 6px; height: 6px; border-radius: 50%; background: #37cf9b; box-shadow: 0 0 9px rgba(55,207,155,.7); }
.inquiry-heading .button { min-height: 36px; padding: 8px 13px; border-radius: 10px; }
.inquiry-heading .button.primary { background: linear-gradient(115deg, #a477f2, #7045d7); }
.inquiry-sections { margin-bottom: 20px; }
.inquiry-sections .segmented { padding: 3px; border-radius: 11px; }
.inquiry-sections .segment { padding: 7px 12px; font-size: 10px; }
.inquiry-segmented .segment { display: inline-flex; align-items: center; gap: 7px; }
.inquiry-segmented .segment svg { width: 13px; height: 13px; }
.inquiry-sections .segment.selected { border: 1px solid rgba(183,184,211,.28); background: rgba(255,255,255,.1); }
.inquiry-toolbar-panel { margin-bottom: 34px; border-radius: 18px; background: rgba(18,20,34,.9); }
.inquiry-toolbar { flex-wrap: nowrap; gap: 9px; padding: 10px 12px; border: 0; }
.inquiry-toolbar .search { flex: 1 1 0; min-width: 180px; max-width: none; }
.inquiry-toolbar .search input { height: 36px; border-radius: 11px; font-size: 11px; }
.inquiry-filters { display: flex; align-items: center; gap: 8px; }
.inquiry-filter { min-height: 36px; padding: 8px 12px; border-radius: 11px; background: rgba(28,30,47,.92); font-size: 11px; }
.inquiry-filter svg { width: 14px; height: 14px; }
.inquiry-filter.selected { color: #d7caff; border-color: rgba(157,119,245,.48); background: rgba(115,81,220,.18); }
.inquiry-content-panel { min-height: 338px; overflow: hidden; border-radius: 18px; background: rgba(18,20,34,.92); }
.inquiry-empty { min-height: 336px; }
.inquiry-empty .empty-icon { width: 98px; height: 98px; margin-bottom: 13px; border: 1px solid rgba(163,170,205,.14); border-radius: 23px; color: #9b6cff; background: #1b1d30; box-shadow: 0 10px 25px rgba(0,0,0,.14); }
.inquiry-empty .empty-icon svg { width: 27px; height: 27px; }
.inquiry-empty .empty-title { margin-bottom: 12px; font-size: 15px; }
.inquiry-empty .empty-copy { max-width: 350px; margin: 0 auto; font-size: 12px; line-height: 1.5; }

@media (min-width: 701px) and (max-width: 980px) {
  .site-header { min-height: 0; align-items: center; padding: 7px 14px; }
  .primary-nav { flex: 1 1 0; max-width: 640px; flex-wrap: wrap; align-content: center; overflow: visible; }
  .primary-nav .nav-item { flex: 0 0 auto; }
}
@media (max-width: 700px) {
  .inquiry-heading { align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .inquiry-heading h1 { font-size: 24px; }
  .inquiry-heading .heading-actions { gap: 5px; }
  .inquiry-heading .updated { display: none; }
  .inquiry-heading .button { min-height: 31px; padding: 6px 8px; font-size: 9px; }
  .inquiry-sections { margin-bottom: 14px; }
  .inquiry-toolbar-panel { margin-bottom: 18px; }
  .inquiry-toolbar { flex-wrap: wrap; padding: 8px; }
  .inquiry-toolbar .search { flex: 1 0 100%; min-width: 0; }
  .inquiry-filters { width: 100%; gap: 5px; justify-content: space-between; }
  .inquiry-filter { min-height: 32px; padding: 6px 8px; font-size: 9px; }
  .inquiry-content-panel { min-height: 300px; }
  .inquiry-empty { min-height: 298px; }
  .inquiry-empty .empty-copy { max-width: 300px; }
}

/* Add-client form reference */
.client-modal-backdrop { padding: 16px; }
.client-modal { display: flex; flex-direction: column; width: min(500px, 100%); height: min(700px, calc(100dvh - 34px)); max-height: calc(100dvh - 34px); overflow: hidden; border-radius: 18px; background: #141622; }
.client-modal .modal-head { flex: 0 0 auto; min-height: 111px; padding: 17px 20px 12px; }
.client-modal .modal-head h2 { font-size: 16px; line-height: 1.25; }
.client-modal .modal-head p { max-width: 400px; margin-top: 5px; font-size: 11px; line-height: 1.45; }
.modal-kicker { display: block; margin-bottom: 5px; color: #7e849f; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.client-modal .modal-form { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0; min-height: 0; }
.client-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 20px 19px; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.client-modal .modal-foot { flex: 0 0 auto; justify-content: space-between; min-height: 61px; padding: 10px 20px; background: #1d1f2d; }
.client-modal .modal-foot .button { min-height: 35px; padding: 8px 13px; font-size: 11px; }
.client-modal .modal-foot .button.primary { background: linear-gradient(115deg, #a477f2, #7045d7); }
.client-form-fields { display: grid; gap: 16px; }
.client-form-fields .field { gap: 6px; }
.client-form-fields .field > label, .client-field-label { color: #b9bed1; font-size: 10px; font-weight: 650; }
.client-required { color: #ff7889; font-weight: 700; }
.client-form-fields .field input, .client-form-fields .field select, .client-form-fields .field textarea { min-height: 36px; padding: 8px 11px; border-radius: 10px; background: rgba(27,29,44,.88); font-size: 11px; }
.client-form-fields .field textarea { min-height: 68px; line-height: 1.45; resize: vertical; }
.client-form-fields .field-hint { color: #727995; font-size: 9px; line-height: 1.4; }
.client-primary-phone, .client-phone-row { display: flex; align-items: center; gap: 0; min-width: 0; border: 1px solid rgba(163,170,205,.2); border-radius: 10px; background: rgba(27,29,44,.88); }
.client-primary-phone:focus-within { border-color: #8e61f1; box-shadow: 0 0 0 2px rgba(142,97,241,.2); }
.client-primary-phone > span, .client-phone-row > span { flex: 0 0 auto; padding: 0 10px; color: #9ba1b8; font-size: 11px; }
.client-form-fields .client-primary-phone input, .client-form-fields .client-phone-row input { flex: 1 1 auto; width: 0; min-width: 0; min-height: 36px; border: 0; outline: 0; background: transparent; box-shadow: none; }
.client-form-fields .client-primary-phone input:focus, .client-form-fields .client-phone-row input:focus { border: 0; outline: 0; box-shadow: none; }
.client-form-fields .client-primary-phone input[readonly] { color: #8d93aa; }
.client-warning { color: #e9ab26; font-size: 9px; font-weight: 650; }
.client-phone-list { display: grid; gap: 7px; }
.client-phone-row { padding-right: 3px; }
.client-phone-row .icon-button { width: 29px; height: 29px; }
.client-add-number { align-self: center; min-height: 28px; padding: 5px 8px; border: 0; background: transparent; font-size: 10px; }
.client-add-number:hover { border-color: transparent; background: rgba(255,255,255,.035); }
.client-requirement-section { display: grid; gap: 16px; padding-top: 5px; }
.client-section-title { color: #727995; font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.client-interest-field { display: grid; gap: 9px; }
.client-interest-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 8px; }
.client-interest-option { display: flex; align-items: center; gap: 8px; min-width: 0; color: #c2c6d7; font-size: 10px; cursor: pointer; }
.client-interest-option input { width: 15px; height: 15px; margin: 0; accent-color: #8e61f1; }
.client-property-types { min-width: 0; margin: 0; padding: 0; border: 0; }
.client-property-types legend { margin-bottom: 8px; color: #b9bed1; font-size: 10px; font-weight: 650; }
.client-type-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.client-choice-chip { position: relative; display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border: 1px solid rgba(163,170,205,.14); border-radius: 16px; color: #aeb3c8; background: rgba(32,34,51,.9); font-size: 9px; font-weight: 600; cursor: pointer; }
.client-choice-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.client-choice-chip:has(input:checked) { border-color: rgba(151,107,248,.52); color: #e0d5ff; background: rgba(118,78,214,.2); }
.client-property-types .field-hint { display: block; margin-top: 8px; }
.client-budget-units { display: flex; gap: 12px; margin-top: -2px; color: #858ba3; font-size: 9px; }
.client-budget-units b { color: #bfc3d4; font-weight: 700; }
.client-budget-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.client-form-fields .client-budget-row input { width: 100%; min-width: 0; min-height: 36px; padding: 8px 11px; border: 1px solid rgba(163,170,205,.18); border-radius: 10px; color: var(--ink); background: rgba(27,29,44,.88); font-size: 11px; }
.client-form-fields .client-budget-row input:focus { border-color: #8e61f1; outline: 0; box-shadow: 0 0 0 2px rgba(142,97,241,.16); }
.client-area-search { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 36px; padding: 0 9px; border: 1px solid rgba(163,170,205,.18); border-radius: 10px; background: rgba(27,29,44,.88); }
.client-area-search > span { display: grid; flex: 0 0 auto; color: #777f9b; }
.client-area-search > span svg { width: 14px; height: 14px; }
.client-form-fields .client-area-search input { flex: 1 1 auto; width: 0; min-width: 0; min-height: 33px; padding: 5px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.client-form-fields .client-area-search input:focus { border-color: transparent; box-shadow: none; }
.client-area-search .button { flex: 0 0 auto; min-height: 25px; padding: 4px 8px; font-size: 9px; }
.client-area-search [hidden] { display: none; }
.client-area-options { display: flex; flex-wrap: wrap; gap: 5px; max-height: 116px; overflow: auto; padding: 1px 2px 2px 0; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.client-area-chip { position: relative; display: inline-flex; align-items: center; min-height: 26px; padding: 5px 9px; border: 1px solid rgba(163,170,205,.13); border-radius: 16px; color: #b0b5c9; background: rgba(32,34,51,.9); font-size: 9px; font-weight: 600; cursor: pointer; }
.client-area-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.client-area-chip:has(input:checked) { border-color: rgba(48,188,217,.42); color: #b9f1f7; background: rgba(36,157,181,.14); }
.client-area-chip[hidden] { display: none; }
.requirement-modal-backdrop { padding: 0; }
.requirement-modal { display: flex; flex-direction: column; width: min(1000px, 100%); height: min(100dvh, 900px); max-height: 100dvh; overflow: hidden; border-radius: 17px; background: #141622; }
.requirement-modal .modal-head { flex: 0 0 auto; min-height: 190px; padding: 27px 29px 23px; }
.requirement-modal .modal-kicker { margin-bottom: 8px; font-size: 12px; }
.requirement-modal .modal-head h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.035em; }
.requirement-modal .modal-head p { max-width: 920px; margin-top: 7px; font-size: 16px; line-height: 1.62; }
.requirement-modal .modal-form { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0; min-height: 0; }
.requirement-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 27px 29px 32px; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.requirement-modal .modal-foot { flex: 0 0 auto; justify-content: space-between; align-items: center; min-height: 86px; padding: 14px 27px; background: #1e202f; }
.requirement-modal .modal-foot .button { min-height: 52px; padding: 12px 24px; font-size: 16px; font-weight: 700; }
.requirement-modal .modal-foot .button.primary { min-width: 188px; border-radius: 14px; background: linear-gradient(115deg, #a477f2, #7045d7); }
.requirement-form-fields { display: grid; gap: 25px; }
.requirement-form-fields .field { gap: 9px; }
.requirement-form-fields .field > label, .requirement-property-types legend, .requirement-purpose legend { color: #c0c5d8; font-size: 15px; font-weight: 650; }
.requirement-form-fields .field input, .requirement-form-fields .field select, .requirement-form-fields .field textarea { min-height: 51px; padding: 12px 16px; border-radius: 14px; background: rgba(27,29,44,.88); font-size: 16px; }
.requirement-form-fields .field textarea { min-height: 108px; line-height: 1.5; }
.requirement-form-fields .field-hint { color: #79819e; font-size: 15px; line-height: 1.55; }
.requirement-property-types, .requirement-purpose { min-width: 0; margin: 0; padding: 0; border: 0; }
.requirement-property-types legend, .requirement-purpose legend { margin-bottom: 12px; }
.requirement-type-grid, .requirement-purpose-options { display: flex; flex-wrap: wrap; gap: 10px; }
.requirement-type-chip, .requirement-purpose-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 17px; border: 1px solid rgba(163,170,205,.2); border-radius: 24px; color: #bdc3d7; background: rgba(32,34,51,.86); font-size: 16px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.requirement-type-chip input, .requirement-purpose-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.requirement-type-chip:has(input:checked), .requirement-purpose-chip:has(input:checked) { border-color: rgba(151,107,248,.62); color: #e7ddff; background: rgba(118,78,214,.22); box-shadow: 0 0 0 1px rgba(151,107,248,.08) inset; }
.requirement-type-chip:focus-within, .requirement-purpose-chip:focus-within { outline: 2px solid rgba(151,107,248,.6); outline-offset: 2px; }
.requirement-property-types .field-hint { display: block; margin-top: 12px; }
.requirement-purpose-chip { min-width: 116px; }
.requirement-form-fields .client-budget-units { gap: 14px; margin: -3px 0 0; font-size: 13px; }
.requirement-budget-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.requirement-form-fields .requirement-budget-row input { width: 100%; min-width: 0; }
.requirement-form-fields .client-area-search { min-height: 52px; padding: 0 15px; border-radius: 14px; }
.requirement-form-fields .client-area-search > span svg { width: 18px; height: 18px; }
.requirement-form-fields .client-area-search input { min-height: 46px; font-size: 16px; }
.requirement-form-fields .client-area-search .button { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.requirement-form-fields .client-area-options { max-height: 176px; gap: 8px; padding-top: 4px; }
.requirement-form-fields .client-area-chip { min-height: 35px; padding: 7px 13px; font-size: 13px; }
.requirement-building-row, .requirement-contact-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.requirement-phone-list { display: grid; gap: 8px; }
.requirement-phone-row { display: flex; align-items: center; min-width: 0; min-height: 51px; overflow: hidden; border: 1px solid rgba(163,170,205,.2); border-radius: 14px; background: rgba(27,29,44,.88); }
.requirement-phone-row > span { flex: 0 0 auto; padding: 0 15px; color: #9ba1b8; font-size: 16px; }
.requirement-form-fields .requirement-phone-row input { flex: 1 1 auto; width: 0; min-width: 0; min-height: 49px; padding: 10px 0; border: 0; outline: 0; background: transparent; box-shadow: none; }
.requirement-form-fields .requirement-phone-row input:focus { border: 0; outline: 0; box-shadow: none; }
.requirement-phone-row .icon-button { flex: 0 0 auto; width: 35px; height: 35px; margin-right: 6px; }
.requirement-add-number { align-self: flex-start; min-height: 32px; border-color: transparent; background: transparent; }
.requirement-add-number:hover { border-color: transparent; background: rgba(255,255,255,.035); }
.requirement-phone-warning { color: #d99d20 !important; }
.requirement-form-fields #requirement-description { min-height: 140px; }
.requirement-form-fields #requirement-notes { min-height: 114px; }
@media (max-width: 720px) {
  .requirement-modal-backdrop { padding: 0; }
  .requirement-modal { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .requirement-modal .modal-head { min-height: 0; padding: 22px 20px 19px; }
  .requirement-modal .modal-head h2 { font-size: 23px; }
  .requirement-modal .modal-head p { font-size: 13px; line-height: 1.5; }
  .requirement-modal .modal-body { padding: 21px 20px 26px; }
  .requirement-modal .modal-foot { min-height: 72px; padding: 10px 18px; }
  .requirement-modal .modal-foot .button { min-height: 45px; padding: 10px 16px; font-size: 14px; }
  .requirement-modal .modal-foot .button.primary { min-width: 155px; }
  .requirement-form-fields .field > label, .requirement-property-types legend, .requirement-purpose legend { font-size: 13px; }
  .requirement-form-fields .field input, .requirement-form-fields .field select, .requirement-form-fields .field textarea { min-height: 45px; font-size: 14px; }
  .requirement-form-fields .field-hint { font-size: 12px; }
  .requirement-type-chip, .requirement-purpose-chip { min-height: 37px; padding: 7px 12px; font-size: 13px; }
  .requirement-purpose-chip { min-width: 92px; }
  .requirement-building-row, .requirement-contact-row { grid-template-columns: 1fr; gap: 18px; }
  .requirement-budget-row { gap: 8px; }
  .requirement-form-fields .client-area-search input { font-size: 13px; }
  .requirement-form-fields .client-area-chip { font-size: 11px; }
}
@media (max-width: 560px) {
  .client-modal-backdrop { padding: 8px; }
  .client-modal { width: 100%; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .client-modal .modal-head, .client-modal .modal-body { padding-right: 15px; padding-left: 15px; }
  .client-modal .modal-foot { padding-right: 15px; padding-left: 15px; }
  .client-interest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


/* Requirement detail view: fixed title/actions with an independently scrolling record. */
.requirement-row { cursor: pointer; }
.requirement-row:focus-visible { outline: 2px solid rgba(155, 113, 255, .72); outline-offset: -2px; }
.req-card[data-requirement-card] { cursor: pointer; }
.req-card[data-requirement-card]:focus-visible { outline: 2px solid rgba(155, 113, 255, .72); outline-offset: 2px; }
.requirement-detail-backdrop { padding: 28px; }
.requirement-detail-dialog { display: flex; flex-direction: column; width: min(810px, calc(100vw - 32px)); max-height: min(680px, calc(100dvh - 48px)); overflow: hidden; border-radius: 18px; background: #171928; }
.requirement-detail-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 27px 19px; border-bottom: 1px solid rgba(163,170,205,.16); background: linear-gradient(135deg, rgba(37,34,62,.72), rgba(23,25,40,.96) 56%); }
.requirement-detail-head h2 { margin: 6px 0 5px; color: #f1f2fb; font-size: 22px; line-height: 1.18; letter-spacing: -.035em; }
.requirement-detail-head p { margin: 0; color: #9da3bb; font-size: 13px; }
.requirement-detail-kicker { color: #858ca9; font-size: 10px; line-height: 1.25; font-weight: 750; letter-spacing: .1em; }
.requirement-detail-head > .icon-button { flex: 0 0 auto; width: 28px; height: 28px; }
.requirement-detail-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.requirement-detail-badges .tag { min-height: 27px; border-radius: 8px; padding: 5px 10px; font-size: 11px; }
.requirement-detail-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 20px 27px 24px; scrollbar-color: rgba(138,143,169,.35) transparent; scrollbar-width: thin; }
.requirement-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.requirement-detail-card, .requirement-detail-block { min-width: 0; border: 1px solid rgba(163,170,205,.19); border-radius: 12px; background: #202236; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.requirement-detail-card { min-height: 88px; padding: 13px 14px; }
.requirement-detail-card > span, .requirement-detail-block h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 7px; color: #828aa8; font-size: 10px; line-height: 1.2; font-weight: 750; letter-spacing: .09em; }
.requirement-detail-card > strong { display: block; color: #e5e7f1; font-size: 14px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.requirement-detail-card > small { display: block; margin-top: 5px; color: #9aa1b9; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.requirement-detail-block { margin-top: 12px; padding: 14px 15px; }
.requirement-detail-block h3 { margin-bottom: 7px; }
.requirement-detail-block h3 svg { flex: none; }
.requirement-detail-block p { margin: 0; color: #d3d5e2; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.original-message-block p { color: #b8bdd0; line-height: 1.65; }
.requirement-detail-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 11px 23px; border-top: 1px solid rgba(163,170,205,.16); background: #202232; }
.requirement-detail-foot > .button { min-height: 39px; padding: 8px 14px; }
.requirement-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.requirement-detail-actions .button { min-height: 39px; padding: 8px 13px; }
.requirement-detail-actions .button.primary { min-width: 184px; }
.requirement-detail-delete { border-color: rgba(226,91,119,.3); background: rgba(205,63,97,.12); }
.requirement-detail-delete:hover { border-color: rgba(226,91,119,.6); background: rgba(205,63,97,.2); color: #ff9bad; }

@media (max-width: 640px) {
  .requirement-detail-backdrop { padding: 8px; }
  .requirement-detail-dialog { width: 100%; max-height: calc(100dvh - 16px); border-radius: 15px; }
  .requirement-detail-head { padding: 19px 17px 15px; }
  .requirement-detail-head h2 { font-size: 19px; }
  .requirement-detail-scroll { padding: 14px 15px 19px; }
  .requirement-detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .requirement-detail-card { min-height: 78px; padding: 10px; }
  .requirement-detail-card > strong { font-size: 12px; }
  .requirement-detail-card > small { font-size: 10px; }
  .requirement-detail-block { padding: 12px; }
  .requirement-detail-foot { min-height: 64px; padding: 8px 11px; }
  .requirement-detail-foot > .button, .requirement-detail-actions .button { min-height: 35px; padding: 7px 9px; font-size: 10px; }
  .requirement-detail-actions { gap: 4px; }
  .requirement-detail-actions .button.primary { min-width: 0; }
}

/* Light theme overrides for the reference-style layout. */
html[data-theme="light"] body { background: radial-gradient(ellipse at 0% 20%, rgba(116, 83, 220, .13), transparent 43%), radial-gradient(ellipse at 100% 34%, rgba(0, 153, 173, .12), transparent 42%), #f4f6fb; }
html[data-theme="light"] .ambient::before { background: radial-gradient(ellipse at 0% 24%, rgba(116, 83, 220, .14), transparent 44%), radial-gradient(ellipse at 100% 44%, rgba(0, 153, 173, .12), transparent 43%), linear-gradient(115deg, rgba(255,255,255,.18), rgba(239,242,250,.34)); }
html[data-theme="light"] .site-header { border-color: rgba(85, 74, 150, .18); background: linear-gradient(105deg, rgba(255,255,255,.94), rgba(246,247,253,.96) 48%, rgba(239,249,250,.96)); box-shadow: 0 8px 28px rgba(63, 72, 120, .13); }
html[data-theme="light"] .site-header .primary-nav { border-color: rgba(85, 74, 150, .13); background: rgba(255,255,255,.58); }
html[data-theme="light"] .site-header .nav-item.active { border-color: rgba(115, 81, 220, .24); background: rgba(115, 81, 220, .10); color: var(--violet-bright); }
html[data-theme="light"] .requirements-stats .stat-card { border-color: rgba(62, 70, 110, .14); background: linear-gradient(145deg, #ffffff, #f1f3fa); box-shadow: 0 8px 22px rgba(63, 72, 120, .07); }
html[data-theme="light"] .requirements-stats .stat-card:nth-child(3) { border-color: rgba(115, 81, 220, .34); background: linear-gradient(145deg, #fbf9ff, #f0edff); }
html[data-theme="light"] .requirements-stats .stat-card:nth-child(3) .stat-value { color: #6840cf; }
html[data-theme="light"] .requirements-toolbar-panel, html[data-theme="light"] .requirements-panel { border-color: rgba(62, 70, 110, .14); background: rgba(255,255,255,.82); box-shadow: 0 10px 26px rgba(63, 72, 120, .07); }
html[data-theme="light"] .requirements-toolbar .segment.selected { border-color: rgba(62, 70, 110, .18); background: rgba(115, 81, 220, .10); color: var(--violet-bright); }
html[data-theme="light"] .requirements-table th { background: #eef1f8; }
html[data-theme="light"] .req-card { border-color: rgba(62, 70, 110, .14); background: rgba(255,255,255,.82); box-shadow: 0 8px 20px rgba(63, 72, 120, .06); }
html[data-theme="light"] .req-card:hover { border-color: rgba(115, 81, 220, .34); }
html[data-theme="light"] .inquiry-sections .segment.selected { border-color: rgba(115,81,220,.24); background: rgba(115,81,220,.10); color: #5f40c7; }
html[data-theme="light"] .inquiry-toolbar-panel { border-color: rgba(62,70,110,.14); background: rgba(255,255,255,.84); box-shadow: 0 8px 22px rgba(34,41,79,.07); }
html[data-theme="light"] .inquiry-filter { border-color: rgba(62,70,110,.14); color: #414760; background: #f1f2f8; }
html[data-theme="light"] .inquiry-filter:hover { border-color: rgba(115,81,220,.28); background: #eceaf8; color: #30284e; }
html[data-theme="light"] .inquiry-filter.selected { border-color: rgba(115,81,220,.3); color: #5f40c7; background: #eee9ff; }
html[data-theme="light"] .inquiry-content-panel { border-color: rgba(62,70,110,.14); color: #20243a; background: rgba(255,255,255,.88); box-shadow: 0 10px 26px rgba(34,41,79,.07); }
html[data-theme="light"] .inquiry-empty .empty-icon { border-color: rgba(115,81,220,.15); color: #6847cf; background: #f0ecff; box-shadow: 0 8px 22px rgba(63,72,120,.07); }
html[data-theme="light"] .inquiry-empty .empty-title { color: #24283e; }
html[data-theme="light"] .inquiry-empty .empty-copy { color: #626b83; }
