/* ============================================================
   RealEdge CRM — static/css/main.css
   ============================================================ */
@import url('./workspace.css');

:root {
  --font: var(--workspace-font);
  --bg: var(--canvas);
  --surface: var(--panel);
  --surface2: var(--soft);
  --surface3: var(--rule);
  --border: var(--rule);
  --border2: var(--field-rule);
  --text: var(--ink);
  --text2: var(--secondary-ink);
  --text3: var(--muted-ink);
  --blue: var(--accent);
  --blue-lt: var(--accent-soft);
  --blue-dk: var(--action-hover);
  --green: var(--accent);
  --green-lt: var(--accent-soft);
  --amber: #865919;
  --amber-lt: #faf2de;
  --red: var(--alert-ink);
  --red-lt: var(--alert-soft);
  --purple: #466459;
  --purple-lt: #edf3ef;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 14px;
  --shadow-sm: 0 1px 3px #15291c0c;
  --shadow-md: 0 4px 16px #15291c12;
  --shadow-lg: 0 12px 40px #15291c22;
  --t: .15s ease;
}
[data-theme="dark"] {
  --amber: #edd197;
  --amber-lt: #382e1e;
  --purple: #bdcec4;
  --purple-lt: #28362e;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
body{font-family:var(--font);background:var(--bg);color:var(--text);min-height:100vh;-webkit-font-smoothing:antialiased;transition:background .25s,color .25s;}
button,input,select,textarea{font-family:inherit;}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:10px;}
html:has(#pg-map.active), #listing-sidebar { scrollbar-width:none; }
html:has(#pg-map.active)::-webkit-scrollbar, #listing-sidebar::-webkit-scrollbar { display:none; }

/* ── Theme toggle ── */
.theme-toggle{width:44px;height:24px;border-radius:12px;background:var(--border2);border:none;cursor:pointer;position:relative;transition:background .25s;flex-shrink:0;}
.theme-toggle.dark{background:var(--blue);}
.theme-toggle::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .25s;box-shadow:0 1px 3px rgba(0,0,0,.2);}
.theme-toggle.dark::after{transform:translateX(20px);}
.theme-toggle-wrap{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text3);}
.toggle-icon{font-size:14px;}

/* ── Login ── */
#login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--soft);}
.login-card{background:var(--surface);border-radius:var(--r-xl);padding:38px 40px;width:400px;max-width:calc(100vw - 32px);border:1px solid var(--rule);box-shadow:var(--shadow-sm);}
.login-logo{display:flex;align-items:center;gap:12px;margin-bottom:26px;}
.login-logo-icon{width:40px;height:40px;background:var(--action);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:16px;font-weight:700;}
.error-box{background:var(--red-lt);color:var(--red);border:1px solid #fecaca;border-radius:var(--r-md);padding:10px 13px;font-size:13px;margin-bottom:14px;display:none;}
.error-box.show{display:block;}
.demo-hint{font-size:12px;color:var(--text3);margin-top:14px;text-align:center;background:var(--surface2);padding:8px 10px;border-radius:var(--r-md);line-height:1.6;}

/* ── App shell ── */
#app-screen{display:none;}
.app{display:flex;min-height:100vh;}
.main{flex:1;margin-left:var(--workspace-nav-width);display:flex;flex-direction:column;}
.topbar{background:var(--surface);border-bottom:1px solid var(--border);padding:0 26px;min-height:64px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:10;transition:background .25s,border-color .25s;}
.topbar-title{letter-spacing:-.035em;font-size:22px;font-weight:700;flex:1;}
.topbar-actions{display:flex;gap:8px;}
.topbar-user{display:flex;align-items:center;gap:8px;cursor:pointer;padding:6px 10px;border-radius:var(--r-md);transition:background var(--t);}
.topbar-user:hover{background:var(--surface2);}
.avatar-sm{width:30px;height:30px;border-radius:50%;background:var(--blue-lt);color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;}
.content{flex:1;width:100%;max-width:1500px;margin-inline:auto;padding:28px clamp(18px,3vw,48px);}
.page{display:none;scroll-margin-top:110px;}
.page.active{display:block;}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:6px;border:1px solid var(--field-rule);background:var(--surface);font-size:14px;font-weight:700;color:var(--text);cursor:pointer;transition:all var(--t);white-space:nowrap;}
.btn:hover{background:var(--surface2);}
.btn-primary{background:var(--action);color:#fff;border-color:var(--blue);}
.btn-primary:hover{background:var(--blue-dk);}
.btn-danger{background:#95363c;color:#fff;border-color:var(--red);}
.btn-danger:hover{background:#c81e1e;}
.btn-ghost{border-color:transparent;background:transparent;}
.btn-ghost:hover{background:var(--surface2);}
.btn-sm{padding:5px 11px;font-size:12px;}
.btn-icon{padding:6px 8px;}
.btn:disabled{opacity:.5;cursor:not-allowed;}

/* ── Cards ── */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:18px 20px;transition:background .25s,border-color .25s;}
.card-title{font-size:17px;letter-spacing:-.02em;font-weight:700;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:8px;}

/* ── Metrics ── */
.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px;}
.metric-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:18px;transition:background .25s;}
.metric-label{font-size:12px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px;}
.metric-value{font-size:30px;font-weight:700;line-height:1;}
.metric-sub{font-size:12px;color:var(--text3);margin-top:5px;}

