:root {
  --ink: #18323a;
  --ink-2: #38565d;
  --muted: #769097;
  --sidebar: #0c2830;
  --sidebar-2: #123840;
  --canvas: #f6f3ed;
  --card: #fffdf9;
  --line: #e7e1d7;
  --teal: #1d9a8a;
  --teal-soft: #e3f5f1;
  --coral: #ef7b64;
  --coral-soft: #fff0ec;
  --gold: #d8a83e;
  --gold-soft: #fff7de;
  --blue: #5e7be7;
  --blue-soft: #eef1ff;
  --danger: #d95c5c;
  --shadow: 0 14px 40px rgba(37, 56, 60, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'DM Sans', system-ui, sans-serif; color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 258px; background: var(--sidebar); color: white; padding: 24px 18px 18px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; transition: .25s ease; }
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 8px 24px; }
.brand-logo { width:72px; height:42px; object-fit:contain; border-radius:8px; background:#050505; box-shadow:0 8px 24px rgba(0,0,0,.2); }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #f4b860, #ef7b64); display:flex; align-items:center; justify-content:center; font-family: Manrope, sans-serif; font-weight:800; color:#17353b; letter-spacing:-1px; box-shadow:0 8px 24px rgba(0,0,0,.2); }
.brand-mark span { font-size: 12px; margin-left:1px; margin-top:8px; }
.brand-copy { display:flex; flex-direction:column; gap:2px; }
.brand-copy strong { font-family: Manrope; font-size: 18px; }
.brand-copy small { color:#9bb6bc; font-size: 10.5px; }
.clinic-switcher { border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.06); border-radius:16px; padding:12px; display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:10px; margin-bottom:18px; }
.clinic-avatar { width:36px; height:36px; border-radius:12px; background:#d9efe9; color:#16594f; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; }
.clinic-switcher strong, .clinic-switcher small { display:block; }
.clinic-switcher strong { font-size:12px; }
.clinic-switcher small { font-size:10px; color:#91adb4; margin-top:2px; }
.icon-btn { border:0; background:transparent; color:inherit; padding:4px; }
.nav-list { display:flex; flex-direction:column; gap:6px; overflow:auto; padding-right:2px; }
.nav-item { border:0; background:transparent; color:#a9c0c5; display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:12px; text-align:left; text-decoration:none; transition:.2s; font-weight:600; font-size:13px; }
.nav-item:hover { background:rgba(255,255,255,.06); color:white; }
.nav-item.active { background:#17474d; color:white; box-shadow: inset 3px 0 0 #56d4c4; }
.nav-icon { width:20px; text-align:center; font-size:16px; }
.nav-badge { margin-left:auto; background:var(--coral); color:white; min-width:20px; height:20px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:10px; padding:0 6px; }
.sidebar-bottom { margin-top:auto; padding-top:18px; display:flex; flex-direction:column; gap:12px; }
.whatsapp-status { display:flex; gap:9px; align-items:center; background:#11363d; border-radius:13px; padding:10px 12px; }
.whatsapp-status strong, .whatsapp-status small { display:block; font-size:10.5px; }
.whatsapp-status small { color:#8facb3; margin-top:2px; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#39c997; box-shadow:0 0 0 4px rgba(57,201,151,.13); }
.profile-card { display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:10px; padding:4px 2px; }
.avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:11px; background:#ece8df; color:#496067; }
.avatar-teal { background:#d8f3ee; color:#15675d; }
.profile-card strong, .profile-card small { display:block; }
.profile-card strong { font-size:12px; } .profile-card small { font-size:10px; color:#89a6ad; margin-top:2px; }
.main-shell { margin-left:258px; width:calc(100% - 258px); min-height:100vh; }
.sidebar-scrim { display:none; position:fixed; inset:0; z-index:25; border:0; background:rgba(6,25,29,.42); backdrop-filter:blur(2px); }
.topbar { height:84px; padding:0 30px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); background:rgba(246,243,237,.92); backdrop-filter:blur(14px); position:sticky; top:0; z-index:20; }
.topbar-left { display:flex; align-items:center; gap:12px; }
.topbar h1 { margin:0; font-family:Manrope; font-size:22px; letter-spacing:-.5px; }
.topbar p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.topbar-actions { display:flex; align-items:center; gap:10px; }
.demo-badge { display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 10px; border:1px solid #d9d4ca; border-radius:999px; background:#fffefa; color:#657b80; font-size:9.5px; font-weight:700; white-space:nowrap; }
.demo-badge i { width:7px; height:7px; border-radius:50%; background:var(--coral); box-shadow:0 0 0 4px var(--coral-soft); }
.demo-badge.connected i { background:var(--teal); box-shadow:0 0 0 4px var(--teal-soft); }
.search-box { height:40px; min-width:280px; border:1px solid var(--line); background:#fffefa; border-radius:12px; display:flex; align-items:center; padding:0 12px; gap:8px; }
.search-box span { color:#80969b; font-size:18px; }
.search-box input { border:0; outline:0; background:transparent; width:100%; color:var(--ink); font-size:12px; }
.top-icon { width:40px; height:40px; border:1px solid var(--line); background:#fffefa; border-radius:12px; position:relative; }
.notification-dot { position:absolute; width:7px; height:7px; border-radius:50%; background:var(--coral); right:8px; top:7px; border:2px solid white; }
.primary-btn { border:0; background:var(--teal); color:white; height:40px; border-radius:12px; padding:0 16px; font-weight:700; font-size:12px; box-shadow:0 8px 18px rgba(29,154,138,.2); }
.primary-btn:hover { filter:brightness(.95); }
.secondary-btn { border:1px solid var(--line); background:white; color:var(--ink); height:38px; border-radius:11px; padding:0 14px; font-weight:700; font-size:12px; }
.mobile-menu { display:none; border:0; background:transparent; font-size:22px; }
.page-content { padding:26px 30px 40px; }
.grid { display:grid; gap:16px; }
.grid > * { min-width:0; }
.grid-4 { grid-template-columns:repeat(4,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.dashboard-overview { grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); }
.metric-card, .panel { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 6px 20px rgba(40,55,58,.025); }
.metric-card { padding:18px; display:flex; justify-content:space-between; min-height:112px; }
.metric-label { color:var(--muted); font-size:11px; font-weight:600; }
.metric-value { font-family:Manrope; font-weight:800; font-size:28px; margin:8px 0 4px; letter-spacing:-1px; }
.metric-foot { font-size:10.5px; color:#739096; }
.up { color:#138c77; } .down { color:var(--coral); }
.metric-icon { width:40px; height:40px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:17px; }
.teal-soft { background:var(--teal-soft); color:var(--teal); } .coral-soft { background:var(--coral-soft); color:var(--coral); } .gold-soft { background:var(--gold-soft); color:#a67816; } .blue-soft { background:var(--blue-soft); color:var(--blue); }
.panel { padding:18px; }
.panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:12px; }
.panel-title h3 { margin:0; font-family:Manrope; font-size:14px; }
.panel-title p { margin:3px 0 0; color:var(--muted); font-size:10.5px; }
.panel-action { border:0; background:transparent; color:var(--teal); font-weight:700; font-size:11px; }
.chart-wrap { height:240px; display:flex; align-items:flex-end; gap:10px; padding:15px 6px 0; border-bottom:1px solid #e8e3da; position:relative; }
.chart-wrap:before, .chart-wrap:after { content:''; position:absolute; left:0; right:0; border-top:1px dashed #e6e0d7; }
.chart-wrap:before { top:33%; } .chart-wrap:after { top:66%; }
.bar-group { flex:1; height:100%; display:flex; align-items:flex-end; gap:4px; position:relative; z-index:2; }
.bar { border-radius:6px 6px 2px 2px; min-width:10px; }
.bar.a { background:var(--teal); } .bar.b { background:#b6ddd7; }
.chart-labels { display:flex; gap:10px; padding:8px 6px 0; color:var(--muted); font-size:9px; }
.chart-labels span { flex:1; text-align:center; }
.legend { display:flex; gap:14px; margin-top:12px; font-size:10px; color:var(--muted); }
.legend i { display:inline-block; width:8px; height:8px; border-radius:3px; margin-right:5px; }
.pipeline-mini { display:flex; flex-direction:column; gap:12px; }
.pipe-row { display:grid; grid-template-columns:110px 1fr 38px; gap:10px; align-items:center; font-size:11px; }
.progress { height:8px; background:#eee9e0; border-radius:20px; overflow:hidden; }
.progress span { display:block; height:100%; border-radius:20px; }
.activity-list { display:flex; flex-direction:column; gap:7px; }
.activity-item { display:grid; grid-template-columns:38px 1fr auto; gap:10px; align-items:center; padding:10px; border-radius:12px; transition:.2s; }
.activity-item:hover { background:#faf7f1; }
.activity-main strong { display:block; font-size:11.5px; } .activity-main small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.activity-time { font-size:9.5px; color:#93a3a7; }
.source-pill, .status-pill { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border-radius:999px; font-size:9px; font-weight:700; }
.source-pill.whatsapp { background:#e9f8ef; color:#218b56; } .source-pill.instagram { background:#fff0f5; color:#c75b82; } .source-pill.google { background:#eef3ff; color:#5d74cf; }
.status-pill.new { background:#eef3ff; color:#6074d7; } .status-pill.follow { background:#fff4dc; color:#9b721a; } .status-pill.booked { background:#e6f6f1; color:#197b6d; } .status-pill.closed { background:#f1efea; color:#6f7a7c; }
.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.quick-action { border:1px solid var(--line); background:#fffefa; border-radius:14px; padding:13px; display:flex; align-items:center; gap:10px; text-align:left; color:var(--ink); }
.quick-action:hover { border-color:#c8d9d5; transform:translateY(-1px); }
.quick-action span:first-child { width:32px; height:32px; border-radius:11px; background:var(--teal-soft); color:var(--teal); display:flex; align-items:center; justify-content:center; }
.quick-action strong { display:block; font-size:11px; } .quick-action small { display:block; color:var(--muted); margin-top:2px; font-size:9px; }
.section-gap { margin-top:16px; }
.filters { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.filter-btn { border:1px solid var(--line); background:#fffefa; padding:7px 11px; border-radius:9px; font-size:10.5px; color:var(--ink-2); }
.filter-btn.active { border-color:#b7dcd6; background:var(--teal-soft); color:#18786d; font-weight:700; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th { text-align:left; font-size:9px; text-transform:uppercase; letter-spacing:.6px; color:#8da0a4; padding:10px 12px; border-bottom:1px solid var(--line); }
td { font-size:11px; padding:13px 12px; border-bottom:1px solid #eee9e0; white-space:nowrap; }
tr:hover td { background:#fbf8f3; }
.name-cell { display:flex; gap:9px; align-items:center; }
.name-cell strong { display:block; } .name-cell small { display:block; color:var(--muted); margin-top:2px; font-size:9.5px; }
.inbox-overview { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.inbox-overview h2 { margin:0; font-family:Manrope; font-size:30px; letter-spacing:-1px; }
.inbox-overview p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.inbox-stats { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.inbox-stat { min-width:112px; height:54px; display:flex; align-items:center; gap:8px; padding:7px 11px; background:var(--card); border:1px solid var(--line); border-radius:14px; }
.inbox-stat > span { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; font-size:12px; }
.inbox-stat strong, .inbox-stat small { display:block; }
.inbox-stat strong { font-family:Manrope; font-size:16px; line-height:1; }
.inbox-stat small { color:var(--muted); font-size:8.5px; margin-top:3px; white-space:nowrap; }
.inbox-layout { display:grid; grid-template-columns:minmax(290px,330px) minmax(390px,1fr) minmax(270px,295px); gap:14px; height:calc(100vh - 210px); min-height:590px; }
.inbox-list, .chat-main, .patient-panel { background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:0 6px 20px rgba(40,55,58,.035); min-width:0; min-height:0; overflow:hidden; }
.inbox-list { display:flex; flex-direction:column; }
.inbox-head { padding:16px; border-bottom:1px solid var(--line); }
.inbox-head-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.inbox-head h3 { margin:0; font-family:Manrope; font-size:15px; }
.compact-btn { height:30px; padding:0 9px; }
.mini-search { border:1px solid var(--line); border-radius:10px; padding:8px 10px; display:flex; gap:7px; align-items:center; }
.mini-search input { border:0; outline:0; background:transparent; width:100%; font-size:10.5px; }
.chat-tabs { display:flex; gap:6px; margin:10px -16px 0; padding:0 16px 2px; overflow-x:auto; scrollbar-width:none; }
.chat-tabs::-webkit-scrollbar { display:none; }
.chat-tab { border:0; background:#f1eee7; border-radius:9px; padding:6px 9px; font-size:9.5px; color:#6f8388; white-space:nowrap; }
.chat-tab b { display:inline-grid; place-items:center; min-width:17px; height:17px; padding:0 4px; margin-left:3px; border-radius:9px; background:#e5e1d9; font-size:8px; }
.chat-tab.active { background:var(--teal-soft); color:var(--teal); font-weight:700; }
.conversation-list { overflow:auto; padding:6px; }
.conversation-item { padding:10px; display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:9px; border-radius:13px; cursor:pointer; position:relative; }
.conversation-item:hover { background:#faf7f1; }
.conversation-item.active { background:color-mix(in srgb,var(--teal) 9%,var(--card)); }
.conversation-item.active:before { content:''; position:absolute; left:0; top:12px; bottom:12px; width:3px; border-radius:0 3px 3px 0; background:var(--teal); }
.conv-title { display:flex; align-items:center; gap:6px; min-width:0; }
.conv-title i { width:7px; height:7px; border-radius:50%; background:var(--coral); flex:none; }
.conv-copy { min-width:0; }
.conv-copy strong { font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversation-item.is-unread .conv-copy strong { font-weight:800; }
.conv-copy p { margin:4px 0 0; color:#70868b; font-size:9.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-foot { display:flex; align-items:center; gap:5px; margin-top:7px; overflow:hidden; }
.conv-foot span, .conv-foot em { height:19px; display:inline-flex; align-items:center; padding:0 7px; border-radius:999px; white-space:nowrap; font-size:8px; font-style:normal; font-weight:700; }
.conv-foot span { background:var(--blue-soft); color:#6175cb; }
.conv-foot em { background:var(--teal-soft); color:#247a70; }
.conv-meta { text-align:right; }
.conv-meta time { display:block; font-size:8.5px; color:#94a4a8; }
.conversation-item.is-unread .conv-meta time { color:var(--teal); font-weight:700; }
.unread { margin-top:8px; display:inline-flex; min-width:18px; height:18px; border-radius:9px; padding:0 5px; align-items:center; justify-content:center; background:var(--coral); color:white; font-size:8px; }
.chat-main { display:flex; flex-direction:column; min-width:0; }
.chat-header { min-height:64px; border-bottom:1px solid var(--line); padding:10px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.chat-person { display:flex; align-items:center; gap:10px; }
.chat-person strong { display:block; font-size:12px; } .chat-person small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.chat-actions { display:flex; gap:7px; }
.chat-action { border:1px solid var(--line); background:white; width:34px; height:34px; border-radius:10px; }
.assign-btn, .resolve-btn { border:1px solid var(--line); background:white; height:34px; border-radius:10px; padding:0 9px; color:var(--ink-2); font-size:9px; font-weight:700; white-space:nowrap; }
.resolve-btn { background:var(--teal-soft); border-color:#cce7e1; color:#19786c; }
.chat-context { min-height:36px; padding:6px 14px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.window-chip { margin-left:auto; display:inline-flex; align-items:center; height:24px; padding:0 9px; border-radius:999px; background:var(--gold-soft); color:#86651f; font-size:8.5px; font-weight:700; }
.chat-body { flex:1; min-height:0; overflow:auto; padding:18px clamp(14px,4%,34px); background-color:#f8f6f1; background-image:radial-gradient(#dcd8d0 0.7px,transparent 0.8px); background-size:18px 18px; display:flex; flex-direction:column; gap:10px; }
.message-row { display:flex; }
.message-row.me { justify-content:flex-end; }
.message { max-width:76%; padding:10px 12px; border-radius:14px 14px 14px 4px; background:white; border:1px solid #ebe5dc; font-size:10.5px; line-height:1.45; box-shadow:0 3px 8px rgba(0,0,0,.035); }
.message-row.me .message { background:#dff4ef; border-color:#cde9e3; border-radius:14px 14px 4px 14px; }
.message time { display:block; color:#8fa1a4; font-size:8px; text-align:right; margin-top:5px; }
.system-chip { align-self:center; background:#ece9e2; color:#7d8b8e; padding:5px 9px; border-radius:999px; font-size:8.5px; }
.chat-composer { padding:10px 12px 12px; border-top:1px solid var(--line); background:white; }
.quick-replies { display:flex; gap:6px; overflow:auto; padding-bottom:8px; }
.quick-reply { border:1px solid #dbe6e3; background:#f2faf8; color:#30796f; border-radius:999px; padding:5px 8px; font-size:8.5px; white-space:nowrap; }
.quick-reply:hover { border-color:#96d3c9; background:#e2f5f1; transform:translateY(-1px); }
.quick-reply:disabled { opacity:.55; cursor:wait; }
.composer-box { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:end; }
.composer-box button { border:0; background:#f1eee7; width:34px; height:34px; border-radius:10px; }
.composer-box textarea { resize:none; min-height:38px; max-height:80px; border:1px solid var(--line); border-radius:18px; padding:10px 12px; outline:0; font-size:10.5px; }
.composer-box .send-btn { background:var(--teal); color:white; border-radius:50%; }
.composer-help { display:block; color:var(--muted); font-size:8px; margin:6px 0 0 42px; }
.patient-panel { overflow:auto; padding:0 16px 16px; }
.patient-panel-head { height:48px; margin:0 -16px; padding:0 16px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:800; }
.patient-top { text-align:center; padding:7px 0 14px; border-bottom:1px solid #eee8df; }
.patient-top .avatar { margin:0 auto 8px; width:48px; height:48px; }
.patient-top h3 { margin:0; font-size:13px; } .patient-top p { margin:4px 0 0; color:var(--muted); font-size:9.5px; }
.detail-section { padding:14px 0; border-bottom:1px solid #eee8df; }
.detail-section h4 { margin:0 0 10px; font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:#829398; }
.detail-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; font-size:9.5px; }
.detail-row span:first-child { color:var(--muted); }
.note-box { background:#fff7df; padding:10px; border-radius:10px; font-size:9.5px; line-height:1.45; color:#6c5d36; }
.consent-chip { display:inline-flex; align-items:center; height:24px; padding:0 9px; border-radius:999px; background:#e9f8ef; color:#218b56; font-size:8.5px; font-weight:700; }
.appointment-preview { display:grid; grid-template-columns:38px 1fr; gap:9px; padding:10px; border-radius:12px; background:var(--teal-soft); }
.appointment-preview > span { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:white; color:var(--teal); font-family:Manrope; font-weight:800; }
.appointment-preview strong, .appointment-preview small { display:block; }
.appointment-preview strong { font-size:9.5px; }
.appointment-preview small { margin-top:3px; color:#5f7d7d; font-size:8.5px; line-height:1.45; }
.panel-link { border:0; background:transparent; color:var(--teal); padding:8px 0 0; font-size:8.5px; font-weight:700; }
.kanban { display:grid; grid-template-columns:repeat(4,minmax(240px,1fr)); gap:14px; overflow:auto; align-items:start; }
.kanban-col { background:#eeebe4; border-radius:16px; padding:10px; min-height:560px; }
.kanban-title { display:flex; align-items:center; justify-content:space-between; padding:4px 3px 10px; }
.kanban-title strong { font-size:11px; } .kanban-count { background:#ddd8cf; color:#66777b; min-width:22px; height:22px; padding:0 6px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:9px; }
.lead-card { background:white; border:1px solid #e6e0d7; border-radius:13px; padding:12px; margin-bottom:9px; cursor:grab; box-shadow:0 3px 10px rgba(0,0,0,.025); }
.lead-card:active { cursor:grabbing; }
.lead-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.lead-card strong { font-size:11px; } .lead-card p { color:var(--muted); font-size:9.5px; margin:5px 0 10px; }
.lead-card-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.lead-value { font-size:9.5px; color:#63787d; font-weight:700; }
.owner-mini { width:24px; height:24px; border-radius:50%; background:#e7f2ef; color:#24796d; display:flex; align-items:center; justify-content:center; font-size:8px; font-weight:800; }
.calendar-layout { display:grid; grid-template-columns:1fr 280px; gap:16px; }
.calendar-panel { padding:0; overflow:hidden; }
.calendar-head { padding:16px 18px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.calendar-head h3 { margin:0; font-family:Manrope; font-size:14px; }
.week-grid { display:grid; grid-template-columns:58px repeat(5,1fr); }
.week-grid > div { border-right:1px solid #eee8df; border-bottom:1px solid #eee8df; min-height:56px; position:relative; }
.day-head { min-height:52px!important; padding:10px 8px; text-align:center; font-size:9px; color:var(--muted); }
.day-head strong { display:block; color:var(--ink); font-size:12px; margin-top:3px; }
.time-cell { padding:8px 8px; color:#93a2a6; font-size:8.5px; }
.appointment-card { position:absolute; left:6px; right:6px; top:5px; min-height:46px; border:0; border-radius:9px; padding:7px 8px; font-size:8.5px; text-align:left; z-index:2; border-left:3px solid; }
.appointment-card strong { display:block; font-size:9px; margin-bottom:2px; }
.appt-teal { background:#e4f4f0; border-color:var(--teal); color:#25675e; }
.appt-coral { background:#fff0ec; border-color:var(--coral); color:#8d5649; }
.appt-blue { background:#edf1ff; border-color:var(--blue); color:#5265a3; }
.today-panel { padding:16px; }
.today-panel h3 { margin:0 0 13px; font-family:Manrope; font-size:14px; }
.today-appt { display:grid; grid-template-columns:42px 1fr; gap:10px; padding:11px 0; border-bottom:1px solid #eee8df; }
.today-appt time { font-weight:800; font-size:10px; }
.today-appt strong { font-size:10.5px; display:block; } .today-appt small { display:block; color:var(--muted); font-size:9px; margin-top:3px; }
.appt-actions { display:flex; align-items:center; gap:6px; margin-top:7px; }
.appt-actions button { border:0; background:var(--teal-soft); color:var(--teal); border-radius:8px; padding:5px 8px; font-size:8px; font-weight:700; }
.table-actions { display:flex; gap:6px; white-space:nowrap; }
.record-action { border:1px solid #cde4df; background:#eff9f7; color:#19796d; border-radius:8px; padding:5px 8px; font-size:9px; font-weight:700; }
.record-action:hover { background:#dff3ee; }
.record-action.danger { border-color:#f1c9c0; background:#fff2ef; color:#a55040; }
.campaign-card { padding:16px; }
.campaign-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.campaign-card h3 { font-size:13px; margin:0; } .campaign-card p { color:var(--muted); font-size:9.5px; line-height:1.5; margin:6px 0 12px; }
.campaign-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.campaign-stat { background:#f8f5ef; border-radius:10px; padding:9px; }
.campaign-stat strong { display:block; font-size:12px; } .campaign-stat small { color:var(--muted); font-size:8.5px; }
.flow-canvas { min-height:600px; background-image:radial-gradient(#d8d4cd 1px, transparent 1px); background-size:20px 20px; position:relative; overflow:auto; padding:35px; }
.flow-track { display:flex; align-items:center; gap:34px; min-width:960px; padding-top:90px; }
.flow-node { width:180px; background:white; border:1px solid #dfdad1; border-radius:14px; padding:13px; box-shadow:var(--shadow); position:relative; }
.flow-node:after { content:'→'; position:absolute; right:-28px; top:50%; color:#9aabae; font-size:20px; }
.flow-node:last-child:after { display:none; }
.flow-node .node-icon { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.flow-node strong { font-size:10.5px; display:block; } .flow-node p { margin:5px 0 0; font-size:8.8px; color:var(--muted); line-height:1.4; }
.analytics-hero { display:grid; grid-template-columns:1.6fr 1fr; gap:16px; }
.donut-wrap { display:flex; align-items:center; justify-content:center; height:240px; }
.donut { width:160px; height:160px; border-radius:50%; background:conic-gradient(var(--teal) 0 48%, var(--coral) 48% 72%, var(--gold) 72% 88%, #c9d3d5 88% 100%); position:relative; }
.donut:after { content:'74%'; position:absolute; inset:24px; background:var(--card); border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:Manrope; font-size:26px; font-weight:800; color:var(--ink); }
.settings-layout { display:grid; grid-template-columns:210px 1fr; gap:16px; }
.settings-nav { padding:10px; height:max-content; }
.settings-nav button { width:100%; border:0; background:transparent; padding:10px 11px; text-align:left; border-radius:10px; color:#61787d; font-size:10.5px; }
.settings-nav button.active { background:var(--teal-soft); color:#16776d; font-weight:700; }
.branding-preview { display:flex; align-items:center; gap:16px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#faf8f3; }
.branding-preview img { width:134px; height:64px; object-fit:contain; border-radius:8px; background:#050505; }
.branding-preview strong { display:block; font-size:12px; }
.branding-preview p { margin:5px 0 0; color:var(--muted); font-size:9.5px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field label { display:block; font-size:9.5px; color:#667c81; margin-bottom:6px; font-weight:700; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--line); background:white; border-radius:10px; padding:10px 11px; outline:none; font-size:10.5px; color:var(--ink); }
.field textarea { min-height:80px; resize:vertical; }
.toggle-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid #eee8df; }
.toggle-row strong { display:block; font-size:10.5px; } .toggle-row small { display:block; color:var(--muted); margin-top:3px; font-size:9px; }
.switch { width:38px; height:22px; border-radius:11px; background:#cfd9d7; position:relative; border:0; }
.switch:after { content:''; width:16px; height:16px; border-radius:50%; background:white; position:absolute; top:3px; left:3px; box-shadow:0 2px 4px rgba(0,0,0,.15); transition:.2s; }
.switch.on { background:var(--teal); } .switch.on:after { left:19px; }
.modal-backdrop { position:fixed; inset:0; background:rgba(9,31,36,.38); display:none; align-items:center; justify-content:center; z-index:80; padding:20px; backdrop-filter:blur(4px); }
.modal-backdrop.open { display:flex; }
.modal { width:min(540px,100%); max-height:90vh; overflow:auto; background:var(--card); border-radius:20px; box-shadow:0 30px 80px rgba(0,0,0,.25); padding:20px; }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:18px; }
.modal-head h2 { margin:0; font-family:Manrope; font-size:18px; } .modal-head p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.close-btn { width:34px; height:34px; border:1px solid var(--line); background:white; border-radius:10px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.split-actions { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; }
.danger-btn { height:38px; border:1px solid #f1c5bb; background:#fff0ec; color:#a34f3e; border-radius:10px; padding:0 12px; font-size:10px; font-weight:700; }
.search-results { display:grid; gap:8px; }
.search-results button { display:block; width:100%; border:1px solid var(--line); background:white; border-radius:12px; padding:12px; text-align:left; }
.search-results button:hover { border-color:#9fd6cd; background:#f4fbf9; }
.search-results strong,.search-results small { display:block; }
.search-results strong { color:var(--ink); font-size:11px; }
.search-results small { color:var(--muted); font-size:9px; margin-top:4px; }
.lead-card[hidden],.conversation-item[hidden],tr[hidden] { display:none!important; }
.toast { position:fixed; right:24px; bottom:24px; background:#153a41; color:white; padding:12px 16px; border-radius:12px; box-shadow:var(--shadow); transform:translateY(20px); opacity:0; pointer-events:none; transition:.25s; font-size:11px; z-index:100; }
.toast.show { transform:translateY(0); opacity:1; }
.empty-hint { text-align:center; color:var(--muted); font-size:11px; padding:40px; }
@media (max-width:1180px) {
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .inbox-layout { grid-template-columns:280px 1fr; }
  .patient-panel { display:none; }
  .grid-3 { grid-template-columns:repeat(2,1fr); }
  .inbox-overview { align-items:flex-start; }
  .inbox-stat { min-width:104px; }
}
@media (max-width:900px) {
  .sidebar { transform:translateX(-100%); box-shadow:20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform:translateX(0); }
  .sidebar.open + .sidebar-scrim { display:block; }
  .main-shell { margin-left:0; width:100%; }
  .mobile-menu { display:block; }
  .search-box { display:none; }
  .calendar-layout, .analytics-hero, .settings-layout { grid-template-columns:1fr; }
  .dashboard-overview { grid-template-columns:1fr; }
  .quick-actions { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:650px) {
  .page-content { padding:18px 14px 28px; }
  .topbar { padding:0 14px; height:76px; }
  .topbar p { display:none; }
  .topbar-actions .top-icon { display:none; }
  .demo-badge { display:none; }
  .primary-btn { padding:0 11px; }
  .grid-4,.grid-3,.grid-2 { grid-template-columns:1fr; }
  .inbox-layout { grid-template-columns:1fr; height:auto; min-height:0; }
  .inbox-overview { display:block; }
  .inbox-overview h2 { font-size:24px; }
  .inbox-stats { display:grid; grid-template-columns:1fr 1fr; margin-top:12px; }
  .inbox-stat { min-width:0; }
  .inbox-list { min-height:310px; border-right:0; }
  .chat-main { min-height:560px; }
  .assign-btn { display:none; }
  .resolve-btn span { display:none; }
  .kanban { grid-template-columns:repeat(4,260px); }
  .form-grid { grid-template-columns:1fr; }
  .quick-actions { grid-template-columns:1fr; }
}

/* Premium visual refinement */
:root {
  --ink:#132f35;
  --ink-2:#476269;
  --muted:#789096;
  --sidebar:#08262b;
  --sidebar-2:#103a40;
  --canvas:#f4f6f3;
  --card:#fffefa;
  --line:#e2e8e4;
  --teal:#168f7d;
  --teal-soft:#e5f5f1;
  --coral:#ef755f;
  --gold:#d7a23b;
  --blue:#637ae0;
  --shadow:0 18px 45px rgba(25,48,52,.08);
  --shadow-soft:0 8px 24px rgba(25,48,52,.055);
  --radius:20px;
}
html { scroll-behavior:smooth; }
body {
  background:
    radial-gradient(circle at 92% 2%,rgba(22,143,125,.08),transparent 24rem),
    radial-gradient(circle at 35% 105%,rgba(215,162,59,.06),transparent 30rem),
    var(--canvas);
  font-size:14px;
  -webkit-font-smoothing:antialiased;
}
button,a,input,textarea,select { transition:border-color .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease,opacity .18s ease; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:3px solid rgba(22,143,125,.18); outline-offset:2px; }
.sidebar {
  width:268px;
  padding:22px 16px 18px;
  background:
    radial-gradient(circle at 12% 4%,rgba(67,199,178,.13),transparent 14rem),
    linear-gradient(180deg,#09282e 0%,#071f24 100%);
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:18px 0 48px rgba(7,31,36,.08);
}
.brand { padding:4px 8px 22px; }
.brand-logo { width:70px;height:42px;border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 25px rgba(0,0,0,.24); }
.brand-copy strong { font-size:17px;letter-spacing:-.25px; }
.brand-copy small { font-size:9px;letter-spacing:.2px; }
.clinic-switcher { margin:0 2px 20px;padding:12px;border-color:rgba(255,255,255,.09);background:rgba(255,255,255,.055);box-shadow:inset 0 1px 0 rgba(255,255,255,.04); }
.nav-list { gap:4px;padding:0 2px; }
.nav-item { min-height:45px;padding:11px 13px;border-radius:13px;font-size:12px;color:#a9c2c6; }
.nav-item:hover { background:rgba(255,255,255,.075);transform:translateX(2px); }
.nav-item.active { background:linear-gradient(90deg,rgba(26,128,119,.48),rgba(27,105,105,.28));box-shadow:inset 3px 0 0 #51d4c1,0 8px 20px rgba(0,0,0,.1); }
.nav-icon { font-size:15px;color:#b9ced1; }
.nav-badge { box-shadow:0 3px 10px rgba(239,117,95,.28); }
.sidebar-bottom { padding-top:16px; }
.whatsapp-status { border:1px solid rgba(255,255,255,.055);background:rgba(22,143,125,.14); }
.main-shell { margin-left:268px;width:calc(100% - 268px); }
.topbar {
  height:82px;
  padding:0 28px;
  background:rgba(248,249,246,.86);
  border-color:rgba(210,220,215,.85);
  box-shadow:0 5px 18px rgba(20,45,48,.03);
}
.topbar h1 { font-size:22px;letter-spacing:-.7px; }
.topbar p { font-size:11px; }
.topbar-actions { gap:9px; }
.demo-badge { height:34px;background:rgba(255,255,255,.82);box-shadow:0 5px 16px rgba(27,54,57,.04); }
.search-box { height:42px;min-width:290px;background:rgba(255,255,255,.88);box-shadow:0 5px 16px rgba(27,54,57,.035); }
.top-icon { height:42px;width:42px;background:white;box-shadow:var(--shadow-soft); }
.primary-btn { height:42px;border-radius:12px;padding:0 17px;background:linear-gradient(135deg,#1a9b88,#11816f);box-shadow:0 10px 22px rgba(22,143,125,.22); }
.primary-btn:hover { filter:none;transform:translateY(-1px);box-shadow:0 13px 26px rgba(22,143,125,.28); }
.secondary-btn { background:#fffefa;border-color:#dce4df; }
.secondary-btn:hover { border-color:#acd3ca;background:#f4faf8; }
.page-content { padding:28px 28px 44px; }
.metric-card,.panel { border-color:rgba(218,226,221,.9);box-shadow:var(--shadow-soft); }
.metric-card { padding:20px;min-height:126px;overflow:hidden;position:relative; }
.metric-card:after { content:'';position:absolute;width:85px;height:85px;border-radius:50%;right:-34px;bottom:-42px;background:rgba(22,143,125,.055); }
.metric-label { font-size:11px;letter-spacing:.1px; }
.metric-value { font-size:31px;margin:9px 0 5px; }
.metric-foot { font-size:10px; }
.metric-icon { width:43px;height:43px;border-radius:14px; }
.panel { padding:20px; }
.panel-title h3,.panel-header h3 { font-size:14px;letter-spacing:-.2px; }
.panel-title p,.panel-header p { font-size:10px; }
.quick-action { min-height:70px;background:#fffefa;box-shadow:0 6px 18px rgba(25,48,52,.035); }
.quick-action:hover { border-color:#9fd1c7;box-shadow:0 10px 24px rgba(25,48,52,.07); }
.inbox-overview { margin-bottom:16px; }
.inbox-overview h2 { font-size:27px;letter-spacing:-.8px; }
.inbox-stat { background:rgba(255,254,250,.9);border-color:#dde5e1;box-shadow:var(--shadow-soft); }
.inbox-layout { height:calc(100vh - 222px);min-height:650px;grid-template-columns:320px minmax(430px,1fr) 292px;border:1px solid #dfe6e2;border-radius:22px;box-shadow:0 20px 50px rgba(24,48,52,.08);background:var(--card);overflow:hidden; }
.inbox-list { background:#fffefa;border-color:#e2e8e4; }
.inbox-head { padding:17px 16px 13px;background:linear-gradient(180deg,#fffefa,#fdfcf8); }
.inbox-head h3 { font-size:13px; }
.mini-search { height:40px;border-radius:11px;background:#f8faf8; }
.chat-tab { padding:7px 9px; }
.conversation-list { padding:6px 8px 12px; }
.conversation-item { margin:3px 0;padding:12px 10px;border-radius:15px;border:1px solid transparent; }
.conversation-item:hover { background:#f5faf8;border-color:#e5efec; }
.conversation-item.active { background:linear-gradient(135deg,#e8f5f1,#eef8f5);border-color:#d5ebe5;box-shadow:0 8px 18px rgba(26,104,94,.07); }
.conversation-item.active:before { width:3px;border-radius:0 4px 4px 0; }
.conv-title strong { font-size:11px; }
.conversation-item p { font-size:9.5px; }
.chat-main { background:#fffefa; }
.chat-header { min-height:66px;padding:10px 16px;background:rgba(255,254,250,.94); }
.chat-person strong { font-size:12px; }
.chat-context { min-height:40px;padding:7px 16px; }
.chat-body { padding:22px clamp(18px,5%,42px);gap:12px;background-color:#f5f8f5;background-image:radial-gradient(#d6e1dc .75px,transparent .85px);background-size:19px 19px; }
.message { max-width:78%;padding:11px 13px;border-radius:15px 15px 15px 5px;border-color:#e4e9e5;font-size:11.5px;line-height:1.5;box-shadow:0 5px 14px rgba(29,52,55,.055); }
.message-row.me .message { background:linear-gradient(135deg,#dff3ed,#d7eee8);border-color:#c8e4dc;border-radius:15px 15px 5px 15px; }
.message time { font-size:7.8px; }
.system-chip { padding:5px 10px;background:rgba(255,255,255,.88);border:1px solid #e3e9e5;box-shadow:0 3px 8px rgba(0,0,0,.025); }
.chat-composer { padding:11px 14px 10px;background:rgba(255,255,255,.96); }
.quick-replies { padding-bottom:9px; }
.quick-reply { padding:6px 10px;border-color:#cce3dd;background:#f1faf7;font-size:8.8px;font-weight:700; }
.composer-box textarea { min-height:43px;border-radius:16px;background:#fbfcfa;font-size:11px; }
.composer-box textarea:focus { border-color:#71bcae;box-shadow:0 0 0 4px rgba(22,143,125,.08);background:white; }
.composer-box .send-btn { width:38px;height:38px;box-shadow:0 8px 18px rgba(22,143,125,.22); }
.patient-panel { background:linear-gradient(180deg,#fffefa,#fcfbf7); }
.patient-top { padding-top:14px; }
.patient-top .avatar { width:52px;height:52px;box-shadow:0 8px 20px rgba(22,143,125,.12); }
.detail-section h4 { letter-spacing:.75px; }
.appointment-preview { background:linear-gradient(135deg,#e4f5f1,#dff1ed); }
.kanban-col { background:#ebefec;border:1px solid #dfe6e1;border-radius:18px; }
.lead-card { border-color:#dfe6e2;border-radius:15px;box-shadow:0 7px 17px rgba(25,48,52,.045); }
.lead-card:hover { transform:translateY(-2px);box-shadow:0 12px 24px rgba(25,48,52,.08); }
.calendar-panel,.today-panel { box-shadow:var(--shadow-soft); }
.appointment-card { box-shadow:0 5px 12px rgba(25,48,52,.06); }
.table-wrap { border:1px solid #e1e7e3;border-radius:15px;overflow:auto; }
table thead { background:#f4f7f4; }
table th { color:#6f888e;letter-spacing:.5px; }
table tbody tr { transition:background .16s ease; }
table tbody tr:hover { background:#f7fbf9; }
.record-action { padding:6px 9px; }
.campaign-card { box-shadow:var(--shadow-soft); }
.modal-backdrop { background:rgba(6,28,33,.5);backdrop-filter:blur(7px); }
.modal { border:1px solid rgba(255,255,255,.75);border-radius:22px;box-shadow:0 32px 90px rgba(8,32,37,.28);padding:22px; }
.field input,.field select,.field textarea { min-height:42px;border-color:#dce4df;background:#fcfdfa; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#73bbae;box-shadow:0 0 0 4px rgba(22,143,125,.08);background:white; }
.toast { right:26px;bottom:26px;border:1px solid rgba(255,255,255,.1);background:linear-gradient(135deg,#12383e,#0b2b31);box-shadow:0 18px 40px rgba(7,31,36,.24); }
@media (max-width:1180px) {
  .inbox-layout { grid-template-columns:300px minmax(420px,1fr); }
}
@media (max-width:900px) {
  .sidebar { width:268px; }
  .main-shell { margin-left:0;width:100%; }
  .page-content { padding:22px 18px 36px; }
  .inbox-layout { grid-template-columns:280px minmax(380px,1fr); }
}
@media (max-width:650px) {
  .topbar { height:72px; }
  .page-content { padding:18px 12px 30px; }
  .inbox-layout { display:block;height:auto;min-height:0;border-radius:17px; }
  .conversation-list { max-height:360px; }
  .chat-main { min-height:600px; }
  .message { font-size:11px;max-width:88%; }
  .composer-help { margin-left:0;text-align:center; }
}

/* Plus91 clinical workspace */
.page-hero { display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px; }
.page-hero h2 { margin:3px 0 5px;font:800 34px/1.1 Manrope,sans-serif;letter-spacing:-1.3px;color:#102f35; }
.page-hero p { margin:0;color:var(--muted);font-size:11px; }
.eyebrow { display:block;color:#547278;font-size:10px;font-weight:800;letter-spacing:.55px;text-transform:uppercase; }
.hero-actions { display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end; }
.hero-actions b { display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;padding:0 5px;border-radius:10px;background:var(--teal-soft);color:var(--teal);font-size:9px; }
.kpi-strip { margin-bottom:22px; }
.kpi-strip .metric-card { min-height:108px;padding:16px 17px;background:rgba(255,255,255,.91); }
.kpi-strip .metric-value { font-size:27px;margin:7px 0 2px; }
.kpi-strip .metric-icon { width:36px;height:36px;border-radius:11px; }
.patient-tools { display:flex;align-items:center;gap:10px;margin-bottom:10px; }
.patient-search { width:min(360px,100%);background:white; }
.segmented { display:inline-flex;align-items:center;padding:3px;border-radius:13px;background:#e8edeb;gap:2px; }
.segmented button { height:32px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:#5e7479;font-size:10px;font-weight:700; }
.segmented button.active { background:white;color:var(--ink);box-shadow:0 3px 10px rgba(24,48,52,.08); }
.tag-filter { display:flex;gap:7px;overflow:auto;padding:1px 0 14px;scrollbar-width:none; }
.tag-filter::-webkit-scrollbar { display:none; }
.tag-filter-chip { display:flex;align-items:center;gap:7px;height:32px;padding:0 11px;border:1px solid #dce5e0;border-radius:999px;background:rgba(255,255,255,.78);color:#4f696f;white-space:nowrap;font-size:9.5px;font-weight:700; }
.tag-filter-chip b { display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#edf1ef;color:#6f8387;font-size:8px; }
.tag-filter-chip.active { background:#0e766b;border-color:#0e766b;color:white;box-shadow:0 7px 15px rgba(14,118,107,.17); }
.tag-filter-chip.active b { background:rgba(255,255,255,.18);color:white; }
.registry-panel { padding:0;overflow:hidden; }
.registry-summary { height:48px;display:flex;align-items:center;gap:4px;padding:0 17px;border-bottom:1px solid var(--line);font-size:10px;color:#657c81; }
.registry-summary span { margin-left:auto;padding:5px 8px;border-radius:999px;background:#f1f4f2;color:#809095;font-size:8px; }
.registry-panel .table-wrap { border:0;border-radius:0; }
.patient-table td { padding-top:12px;padding-bottom:12px; }
.micro-tags { display:flex;gap:4px;max-width:180px;flex-wrap:wrap; }
.micro-tags span { padding:4px 7px;border-radius:7px;background:#fff1dc;color:#9a6719;font-size:8px;font-weight:700; }
.micro-tags span:nth-child(2) { background:#fbe9e5;color:#b85b4d; }
.clinician-cell { display:flex;align-items:center;gap:7px;font-weight:700;font-size:10px; }
.clinician-cell span { display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#dff3ef;color:#14786c;font-size:7px; }
.cell-sub { display:block;margin-top:3px;color:var(--muted);font-size:8px;font-weight:400; }
.consent-status { display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#e4f5ec;color:#1d8654;font-size:8.5px;font-weight:800; }
.consent-status.pending { background:#fff1dc;color:#a46e19; }
.consent-status.opted-out { background:#f1efeb;color:#738084; }
.clinician-filter { display:flex;align-items:center;gap:8px;overflow:auto;padding:1px 0 14px;scrollbar-width:none; }
.clinician-chip { display:flex;align-items:center;gap:7px;height:34px;padding:0 12px;border:1px solid #d9e2dd;border-radius:999px;background:#fffefa;color:#4b6267;white-space:nowrap;font-size:9.5px;font-weight:700; }
.clinician-chip i { width:8px;height:8px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 3px rgba(22,143,125,.12); }
.clinician-chip i.blue { background:#5c8fe1; }.clinician-chip i.violet { background:#8d72cf; }.clinician-chip i.gold { background:#e39c42; }
.clinician-chip.active { border-color:#71bdae;background:#e8f6f2;color:#126e63; }
.calendar-head p { margin:4px 0 0;color:var(--muted);font-size:9px; }
.appointment-card span { display:block;margin-top:3px;opacity:.7;font-size:7.5px; }
.campaign-tabs { display:inline-flex;padding:3px;margin-bottom:16px;border-radius:14px;background:white;border:1px solid var(--line);box-shadow:var(--shadow-soft); }
.campaign-tabs button { min-width:112px;height:34px;border:0;border-radius:11px;background:transparent;color:#667c81;font-size:10px;font-weight:800; }
.campaign-tabs button.active { background:#117e70;color:white;box-shadow:0 7px 16px rgba(17,126,112,.18); }
.campaign-board { display:grid;grid-template-columns:repeat(3,minmax(290px,1fr));gap:15px;align-items:start; }
.campaign-card-rich { padding:16px; }
.campaign-card-rich header { display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:start; }
.campaign-symbol { display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--teal-soft);color:var(--teal);font-size:14px; }
.campaign-card-rich h3 { margin:2px 0 4px;font:800 13px Manrope,sans-serif; }
.campaign-card-rich code { padding:2px 5px;border-radius:5px;background:#f2f4f2;color:#6b7d80;font-size:7.5px; }
.campaign-meta { display:flex;gap:11px;flex-wrap:wrap;margin:15px 0 10px;color:#50666b;font-size:8.5px;font-weight:700; }
.exclusion-note { margin-bottom:10px;padding:8px 10px;border-radius:10px;background:#f5f6f3;color:#68797d;font-size:8.5px; }
.message-preview { padding:12px;border:1px solid #dce9e5;border-radius:14px;background-color:#eff7f4;background-image:radial-gradient(#ceded9 .65px,transparent .75px);background-size:14px 14px; }
.message-preview strong { font-size:9.5px; }
.message-preview p { margin:7px 0 10px;padding:9px 10px;border-radius:10px;background:white;box-shadow:0 3px 10px rgba(20,50,52,.045);font-size:9px;line-height:1.45;color:#38535a; }
.message-preview button { display:block;margin-left:auto;border:0;background:transparent;color:var(--teal);font-size:8.5px;font-weight:800; }
.campaign-card-rich footer { margin-top:12px;padding-top:12px;border-top:1px solid var(--line); }
.campaign-mini-stats { display:flex;gap:12px;color:#718388;font-size:8px; }
.campaign-mini-stats b { color:#263f45; }
.campaign-actions { display:flex;gap:7px;margin-top:11px; }
.campaign-actions .secondary-btn { flex:1; }
.reports-grid { display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,.85fr);gap:16px; }
.report-chart,.funnel-card { min-height:390px; }
.insight-chip { padding:6px 9px;border-radius:999px;background:#e3f5eb;color:#188356;font-size:8px;font-weight:800; }
.report-comparison { display:flex;align-items:center;gap:18px;margin:5px 0 18px; }
.report-comparison div { display:flex;flex-direction:column; }
.report-comparison small { color:var(--muted);font-size:8.5px; }.report-comparison strong { margin-top:2px;font:800 23px Manrope,sans-serif; }
.report-comparison > span { color:#91a1a4; }
.line-chart { height:205px;display:flex;align-items:flex-end;gap:6px;position:relative;padding:10px 4px 24px;border-bottom:1px solid #e3e8e4;background:linear-gradient(to top,rgba(239,117,95,.08),transparent 65%); }
.chart-baseline { position:absolute;left:0;right:0;top:31%;border-top:1px dashed #95aaa6; }
.line-point { flex:1;position:relative;background:linear-gradient(to top,rgba(239,117,95,.12),rgba(239,117,95,.65));border-radius:5px 5px 0 0;min-width:5px; }
.line-point i { position:absolute;top:-3px;left:50%;width:6px;height:6px;transform:translateX(-50%);border-radius:50%;background:var(--coral);box-shadow:0 0 0 3px #fff; }
.line-point span { position:absolute;bottom:-19px;left:50%;transform:translateX(-50%);color:#849598;font-size:7.5px; }
.report-note { margin:13px 0 0;color:#5f7479;font-size:9px; }
.funnel-list { display:flex;flex-direction:column;gap:17px;margin-top:17px; }
.funnel-label { display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px; }
.funnel-icon { display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--teal-soft);color:var(--teal); }
.tone-1 { background:#e9f0ff;color:#527ad0; }.tone-2 { background:#e7f5fb;color:#238ab9; }.tone-3 { background:#e5f6ec;color:#208653; }
.funnel-label strong { font-size:10px; }.funnel-label b { font:800 12px Manrope,sans-serif; }.funnel-label small { color:var(--muted);font:600 8px DM Sans,sans-serif; }
.funnel-bar { height:8px;margin:5px 0 0 44px;border-radius:5px;background:#edf0ee;overflow:hidden; }.funnel-bar span { display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--teal),#49bba9); }
.funnel-foot { margin-top:24px;padding-top:14px;border-top:1px solid var(--line);color:#60757a;font-size:8.5px; }
.report-bar-row { display:grid;grid-template-columns:120px 1fr 65px;gap:12px;align-items:center;margin:15px 0;font-size:9.5px; }
.report-bar-row .progress i { display:block;height:100%;border-radius:20px; }
.report-bar-row b { text-align:right;font-size:9px; }

@media (max-width:1200px) {
  .campaign-board { grid-template-columns:repeat(2,minmax(290px,1fr)); }
  .patient-table { min-width:1050px; }
}
@media (max-width:900px) {
  .page-hero { align-items:flex-start; }.page-hero h2 { font-size:29px; }
  .patient-tools { flex-wrap:wrap; }.patient-search { flex:1;min-width:250px; }
  .reports-grid { grid-template-columns:1fr; }
}
@media (max-width:650px) {
  .page-hero { display:block; }.hero-actions { justify-content:flex-start;margin-top:14px; }
  .page-hero h2 { font-size:26px; }
  .campaign-board { grid-template-columns:1fr; }
  .campaign-card-rich header { grid-template-columns:38px 1fr; }.campaign-card-rich header .status-pill { grid-column:2;justify-self:start; }
  .report-chart,.funnel-card { min-height:auto; }.report-bar-row { grid-template-columns:100px 1fr 55px; }
}

/* Aurora theme — an original Plus91 visual direction */
:root {
  --ink:#17203a;
  --ink-2:#4b5675;
  --muted:#7c86a3;
  --sidebar:#ffffff;
  --sidebar-2:#f4f2ff;
  --canvas:#f5f6fc;
  --card:#ffffff;
  --line:#e5e7f2;
  --teal:#5146d8;
  --teal-soft:#efedff;
  --coral:#f06d74;
  --coral-soft:#fff0f1;
  --gold:#efa63c;
  --gold-soft:#fff5df;
  --blue:#0ea5c6;
  --blue-soft:#e7f8fb;
  --danger:#dd4f62;
  --shadow:0 12px 35px rgba(35,42,85,.075);
  --shadow-soft:0 5px 18px rgba(35,42,85,.055);
  --radius:13px;
}
body {
  background-color:var(--canvas);
  background-image:linear-gradient(rgba(76,70,216,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(76,70,216,.025) 1px,transparent 1px);
  background-size:32px 32px;
  color:var(--ink);
}
.sidebar {
  width:244px;
  padding:20px 14px 16px;
  color:var(--ink);
  background:#fff;
  border-right:1px solid #e6e7f0;
  box-shadow:8px 0 30px rgba(36,42,83,.045);
}
.main-shell { margin-left:244px;width:calc(100% - 244px); }
.brand { padding:3px 9px 20px; }
.brand-logo { width:64px;height:38px;border:0;border-radius:7px;background:#060606;box-shadow:0 7px 18px rgba(17,24,39,.14); }
.brand-copy strong { color:#151d38;font-size:16px; }
.brand-copy small { color:#8990a8; }
.clinic-switcher { margin:0 2px 20px;border:0;background:#f2f1fb;box-shadow:none; }
.clinic-avatar { color:#4338ca;background:#dedbff;border-radius:10px; }
.clinic-switcher strong { color:#242d49; }.clinic-switcher small { color:#7c86a0; }
.nav-list { gap:3px; }
.nav-item { min-height:43px;color:#66708c;border-radius:10px;font-size:11.5px; }
.nav-item:hover { color:#3f36bd;background:#f4f2ff;transform:none; }
.nav-item.active { color:#fff;background:linear-gradient(135deg,#4e46d8,#7558e7);box-shadow:0 8px 18px rgba(78,70,216,.22); }
.nav-item.active .nav-icon { color:#fff; }.nav-icon { color:#868eaa; }
.nav-badge { background:#ff6875;box-shadow:none; }
.sidebar-bottom { border-top:1px solid #ececf3; }
.whatsapp-status { color:#28304d;background:#eefaf5;border:1px solid #d9f2e6; }
.whatsapp-status small { color:#728a80; }.profile-card strong { color:#28304d; }.profile-card small { color:#8d94a9; }
.profile-card .icon-btn { color:#7d859c; }
.topbar { height:76px;padding:0 26px;background:rgba(255,255,255,.88);border-color:#e5e6ef;box-shadow:0 3px 14px rgba(34,42,83,.035); }
.topbar h1 { color:#202944;font-size:20px; }.topbar p { color:#8790a7; }
.demo-badge { color:#4d5670;border-color:#e2e3ee;background:#f8f8fc; }
.demo-badge.connected i { background:#22a977;box-shadow:0 0 0 4px #e4f6ef; }
.search-box { background:#f6f6fa;border-color:#e5e5ee;box-shadow:none; }
.search-box:focus-within { background:white;border-color:#aaa4f2;box-shadow:0 0 0 4px rgba(81,70,216,.08); }
.top-icon { background:#f7f7fa;border-color:#e5e5ee;box-shadow:none; }
.primary-btn { background:linear-gradient(135deg,#5146d8,#7658e8);box-shadow:0 8px 18px rgba(81,70,216,.2); }
.primary-btn:hover { box-shadow:0 11px 23px rgba(81,70,216,.28); }
.secondary-btn { color:#39425e;background:#fff;border-color:#dfe1eb; }
.secondary-btn:hover { color:#4a40c6;background:#f6f4ff;border-color:#bbb7ef; }
.page-content { padding:25px 26px 42px; }
.page-hero { position:relative;min-height:138px;margin:-1px 0 20px;padding:25px 28px;align-items:center;overflow:hidden;border-radius:18px;color:#fff;background:linear-gradient(120deg,#20264a 0%,#4037aa 58%,#6a53d8 100%);box-shadow:0 16px 32px rgba(48,43,133,.18); }
.page-hero:before,.page-hero:after { content:'';position:absolute;border-radius:50%;pointer-events:none; }
.page-hero:before { width:230px;height:230px;right:9%;top:-155px;border:34px solid rgba(255,255,255,.08); }
.page-hero:after { width:90px;height:90px;right:2%;bottom:-55px;background:rgba(25,210,199,.16); }
.page-hero > * { position:relative;z-index:1; }
.page-hero h2 { color:#fff;font-size:30px;margin:5px 0 6px; }.page-hero p { color:#d8d9f4;font-size:10.5px; }
.page-hero .eyebrow { color:#aca8ff; }.page-hero .secondary-btn { color:#fff;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.2);backdrop-filter:blur(8px); }
.page-hero .primary-btn { color:#312b79;background:#fff;box-shadow:0 8px 20px rgba(13,16,45,.18); }
.page-hero .segmented { background:rgba(255,255,255,.12); }.page-hero .segmented button { color:#d7d8ef; }.page-hero .segmented button.active { color:#312b79;background:#fff; }
.metric-card,.panel { background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow-soft); }
.metric-card { min-height:118px;border-top:3px solid #5146d8; }
.metric-card:nth-child(2) { border-top-color:#0ea5c6; }.metric-card:nth-child(3) { border-top-color:#efa63c; }.metric-card:nth-child(4) { border-top-color:#f06d74; }
.metric-card:after { width:72px;height:72px;right:-28px;bottom:-35px;background:rgba(81,70,216,.045); }
.metric-label { color:#707a97;text-transform:uppercase;letter-spacing:.55px;font-size:8.5px; }.metric-value { color:#1d2743;font-size:28px; }
.metric-icon { border-radius:10px; }.teal-soft { color:#5146d8;background:#efedff; }.blue-soft { color:#0b91b0;background:#e7f8fb; }
.filter-btn.active,.tag-filter-chip.active,.clinician-chip.active { color:#fff;background:#5146d8;border-color:#5146d8; }
.filter-btn,.clinician-chip,.tag-filter-chip { border-radius:8px; }
.segmented { border-radius:9px;background:#ececf4; }.segmented button { border-radius:7px; }
.registry-panel,.table-wrap { border-radius:10px; }.registry-summary { background:#fbfbfd; }
table thead { background:#f0f1f7; }table th { color:#626d8b; }td { border-color:#ececf3; }tr:hover td { background:#f8f7ff; }
.micro-tags span { color:#493eaf;background:#eeecff; }.micro-tags span:nth-child(2) { color:#a84658;background:#ffecef; }
.clinician-cell span { color:#4d43c7;background:#e8e6ff; }
.record-action { color:#4f46d0;background:#f0efff;border-color:#dcdaff; }
.record-action.danger { color:#cf4c5d;background:#fff0f2;border-color:#ffdce1; }
.campaign-tabs { border-radius:10px; }.campaign-tabs button { border-radius:7px; }.campaign-tabs button.active { background:#5146d8;box-shadow:0 6px 14px rgba(81,70,216,.2); }
.campaign-symbol { color:#5146d8;background:#efedff;border-radius:9px; }
.message-preview { border-color:#dedcf4;background-color:#f4f2ff;background-image:radial-gradient(#cbc7ed .65px,transparent .75px); }
.message-preview button,.panel-action,.panel-link { color:#5146d8; }
.progress span,.funnel-bar span { background:linear-gradient(90deg,#5146d8,#8470ee); }
.insight-chip { color:#4138b7;background:#eeecff; }
.inbox-overview { padding:19px 22px;border-radius:16px;color:white;background:linear-gradient(120deg,#20264a,#4d43bd);box-shadow:0 14px 30px rgba(45,42,119,.16); }
.inbox-overview h2 { color:#fff; }.inbox-overview p { color:#d7d9ee; }.inbox-stat { color:#26304b;background:rgba(255,255,255,.95);border:0;box-shadow:none; }
.inbox-layout { border-color:#e2e3ed;border-radius:14px;box-shadow:var(--shadow);background:#fff; }
.inbox-list { background:#f8f8fc; }.inbox-head { background:#fff;border-color:#e5e6ef; }
.chat-tab { background:#ececf4;color:#6a738d;border-radius:7px; }.chat-tab.active { color:#4a40c4;background:#ebe9ff; }
.conversation-item { border-radius:9px; }.conversation-item:hover { background:#f0effc;border-color:#e3e0fa; }.conversation-item.active { background:#e9e7ff;border-color:#d9d5ff;box-shadow:none; }
.conversation-item.active:before { background:#5146d8; }.conv-foot span { color:#554bc5;background:#e8e6ff; }.conv-foot em { color:#087c96;background:#e5f7fa; }
.chat-main { background:#fff; }.chat-context { background:#fbfbfd; }
.chat-body { background-color:#f3f2f8;background-image:linear-gradient(135deg,rgba(81,70,216,.035) 25%,transparent 25%),linear-gradient(225deg,rgba(14,165,198,.035) 25%,transparent 25%);background-size:30px 30px; }
.message { color:#25304b;border-color:#e1e2ec;border-radius:12px 12px 12px 3px; }.message-row.me .message { color:#fff;background:linear-gradient(135deg,#5146d8,#6f56db);border-color:#5146d8;border-radius:12px 12px 3px 12px; }.message-row.me .message time { color:#dedbff; }
.quick-reply { color:#4f45c6;border-color:#d9d5ff;background:#f1efff;border-radius:7px; }.quick-reply:hover { color:#fff;border-color:#5146d8;background:#5146d8; }
.composer-box .send-btn { background:#5146d8;box-shadow:0 7px 16px rgba(81,70,216,.24); }
.patient-panel { background:#fafafe; }.patient-top .avatar { box-shadow:0 7px 18px rgba(81,70,216,.12); }.appointment-preview { background:linear-gradient(135deg,#eeecff,#e7f6fb); }
.kanban-col { background:#eff0f6;border-color:#e0e2eb;border-radius:11px; }.lead-card { border-radius:9px; }
.calendar-panel,.today-panel { border-radius:12px; }.appointment-card { border-radius:6px; }
.modal { border-radius:14px;border-color:#e4e4ed;box-shadow:0 30px 80px rgba(27,31,70,.25); }.modal-backdrop { background:rgba(27,31,70,.56); }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#8e86ea;box-shadow:0 0 0 4px rgba(81,70,216,.09); }
.toast { background:linear-gradient(135deg,#28244e,#4a3faf); }

@media (max-width:900px) {
  .sidebar { width:244px; }.main-shell { margin-left:0;width:100%; }
}
@media (max-width:650px) {
  .page-hero { min-height:0;padding:20px;border-radius:13px; }.page-hero h2 { font-size:25px; }
  .inbox-overview { padding:16px; }.topbar { padding:0 13px; }
}
