:root {
  --navy-950: #081f25;
  --navy-900: #0d2930;
  --navy-800: #123942;
  --navy-700: #1b4a54;
  --slate-950: #172126;
  --slate-700: #4a5b61;
  --slate-500: #75868b;
  --slate-300: #bdc9cc;
  --slate-200: #d8e0e2;
  --slate-100: #e9eeef;
  --cream: #f5f2ea;
  --white: #fff;
  --green: #1f6a55;
  --green-light: #dceee7;
  --gold: #d9ad52;
  --gold-light: #f5e7c4;
  --red: #a5483f;
  --red-light: #f7e3e0;
  --orange: #a8621c;
  --orange-light: #f7ead7;
  --shadow-sm: 0 8px 24px rgba(8, 31, 37, 0.07);
  --shadow-lg: 0 26px 70px rgba(8, 31, 37, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 278px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; font-family: Inter, Arial, sans-serif; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--slate-950); background: #f4f6f5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.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; }

:focus-visible { outline: 3px solid rgba(217, 173, 82, 0.5); outline-offset: 3px; }

.portal-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1rem; letter-spacing: -0.02em; }
.portal-brand strong { font-weight: 700; }
.portal-brand-light { color: var(--white); }
.portal-brand-mark { width: 38px; height: 38px; color: var(--green); flex: 0 0 auto; }

.auth-view { min-height: 100vh; padding: 28px; color: var(--white); background-color: var(--navy-950); background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 36px 36px; }
.auth-home-link { position: fixed; top: 30px; right: 34px; z-index: 2; font-size: .82rem; color: rgba(255,255,255,.68); text-decoration: none; }
.auth-home-link:hover { color: var(--white); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); width: min(1180px, 100%); min-height: calc(100vh - 56px); margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 30px; background: rgba(255,255,255,.025); box-shadow: 0 40px 100px rgba(0,0,0,.22); }
.auth-story { display: flex; flex-direction: column; justify-content: space-between; gap: 60px; padding: clamp(36px, 6vw, 82px); background: radial-gradient(circle at 18% 20%, rgba(217,173,82,.15), transparent 34%), radial-gradient(circle at 85% 80%, rgba(31,106,85,.23), transparent 38%); }
.auth-story > div { max-width: 650px; }
.auth-story h1 { margin: 18px 0 22px; max-width: 760px; font-size: clamp(2.25rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.065em; }
.auth-story > div > p:not(.auth-eyebrow) { margin: 0; max-width: 610px; color: rgba(255,255,255,.68); font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.75; }
.auth-eyebrow, .view-kicker { margin: 0; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.auth-story .auth-eyebrow { color: var(--gold); }
.auth-benefits { display: grid; gap: 16px; padding: 0; margin: 34px 0 0; list-style: none; color: rgba(255,255,255,.88); font-size: .9rem; }
.auth-benefits li { display: flex; align-items: center; gap: 11px; }
.auth-benefits svg { width: 19px; height: 19px; color: var(--gold); }
.auth-security-note { max-width: 580px; margin: 0; color: rgba(255,255,255,.48); font-size: .76rem; line-height: 1.65; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 70px); color: var(--slate-950); background: var(--white); }
.auth-tabs { display: inline-flex; align-self: flex-start; padding: 4px; margin-bottom: 45px; border-radius: 999px; background: var(--slate-100); }
.auth-tabs button { min-width: 100px; padding: 10px 18px; border: 0; border-radius: 999px; color: var(--slate-700); background: transparent; font-size: .78rem; font-weight: 700; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { color: var(--white); background: var(--navy-900); box-shadow: var(--shadow-sm); }
.auth-copy { margin-bottom: 30px; }
.auth-copy h2 { margin: 9px 0 10px; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.auth-copy p:last-child { margin: 0; color: var(--slate-700); font-size: .9rem; line-height: 1.6; }
.auth-form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; color: #26363b; font-size: .78rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); color: var(--slate-950); background: var(--white); transition: border-color .2s ease, box-shadow .2s ease; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 0; box-shadow: 0 0 0 4px rgba(31,106,85,.09); }
.form-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-span-two { grid-column: 1 / -1; }
.field-help { margin: -8px 0 0; color: var(--slate-500); font-size: .72rem; line-height: 1.5; }
.check-field { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.5; }
.check-field input { width: 17px; min-height: 17px; margin-top: 2px; accent-color: var(--green); }
.check-field a { color: var(--green); }
.form-alert { padding: 12px 14px; margin-top: 16px; border: 1px solid #efc9c4; border-radius: var(--radius-sm); color: #7f332d; background: var(--red-light); font-size: .8rem; line-height: 1.5; }

.portal-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.portal-button svg { width: 17px; height: 17px; }
.portal-button:disabled { opacity: .55; cursor: wait; }
.portal-button-primary { color: var(--white); background: var(--green); box-shadow: 0 9px 24px rgba(31,106,85,.19); }
.portal-button-secondary { color: var(--navy-900); border-color: var(--slate-200); background: var(--white); }
.auth-form .portal-button { width: 100%; margin-top: 7px; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--slate-200); border-radius: 10px; color: var(--slate-700); background: var(--white); cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.text-button { padding: 8px 10px; border: 0; color: var(--green); background: transparent; font-size: .75rem; font-weight: 700; cursor: pointer; }

.portal-shell { min-height: 100vh; }
.portal-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 26px 18px 20px; color: var(--white); background-color: var(--navy-950); background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 30px 30px; }
.portal-sidebar .portal-brand { padding: 0 11px; }
.tenant-chip { display: grid; gap: 4px; padding: 13px 14px; margin: 30px 3px 18px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.035); }
.tenant-chip span { color: rgba(255,255,255,.43); font-size: .62rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.tenant-chip strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-nav { display: grid; gap: 3px; overflow-y: auto; padding: 2px 3px; }
.portal-nav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; color: rgba(255,255,255,.58); background: transparent; font-size: .77rem; font-weight: 600; text-align: left; cursor: pointer; transition: color .2s, background-color .2s; }
.portal-nav button svg { width: 18px; height: 18px; }
.portal-nav button.is-active { color: var(--white); background: rgba(255,255,255,.09); }
.sidebar-account { display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px; align-items: center; gap: 10px; padding: 15px 8px 0; margin-top: auto; border-top: 1px solid rgba(255,255,255,.09); }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--navy-950); background: var(--gold); font-size: .7rem; font-weight: 800; }
.sidebar-account strong, .sidebar-account span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: .7rem; }
.sidebar-account span { margin-top: 3px; color: rgba(255,255,255,.42); font-size: .62rem; }
.sidebar-account button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; color: rgba(255,255,255,.5); background: transparent; cursor: pointer; }
.sidebar-account svg { width: 17px; height: 17px; }
.portal-overlay { display: none; }