/* ── Badges ── */
.badge{display:inline-block;font-size:12px;font-weight:600;padding:3px 9px;border-radius:20px;}
.badge-prospect{background:var(--amber-lt);color:var(--amber);}
.badge-closed{background:var(--green-lt);color:var(--green);}

/* ── Client tags (Discord-style) ── */
.client-tag{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:3px 8px;border-radius:20px;cursor:default;white-space:nowrap;transition:opacity .15s;}
.client-tag .tag-emoji{font-size:12px;}
.tags-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px;}
.tag-selector{display:flex;flex-wrap:wrap;gap:6px;padding:10px 0;}
.tag-option{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;padding:5px 10px;border-radius:20px;cursor:pointer;transition:all .15s;user-select:none;border:2px solid transparent;}
.tag-option:hover{opacity:.8;}
.tag-option.selected{border-color:var(--text);}

/* ── Pipeline ── */
.pipeline{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}
.pipe-col{background:var(--surface2);border-radius:var(--r-md);padding:12px;}
.pipe-label{font-size:12px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px;}
.pipe-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:9px 11px;margin-bottom:8px;}
.pipe-card-name{font-size:13px;font-weight:600;}
.pipe-card-budget{font-size:12px;color:var(--text3);margin-top:2px;}
.pipe-empty{font-size:12px;color:var(--text3);text-align:center;padding:14px 0;}

/* ── Updates ── */
.update-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--surface3);font-size:13px;align-items:flex-start;}
.update-item:last-child{border-bottom:none;}
.dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:3px;}
.dot-blue{background:var(--blue);}.dot-green{background:var(--green);}
.dot-amber{background:var(--amber);}.dot-red{background:var(--red);}
.update-text{flex:1;line-height:1.45;}
.update-time{font-size:12px;color:var(--text3);flex-shrink:0;}
.upcoming-item{padding:11px 13px;border:1px solid var(--border);border-radius:var(--r-md);margin-bottom:8px;}
.upcoming-date{font-size:12px;color:var(--text3);margin-bottom:3px;}
.upcoming-title{font-size:13px;font-weight:600;margin-bottom:2px;}
.upcoming-sub{font-size:12px;color:var(--text2);}

/* ── Clients ── */
.search-bar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;}
.search-input{flex:1;padding:9px 14px;border:1px solid var(--border2);border-radius:var(--r-md);font-size:13px;min-width:160px;background:var(--surface);color:var(--text);}
.search-input:focus{outline:none;border-color:var(--blue);}
.filter-select{padding:9px 12px;border:1px solid var(--border2);border-radius:var(--r-md);font-size:13px;background:var(--surface);color:var(--text);cursor:pointer;}
.clients-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:14px;}
.client-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:18px;transition:border-color var(--t),box-shadow var(--t);}
.client-card:hover{border-color:var(--blue);background:var(--soft);}
.avatar{width:44px;height:44px;border-radius:50%;background:var(--blue-lt);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;color:var(--blue);margin-bottom:12px;}
.client-name{font-size:14px;font-weight:700;margin-bottom:4px;}
.client-meta{font-size:12px;color:var(--text3);margin-top:6px;}
.client-notes{font-size:12px;color:var(--text2);margin-top:7px;line-height:1.45;}
.client-actions{display:flex;gap:6px;margin-top:12px;}

