:root{--ink:#172c32;--muted:#617279;--teal:#14665d;--teal-dark:#104f49;--nav:#122e33;--line:#e1e7e9;--bg:#f3f6f7;--white:#fff;--radius:12px}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font-family:'Segoe UI',Arial,sans-serif;font-size:16px;line-height:1.5}a{color:var(--teal);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{outline-offset:4px}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}h1,h2,h3,p{margin-top:0}h1{font-size:1.85rem;font-weight:650;letter-spacing:-.035em;line-height:1.25;margin-bottom:8px}h2{font-size:1.08rem;font-weight:650;margin-bottom:0}h3{font-size:1rem;font-weight:650;margin-bottom:4px}small,.subtle{color:var(--muted)}small{font-size:.82rem}.subtle{font-size:.9rem;margin-bottom:0}.app-shell{display:flex;min-height:100vh}.sidebar{width:250px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;background:var(--nav);color:#dce9e8;padding:30px 18px 18px;overflow-y:auto}.brand{display:flex;gap:12px;align-items:center;color:#fff;font-weight:650;font-size:1.06rem;padding:0 10px}.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;border:1px solid #749b94;width:42px;height:46px;border-radius:10px;font-family:Georgia,serif;font-size:2rem;color:#d9e8c4}.brand small{display:block;font-size:.65rem;letter-spacing:.16em;color:#9eb8b8;margin-top:4px}.workspace-label{font-size:.68rem;letter-spacing:.12em;color:#8fa7ab;margin:40px 12px 13px}.nav-link{display:flex;align-items:center;gap:11px;font-size:.88rem;color:#c3d2d3;padding:12px;border-radius:7px;margin:3px 0;white-space:nowrap}.nav-link:hover{background:#23434a;text-decoration:none;color:#fff}.nav-link.selected{background:#305251;color:#fff}.nav-icon{width:18px;text-align:center;font-size:1.1rem;line-height:1}.nav-count{margin-left:auto;background:#476866;padding:1px 6px;border-radius:4px;color:#e5efed;font-size:.75rem}.nav-divider{height:1px;background:#315056;margin:19px 11px}.sidebar-bottom{margin-top:auto;padding-top:30px}.region-card{background:#1d3c41;padding:14px;border-radius:8px;margin:0 8px 23px;font-size:.87rem}.region-card small{display:block;color:#97b0b3;margin-top:3px}.user-card{display:flex;align-items:center;gap:10px;color:#e6eeee;font-size:.9rem;padding:0 10px}.user-card small{display:block;color:#9fb9bc}.avatar{display:grid;place-items:center;background:#d1e1d0;color:#25574b;width:36px;height:36px;border-radius:50%;font-weight:650}.logout{background:none;border:0;color:#a4babc;font-size:.82rem;padding:13px 11px}.main-shell{margin-left:250px;flex:1;min-width:0}.topbar{height:73px;padding:0 38px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid var(--line);font-size:.86rem;color:var(--muted)}.topbar>div{display:flex;align-items:center;gap:20px}.slash{color:#b4c1c4;margin:0 14px}.demo-pill{color:#506963;border:1px solid #d8e5e1;background:#f2f8f5;padding:4px 9px;border-radius:5px;font-size:.77rem}main#main{padding:34px 38px;max-width:1700px;margin:auto}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:28px}.eyebrow{font-size:.67rem;letter-spacing:.15em;font-weight:650;color:#7a8c91;margin-bottom:9px}.heading-actions,.inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.button{background:var(--teal);border:1px solid var(--teal);color:white;border-radius:7px;padding:10px 16px;font-size:.9rem;font-weight:600;display:inline-flex;justify-content:center;align-items:center;gap:6px;min-height:43px;text-align:center;white-space:nowrap}.button:hover{background:var(--teal-dark);text-decoration:none}.button.secondary{background:white;color:var(--ink);border-color:#d5dfe2}.button.secondary:hover{background:#f1f5f4}.button.small{font-size:.85rem;padding:7px 12px;min-height:35px}.full{width:100%}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:17px;margin-bottom:26px}.stat{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:20px 23px;display:flex;flex-direction:column;color:var(--ink);box-shadow:0 3px 8px #102b3003}.stat:hover{text-decoration:none;border-color:#b5cdc6}.stat>span{font-size:.88rem;color:var(--muted)}.stat strong{font-size:2.25rem;line-height:1.3;margin:8px 0;font-weight:600;letter-spacing:-.04em}.stat small{font-size:.8rem}.stat.accent{border-color:#c0d8cf;background:#edf6f2}.stat.accent strong{color:var(--teal)}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;margin-bottom:22px;box-shadow:0 3px 10px #112e3302}.panel-heading{padding:21px 23px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.panel-heading .subtle{margin-top:5px;font-size:.84rem}.panel-heading>a{font-size:.85rem;font-weight:600;white-space:nowrap}.panel-body{padding:22px 24px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:23px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.88rem;text-align:left}th{font-size:.78rem;color:var(--muted);font-weight:600;background:#fafcfc;padding:12px 20px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:17px 20px;border-bottom:1px solid #eef1f2;vertical-align:middle}tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfdfc}.client-name{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--ink);min-width:150px}.initial{display:grid;place-items:center;background:#e9f0f0;width:32px;height:32px;border-radius:8px;color:#537373;flex-shrink:0;font-size:.85rem;font-weight:600}.mono{font-variant-numeric:tabular-nums;white-space:nowrap}.cell-note{display:block;font-size:.76rem;color:#7b8c92;margin-top:3px}.badge{display:inline-flex;padding:3px 8px;border-radius:5px;font-size:.76rem;line-height:1.5;background:#edf1f4;color:#596b75;font-weight:550}.badge.green,.badge.interested,.badge.active,.badge.closed{background:#e7f4ed;color:#28704f}.badge.new,.badge.review,.badge.callback{background:#eaf0fc;color:#4d689d}.badge.documents,.badge.amber,.badge.preparing,.badge.meeting{background:#faf0d9;color:#90661d}.badge.red,.badge.not_interested{background:#f9e9e9;color:#a05252}.badge.hearing,.badge.filed,.badge.deadline{background:#eee9f7;color:#745897}.event-list{padding:0 21px}.event-item{display:flex;gap:16px;padding:20px 0;border-bottom:1px solid var(--line);color:var(--ink)}.event-item:last-child{border-bottom:0}.event-item:hover{text-decoration:none}.event-item h3{margin:7px 0 2px;font-size:.92rem}.event-item p{font-size:.86rem;margin-bottom:3px;color:var(--muted)}.date-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f2f5f6;min-width:49px;width:49px;height:59px;border:1px solid #e8edef;border-radius:8px}.date-tile strong{font-size:1.25rem;line-height:1.2}.date-tile span{font-size:.75rem;color:var(--muted)}.empty{padding:43px 25px;text-align:center;color:var(--muted);font-size:.91rem;line-height:1.8}.empty.compact{padding:20px 0}.workflow-note{display:flex;align-items:center;gap:22px;border-top:1px solid var(--line);padding:22px 2px;margin-top:6px}.note-symbol{font-family:Georgia,serif;color:#71938b;font-size:2.1rem}.workflow-note h3{font-size:.94rem}.workflow-note p{font-size:.86rem;color:var(--muted);margin-bottom:0;max-width:780px}footer{display:flex;justify-content:space-between;padding:18px 38px 24px;color:#87979b;font-size:.77rem}.notice{padding:14px 18px;background:#edf3f7;border:1px solid #d4e3e9;border-radius:8px;margin:0 0 20px;font-size:.92rem}.notice.success{background:#eaf6ef;border-color:#c8e3d2;color:#285d42}.notice.error,.notice.warning{background:#fff4e2;border-color:#efd9ad;color:#835d25}.filters{padding:18px 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.search-label{flex:1}.filters select{max-width:230px}.filters input,.filters select{font-size:.87rem;margin:0}.pagination{padding:18px 22px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:.85rem;color:var(--muted)}.pagination>div{display:flex;gap:8px}.field{margin-bottom:19px}.field>label{display:block;font-size:.89rem;font-weight:600;margin-bottom:7px}.required{color:#8b6658}input,select,textarea{display:block;width:100%;border:1px solid #cbd7dc;border-radius:6px;background:white;color:var(--ink);padding:10px 12px;line-height:1.4}input:focus,select:focus,textarea:focus{border-color:#368f80;outline:2px solid #c8e3dc;outline-offset:1px}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23516d73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px}input[type=checkbox]{width:auto;display:inline;margin-right:8px}input[type=file]{font-size:.9rem}.help{display:block;color:var(--muted);margin-top:6px;font-size:.82rem}.errorlist{color:#aa3e3e;background:#fff1f0;padding:10px 12px 10px 28px;border-radius:5px;font-size:.88rem}.form-panel{max-width:780px;padding:28px}.form-actions{display:flex;gap:12px;margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}.client-layout{display:grid;grid-template-columns:285px minmax(0,1fr);gap:24px;align-items:start}.client-summary{padding:26px 23px}.profile-monogram{width:58px;height:58px;display:grid;place-items:center;background:#e0efea;color:var(--teal);font-size:1.4rem;border-radius:12px;margin-bottom:14px}.client-summary h2{margin-bottom:12px}.client-summary dl{margin-top:26px;font-size:.9rem}.client-summary dt{color:var(--muted);font-size:.79rem;margin-top:17px}.client-summary dd{margin:4px 0 0;word-break:break-word}.profile-actions{border-top:1px solid var(--line);padding-top:20px;display:flex;flex-direction:column;gap:16px}.text-button,.text-danger{border:0;background:transparent;padding:0;color:var(--teal);font-size:.87rem}.text-danger{color:#a75a53}.section-links{display:flex;gap:23px;flex-wrap:wrap;padding:5px 1px 20px;font-size:.89rem}.count{color:#8a9ba0;font-weight:400;margin-left:6px}.timeline-item{padding:18px 0;border-top:1px solid var(--line)}.timeline-item>div{display:flex;justify-content:space-between;gap:10px}.timeline-item time,.audit-row time{font-size:.78rem;color:var(--muted);white-space:nowrap}.timeline-item p{font-size:.91rem;margin:12px 0 5px}.list-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 23px;border-bottom:1px solid var(--line)}.list-row:last-child{border-bottom:0}.loan-item,.case-item{padding:0 23px 22px;border-bottom:1px solid var(--line)}.loan-item:last-child,.case-item:last-child{border-bottom:0}.loan-item .list-row,.case-item .list-row{padding:19px 0 14px;border:0}.money-grid{display:grid;grid-template-columns:repeat(3,1fr);background:#f6f8f8;padding:14px 16px;gap:12px;border-radius:7px}.money-grid span{display:block;font-size:.78rem;color:var(--muted)}.money-grid strong{display:block;font-size:.95rem;margin-top:4px;font-weight:600}.document-row{padding-left:0;padding-right:0}.document-row>a,.document-row>div{overflow-wrap:anywhere}.chip{display:inline-block;background:#f2f5f6;border:1px solid var(--line);font-size:.82rem;padding:4px 9px;border-radius:5px;margin:0 5px 6px 0}.finance-row{display:flex;justify-content:space-between;gap:18px;padding:10px 0;font-size:.86rem;border-bottom:1px solid #eef2f3}.finance-row strong{white-space:nowrap}.inline-actions{margin-top:18px;font-size:.86rem;gap:22px}.audit-row{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #eef2f3;font-size:.86rem}.audit-row small{display:block;margin-top:3px}details{border:1px solid var(--line);border-radius:8px;padding:14px 17px;margin-bottom:20px}summary{cursor:pointer;font-size:.9rem;font-weight:600;color:var(--teal)}details[open]>summary{margin-bottom:18px}.calendar-row{display:flex;gap:22px;padding:25px;border-bottom:1px solid var(--line)}.calendar-content{flex:1}.calendar-content h3{margin-top:7px}.calendar-content p{font-size:.88rem;margin-bottom:5px}.calendar-actions{display:flex;align-items:center;gap:8px}.auth-body{background:#fff}.auth-layout{display:grid;grid-template-columns:47% 53%;min-height:100vh}.auth-intro{background:var(--nav);color:#e3edeb;padding:48px 60px;display:flex;flex-direction:column;justify-content:space-between;min-height:100vh;position:relative;overflow:hidden}.auth-intro:after{content:'§';position:absolute;font:33rem Georgia,serif;right:-80px;bottom:-140px;color:#1a393e;pointer-events:none}.auth-intro>*{position:relative;z-index:1}.auth-intro .brand{padding:0}.auth-intro .eyebrow{color:#92b2ab;margin-top:60px;margin-bottom:20px}.auth-intro h1{font-size:clamp(2.2rem,4vw,4rem);font-weight:500;line-height:1.2;letter-spacing:-.04em;margin-bottom:28px}.auth-intro p:not(.eyebrow){color:#b6caca;max-width:390px;font-size:1.02rem;line-height:1.8}.auth-rule{height:2px;width:56px;background:#8fad90;margin:34px 0 20px}.auth-intro .auth-region{font-size:.88rem!important}.auth-intro>small{color:#91aeae;margin-top:60px}.auth-form-wrap{display:flex;justify-content:center;align-items:center;padding:45px}.auth-form{width:100%;max-width:410px}.auth-form h1{font-size:1.9rem}.auth-form>.subtle{margin:14px 0 30px}.auth-form form{margin-top:28px}.auth-help{font-size:.84rem;color:var(--muted);border-top:1px solid var(--line);padding-top:22px;margin:30px 0 0}.auth-back{display:block;margin-top:22px;font-size:.88rem}.qr{display:block;width:220px;height:220px;margin:22px auto}.secret{overflow-wrap:anywhere;font-size:.84rem}.auth-form textarea{margin:12px 0 22px;font-family:monospace;letter-spacing:.1em}.skip,.sr-only{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.skip:focus{left:20px;top:10px;width:auto;height:auto;z-index:9;background:white;padding:10px}.dot-separator{padding:0 6px}[hidden]{display:none!important}@media(min-width:1600px){main#main{padding-top:42px}}@media(max-width:1250px){.sidebar{width:225px;padding-left:11px;padding-right:11px}.main-shell{margin-left:225px}.topbar{padding:0 25px}main#main{padding:28px 25px}.dashboard-grid{grid-template-columns:1fr}.client-layout{grid-template-columns:250px minmax(0,1fr)}.heading-actions{justify-content:flex-end}.filters{flex-wrap:wrap}.filters .search-label{min-width:250px}.auth-intro{padding:36px}}@media(max-width:850px){.sidebar{position:static;width:100%;padding:20px}.app-shell{display:block}.sidebar nav{display:flex;flex-wrap:wrap;gap:5px;margin-top:20px}.workspace-label,.sidebar-bottom,.nav-divider,.nav-icon{display:none}.nav-link{font-size:.82rem;padding:8px 10px}.brand small{font-size:.65rem}.main-shell{margin:0}.topbar{height:auto;min-height:60px;flex-wrap:wrap;padding:15px 20px}.topbar>div{gap:10px}main#main{padding:24px 18px}.page-heading{align-items:flex-start;flex-direction:column;gap:18px}.heading-actions{justify-content:flex-start}.client-layout{grid-template-columns:1fr}.client-summary{display:block}.client-summary dl{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px}.client-summary dt{margin:0}.profile-monogram{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stat{padding:17px}.stat>span{font-size:.82rem}.stat strong{font-size:1.8rem}.panel-heading{padding:18px}.panel-heading .subtle{font-size:.8rem}.panel-heading>a{font-size:.8rem}.calendar-row{flex-wrap:wrap;padding:20px;gap:14px}.calendar-actions{width:100%;padding-left:63px}.auth-layout{grid-template-columns:1fr}.auth-intro{min-height:auto;padding:26px}.auth-intro>div,.auth-intro>small{display:none}.auth-form-wrap{padding:40px 24px;align-items:flex-start}footer{padding:15px 20px;font-size:.7rem}.workflow-note{align-items:flex-start}.filters label{width:100%}.filters select{max-width:none}.filters .search-label{min-width:0}.form-panel{padding:20px}}@media(prefers-reduced-motion:no-preference){.button,.nav-link,.stat{transition:background .15s,border-color .15s}}

.live-reminders:empty{display:none}.live-reminders{position:fixed;bottom:22px;right:22px;max-width:min(420px,calc(100vw - 44px));padding:16px 20px;background:#fff;border:1px solid #b4d4c7;border-left:4px solid #14665d;box-shadow:0 8px 30px #122e3320;border-radius:10px;z-index:8}.live-reminders a{display:block}.live-reminders strong{display:block;font-size:.94rem}.live-reminders span{display:block;font-size:.84rem;color:#617279;margin-top:4px}

/* Contact list: visible city filter and inline working area. */
.location-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 20px 24px 0; }
.filter-caption { color: #65777c; font-size: .8rem; font-weight: 600; margin-right: 6px; }
.location-filter { padding: 8px 14px; border: 1px solid #dce5e5; border-radius: 7px; color: #50676c; font-size: .84rem; font-weight: 600; }
.location-filter:hover { background: #f1f7f5; text-decoration: none; }
.location-filter.selected { background: #e6f3ee; color: #145d52; border-color: #8ebeb0; }
.contacts-panel .filters { padding-top: 16px; }
.location-hint { margin: -4px 24px 18px; font-size: .82rem; color: #50676c; }
.contacts-table { width: 100%; table-layout: fixed; min-width: 940px; }
.contacts-table th:nth-child(1) { width: 22%; }
.contacts-table th:nth-child(2) { width: 13%; }
.contacts-table th:nth-child(3) { width: 16%; }
.contacts-table th:nth-child(4) { width: 22%; }
.contacts-table th:nth-child(5) { width: 27%; }
.contacts-table td, .contacts-table th { padding: 17px 16px; }
.contact-row { cursor: pointer; }
.contact-row.is-expanded, .contact-row:hover { background: #f3f9f6; }
.contact-toggle { display: flex; align-items: flex-start; gap: 9px; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: #203d42; text-align: left; cursor: pointer; }
.contact-toggle:focus-visible, .location-filter:focus-visible { outline: 2px solid #14665d; outline-offset: 4px; }
.contact-chevron { font-size: 1.25rem; line-height: 1; transition: transform .15s; }
.contact-toggle[aria-expanded="true"] .contact-chevron { transform: rotate(90deg); }
.contact-profile { display: inline-block; margin: 7px 0 0 18px; font-size: .73rem; }
.contact-phone { white-space: nowrap; font-size: .8rem; }
.cell-meta { display: block; margin-top: 5px; color: #738287; font-size: .71rem; line-height: 1.5; }
.stage-select { width: 100%; font: inherit; font-size: .8rem; padding: 8px; color: #244b45; background: #fff; border: 1px solid #c9dad5; border-radius: 6px; cursor: pointer; }
.stage-select:disabled { opacity: .65; }
.handoff-label { margin-bottom: 7px; }
.quick-status { display: block; font-size: .74rem; color: #14665d; line-height: 1.5; }
.quick-status:empty { display: none; }
.quick-stage-form .quick-status { margin-top: 5px; }
.quick-status.save-error { color: #a43535; }
.stage-save { margin-top: 7px; }
.note-preview { margin: 0; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-expanded > td { padding: 22px 26px; background: #f4f8f6; border-top: 0; box-shadow: inset 3px 0 #428d7b; }
.quick-note-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 32px; }
.previous-note h3 { font-size: .8rem; margin: 0 0 9px; color: #516b65; }
.previous-note p { font-size: .85rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; margin: 0; }
.previous-note a { display: inline-block; font-size: .76rem; margin-top: 12px; }
.quick-note-form label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 9px; }
.quick-note-form textarea { display: block; box-sizing: border-box; width: 100%; min-height: 88px; resize: vertical; padding: 11px 12px; border: 1px solid #c9dad5; border-radius: 6px; font: inherit; font-size: .86rem; background: white; }
.quick-note-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.quick-note-form button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 850px) { .location-filters { padding: 16px 16px 0; } .location-hint { margin-left: 16px; } }
/* Callback scheduling is attached to the intake-stage control. */
.callback-summary { margin-top: 8px; font-size: .82rem; line-height: 1.5; }
.callback-date { display: block; color: #24594e; }
.callback-owner { display: block; color: #6b7e78; }
.callback-edit, .callback-start { margin-top: 4px; font-size: .8rem; }
.callback-picker { margin-top: 10px; padding: 11px; border: 1px solid #c9dad5; border-radius: 7px; background: #f0f7f3; }
.callback-picker label { display: block; margin-bottom: 8px; color: #294f46; font-size: .875rem; font-weight: 600; }
.callback-picker small { display: block; margin-top: 7px; font-size: .75rem; line-height: 1.5; color: #60756c; }
.callback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.callback-actions button { font-size: .8rem; }
.callback-actions button:disabled { opacity: .65; }
.badge.callback { background: #fff2d8; color: #865d16; }

/* Month, week and day calendar. All layout stays in self-hosted CSS. */
.calendar-app { overflow: hidden; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding: 24px; }
.cal-period { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.cal-period h2 { margin: 0; font-size: 1.35rem; font-weight: 650; letter-spacing: -.025em; }
.cal-navigation { display: flex; border: 1px solid #dce5e1; border-radius: 7px; overflow: hidden; }
.cal-chevron { display: grid; place-items: center; width: 34px; height: 34px; font-size: 1.5rem; color: #33584e; }
.cal-chevron + .cal-chevron { border-left: 1px solid #dce5e1; }
.cal-chevron:hover { background: #edf5f1; text-decoration: none; }
.cal-views { display: flex; gap: 3px; border-radius: 8px; padding: 4px; background: #eef3f0; }
.cal-views a { padding: 8px 14px; border-radius: 5px; color: #5a7068; font-size: .875rem; font-weight: 600; }
.cal-views a.selected { background: #fff; color: #185c4e; box-shadow: 0 1px 4px #14352916; }
.cal-views a:hover { text-decoration: none; background: #fff; }
.cal-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 0 24px 20px; }
.cal-filters label > span { display: block; font-size: .75rem; color: #6c7d75; margin-bottom: 5px; }
.cal-filters input[type="date"], .cal-filters select { border: 1px solid #dce5e1; border-radius: 6px; padding: 8px 10px; color: #36574e; font: inherit; font-size: .875rem; background: #fff; min-height: 36px; }
.cal-checkbox { display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: .8rem; color: #5c7268; }
.cal-checkbox input { accent-color: #14665d; }
.cal-count { margin-left: auto; padding-bottom: 9px; color: #708178; font-size: .8rem; }
.cal-scroll { overflow: auto; border-top: 1px solid #e1e8e4; }
.cal-month, .cal-timetable { width: 100%; table-layout: fixed; border-collapse: collapse; min-width: 720px; }
.cal-month th { text-align: left; padding: 12px 14px; background: #f7faf8; color: #7a8982; font-size: .75rem; font-weight: 600; }
.cal-month td { height: clamp(95px, calc((100dvh - 510px) / 6), 142px); vertical-align: top; padding: 8px; border-right: 1px solid #e6ece8; border-bottom: 1px solid #e6ece8; }
.cal-month td:last-child { border-right: 0; }
.cal-month td.weekend { background: #fafcfb; }
.cal-month td.outside-month { background: #f5f8f6; }
.cal-month .outside-month .cal-day-number { color: #95a49b; }
.cal-day-top { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 7px; }
.cal-day-number { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px; border-radius: 50%; color: #3e594e; font-size: .875rem; font-weight: 600; }
.is-today .cal-day-number { background: #14665d; color: white; }
.cal-day-add { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; color: #8ba497; opacity: .6; }
.cal-month-day:hover .cal-day-add, .cal-day-add:focus-visible { opacity: 1; background: #e3f0e9; color: #14665d; text-decoration: none; }
.cal-day-events { display: grid; gap: 4px; }
.cal-event { width: 100%; display: block; text-align: left; border: 0; border-left: 3px solid; border-radius: 4px; padding: 6px 7px; font: inherit; font-size: .8rem; cursor: pointer; line-height: 1.45; overflow: hidden; }
.cal-event:hover { filter: brightness(.96); }
.cal-event:focus-visible, .cal-day-add:focus-visible, .cal-empty-slot:focus-visible { outline: 2px solid #164e40; outline-offset: 1px; }
.cal-event-heading { display: flex; align-items: baseline; gap: 5px; }
.cal-event-heading time { flex-shrink: 0; font-size: .75rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.cal-event-heading > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.cal-event-client { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; opacity: .9; }
.cal-callback { background: #fff3d8; color: #785318; border-color: #d3a343; }
.cal-meeting { background: #e5f3ec; color: #255e4b; border-color: #62a48c; }
.cal-hearing { background: #e9efff; color: #3c568c; border-color: #7894d4; }
.cal-deadline { background: #fae8ec; color: #964658; border-color: #c9798c; }
.cal-completed { opacity: .55; }
.cal-completed .cal-event-heading > span { text-decoration: line-through; }
.cal-blocked { background: #edf0ef; color: #7e8984; border-color: #b5beba; }
.cal-event-flag { display: block; margin-top: 2px; font-size: .7rem; font-weight: 600; }
.cal-more { display: inline-block; padding: 5px 6px; font-size: .75rem; font-weight: 600; }
.cal-time-scroll { max-height: 720px; }
.cal-timetable thead { position: sticky; top: 0; z-index: 1; background: #fff; }
.cal-timetable thead th { padding: 10px; text-align: center; background: #fff; border-right: 1px solid #e6ece8; border-bottom: 1px solid #e1e8e4; }
.cal-timetable thead a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; color: #73887c; }
.cal-timetable th.cal-time-label { width: 65px; font-size: .7rem; font-weight: 400; color: #87978e; text-align: center; padding: 5px; font-variant-numeric: tabular-nums; }
.cal-timetable tbody th { vertical-align: top; border-bottom: 0; }
.cal-timetable td { padding: 2px; height: 38px; vertical-align: top; border-right: 1px solid #e6ece8; border-bottom: 1px solid #e5ece7; }
.cal-timetable td.is-today { background: #f5faf7; }
.cal-timetable .cal-half-hour td { border-bottom-style: dashed; border-bottom-color: #eef2ef; }
.cal-timetable .cal-half-hour th { color: #b6c0ba; }
.cal-timetable .cal-event + .cal-event { margin-top: 3px; }
.cal-empty-slot { display: block; height: 32px; color: transparent; text-align: center; border-radius: 4px; }
.cal-empty-slot:hover, .cal-empty-slot:focus-visible { background: #e8f3ed; color: #568771; text-decoration: none; }
.cal-single-day { min-width: 0; }
.cal-single-day .cal-event { max-width: 620px; }
.cal-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 24px; font-size: .75rem; color: #7d8e83; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-key { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.cal-empty-message { margin: 0; padding: 0 24px 20px; color: #677c6f; font-size: .875rem; }
.cal-dialog { width: min(490px, calc(100vw - 32px)); padding: 26px; border: 1px solid #d4e2da; border-radius: 14px; box-shadow: 0 22px 85px #0e302536; max-height: 85vh; overflow: auto; color: #283f35; }
.cal-dialog::backdrop { background: #102c2655; }
.cal-dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.cal-close { border: 0; background: #f2f6f3; color: #687d70; border-radius: 50%; width: 30px; height: 30px; font-size: 1.25rem; cursor: pointer; }
.cal-dialog h2 { font-size: 1.4rem; margin: 0 0 12px; overflow-wrap: anywhere; }
.cal-detail-time { font-size: 1rem; margin: 0 0 14px; font-weight: 600; }
.cal-detail-time small { font-size: .8rem; font-weight: 400; color: #7d8e83; }
.cal-client-link { font-size: 1rem; }
.cal-details { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; margin: 24px 0; font-size: .875rem; }
.cal-details dt { color: #809084; }
.cal-details dd { margin: 0; overflow-wrap: anywhere; }
.cal-event-notes { padding: 14px; border-radius: 7px; background: #f4f8f5; font-size: .875rem; line-height: 1.65; overflow-wrap: anywhere; }
.cal-dialog-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.cal-client-choices > a { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 24px; border-bottom: 1px solid #edf1ee; }
.cal-client-choices > a:hover { background: #f3f9f5; text-decoration: none; }
.cal-client-choices small { display: block; margin-top: 5px; color: #7d8e83; }
.cal-picker-hint { padding: 10px 24px; font-size: .8rem; color: #7d8e83; }
@media (max-width: 850px) { .cal-toolbar { padding: 18px; } .cal-filters { padding: 0 18px 18px; } .cal-count { display: none; } .cal-period { gap: 10px; } .cal-period h2 { font-size: 1.1rem; } .cal-footer { padding: 14px 18px; } }
/* 24-hour controls: use explicit hours instead of locale-dependent AM/PM inputs. */
.datetime24 { display: grid; grid-template-columns: minmax(150px, 1.6fr) minmax(100px, 1fr) minmax(80px, 1fr); gap: 12px; max-width: 540px; }
.datetime24 .datetime24-part { display: block; margin: 0; }
.datetime24-part > span { display: block; margin-bottom: 6px; color: #465c66; font-size: .875rem; font-weight: 500; }
.datetime24 input, .datetime24 select { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px; border: 1px solid #aebec6; border-radius: 6px; background: #fafbfc; font: inherit; font-size: .9375rem; color: #253c46; }
.callback-picker .datetime24 { grid-template-columns: 1fr 1fr; gap: 10px; }
.callback-picker .datetime24-date { grid-column: 1 / -1; }
.callback-picker .datetime24-part { margin: 0; }
.callback-picker .datetime24-part > span { font-size: .8125rem; }
.callback-picker-title { margin: 0 0 12px; font-size: .875rem; font-weight: 600; }
@media (max-width: 550px) { .datetime24 { grid-template-columns: 1fr 1fr; } .datetime24-date { grid-column: 1 / -1; } }

/* Quiet grey surfaces with clearly separated, readable records. */
body { background: #e8edf0; color: #253b45; }
.topbar { background: #eef2f4; border-bottom-color: #cdd6dc; }
.panel { background: #f4f6f7; border-color: #cbd5db; }
.panel-heading, .contacts-panel .filters { background: #edf1f3; }
.location-filters { padding-bottom: 4px; }
.contacts-table thead th { background: #dce4e9; color: #3e5663; font-size: .875rem; font-weight: 650; border-bottom: 1px solid #bdcbd3; }
.contacts-table .contact-row { color: #283f49; font-size: .9375rem; }
.contacts-table .contact-row > td { border-bottom: 1px solid #c7d2d9; }
.contacts-table .contact-row:hover { background: #dce7eb; }
.contacts-table .contact-row.is-expanded { background: #d1e3df; }
.contacts-table .contact-row.is-expanded > td { border-bottom-color: #9cbdb2; }
.contacts-table .contact-row.is-expanded > td:first-child { box-shadow: inset 4px 0 #367c6a; }
.contacts-table .contact-expanded > td { background: #e2eeea; border-bottom: 2px solid #a6c3b9; box-shadow: inset 4px 0 #367c6a; }
.contacts-table .cell-meta { color: #526875; font-size: .8125rem; }
.contacts-table .contact-phone { font-size: .9375rem; color: #314b59; }
.contacts-table .contact-profile { font-size: .8125rem; }
.contacts-table .stage-select { font-size: .875rem; background: #fafbfc; border-color: #adbec7; }
.contacts-table .note-preview { color: #304852; }
.contacts-table .quick-status { font-size: .8125rem; }
.table-wrap table:not(.contacts-table) tbody tr:hover { background: #dce7eb; }
.cal-month th, .cal-timetable thead th { background: #e3eaee; color: #526875; }
.cal-month td { background: #f7f9fa; border-color: #cdd8df; }
.cal-month td.weekend { background: #e7edf1; }
.cal-month td.outside-month { background: #e1e8ed; }
.cal-month .outside-month .cal-day-number { color: #6c808d; }
.cal-timetable td { background: #f7f9fa; border-color: #d2dce2; }
.cal-timetable .cal-half-hour td { background: #edf2f5; }
.cal-timetable td.is-today { background: #e0eee8; }
.cal-timetable th.cal-time-label { color: #5f7582; font-size: .8125rem; }
.cal-timetable .cal-half-hour th { color: #778c97; }