.portal-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.portal-topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 14px clamp(24px, 4vw, 52px); border-bottom: 1px solid rgba(8,31,37,.08); background: rgba(244,246,245,.9); backdrop-filter: blur(18px); }
.portal-topbar p { margin: 0 0 4px; color: var(--slate-500); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.portal-topbar h1 { margin: 0; font-size: 1.15rem; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.system-status { display: flex; align-items: center; gap: 7px; color: var(--slate-500); font-size: .68rem; font-weight: 600; }
.system-status i { width: 7px; height: 7px; border-radius: 50%; background: #2c8b69; box-shadow: 0 0 0 4px rgba(44,139,105,.12); }
.sidebar-toggle { display: none; }
.portal-content { width: min(1540px, 100%); padding: clamp(28px, 4vw, 54px); margin: 0 auto; }
.portal-view { display: none; animation: view-in .35s var(--ease); }
.portal-view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.view-heading h2 { margin: 7px 0 8px; font-size: clamp(1.8rem, 3.2vw, 2.75rem); line-height: 1.05; letter-spacing: -.05em; }
.view-heading p:last-child { max-width: 700px; margin: 0; color: var(--slate-700); font-size: .85rem; line-height: 1.65; }
.view-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.view-actions select { width: auto; min-width: 170px; }
.portal-card { border: 1px solid rgba(8,31,37,.09); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.card-heading span { display: block; margin-bottom: 5px; color: var(--slate-500); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.card-heading h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.025em; }
.card-heading a { color: var(--green); font-size: .7rem; font-weight: 700; text-decoration: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card { position: relative; display: grid; min-height: 185px; padding: 22px; overflow: hidden; border: 1px solid rgba(8,31,37,.08); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--green); background: var(--green-light); }
.metric-icon svg { width: 19px; height: 19px; }
.metric-card > span { align-self: end; margin-top: 18px; color: var(--slate-500); font-size: .72rem; font-weight: 600; }
.metric-card > strong { margin: 2px 0 9px; font-size: 2rem; letter-spacing: -.06em; }
.metric-card a { color: var(--green); font-size: .68rem; font-weight: 700; text-decoration: none; }
.metric-card-accent { color: var(--white); border-color: var(--navy-900); background: var(--navy-900); }
.metric-card-accent .metric-icon { color: var(--gold); background: rgba(255,255,255,.08); }
.metric-card-accent > span { color: rgba(255,255,255,.58); }
.metric-card-accent a { color: var(--gold); }
.overview-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 18px; }
.overview-grid > article { padding: 25px; }
.activity-list, .integration-status-list { display: grid; gap: 10px; }
.activity-item { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; padding: 11px 0; border-top: 1px solid var(--slate-100); }
.activity-date { display: grid; place-items: center; width: 46px; height: 48px; border-radius: 10px; color: var(--navy-900); background: var(--cream); font-size: .62rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.activity-date strong { display: block; font-size: 1rem; }
.activity-item h4, .activity-item p { margin: 0; }
.activity-item h4 { font-size: .78rem; }
.activity-item p { margin-top: 4px; color: var(--slate-500); font-size: .68rem; }
.activity-item > span { color: var(--green); font-size: .68rem; font-weight: 700; }
.integration-status { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--slate-100); }
.integration-status svg { width: 18px; height: 18px; color: var(--green); }
.integration-status strong, .integration-status span { display: block; }
.integration-status strong { font-size: .75rem; }
.integration-status span { margin-top: 3px; color: var(--slate-500); font-size: .64rem; }
.status-badge { display: inline-flex !important; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--green) !important; background: var(--green-light); font-size: .6rem !important; font-weight: 700; }
.status-badge.is-off { color: var(--slate-700) !important; background: var(--slate-100); }

.toolbar { display: flex; gap: 10px; padding: 14px; margin-bottom: 18px; border: 1px solid rgba(8,31,37,.08); border-radius: 13px; background: var(--white); }
.search-field { flex: 1; }
.toolbar input, .toolbar select { min-height: 40px; }
.toolbar select { width: 190px; }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.property-card { display: flex; flex-direction: column; min-height: 295px; padding: 23px; border: 1px solid rgba(8,31,37,.09); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.property-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.property-type { color: var(--green); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.availability { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: var(--green); background: var(--green-light); font-size: .58rem; font-weight: 700; text-transform: capitalize; }
.availability.under_offer { color: var(--orange); background: var(--orange-light); }
.availability.sold, .availability.withdrawn { color: var(--slate-700); background: var(--slate-100); }
.property-card h3 { margin: 18px 0 8px; font-size: 1.05rem; line-height: 1.35; letter-spacing: -.03em; }
.property-price { margin: 0; color: var(--slate-700); font-size: .82rem; font-weight: 700; }
.property-specs { display: flex; gap: 15px; padding: 15px 0; margin: 17px 0; border-block: 1px solid var(--slate-100); color: var(--slate-700); font-size: .68rem; }
.property-description { display: -webkit-box; overflow: hidden; margin: 0 0 20px; color: var(--slate-500); font-size: .72rem; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.property-card-actions { display: flex; gap: 8px; margin-top: auto; }
.property-card-actions button { padding: 7px 9px; border: 0; color: var(--green); background: transparent; font-size: .66rem; font-weight: 700; cursor: pointer; }
.property-card-actions button[data-delete-property] { color: var(--red); }
.empty-state { display: grid; place-items: center; min-height: 260px; padding: 34px; border: 1px dashed var(--slate-300); border-radius: var(--radius-md); color: var(--slate-500); text-align: center; }
.empty-state.compact { min-height: 120px; padding: 20px; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state h3 { color: var(--slate-950); font-size: .9rem; }
.empty-state p { margin-top: 7px; font-size: .72rem; line-height: 1.5; }
.property-grid > .empty-state { grid-column: 1 / -1; }

.calendar-card { padding: 20px; }
.calendar-toolbar { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.calendar-toolbar h3 { min-width: 170px; margin: 0 6px; font-size: 1rem; text-align: center; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-block: 1px solid var(--slate-100); }
.calendar-weekdays span { padding: 10px; color: var(--slate-500); font-size: .61rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 125px; padding: 8px; border-right: 1px solid var(--slate-100); border-bottom: 1px solid var(--slate-100); background: var(--white); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-outside { color: var(--slate-300); background: #fafbfb; }
.calendar-day.is-today > span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--white); background: var(--green); }
.calendar-day > span { font-size: .65rem; font-weight: 700; }
.calendar-events { display: grid; gap: 4px; margin-top: 7px; }
.calendar-event { width: 100%; padding: 5px 6px; overflow: hidden; border: 0; border-left: 3px solid var(--green); border-radius: 5px; color: var(--navy-900); background: var(--green-light); font-size: .58rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.calendar-event.block { border-left-color: var(--slate-500); background: var(--slate-100); }
.calendar-detail { min-height: 110px; padding: 20px; margin-top: 16px; }
.event-detail { display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.event-detail h3 { margin: 0 0 7px; font-size: 1rem; }
.event-detail p { margin: 4px 0; color: var(--slate-700); font-size: .73rem; }

.workflow-layout { display: grid; grid-template-columns: 200px minmax(500px, 1fr) 260px; gap: 15px; min-height: 590px; }
.workflow-tools, .workflow-inspector { padding: 20px; }
.workflow-tools h3, .workflow-inspector h3 { margin: 0 0 8px; font-size: .9rem; }
.workflow-tools > p { margin: 0 0 18px; color: var(--slate-500); font-size: .68rem; line-height: 1.5; }
.node-palette { display: grid; gap: 8px; }
.node-palette button { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--slate-200); border-radius: 9px; background: var(--white); font-size: .68rem; font-weight: 700; text-align: left; cursor: pointer; }
.node-color { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.node-color.condition { background: var(--gold); }
.node-color.handoff { background: var(--red); }
.node-color.complete { background: var(--navy-700); }
.workflow-validation { display: flex; align-items: center; gap: 8px; padding: 11px; margin-top: 22px; border-radius: 9px; color: var(--green); background: var(--green-light); font-size: .64rem; font-weight: 700; }
.workflow-validation.is-invalid { color: var(--red); background: var(--red-light); }
.workflow-validation svg { width: 16px; height: 16px; }
.workflow-canvas-wrap { position: relative; overflow: auto; }
.workflow-canvas { position: relative; min-width: 900px; min-height: 580px; background-color: #fbfcfc; background-image: radial-gradient(rgba(13,41,48,.15) 1px, transparent 1px); background-size: 22px 22px; }
.workflow-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.workflow-lines path { fill: none; stroke: var(--slate-300); stroke-width: 2; }
.workflow-lines marker path { fill: var(--slate-300); }
.workflow-node { position: absolute; z-index: 2; width: 155px; min-height: 82px; padding: 13px; border: 1px solid var(--slate-200); border-left: 4px solid var(--green); border-radius: 12px; background: var(--white); box-shadow: var(--shadow-sm); cursor: grab; user-select: none; touch-action: none; }
.workflow-node.condition { border-left-color: var(--gold); }
.workflow-node.handoff { border-left-color: var(--red); }
.workflow-node.start, .workflow-node.complete { border-left-color: var(--navy-700); }
.workflow-node.is-selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,106,85,.11), var(--shadow-sm); }
.workflow-node span { display: block; margin-bottom: 5px; color: var(--slate-500); font-size: .55rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.workflow-node strong { display: block; font-size: .7rem; line-height: 1.35; }
.workflow-inspector { overflow-y: auto; }
.inspector-form { display: grid; gap: 14px; }
.inspector-form label { font-size: .68rem; }
.inspector-connections { display: grid; gap: 9px; padding-top: 13px; border-top: 1px solid var(--slate-100); }
.inspector-connections h4 { margin: 0; font-size: .73rem; }
.connection-row { display: grid; gap: 6px; padding: 9px; border-radius: 8px; background: var(--slate-100); }
.connection-row button, .inspector-delete { justify-self: start; padding: 0; border: 0; color: var(--red); background: transparent; font-size: .62rem; font-weight: 700; cursor: pointer; }

.lead-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.lead-filters button { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--slate-200); border-radius: 999px; color: var(--slate-700); background: var(--white); font-size: .67rem; font-weight: 700; cursor: pointer; }
.lead-filters button.is-active { color: var(--white); border-color: var(--navy-900); background: var(--navy-900); }
.score-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-500); }
.score-dot.hot { background: var(--red); }
.score-dot.warm { background: var(--gold); }
.score-dot.cold { background: #538094; }
.kanban-scroll { overflow-x: auto; padding-bottom: 10px; }
.kanban-board { display: grid; grid-template-columns: repeat(6, minmax(235px, 1fr)); gap: 12px; min-width: 1450px; }
.kanban-column { min-height: 500px; padding: 12px; border: 1px solid rgba(8,31,37,.08); border-radius: 14px; background: rgba(233,238,239,.52); }
.kanban-column.is-drag-over { border-color: var(--green); background: var(--green-light); }
.kanban-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.kanban-heading strong { font-size: .71rem; text-transform: capitalize; }
.kanban-heading span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; color: var(--slate-700); background: var(--white); font-size: .6rem; font-weight: 700; }
.kanban-list { display: grid; gap: 9px; }
.lead-card { padding: 14px; border: 1px solid var(--slate-200); border-radius: 11px; background: var(--white); box-shadow: 0 5px 15px rgba(8,31,37,.05); cursor: grab; }
.lead-card.is-dragging { opacity: .45; }
.lead-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lead-card h3 { margin: 0; font-size: .75rem; }
.score-pill { padding: 4px 6px; border-radius: 999px; color: var(--red); background: var(--red-light); font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.score-pill.warm { color: var(--orange); background: var(--orange-light); }
.score-pill.cold { color: #416779; background: #e1edf1; }
.lead-card p { margin: 9px 0; color: var(--slate-500); font-size: .64rem; line-height: 1.45; }
.lead-meta { display: grid; gap: 5px; padding-top: 9px; border-top: 1px solid var(--slate-100); color: var(--slate-700); font-size: .59rem; }
.lead-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.lead-tags span { padding: 3px 5px; border-radius: 5px; color: var(--slate-700); background: var(--slate-100); font-size: .52rem; }

.analytics-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.analytics-stat { padding: 20px; }
.analytics-stat span { color: var(--slate-500); font-size: .68rem; }
.analytics-stat strong { display: block; margin: 7px 0 3px; font-size: 1.65rem; letter-spacing: -.05em; }
.analytics-stat small { color: var(--slate-500); font-size: .58rem; }
.analytics-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 16px; }
.chart-card { min-height: 390px; padding: 24px; }
.chart-legend { display: flex; gap: 15px; margin: -7px 0 18px; color: var(--slate-500); font-size: .62rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-key { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chart-key.viewings { background: var(--gold); }
.line-chart { min-height: 265px; }
.line-chart svg { width: 100%; height: 265px; overflow: visible; }
.chart-grid-line { stroke: var(--slate-100); stroke-width: 1; }
.chart-area { fill: rgba(31,106,85,.08); stroke: none; }
.chart-line { fill: none; stroke: var(--green); stroke-width: 3; }
.chart-line-secondary { fill: none; stroke: var(--gold); stroke-width: 2; }
.chart-label { fill: var(--slate-500); stroke: none; font-size: 9px; }
.score-chart { display: grid; place-items: center; min-height: 270px; }
.donut-wrap { position: relative; width: 210px; height: 210px; }
.donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 18; }
.donut-total { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-total strong { font-size: 2rem; letter-spacing: -.06em; }
.donut-total span { color: var(--slate-500); font-size: .62rem; }
.score-legend { display: flex; gap: 13px; margin-top: 18px; color: var(--slate-700); font-size: .62rem; }
.score-legend span { display: flex; align-items: center; gap: 5px; }

.compliance-note { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid #ead7a9; border-radius: 12px; color: #72571d; background: var(--gold-light); }
.compliance-note svg { width: 20px; height: 20px; flex: 0 0 auto; }
.compliance-note strong, .compliance-note p { display: block; margin: 0; }
.compliance-note strong { font-size: .73rem; }
.compliance-note p { margin-top: 4px; font-size: .66rem; line-height: 1.45; }
.table-card { overflow: hidden; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; border-bottom: 1px solid var(--slate-100); font-size: .68rem; text-align: left; white-space: nowrap; }
th { color: var(--slate-500); background: #fafbfb; font-size: .59rem; letter-spacing: .07em; text-transform: uppercase; }
td strong { display: block; color: var(--slate-950); font-size: .71rem; }
td span { color: var(--slate-500); }
.table-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: var(--green); background: var(--green-light); font-size: .56rem; font-weight: 700; text-transform: capitalize; }

.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.settings-card { padding: 24px; }
.toggle-field { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--slate-100); }
.toggle-field strong, .toggle-field small { display: block; }
.toggle-field strong { font-size: .75rem; }
.toggle-field small { margin-top: 4px; color: var(--slate-500); font-size: .63rem; font-weight: 400; }
.toggle-field input { position: relative; width: 42px; min-height: 23px; border: 0; border-radius: 999px; appearance: none; background: var(--slate-300); cursor: pointer; transition: background-color .2s; }
.toggle-field input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: transform .25s var(--ease); }
.toggle-field input:checked { background: var(--green); }
.toggle-field input:checked::after { transform: translateX(19px); }
.settings-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.billing-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 25px; margin-bottom: 16px; }
.billing-summary span { color: var(--slate-500); font-size: .65rem; }
.billing-summary strong { display: block; margin: 4px 0; font-size: 1.2rem; }
.billing-summary p { margin: 0; color: var(--slate-500); font-size: .67rem; text-transform: capitalize; }
.billing-mode { padding: 7px 10px; border-radius: 999px; color: var(--slate-700); background: var(--slate-100); font-size: .6rem; font-weight: 700; }
.billing-toggle { display: flex; width: fit-content; padding: 4px; margin: 0 auto 17px; border: 1px solid var(--slate-200); border-radius: 999px; background: var(--white); }
.billing-toggle button { padding: 8px 15px; border: 0; border-radius: 999px; color: var(--slate-500); background: transparent; font-size: .65rem; font-weight: 700; cursor: pointer; }
.billing-toggle button.is-active { color: var(--white); background: var(--navy-900); }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.plan-card { padding: 27px; }
.plan-card > span { color: var(--green); font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.plan-card h3 { margin: 9px 0; font-size: 1.2rem; letter-spacing: -.035em; }
.plan-card p { margin: 0; color: var(--slate-500); font-size: .72rem; line-height: 1.55; }
.plan-card ul { display: grid; gap: 10px; padding: 0; margin: 22px 0; list-style: none; color: var(--slate-700); font-size: .68rem; }
.plan-card li { display: flex; align-items: center; gap: 8px; }
.plan-card li svg { width: 16px; height: 16px; color: var(--green); }
.plan-card-featured { color: var(--white); border-color: var(--navy-900); background: var(--navy-900); }
.plan-card-featured > span, .plan-card-featured li svg { color: var(--gold); }
.plan-card-featured p, .plan-card-featured ul { color: rgba(255,255,255,.64); }
.invoice-card { margin-top: 16px; }
.invoice-card .card-heading { padding: 22px 24px 0; }
.invoice-download { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--green); background: var(--green-light); }
.invoice-download svg { width: 14px; height: 14px; }

.portal-dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 0; border-radius: var(--radius-lg); color: var(--slate-950); background: transparent; box-shadow: var(--shadow-lg); }
.portal-dialog-small { width: min(520px, calc(100% - 28px)); }
.portal-dialog::backdrop { background: rgba(8,31,37,.67); backdrop-filter: blur(5px); }
.dialog-shell { display: grid; gap: 20px; padding: 27px; background: var(--white); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 7px 0 0; font-size: 1.45rem; letter-spacing: -.04em; }
.dialog-shell > p { margin: 0; color: var(--slate-700); font-size: .76rem; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.dialog-shell fieldset { padding: 13px; border: 1px solid var(--slate-200); border-radius: 10px; }
.dialog-shell legend { padding: 0 5px; color: #26363b; font-size: .7rem; font-weight: 700; }
.check-row { display: flex; gap: 17px; }
.check-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.check-row input { width: 16px; min-height: 16px; accent-color: var(--green); }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 8px; width: min(370px, calc(100% - 44px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: var(--white); background: var(--navy-900); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); }
.toast svg { width: 20px; height: 20px; color: var(--gold); }
.toast strong, .toast span { display: block; }
.toast strong { font-size: .72rem; }
.toast span { margin-top: 3px; color: rgba(255,255,255,.65); font-size: .65rem; line-height: 1.4; }
.toast.is-error svg { color: #e88d82; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (hover: hover) and (pointer: fine) {
  .portal-button:not(:disabled):hover { transform: translateY(-2px); }
  .portal-button-primary:hover { background: #185c49; box-shadow: 0 13px 29px rgba(31,106,85,.25); }
  .portal-button-secondary:hover { border-color: var(--slate-300); box-shadow: var(--shadow-sm); }
  .portal-nav button:hover { color: var(--white); background: rgba(255,255,255,.06); }
  .property-card { transition: transform .35s var(--ease), box-shadow .35s ease; }
  .property-card:hover { transform: translateY(-4px); box-shadow: 0 20px 45px rgba(8,31,37,.1); }
  .lead-card:hover { border-color: var(--slate-300); }
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-layout { grid-template-columns: 180px minmax(500px, 1fr); }
  .workflow-inspector { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .auth-view { padding: 16px; }
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .auth-story { min-height: 520px; }
  .auth-card { min-height: 560px; }
  .auth-home-link { position: absolute; top: 28px; right: 30px; }
  .portal-sidebar { transform: translateX(-100%); transition: transform .35s var(--ease); }
  .portal-shell.sidebar-open > .portal-sidebar { transform: translateX(0) !important; }
  .portal-overlay { position: fixed; inset: 0; z-index: 15; display: block; visibility: hidden; opacity: 0; background: rgba(8,31,37,.55); transition: opacity .25s, visibility .25s; }
  .portal-shell.sidebar-open > .portal-overlay { visibility: visible !important; opacity: 1 !important; }
  .portal-main { margin-left: 0; }
  .sidebar-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; margin-right: 12px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--white); }
  .sidebar-toggle svg { width: 19px; height: 19px; }
  .portal-topbar > div:first-of-type { margin-right: auto; }
  .overview-grid, .analytics-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .workflow-layout { display: block; }
  .workflow-tools, .workflow-inspector { margin-bottom: 15px; }
  .workflow-canvas-wrap { height: 560px; }
}

@media (max-width: 680px) {
  .auth-view { padding: 0; }
  .auth-layout { border: 0; border-radius: 0; }
  .auth-story { min-height: 460px; padding: 32px 24px; }
  .auth-story h1 { margin-top: 70px; }
  .auth-benefits { display: none; }
  .auth-card { padding: 38px 22px; }
  .auth-home-link { top: 32px; right: 23px; }
  .form-grid-two { grid-template-columns: 1fr; }
  .form-span-two { grid-column: auto; }
  .portal-topbar { min-height: 72px; padding: 11px 15px; }
  .portal-topbar h1 { font-size: .95rem; }
  .portal-topbar p, .system-status { display: none; }
  .portal-content { padding: 24px 15px 40px; }
  .view-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .view-heading h2 { font-size: 2rem; }
  .view-actions { width: 100%; flex-wrap: wrap; }
  .view-actions .portal-button { flex: 1; }
  .view-actions select { width: 100%; }
  .metric-grid, .property-grid, .analytics-metrics, .plan-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 160px; }
  .toolbar { flex-direction: column; }
  .toolbar select { width: 100%; }
  .calendar-card { padding: 11px; overflow-x: auto; }
  .calendar-toolbar, .calendar-weekdays, .calendar-grid { min-width: 690px; }
  .calendar-day { min-height: 105px; }
  .event-detail { grid-template-columns: 1fr; }
  .billing-summary { align-items: flex-start; flex-direction: column; }
  .dialog-shell { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