/* ── Calendar ── */
.cal-layout{display:grid;grid-template-columns:1fr 300px;gap:18px;}
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.cal-month{font-size:15px;font-weight:700;}
.cal-grid{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;}
.cal-head{display:grid;grid-template-columns:repeat(7,1fr);background:var(--surface2);}
.cal-dh{padding:9px;text-align:center;font-size:12px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.4px;}
.cal-body{display:grid;grid-template-columns:repeat(7,1fr);}
.cal-cell{min-height:78px;padding:7px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);}
.cal-cell:nth-child(7n){border-right:none;}
.cal-num{font-size:12px;color:var(--text3);display:inline-block;margin-bottom:4px;}
.cal-today .cal-num{background:var(--action);color:#fff;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;}
.cal-event{font-size:10px;padding:2px 6px;border-radius:4px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;}
.ev-showing{background:var(--blue-lt);color:var(--blue);}
.ev-call{background:var(--green-lt);color:var(--green);}
.ev-closing{background:var(--amber-lt);color:var(--amber);}
.ev-meeting,.ev-other,.ev-followup{background:var(--purple-lt);color:var(--purple);}
.ev-legend{display:flex;gap:14px;margin-top:10px;font-size:12px;color:var(--text3);flex-wrap:wrap;}
.ev-dot{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:4px;vertical-align:middle;}

/* ── AI ── */
.ai-wrap{display:grid;grid-template-columns:1fr 280px;gap:16px;height:calc(100vh - 140px);}
.chat-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);display:flex;flex-direction:column;overflow:hidden;}
.chat-head{padding:13px 16px;border-bottom:1px solid var(--border);font-size:13px;font-weight:700;display:flex;align-items:center;gap:8px;}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--green);flex-shrink:0;}
.chat-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;}
.msg{max-width:88%;padding:11px 14px;border-radius:12px;font-size:13px;line-height:1.65;}
.msg-user{background:var(--action);color:#fff;align-self:flex-end;border-bottom-right-radius:3px;}
.msg-ai{background:var(--surface2);color:var(--text);align-self:flex-start;border-bottom-left-radius:3px;}
.msg-label{font-size:10px;font-weight:700;color:var(--text3);margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px;}
.chat-footer{border-top:1px solid var(--border);padding:12px;display:flex;gap:8px;}
.chat-input{flex:1;padding:9px 13px;border:1px solid var(--border2);border-radius:var(--r-md);font-size:13px;resize:none;background:var(--surface);color:var(--text);}
.chat-input:focus{outline:none;border-color:var(--blue);}
.chips-panel{display:flex;flex-direction:column;gap:8px;}
.chips-label{font-size:12px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.5px;}
.chip{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:10px 12px;font-size:12px;cursor:pointer;color:var(--text2);transition:all var(--t);}
.chip:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-lt);}
.typing-dots{display:inline-flex;gap:4px;align-items:center;padding:11px 14px;background:var(--surface2);border-radius:12px;border-bottom-left-radius:3px;align-self:flex-start;}
.typing-dots span{width:6px;height:6px;border-radius:50%;background:var(--text3);animation:blink 1.2s infinite;}
.typing-dots span:nth-child(2){animation-delay:.2s;}.typing-dots span:nth-child(3){animation-delay:.4s;}
@keyframes blink{0%,80%,100%{opacity:.3;}40%{opacity:1;}}

/* ── Tables ── */
.tbl{width:100%;border-collapse:collapse;font-size:13px;}
.tbl th{text-align:left;padding:10px 14px;font-size:12px;font-weight:700;color:var(--text3);border-bottom:1px solid var(--border);background:var(--surface2);text-transform:uppercase;letter-spacing:.4px;}
.tbl td{padding:12px 14px;border-bottom:1px solid var(--surface3);vertical-align:middle;}
.tbl tr:last-child td{border-bottom:none;}
.tbl tbody tr:hover td{background:var(--surface2);}
.perm-y{color:var(--green);font-weight:700;}.perm-n{color:var(--text3);}
.role-badge{font-size:12px;padding:3px 9px;border-radius:20px;font-weight:600;display:inline-block;}

/* ── Forms ── */
.fg{margin-bottom:14px;}
.fl{font-size:12px;color:var(--text2);display:block;margin-bottom:5px;font-weight:600;}
.fi,.fs,.fta{width:100%;padding:9px 12px;border:1px solid var(--border2);border-radius:var(--r-md);font-size:13px;background:var(--surface);color:var(--text);transition:border-color var(--t),background .25s;}
.fi:focus,.fs:focus,.fta:focus{outline:none;border-color:var(--blue);}
.fta{resize:vertical;min-height:80px;}
.frow{display:grid;grid-template-columns:1fr 1fr;gap:12px;}

