/* Layout and components. All color tokens live in theme.css. */
:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--app-background);
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { cursor: pointer; }
button { border: 0; transition: background-color .15s, border-color .15s; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--brand-navy); }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -.8px; line-height: 1.25; margin-bottom: 10px; }
h2 { font-size: 17px; font-weight: 650; margin-bottom: 0; }
h3 { font-size: 16px; }
p { line-height: 1.65; }
small { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
svg { display: block; flex-shrink: 0; }
.muted { color: var(--text-secondary); font-size: 14px; }
.eyebrow { font-size: 11px; letter-spacing: 1.3px; font-weight: 650; color: var(--text-secondary); display: block; margin-bottom: 12px; }
.brand { display: block; background: var(--surface); border-radius: 6px; padding: 8px 0; line-height: 0; }
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.workspace { display: flex; min-height: 100vh; }
.sidebar { width: 272px; background: var(--surface); border-right: 1px solid var(--border); padding: 26px 20px 0; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 4; overflow-y: auto; }
.sidebar .brand { width: 232px; max-width: 100%; margin: 0 auto 30px; }
.workspace-label { font-size: 11px; letter-spacing: 1.1px; color: var(--text-secondary); margin: 0 12px 15px; }
.nav-item { display: flex; align-items: center; gap: 11px; color: var(--brand-navy); width: 100%; text-align: left; padding: 13px 12px; border-left: 3px solid transparent; border-radius: 6px; background: transparent; font-size: 14px; margin: 5px 0; min-height: 46px; }
.nav-item > span:first-child { display: flex; flex-shrink: 0; width: 22px; justify-content: center; }
.nav-item.active { background: var(--brand-soft); color: var(--brand-navy); font-weight: 650; border-left-color: var(--brand-orange); }
.nav-item:hover { background: var(--surface-muted); }
.nav-item.active:hover { background: var(--brand-soft); }
.nav-item:active { background: var(--border); }
.nav-item b { background: var(--surface); color: var(--brand-navy); font-size: 12px; border-radius: 4px; padding: 1px 6px; margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.local-indicator { font-size: 12px; padding: 16px 12px; color: var(--text-secondary); }
.local-indicator i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--info-text); margin-right: 5px; }
.local-indicator span { display: block; font-size: 12px; padding: 4px 0 0 16px; }
.profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--border); padding: 20px 0; margin-top: 15px; font-size: 13px; }
.profile div { min-width: 0; flex: 1; }
.profile strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile small { display: block; font-size: 12px; }
.avatar { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--brand-navy); }
.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.icon-button { background: transparent; color: var(--text-secondary); min-width: 36px; min-height: 36px; font-size: 23px; border-radius: 5px; padding: 3px 7px; }
.icon-button:hover { background: var(--surface-muted); }
.main-wrap { margin-left: 272px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 76px; border-bottom: 1px solid var(--border); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); gap: 15px; position: relative; }
.topbar::before { content: ''; position: absolute; top: 0; left: 0; width: 96px; height: 3px; background: var(--brand-gradient); }
.breadcrumb { font-size: 13px; color: var(--text-secondary); }
.breadcrumb span { margin: 0 12px; }
.breadcrumb strong { font-weight: 550; color: var(--brand-navy); }
.top-date { font-size: 12px; color: var(--text-secondary); }
.mobile-brand, .mobile-settings, .mobile-logout { display: none; }
.content { padding: 32px; max-width: 1800px; width: 100%; margin: 0 auto; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.page-heading p { font-size: 14px; color: var(--text-secondary); margin: 0; }
.page-heading .eyebrow { margin-bottom: 10px; }
.primary, .secondary { padding: 11px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.primary { background: var(--brand-orange-dark); color: var(--surface); border: 1px solid var(--brand-orange-dark); }
.primary:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); }
.primary:active { background: var(--brand-orange-active); border-color: var(--brand-orange-active); }
.secondary { border: 1px solid var(--input-border); background: var(--surface); color: var(--brand-navy); }
.secondary:hover { background: var(--surface-muted); }
.secondary:active { background: var(--border); }
.text-button { font-size: 13px; color: var(--brand-navy); padding: 7px 2px; background: transparent; text-align: left; border-radius: 3px; }
.text-button:hover { text-decoration: underline; background: var(--surface-hover); }
.text-button:active { background: var(--surface-muted); }
.destructive { color: var(--error-text); }
.destructive:hover, .destructive:active { background: var(--error-background); color: var(--error-text); }
button:disabled { cursor: not-allowed; background: var(--disabled-background); color: var(--disabled-text); border-color: var(--disabled-background); }
button[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::after { content: ''; width: 12px; height: 12px; flex-shrink: 0; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; margin-left: 7px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { border: 1px solid var(--border); border-left: 3px solid var(--info-text); background: var(--info-background); border-radius: 7px; padding: 16px 19px; display: flex; gap: 14px; align-items: center; margin-bottom: 24px; font-size: 13px; color: var(--info-text); line-height: 1.65; }
.notice strong { font-size: 14px; color: var(--info-text); font-weight: 650; }
.notice p { margin: 4px 0 0; font-size: 13px; color: var(--info-text); }
.notice .text-button { margin-left: auto; white-space: nowrap; color: var(--info-text); }
.notice-symbol { width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: Georgia, serif; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 26px; }
.metric { border: 1px solid var(--border); border-radius: 8px; padding: 21px; background: var(--surface); }
.metric > span { color: var(--text-secondary); font-size: 13px; }
.metric > strong { display: flex; align-items: center; justify-content: space-between; font-size: 34px; font-weight: 600; margin: 15px 0 12px; line-height: 1; color: var(--brand-navy); }
.metric strong small { font-size: 19px; color: var(--text-secondary); }
.metric p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; overflow: hidden; min-width: 0; }
.panel-heading { padding: 19px 21px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 69px; flex-wrap: wrap; }
.panel-heading h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.badge { display: inline-block; vertical-align: middle; border-radius: 4px; padding: 4px 8px; font-size: 12px; line-height: 1.5; font-weight: 600; white-space: normal; color: var(--text-secondary); background: var(--surface-muted); }
.badge.warm { background: var(--brand-soft); color: var(--brand-orange-dark); }
.badge.burgundy { background: var(--burgundy-background); color: var(--brand-burgundy); }
.badge.warning { background: var(--warning-background); color: var(--warning-text); }
.badge.info { background: var(--info-background); color: var(--info-text); }
.badge.success { background: var(--success-background); color: var(--success-text); }
.badge.error { background: var(--error-background); color: var(--error-text); }
.lead-row { width: 100%; padding: 18px 21px; display: flex; text-align: left; align-items: center; gap: 12px; background: var(--surface); color: var(--text-primary); border-bottom: 1px solid var(--border); }
.lead-row:last-child { border-bottom: 0; }
.lead-row:hover { background: var(--surface-hover); }
.lead-row:active { background: var(--brand-soft); }
.lead-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lead-info strong { display: block; font-size: 14px; font-weight: 600; }
.lead-info small { display: block; margin-top: 5px; }
.lead-status { text-align: right; max-width: 160px; }
.lead-status small { display: block; margin-top: 6px; }
.arrow { color: var(--text-secondary); margin-left: 5px; }
.empty { padding: 34px 20px; text-align: center; max-width: 470px; margin: auto; }
.empty-icon { font-size: 30px; color: var(--text-secondary); background: var(--surface-muted); width: 55px; height: 55px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--brand-navy); }
.empty p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.empty p:last-child { margin: 0; }
.panel-note { padding: 14px 20px; background: var(--surface-hover); border-top: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
.task-row { padding: 17px 21px; display: flex; gap: 11px; align-items: center; border-bottom: 1px solid var(--border); }
.check-button { width: 32px; height: 32px; border: 1px solid var(--input-border); background: var(--surface); color: var(--brand-navy); border-radius: 50%; flex-shrink: 0; }
.check-button:hover { background: var(--success-background); color: var(--success-text); }
.task-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task-info strong { display: block; font-size: 13px; }
.task-info small { display: block; margin-top: 4px; }
.getting-started { margin-top: 24px; padding: 25px 28px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand-orange); border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.getting-started h2 { font-size: 18px; margin: 0 0 8px; }
.getting-started .eyebrow { margin-bottom: 10px; }
.getting-started p { margin: 0; font-size: 13px; color: var(--text-secondary); }
.getting-started button { flex-shrink: 0; }
.main-footer { padding: 18px 32px; color: var(--text-secondary); display: flex; justify-content: space-between; font-size: 12px; border-top: 1px solid var(--border); gap: 15px; }
.search { position: relative; max-width: 460px; margin-bottom: 22px; }
.search input { padding: 12px 15px 12px 40px; }
.search > span { position: absolute; top: 7px; left: 14px; font-size: 24px; color: var(--text-secondary); }
.inbox-layout { display: grid; grid-template-columns: 240px minmax(280px,1fr) 290px; gap: 16px; align-items: start; }
.conversation-list { max-height: 850px; overflow-y: auto; }
.conversation-list .panel-heading { padding: 18px 15px; }
.conversation-item { background: var(--surface); color: var(--text-primary); border-bottom: 1px solid var(--border); border-left: 3px solid transparent; width: 100%; text-align: left; padding: 18px 13px; }
.conversation-item:hover { background: var(--surface-hover); }
.conversation-item.selected { background: var(--brand-soft); border-left-color: var(--brand-orange); }
.conversation-title { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; justify-content: space-between; }
.conversation-title strong { font-size: 14px; overflow-wrap: anywhere; }
.conversation-item p { font-size: 13px; color: var(--text-secondary); margin: 10px 0; }
.conversation-control { margin-top: 6px; }
.conversation-control .badge { font-size: 12px; }
.thread { display: flex; flex-direction: column; min-height: 750px; }
.thread-header { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.thread-header .primary, .thread-header .secondary { font-size: 12px; padding: 9px 11px; }
.thread-person { flex: 1; min-width: 120px; }
.thread-person h2 { font-size: 15px; margin: 0 0 4px; overflow-wrap: anywhere; }
.thread-warning { background: var(--warning-background); font-size: 12px; color: var(--warning-text); line-height: 1.65; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.thread-messages { flex: 1; min-height: 260px; max-height: 480px; overflow: auto; background: var(--surface-hover); padding: 22px 16px; display: flex; flex-direction: column; gap: 17px; }
.message { padding: 13px 15px; border: 1px solid var(--border); border-radius: 0 10px 10px 10px; align-self: flex-start; background: var(--surface); max-width: 92%; }
.message.sent { background: var(--info-background); align-self: flex-end; border-radius: 10px 0 10px 10px; }
.message > span { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.message p { font-size: 14px; margin: 8px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message > small { font-size: 12px; }
.suggestion { border-top: 1px solid var(--border); padding: 16px; background: var(--surface-muted); }
.suggestion .eyebrow { margin-bottom: 8px; }
.suggestion p { font-size: 13px; color: var(--text-primary); margin-bottom: 7px; }
#message-form { padding: 16px; }
#message-form textarea { min-height: 78px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.composer-actions select { font-size: 12px; width: auto; flex: 1; min-width: 0; padding: 10px 8px; }
.composer-actions button { font-size: 13px; }
.detail-panel .panel-heading { padding: 16px; }
.property-illustration { background: var(--surface-muted); padding: 24px; display: flex; flex-direction: column; align-items: center; color: var(--text-secondary); font-size: 50px; line-height: 1.2; }
.property-illustration span { font-size: 13px; margin-top: 12px; }
.detail-body { padding: 21px 18px; }
.detail-body h3 { font-size: 19px; margin-bottom: 8px; overflow-wrap: anywhere; }
.detail-body .muted { font-size: 13px; margin-bottom: 17px; overflow-wrap: anywhere; }
.price { font-size: 20px; font-weight: 650; display: block; margin: 12px 0 20px; letter-spacing: -.3px; color: var(--brand-navy); }
.detail-section { padding: 20px 0; border-top: 1px solid var(--border); }
.detail-section .eyebrow { margin-bottom: 12px; }
.detail-section p { font-size: 14px; margin-bottom: 9px; }
.reasons { list-style: none; margin: 10px 0; padding: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.doc-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 12px; color: var(--text-secondary); }
.doc-row strong { font-weight: 600; }
.doc-row span { text-align: right; }
.footnote { font-size: 12px; line-height: 1.7; color: var(--text-secondary); margin-top: 15px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }
.property-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.property-cover { height: 165px; background: var(--surface-muted); position: relative; display: flex; align-items: center; justify-content: center; }
.property-cover > span:first-child { font-size: 80px; color: var(--text-secondary); line-height: 1; }
.property-cover .badge { position: absolute; top: 16px; left: 16px; background: var(--surface); }
.property-card-body { padding: 22px; }
.property-card-body h2 { font-size: 23px; margin: 9px 0 8px; }
.property-card-body p { font-size: 13px; }
.property-owner { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 18px 0; border-top: 1px solid var(--border); }
.property-card-footer { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 15px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; background: var(--surface); }
th { font-size: 13px; font-weight: 600; color: var(--brand-navy); background: var(--surface-muted); padding: 15px 20px; }
td { padding: 20px; font-size: 14px; border-top: 1px solid var(--border); }
tr:hover td { background: var(--surface-hover); }
td small { display: block; margin-top: 6px; }
.board-heading { margin-bottom: 18px; }
.board-heading h2 { display: flex; gap: 10px; align-items: center; }
.board-heading p { margin: 9px 0 0; font-size: 13px; }
.kanban { display: flex; align-items: stretch; gap: 16px; overflow-x: auto; padding: 4px 3px 20px; scroll-snap-type: x proximity; }
.kanban-column { flex: 0 0 285px; min-width: 0; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; scroll-snap-align: start; }
.kanban-column > header { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 16px 14px; min-height: 70px; border-bottom: 1px solid var(--border); }
.kanban-column > header h3 { margin: 0; font-size: 14px; }
.kanban-cards { padding: 12px; min-height: 260px; display: flex; flex-direction: column; gap: 12px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 16px; }
.kanban-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-type { color: var(--text-secondary); font-size: 12px; }
.kanban-card h3 { margin: 13px 0 5px; }
.card-link { font-size: 15px; font-weight: 650; width: 100%; display: flex; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.card-location { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.kanban-card .reasons li::before { content: '· '; }
.card-next { border-top: 1px solid var(--border); padding-top: 13px; margin-top: 13px; }
.card-next > span { color: var(--text-secondary); font-size: 12px; }
.card-next p { font-size: 13px; margin: 6px 0; }
.card-next small { display: block; margin-top: 5px; }
.column-empty { color: var(--text-secondary); text-align: center; font-size: 13px; margin: 15px 6px; }
.agenda-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 22px; }
.agenda-rules { padding: 24px; }
.agenda-rules h2 { font-size: 18px; margin-bottom: 22px; }
.agenda-rules > div { padding: 17px 0; border-bottom: 1px solid var(--border); }
.agenda-rules strong { font-size: 14px; }
.agenda-rules p { font-size: 13px; color: var(--text-secondary); margin: 7px 0 0; }
.visit-row { display: flex; gap: 15px; padding: 20px; align-items: center; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.visit-date { padding: 12px 7px; background: var(--surface-muted); border-radius: 7px; color: var(--brand-navy); font-size: 14px; flex-shrink: 0; min-width: 64px; text-align: center; }
.visit-info { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
.visit-info small { display: block; margin-top: 5px; }
.visit-info button { font-size: 14px; font-weight: 600; }
.visit-status { text-align: right; max-width: 185px; }
.visit-status small { display: block; margin-top: 7px; }
.followups { margin-top: 24px; }
.integration-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 22px; gap: 17px; }
.integration-card { border: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; border-radius: 7px; }
.integration-card strong { font-size: 14px; }
.integration-icon { width: 36px; height: 36px; background: var(--surface-muted); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--brand-navy); font-size: 21px; }
.settings-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 24px; }
.padded-form { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.padded-form p { margin-bottom: 0; }
.padded-form .notice { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; flex-direction: column; gap: 8px; }
input, select, textarea { border: 1px solid var(--input-border); border-radius: 5px; background: var(--surface); padding: 11px 12px; color: var(--text-primary); font-size: 14px; width: 100%; min-width: 0; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: 1; }
textarea { resize: vertical; line-height: 1.65; }
.checkbox-label { display: flex; flex-direction: row; align-items: flex-start; line-height: 1.6; }
.checkbox-label input { width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--brand-orange-dark); }
.compact { display: block; padding: 14px; font-size: 13px; }
.settings-data { padding: 25px; margin-bottom: 22px; }
.settings-data h2 { font-size: 20px; margin-bottom: 17px; }
.settings-data > p { font-size: 14px; color: var(--text-secondary); }
.audit-list { padding: 0 22px; }
.audit-list > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.audit-list strong { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.audit-list small { display: block; }
.form-error, .field-error { font-size: 13px; color: var(--error-text); line-height: 1.6; margin: 0; }
.form-error:empty, .field-error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--error-text); background: var(--error-background); }
.block { display: block; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--border); border-radius: 10px; width: min(690px,calc(100% - 24px)); padding: 0; max-height: 90vh; color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-dialog); }
dialog::backdrop { background: var(--backdrop); }
.modal-heading { padding: 22px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1; gap: 12px; }
.modal-heading h2 { font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px; }
.evidence-list { padding: 24px; }
.evidence-list article { border-bottom: 1px solid var(--border); padding: 15px 0; }
.evidence-list strong { font-size: 14px; }
.evidence-list p { font-size: 14px; margin: 9px 0; overflow-wrap: anywhere; }
.evidence-list small { display: block; margin-top: 10px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,12px); background: var(--info-background); color: var(--info-text); border: 1px solid currentColor; border-radius: 7px; padding: 14px 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 10; max-width: 90%; box-shadow: var(--shadow-toast); }
#toast.success { color: var(--success-text); background: var(--success-background); }
#toast.error { color: var(--error-text); background: var(--error-background); }
#toast.visible { opacity: 1; transform: translate(-50%,0); }
.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; }
.loading { padding: 25vh 20px; text-align: center; color: var(--text-secondary); font-size: 15px; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); position: relative; }
.login::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-gradient); }
.login-story { background: var(--surface); color: var(--brand-navy); padding: 50px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 35px; border-right: 1px solid var(--border); }
.login-brand { width: 320px; max-width: 100%; }
.login-story h1 { font-size: 39px; font-weight: 550; line-height: 1.35; letter-spacing: -1px; margin-bottom: 25px; }
.login-story .eyebrow { color: var(--brand-orange-dark); margin-bottom: 24px; }
.login-story p { font-size: 15px; color: var(--text-secondary); line-height: 1.9; }
.login-story small { font-size: 13px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 60px 40px; background: var(--app-background); }
.login-form > div { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 28px; letter-spacing: -.7px; margin: 16px 0 12px; }
.login-form .muted { margin-bottom: 30px; }
.login-form form { display: flex; flex-direction: column; gap: 22px; }
.login-form input { padding: 14px; }
.login-form form > .primary { margin-top: 7px; justify-content: space-between; padding: 14px 18px; }
.login-form .footnote { text-align: center; margin-top: 24px; }
.login-form .notice { display: block; }
@media (max-width: 1450px) {
  .inbox-layout { grid-template-columns: 230px minmax(280px,1fr); }
  .detail-panel { grid-column: 2; }
  .detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .detail-body > h3, .detail-body > .muted, .detail-body > .price, .detail-actions { grid-column: 1 / -1; }
  .property-illustration { display: none; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1150px) {
  .sidebar { width: 256px; padding: 24px 14px 0; }
  .sidebar .brand { width: 228px; }
  .main-wrap { margin-left: 256px; }
  .content { padding: 26px 22px; }
  .topbar { padding: 0 22px; }
  .top-date { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .property-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .integration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-grid, .agenda-grid { grid-template-columns: 1fr; }
  .getting-started { flex-wrap: wrap; }
  .login-story { padding: 45px 35px; }
  .login-story h1 { font-size: 32px; }
  .page-heading > .primary { max-width: 170px; }
}
@media (max-width: 950px) {
  .inbox-layout { grid-template-columns: minmax(0,1fr); }
  .conversation-list { max-height: 300px; }
  .detail-panel { grid-column: 1; }
  .page-heading h1 { font-size: 27px; }
  .page-heading { align-items: flex-start; }
  .main-footer { flex-direction: column; gap: 5px; padding: 17px 22px; }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .sidebar > .brand, .workspace-label, .sidebar-bottom .local-indicator, .sidebar-bottom .profile { display: none; }
  .sidebar nav { display: flex; padding: 5px; gap: 2px; overflow-x: auto; }
  .nav-item { flex: 1 0 98px; flex-direction: column; gap: 5px; margin: 0; justify-content: center; padding: 8px 4px; border-left: 0; border-bottom: 3px solid transparent; min-width: 0; min-height: 64px; }
  .nav-label { font-size: 12px; }
  .nav-item.active { border-bottom-color: var(--brand-orange); }
  .nav-item b { display: none; }
  .sidebar-bottom { display: none; }
  .mobile-settings { display: flex; }
  .mobile-logout { display: block; margin-left: auto; }
  .main-wrap { margin: 0; }
  .topbar { height: 88px; padding: 0 16px; justify-content: flex-start; }
  .topbar::before { display: none; }
  .breadcrumb { display: none; }
  .mobile-brand { display: block; width: 232px; max-width: calc(100% - 60px); padding: 0; background: var(--surface); border-radius: 4px; }
  .mobile-brand .brand-logo { width: 100%; }
  .content { padding: 24px 16px; }
  .page-heading { gap: 13px; margin-bottom: 23px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 13px; }
  .page-heading > .primary { font-size: 13px; min-width: 118px; max-width: 135px; padding: 10px; margin-top: 10px; }
  .notice { padding: 14px; gap: 10px; flex-wrap: wrap; }
  .notice .text-button { white-space: normal; margin-left: 35px; }
  .metrics { gap: 12px; margin-bottom: 20px; }
  .metric { padding: 17px 14px; }
  .metric > strong { font-size: 30px; }
  .metric > span { font-size: 13px; }
  .panel-heading { padding: 17px 15px; }
  .lead-row { padding: 17px 14px; gap: 10px; flex-wrap: wrap; }
  .lead-status { max-width: 145px; }
  .arrow { display: none; }
  .getting-started { padding: 22px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .getting-started h2 { font-size: 18px; }
  .property-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .thread { min-height: 650px; }
  .thread-header { padding: 15px 12px; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-body > h3, .detail-body > .muted, .detail-body > .price, .detail-actions { grid-column: auto; }
  .visit-row { padding: 16px 14px; gap: 12px; }
  .visit-status { max-width: none; text-align: left; padding-left: 76px; width: 100%; }
  .integration-grid { padding: 15px; gap: 12px; }
  .integration-card { padding: 17px 13px; gap: 11px; }
  .settings-grid { gap: 20px; margin-top: 20px; }
  .padded-form { padding: 20px; }
  .modal-heading { padding: 18px 20px; }
  .kanban-column { flex-basis: min(285px,calc(100vw - 52px)); }
  .login { display: block; }
  .login-story { padding: 26px; min-height: auto; border: 0; gap: 20px; }
  .login-brand { width: 250px; }
  .login-story h1 { font-size: 27px; margin-bottom: 0; }
  .login-story h1 br { display: none; }
  .login-story .eyebrow, .login-story p, .login-story small { display: none; }
  .login-form { padding: 30px 26px 45px; }
  .login-form h2 { font-size: 25px; }
}
@media (max-width: 390px) {
  .page-heading { flex-wrap: wrap; }
  .page-heading > .primary { max-width: none; margin-top: 0; }
  .lead-status { width: 100%; max-width: none; text-align: left; padding-left: 48px; }
  .composer-actions { flex-wrap: wrap; }
  .composer-actions select { flex-basis: 100%; }
  .integration-grid { grid-template-columns: 1fr; }
  .visit-status { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button[aria-busy="true"]::after { border-right-color: currentColor; border-style: dotted; }
}
.connection-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.connection-url { display: block; overflow-wrap: anywhere; padding: 12px; background: var(--surface-muted, #f4f6f9); font-size: 12px; }