/* ── Modal ── */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:100;}
.modal{background:var(--surface);border-radius:var(--r-xl);padding:24px;width:480px;max-width:calc(100vw - 32px);box-shadow:var(--shadow-lg);max-height:90vh;overflow-y:auto;}
.modal-lg{width:600px;}
.modal-title{font-size:16px;font-weight:700;margin-bottom:20px;}
.modal-footer{display:flex;gap:8px;justify-content:flex-end;margin-top:20px;}

/* ── Email section ── */
.email-layout{display:grid;grid-template-columns:1fr 320px;gap:18px;}
.recipient-list{max-height:300px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r-md);}
.recipient-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--surface3);font-size:13px;cursor:pointer;transition:background var(--t);}
.recipient-row:last-child{border-bottom:none;}
.recipient-row:hover{background:var(--surface2);}
.recipient-row.selected{background:var(--blue-lt);}
.recipient-check{width:16px;height:16px;accent-color:var(--blue);flex-shrink:0;}
.email-log-item{padding:11px 13px;border:1px solid var(--border);border-radius:var(--r-md);margin-bottom:8px;}
.email-log-subject{font-size:13px;font-weight:600;margin-bottom:3px;}
.email-log-meta{font-size:12px;color:var(--text3);}
.select-all-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--surface2);border-bottom:1px solid var(--border);font-size:12px;font-weight:600;color:var(--text2);}
.tag-filter-bar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px;}

/* ── Client Tags page ── */
.tags-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;}
.tag-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;}
.tag-card-header{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.tag-card-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
.tag-card-name{font-size:14px;font-weight:700;}
.tag-card-desc{font-size:12px;color:var(--text2);margin-bottom:10px;line-height:1.4;}
.tag-usage{font-size:12px;color:var(--text3);font-weight:600;}

/* ── Toast ── */
.toast-wrap{position:fixed;bottom:24px;right:24px;z-index:999;display:flex;flex-direction:column;gap:8px;}
.toast{background:var(--text);color:var(--surface);padding:11px 16px;border-radius:var(--r-md);font-size:13px;box-shadow:var(--shadow-md);animation:slide-in .2s ease;max-width:300px;}
.toast.success{background:var(--action);color:#fff;}
.toast.error{background:#95363c;color:#fff;}
@keyframes slide-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

/* ── Utility ── */
.row2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px;}
.mb-16{margin-bottom:16px;}.mb-20{margin-bottom:20px;}
.divider{height:1px;background:var(--border);margin:16px 0;}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}

@media(max-width:1100px){
  .metrics,.pipeline{grid-template-columns:repeat(2,1fr);}
  .ai-wrap,.cal-layout,.email-layout{grid-template-columns:1fr;}
}
@media(max-width:1024px){
  .main{margin-left:0;}
  .topbar{flex-wrap:wrap;padding:8px 16px;}
  .topbar-actions,.modal-footer{flex-wrap:wrap;}
}
@media(max-width:720px){
  .cal-head,.cal-body{grid-template-columns:repeat(7,minmax(0,1fr));}
  .cal-cell{min-width:0;padding:4px;}
  .cal-dh{padding-inline:2px;}
  .metrics{grid-template-columns:1fr 1fr;}
  .frow{grid-template-columns:1fr;}
}

/* ── Map page ── */
.map-page-grid { display:grid; grid-template-columns:1fr 320px; gap:16px; height:calc(100vh - 140px); }
#map-container  { border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--border); }
.listing-card   { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md);
  padding:12px; cursor:pointer; transition:border-color var(--t), box-shadow var(--t); }
.listing-card:hover        { border-color:var(--blue-lt); }
.listing-card-active       { border-color:var(--blue)!important; box-shadow:0 0 0 2px var(--blue)!important; }

.workspace-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* Keep collections and filters visually aligned with the transaction register. */
.search-bar { align-items: center; padding: 10px 12px; background: var(--soft); border: 1px solid var(--rule); border-radius: 9px; }
.filter-select { border-radius: 6px; color: var(--accent); }
.tbl th { text-transform: none; letter-spacing: 0; font-size: .84rem; }
.tbl td { padding-block: 10px; }
.card-title { font-weight:750; }

/* The transaction queue and the day's agenda share one reading surface. */
.home-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:4px 0 26px; padding-bottom:22px; border-bottom:2px solid var(--ink); }
.home-heading h1 { font:normal clamp(2rem,3.4vw,3.4rem)/1.12 Georgia,serif; letter-spacing:-.045em; }
.home-heading a { text-decoration:none; }
.home-layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(230px,1fr); gap:clamp(24px,3vw,50px); }
.home-layout > *, .home-aside > section { min-width:0; }
.home-aside { display:grid; align-content:start; gap:30px; border-left:1px solid var(--rule); padding-left:clamp(20px,2vw,32px); }
.home-aside:only-child { grid-column:1 / -1; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); border:0; padding:0; }
.home-section-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.home-section-head h2 { font-size:1.12rem; font-weight:800; letter-spacing:-.02em; }
.home-section-head a { color:var(--accent); font-size:.875rem; font-weight:700; text-underline-offset:3px; }
.home-deal-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:17px 0 22px; }
.home-deal-counts > div { display:grid; grid-template-rows:auto 1fr; gap:4px; }
.home-deal-counts dd { order:-1; }
.home-deal-counts dd { font-size:clamp(1.75rem,2.5vw,2.4rem); line-height:1.1; font-weight:650; font-variant-numeric:tabular-nums; }
.home-deal-counts dt, .home-empty, .home-review small { color:var(--muted-ink); font-size:.88rem; }
.home-deal-counts .needs-review dd, .review-date { color:var(--alert-ink); }
.home-deadlines-heading { padding:15px 0 10px; border-top:1px solid var(--field-rule); font-size:1rem; }
.home-review { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:14px 0; border-top:1px solid var(--rule); color:var(--ink); text-decoration:none; }
.home-review strong, .home-review small { display:block; overflow-wrap:anywhere; }
.home-review strong { font-weight:750; }
.home-review small { margin-top:2px; }
.home-review time, .home-agenda time { white-space:nowrap; font-size:.82rem; font-variant-numeric:tabular-nums; }
.home-review:hover strong { text-decoration:underline; text-underline-offset:3px; }
.home-empty { padding:12px 0; line-height:1.5; }
.home-agenda, .home-contacts { margin:8px 0 0; list-style:none; }
.home-agenda li, .home-contacts > div { display:flex; align-items:baseline; gap:15px; padding:9px 0; border-bottom:1px solid var(--rule); font-size:.92rem; }
.home-agenda time { flex:none; color:var(--muted-ink); }
.home-agenda span { overflow-wrap:anywhere; }
.home-contacts dd { margin-left:auto; font-weight:750; font-variant-numeric:tabular-nums; }
#home-weather .card-title { margin-bottom:8px; }
.brokerage-map { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,270px); gap:20px; height:calc(100dvh - 135px); min-height:480px; }
.map-workspace, .map-properties { display:flex; flex-direction:column; min-width:0; min-height:0; }
.map-workspace { gap:10px; }
.map-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.map-external { align-self:flex-start; margin:0 0 12px; font-size:.85rem; font-weight:700; color:var(--accent); text-underline-offset:3px; }
.map-properties { border-left:1px solid var(--rule); padding-left:18px; }
@media(max-width:800px) {
  .home-layout, .home-aside:only-child { grid-template-columns:1fr; }
  .home-aside { border:0; padding:0; }
  .home-aside > section { border-top:1px solid var(--rule); padding-top:16px; }
  .brokerage-map { grid-template-columns:1fr; height:auto; min-height:0; }
  .brokerage-map #map-wrap { flex:none !important; height:clamp(310px,52dvh,520px); }
  .map-properties { padding:14px 0 0; border:0; border-top:1px solid var(--rule); }
}
@media(max-width:520px) {
  .home-heading { align-items:flex-start; margin-bottom:20px; gap:14px; }
  .home-heading h1 { font-size:2rem; }
  .home-deal-counts { column-gap:6px; }
  .home-deal-counts dt { font-size:.8rem; }
  .home-review { flex-wrap:wrap; gap:4px 12px; }
  #map-hint { bottom:32px !important; }
  .topbar-user { display:none; }
  .topbar .workspace-menu-toggle { min-width:44px; padding:0; gap:0; font-size:0; }
  .topbar #theme-icon { display:none; }
  .map-toolbar .btn { min-height:36px; }
}
