@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* MATI CRM — calm light theme. Drop-in replacement for theme-v3.css (styles only, no behaviour). */
:root{
  --bg:#ecebe6;          /* page */
  --paper:#fbfaf7;       /* cards */
  --sunk:#f3f2ee;        /* inset surfaces */
  --ink:#17171a;
  --ink-2:#3c3c42;
  --muted:#8b8a86;
  --line:#e6e4de;
  --line-2:#d9d7d0;
  --accent:#e2703f;      /* single warm accent, used sparingly */
  --accent-soft:#fbe9df;
  --lilac:#b9b3ec;
  --lilac-soft:#eeecfa;
  --ok:#3f7a55;
  --ok-soft:#e8f0e9;
  --gold:var(--accent);
  --green:var(--ink);
  --r-lg:22px;--r-md:14px;--r-sm:10px;
  --shadow:0 1px 0 #ffffff inset,0 1px 2px #1a18120a,0 8px 24px -12px #1a181222;
}
body{background:var(--bg);color:var(--ink);font-family:'Inter',system-ui,-apple-system,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased;font-feature-settings:'cv11','ss01'}
h1,h2{font-family:'Inter',system-ui,sans-serif;font-weight:600;letter-spacing:-.035em;color:var(--ink)}
h3{font-weight:600;letter-spacing:-.01em}
button:focus-visible,a:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
::selection{background:var(--accent-soft)}

.eyebrow{text-transform:none;letter-spacing:0;font-size:12px;font-weight:500;color:var(--muted)}
.muted{color:var(--muted)}
.wordmark{font-weight:600;letter-spacing:-.01em;display:inline-flex;align-items:center;gap:9px}
.wordmark::before{content:'';width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 50% 50%,var(--paper) 0 28%,transparent 29%),var(--ink);flex-shrink:0}

/* buttons */
.btn{border:1px solid var(--line-2);background:var(--paper);color:var(--ink);border-radius:999px;padding:9px 16px;font-weight:500;font-size:13px;box-shadow:0 1px 2px #1a18120d;transition:background .15s,border-color .15s}
.btn:hover{background:#fff;border-color:#c9c6be}
.btn.primary,.btn.dark{background:var(--ink);border-color:var(--ink);color:#fff;box-shadow:0 1px 2px #0000002a}
.btn.primary:hover,.btn.dark:hover{background:#2a2a2f;border-color:#2a2a2f}
.textbtn{color:var(--ink);font-weight:500;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.textbtn:hover{text-decoration-color:var(--ink)}

/* surfaces */
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.box,.metric{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.box h3{font-size:15px}
.mock{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow)}
.mockbar{border-color:var(--line);color:var(--muted);font-size:12px;align-items:center;gap:10px}
.mockbar span{background:var(--sunk);border-radius:999px;padding:2px 9px;font-size:11px}
.mockbody .field,.field{border-color:var(--line)}
.mockbody h3{color:var(--ink)}
.quote{background:var(--sunk);border-left:0;border-radius:var(--r-sm);color:var(--ink-2);position:relative;padding:14px 16px 14px 28px}
.quote::before{content:'';position:absolute;left:14px;top:16px;bottom:16px;width:2px;border-radius:2px;background:var(--accent)}
.mini-stats div{background:var(--sunk);border-radius:var(--r-sm)}
.mini-stats strong{letter-spacing:-.03em;font-weight:600}
.notice{background:var(--sunk);color:var(--ink-2);border-radius:var(--r-sm)}
.source{border-color:var(--line);color:var(--muted)}

/* badges: quiet pills with a dot, like status chips */
.badge{display:inline-flex;align-items:center;gap:6px;background:var(--ok-soft);color:var(--ok);font-weight:500;border-radius:999px;padding:3px 10px}
.badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.85}
.badge.pending{background:var(--accent-soft);color:#b8531f}
.badge.lost{background:var(--ink);color:#fff}

/* dashboard shell */
.shell{background:var(--bg)}
.sidebar{background:transparent;border-right:1px solid var(--line-2);color:var(--ink);padding:26px 14px}
.sidebar .wordmark{font-size:15px}
.sidebar button{color:var(--ink-2);font-weight:500;font-size:13px;border-radius:999px;padding:9px 14px;transition:background .15s}
.sidebar button:hover{background:#00000008}
.sidebar button.active{background:var(--ink);color:#fff}
.sidebar-bottom{color:var(--muted)}
.sidebar-bottom a{text-decoration:none;color:var(--ink-2)}
.workspace{min-width:0}
.dashhead h1{font-size:40px;letter-spacing:-.04em}
.filters select,.filters input,input,select,textarea{background:var(--paper);color:var(--ink);border:1px solid var(--line-2);border-radius:999px;padding:8px 14px;color-scheme:light}
textarea{border-radius:var(--r-md)}
.formgrid input,.formgrid select{border-radius:var(--r-sm)}
.filters input{padding-left:34px;background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238b8a86' stroke-width='1.6'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='M9.5 9.5 13 13'/%3E%3C/svg%3E") no-repeat 13px 50%}

/* metrics */
.metric{padding:20px 22px}
.metric strong{font-weight:600;letter-spacing:-.04em;font-size:clamp(24px,2.4vw,34px);font-variant-numeric:tabular-nums}
.metric .label{color:var(--muted)}
.metric{background:var(--ink);border-color:var(--ink);color:#fff}
.metric .label,.metric small{color:#a9a8a4}
.metric strong{color:#fff}

/* tables */
th{color:var(--muted);text-transform:none;letter-spacing:0;font-size:12px;font-weight:500}
td,th,.task{border-color:var(--line)}
tbody tr{transition:background .12s}
tbody tr:hover{background:#00000005}
.avatar{background:var(--lilac-soft);color:#5d56a0;font-weight:600}

/* bars: rounded capsules like the reference */
.bars{gap:12px}
.bar{background:#dedcd5;border-radius:12px;width:38px;max-width:70%;min-height:6px;transition:background .15s}
.barcol:hover .bar{background:var(--ink)}
.barval{color:var(--ink-2);font-variant-numeric:tabular-nums}
.barcol{color:var(--muted)}
.progress{background:var(--sunk);border-radius:999px}
.progress div{background:var(--ink);border-radius:999px}
.score{color:var(--ink);font-weight:600;letter-spacing:-.04em}

/* tabs */
.tabs{background:var(--sunk);border-radius:999px;padding:4px;display:inline-flex}
.tabs button{border:0;border-radius:999px;padding:7px 14px;color:var(--ink-2);font-weight:500}
.tabs button.active{background:var(--paper);color:var(--ink);font-weight:600;box-shadow:0 1px 2px #1a18121a}

/* modal & toast */
.modal{background:#1a18123d;backdrop-filter:blur(6px)}
.dialog{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:0 30px 80px -20px #1a181240}
.toast{background:var(--ink);color:#fff;border-radius:999px;padding:12px 20px;font-size:13px}

/* brand marks */
.brandmark{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--line);background:#fff;border-radius:8px;flex-shrink:0;padding:5px;vertical-align:middle;margin-right:7px}
.brandmark img{width:100%;height:100%;object-fit:contain}
.brandmark.generic{background:var(--sunk);color:var(--ink-2);font-size:15px}
.sidebar button .brandmark{width:21px;height:21px;font-size:12px}
.sidebar button.active .brandmark.generic{background:#ffffff1f;color:#fff;border-color:transparent}
.brandrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:18px}
.brandtag{display:inline-flex;align-items:center;font-size:12px;color:var(--ink-2);border:1px solid var(--line);background:var(--paper);border-radius:999px;padding:5px 10px 5px 6px}
.integration-brand{display:flex;align-items:center}
.motion-legend{display:inline-block;width:7px;height:7px;background:var(--accent);border-radius:50%;margin-right:6px}

/* legacy linear map (kept for completeness) */
.node{background:var(--paper);color:var(--ink);border:1px solid var(--line-2);border-radius:var(--r-md);box-shadow:var(--shadow);min-height:103px}
.node.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.node.branch{background:var(--sunk);min-height:72px}
.node .brandmark{margin-bottom:7px}
.wires g{stroke:#c9c6be}
.canvas{min-width:1294px}.wires{width:1294px}
.stage,.legend{color:var(--muted)}
.top{color:var(--ink)}.mast{border-color:var(--line-2)}.hero p{color:var(--muted)}.hero aside{border-color:var(--line-2)}
.pill{border-color:var(--line-2);color:var(--ink-2)}
.footer{color:var(--muted)}

/* CRM record views */
.unified-sources{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:16px;background:var(--sunk);border:1px dashed var(--line-2);border-radius:var(--r-md);margin:10px 0 22px}
.unified-sources span,.unified-sources strong{width:100%;text-align:center;font-size:12px;color:var(--muted)}
.unified-sources a{font-size:12px;text-decoration:none;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:7px 12px}
.crm-zone{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper);padding:20px;box-shadow:var(--shadow)}
.crm-header{display:flex;gap:15px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:15px}
.crm-header h3{margin-top:5px}
.crm-header .btn{font-size:12px;white-space:nowrap}
.crm-header a{flex-shrink:0}
.pipeline{display:flex;gap:6px;overflow:auto;padding:4px;margin:18px 0;background:var(--sunk);border-radius:999px;width:max-content;max-width:100%}
.pipeline button{border:0;border-radius:999px;background:transparent;color:var(--ink-2);padding:7px 14px;white-space:nowrap;font-weight:500;font-size:13px}
.pipeline button:hover{background:var(--paper)}
.history-item{border-left:2px solid var(--line-2);padding:4px 16px;margin:0 0 14px 4px}
.history-item:first-child{border-left-color:var(--accent)}
.import-summary{padding:16px;border:1px solid var(--line);background:var(--sunk);border-radius:var(--r-md);margin:15px 0}
.contact-meta{display:flex;gap:18px;flex-wrap:wrap;padding:14px 16px;background:var(--sunk);border-radius:var(--r-md);margin-bottom:20px}
.contact-meta span{font-size:12px;color:var(--ink-2)}

/* guided demo */
.demo-start{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper);box-shadow:var(--shadow);padding:16px 18px;display:flex;justify-content:space-between;align-items:center;gap:15px;margin:10px 0 22px}
.guide{background:var(--ink);color:#fff;border:0;border-radius:var(--r-lg);padding:22px 24px;margin:0 0 20px}
.guide h3{margin:8px 0;color:#fff}
.guide .eyebrow,.guide .label{color:#a9a8a4}
.guide p{color:#cfcdc8;font-size:13px;max-width:750px}
.guide .actions{margin-top:14px}
.guide .btn{background:#ffffff14;border-color:#ffffff24;color:#fff;box-shadow:none}
.guide .btn.primary{background:#fff;color:var(--ink);border-color:#fff}
.guide .textbtn{color:#fff;text-decoration-color:#ffffff55}

/* layout safety (from previous theme) */
.dashgrid{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}
.box,.metric{min-width:0}

/* motion: one gentle entrance, nothing looping */
.panel,.metric,.box,.mock{animation:appear .45s cubic-bezier(.2,.7,.2,1) both}
.metric:nth-child(2){animation-delay:.05s}.metric:nth-child(3){animation-delay:.1s}.metric:nth-child(4){animation-delay:.15s}
.bar{transform-origin:bottom;animation:grow .7s cubic-bezier(.2,.7,.2,1) both}
@keyframes appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes grow{from{transform:scaleY(.05)}to{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){*,*::after{animation:none!important;transition:none!important}}
@media(max-width:1000px){.dashgrid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){
  .crm-header{display:block}.crm-header a{margin-top:15px}.crm-zone{padding:14px}
  .demo-start{display:block}.demo-start button{margin-top:12px}
  .sidebar{background:var(--bg);border-right:0;border-bottom:1px solid var(--line-2)}
  .dashhead h1{font-size:30px}
}

/* ---- v8.1: warmth & life ---- */
:root{--glow:radial-gradient(120% 140% at 15% 110%,#f08a4b 0,#e2703f22 38%,transparent 60%),radial-gradient(90% 120% at 95% -10%,#8d9ec2 0,transparent 55%),linear-gradient(160deg,#2c3a46 0%,#1b2229 70%)}
body{background:radial-gradient(900px 520px at 8% -8%,#f7dcc8 0,transparent 62%),radial-gradient(800px 520px at 100% 0,#dedaf4 0,transparent 58%),radial-gradient(900px 600px at 50% 115%,#f3e3d6 0,transparent 60%),var(--bg);background-attachment:fixed}
.metric,.guide{background:var(--glow);border-color:transparent;position:relative;overflow:hidden}
.metric::after,.guide::after{content:'';position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#ffffff22 1px,transparent 1.3px);background-size:6px 6px;mask-image:linear-gradient(90deg,transparent 40%,#000);-webkit-mask-image:linear-gradient(90deg,transparent 40%,#000)}
.metric>*,.guide>*{position:relative;z-index:1}
.metric .label,.metric small{color:#e7e2dc}
.bar{background:linear-gradient(180deg,#b9cbe9,#7f98c6)}
.barcol:hover .bar{background:linear-gradient(180deg,#f2a272,#e2703f)}
tbody tr:nth-child(3n+2) .avatar{background:var(--accent-soft);color:#b8531f}
tbody tr:nth-child(3n) .avatar{background:var(--ok-soft);color:var(--ok)}
.sidebar button.active{box-shadow:0 6px 14px -8px #17171a99}
/* four glow cards, each with its own light */
.metric:nth-child(4n+2){background:radial-gradient(120% 140% at 90% 115%,#e98a5c 0,#e2703f22 36%,transparent 60%),radial-gradient(90% 120% at 5% -10%,#9aa9c9 0,transparent 55%),linear-gradient(160deg,#2a3642 0%,#1b2229 70%)}
.metric:nth-child(4n+3){background:radial-gradient(120% 140% at 20% 115%,#6f8fc9 0,#6f8fc922 38%,transparent 60%),radial-gradient(90% 120% at 95% -10%,#a7b3cf 0,transparent 55%),linear-gradient(160deg,#283544 0%,#1a2129 70%)}
.metric:nth-child(4n){background:radial-gradient(120% 140% at 85% 115%,#a99be0 0,#a99be022 38%,transparent 60%),radial-gradient(90% 120% at 10% -10%,#8d9ec2 0,transparent 55%),linear-gradient(160deg,#2c3442 0%,#1c2129 70%)}
/* bars: blue-to-navy capsules with a warm glow at the base, matching the cards */
.bar{background:radial-gradient(140% 55% at 50% 108%,#f08a4bcc 0,transparent 70%),linear-gradient(180deg,#a9bde3 0%,#5f7cb0 55%,#2c3d5c 100%);box-shadow:inset 0 1px 0 #ffffff55,0 8px 16px -10px #2c3d5c99}
.barcol:hover .bar{background:radial-gradient(140% 60% at 50% 108%,#ffa36b 0,transparent 72%),linear-gradient(180deg,#c3d3f0 0%,#7592c6 55%,#33476a 100%)}

/* ===== Dark mode (html.dark, toggled by theme-toggle.js) ===== */
.theme-toggle{width:38px;padding:0;height:38px}
.radial-top .theme-toggle{height:36px;width:36px}
html.dark{color-scheme:dark;
  --bg:#0e0f11;--paper:#16171a;--sunk:#1e1f23;--ink:#f1f0ec;--ink-2:#c6c5c0;--muted:#8a8985;
  --line:#25262a;--line-2:#323338;--accent-soft:#3a2216;--lilac-soft:#25233a;--ok:#7cc495;--ok-soft:#16261c;
  --shadow:0 1px 0 #ffffff08 inset,0 1px 2px #0000004d,0 10px 28px -14px #000000cc}
html.dark body{background:radial-gradient(900px 520px at 8% -8%,#3a2214 0,transparent 62%),radial-gradient(800px 520px at 100% 0,#1f1d38 0,transparent 58%),radial-gradient(900px 600px at 50% 115%,#251812 0,transparent 60%),var(--bg);background-attachment:fixed}
html.dark .btn:hover{background:var(--sunk)}
html.dark .btn.primary,html.dark .btn.dark,html.dark .sidebar button.active,html.dark .badge.lost,html.dark .toast{color:#111214}
html.dark .btn.primary:hover,html.dark .btn.dark:hover{background:#ffffff;border-color:#fff}
html.dark .sidebar button:hover,html.dark tbody tr:hover{background:#ffffff08}
html.dark .sidebar button.active .brandmark.generic{background:#0000001a;color:#111214}
html.dark .badge.pending,html.dark tbody tr:nth-child(3n+2) .avatar{color:#f2a272}
html.dark .avatar{color:#c4bef2}
html.dark .modal{background:#0000008c}
html.dark .guide .btn.primary{background:#fff;color:#111214}
html.dark ::selection{background:#e2703f55}
/* map page */
html.dark .branch-node{background:var(--paper)}
html.dark .branch-node:hover{border-color:#44454b}
html.dark .branch-node.active{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink),0 12px 24px -12px #000}
html.dark .mindmap{background-color:var(--paper);background-image:radial-gradient(circle,#2b2c31 1px,transparent 1.2px)}
html.dark #connections,html.dark .mindmap path{stroke:#3b3c42}
html.dark .hub{box-shadow:0 0 0 8px #ffffff0a,0 0 0 9px var(--line-2),0 18px 40px -14px #e2703f99}
html.dark .radial-detail .mockbody{background:var(--paper)}
html.dark .radial-detail::before{background:radial-gradient(circle,#3a2214,transparent 65%)}
html.dark .mati-intro>img{border-color:var(--paper)}
/* custom dropdown arrow: always visible, spaced from the rounded edge */
select,.filters select,.formgrid select{-webkit-appearance:none;appearance:none;padding-right:36px;cursor:pointer;background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%233c3c42' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 14px center/12px}
html.dark select,html.dark .filters select,html.dark .formgrid select{background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23c6c5c0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 14px center/12px}
/* "Del acuerdo al pago": four stat tiles instead of a list */
.dashgrid>.box:nth-child(2):has(>.field){display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}
.dashgrid>.box:nth-child(2):has(>.field)>h3,.dashgrid>.box:nth-child(2):has(>.field)>p{grid-column:1/-1}
.dashgrid>.box:nth-child(2):has(>.field)>h3{margin-bottom:8px}
.dashgrid>.box:nth-child(2)>.field{flex-direction:column-reverse;justify-content:flex-end;gap:6px;border:1px solid var(--line);border-radius:16px;background:var(--sunk);padding:16px 16px 14px;position:relative;overflow:hidden}
.dashgrid>.box:nth-child(2)>.field strong{font-size:clamp(20px,1.9vw,26px);font-weight:600;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.dashgrid>.box:nth-child(2)>.field span{font-size:12px;color:var(--muted)}
.dashgrid>.box:nth-child(2)>.field::after{content:'';position:absolute;top:14px;right:14px;width:7px;height:7px;border-radius:50%;background:#7f98c6}
.dashgrid>.box:nth-child(2)>.field:nth-of-type(2)::after{background:var(--accent)}
.dashgrid>.box:nth-child(2)>.field:nth-of-type(3)::after{background:#a99be0}
.dashgrid>.box:nth-child(2)>.field:nth-of-type(4)::after{background:var(--ok)}
.dashgrid>.box:nth-child(2)>.field:nth-of-type(2){background:radial-gradient(120% 120% at 100% 120%,#e2703f1f,transparent 60%),var(--sunk)}
/* ---- status colours (calls) ---- */
.badge.st-scheduled{background:#e6edf8;color:#3f5f96}
.badge.st-pending{background:var(--accent-soft);color:#b8531f}
.badge.st-won{background:var(--ok-soft);color:var(--ok)}
.badge.st-contacted{background:var(--lilac-soft);color:#5d56a0}
.badge.st-new{background:#eef3f7;color:#4f6b80}
.badge.st-noshow{background:#efedea;color:#7a7874}
.badge.st-lost{background:#f8e5e1;color:#b2402f}
html.dark .badge.st-scheduled{background:#1b2638;color:#9fb8e6}
html.dark .badge.st-contacted{background:var(--lilac-soft);color:#c4bef2}
html.dark .badge.st-new{background:#1a2329;color:#9fbccc}
html.dark .badge.st-noshow{background:#232325;color:#a5a4a0}
html.dark .badge.st-lost{background:#33191a;color:#f09a8c}
html.dark .badge.st-pending{color:#f2a272}
.status-strip{display:flex;gap:8px;flex-wrap:wrap;margin:-4px 0 16px}
.status-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--paper);color:var(--ink-2);border-radius:999px;padding:6px 8px 6px 12px;font-size:12px;font-weight:500;transition:transform .15s,border-color .15s}
.status-chip:hover{transform:translateY(-1px);border-color:var(--line-2)}
.status-chip i{width:8px;height:8px;border-radius:50%;background:currentColor}
.status-chip b{background:var(--sunk);color:var(--ink);border-radius:999px;padding:1px 8px;font-weight:600}
.status-chip.st-scheduled i{background:#6f8fc9}.status-chip.st-pending i{background:var(--accent)}.status-chip.st-won i{background:var(--ok)}
.status-chip.st-contacted i{background:#a99be0}.status-chip.st-new i{background:#8fb2c6}.status-chip.st-noshow i{background:#b5b3ae}.status-chip.st-lost i{background:#d9604c}
.calls-box tbody tr td:first-child{box-shadow:inset 3px 0 0 transparent;padding-left:12px}
.calls-box tbody tr:has(.st-scheduled) td:first-child{box-shadow:inset 3px 0 0 #6f8fc9}
.calls-box tbody tr:has(.st-pending) td:first-child{box-shadow:inset 3px 0 0 var(--accent)}
.calls-box tbody tr:has(.st-won) td:first-child{box-shadow:inset 3px 0 0 var(--ok)}
.calls-box tbody tr:has(.st-contacted) td:first-child{box-shadow:inset 3px 0 0 #a99be0}
.calls-box tbody tr:has(.st-new) td:first-child{box-shadow:inset 3px 0 0 #8fb2c6}
.calls-box tbody tr:has(.st-noshow) td:first-child{box-shadow:inset 3px 0 0 #b5b3ae}
.calls-box tbody tr:has(.st-lost) td:first-child{box-shadow:inset 3px 0 0 #d9604c}
tr.is-new td{animation:newrow 3.5s ease-out both}
@keyframes newrow{0%,40%{background:#e2703f26}100%{background:transparent}}

/* ---- sidebar menu: clear text, coloured hover/touch, strong active ---- */
.sidebar button{color:var(--ink);font-weight:500;-webkit-tap-highlight-color:transparent;transition:background .15s,color .15s,transform .1s}
.sidebar button:hover{background:var(--accent-soft);color:#9c4317}
.sidebar button:active{transform:scale(.98);background:#f6d6c2}
.sidebar button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sidebar button.active,.sidebar button.active:hover{background:var(--glow);color:#fff;font-weight:600;box-shadow:0 8px 18px -10px #1b2229cc}
html.dark .sidebar button{color:var(--ink)}
html.dark .sidebar button:hover{background:#3a2216;color:#f6b48c}
html.dark .sidebar button:active{background:#4a2a1a}
html.dark .sidebar button.active,html.dark .sidebar button.active:hover{background:var(--glow);color:#fff;box-shadow:0 0 0 1px #ffffff1a,0 8px 18px -10px #000}
.sidebar button.active .brandmark.generic,html.dark .sidebar button.active .brandmark.generic{background:#ffffff26;color:#fff}
/* monthly bars are buttons that filter the dashboard */
.bars.months .barcol{border:0;background:transparent;font:inherit;color:var(--muted);font-size:11px;padding:6px 0 4px;border-radius:14px;cursor:pointer;transition:background .15s,opacity .2s}
.bars.months .barcol:hover{background:var(--sunk)}
.bars.months .barcol.selected{background:var(--sunk);color:var(--ink);font-weight:600}
.bars.months .barcol.selected .bar{background:radial-gradient(140% 60% at 50% 108%,#ffa36b 0,transparent 72%),linear-gradient(180deg,#c3d3f0 0%,#7592c6 55%,#33476a 100%);box-shadow:0 0 0 2px var(--paper),0 0 0 3.5px #7592c6}
.bars.months .barcol.dim{opacity:.45}
.bars.months .barcol.dim:hover{opacity:.8}
.bars.months .barcol:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* menu icons */
.sidebar nav button{display:flex;align-items:center;gap:11px}
.sidebar nav button .ni{flex-shrink:0;opacity:.7;transition:opacity .15s}
.sidebar nav button:hover .ni,.sidebar nav button.active .ni{opacity:1}
@media(max-width:650px){.sidebar nav button{gap:7px}}
@media(min-width:1001px){.shell{grid-template-columns:240px minmax(0,1fr)}.sidebar nav button{white-space:nowrap}}
/* ---- collapsible menu ---- */
.shell{transition:grid-template-columns .25s cubic-bezier(.2,.7,.2,1)}
.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden}
.side-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-right:2px}
.menu-toggle{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--muted);flex-shrink:0;transition:background .15s,color .15s,border-color .15s}
.menu-toggle:hover{background:var(--paper);border-color:var(--line);color:var(--ink)}
.menu-toggle .chev{transition:transform .25s;transform-origin:14px 12px}
html.menu-collapsed .menu-toggle .chev{transform:scaleX(-1)}
@media(min-width:651px){
  html.menu-collapsed .shell{grid-template-columns:76px minmax(0,1fr)}
  html.menu-collapsed .sidebar{padding:26px 12px}
  html.menu-collapsed .side-head{flex-direction:column;gap:14px;padding:0}
  html.menu-collapsed .sidebar .wordmark{font-size:0;gap:0;padding:0}
  html.menu-collapsed .sidebar .wordmark::before{width:22px;height:22px}
  html.menu-collapsed .sidebar nav button{justify-content:center;padding:11px 0;gap:0}
  html.menu-collapsed .sidebar nav button span{display:none}
  html.menu-collapsed .sidebar nav button .ni{opacity:.85}
  html.menu-collapsed .sidebar-bottom{display:none}
}
@media(max-width:650px){.menu-toggle{display:none}.sidebar{position:sticky;height:auto;overflow:visible}}
@media(prefers-reduced-motion:reduce){.shell{transition:none}}
/* header: only theme switch + profile; "Nueva llamada" lives in Llamadas */
.dashhead .actions{align-items:center;gap:10px}
.dashhead #export{display:none}
.dashhead #new-call{display:none}
body[data-view="calls"] .dashhead #new-call{display:inline-flex}
.profile-chip{display:inline-block;width:40px;height:40px;border-radius:50%;padding:2px;background:var(--glow);box-shadow:0 6px 14px -8px #1b2229aa;flex-shrink:0}
.profile-chip img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:2px solid var(--paper);display:block}
.dashhead #subtitle{display:none}
/* ---- contact record (Contactos › Ver contacto) ---- */
.contact-card{display:grid;gap:4px}
.cc-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.cc-av{width:52px;height:52px;font-size:17px;background:var(--glow)!important;color:#fff!important}
.cc-status{margin-top:4px}
.cc-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:10px}
.cc-stats div{background:var(--sunk);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.cc-stats span{display:block;font-size:12px;color:var(--muted)}
.cc-stats strong{font-size:22px;font-weight:600;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.cc-stats div:nth-child(1){background:var(--glow);border-color:transparent;color:#fff}
.cc-stats div:nth-child(1) span{color:#e7e2dc}
.cc-h{font-size:14px;margin:18px 0 10px}
.cc-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.cf{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--paper)}
.cf span{display:block;font-size:11px;color:var(--muted)}
.cf strong{font-weight:500;font-size:13px;word-break:break-word}
.timeline{position:relative;display:grid;gap:2px}
.timeline::before{content:'';position:absolute;left:5px;top:8px;bottom:8px;width:2px;background:var(--line);border-radius:2px}
.tl{display:grid;grid-template-columns:12px 1fr;gap:14px;padding:8px 0;position:relative}
.tl i{width:12px;height:12px;border-radius:50%;margin-top:4px;background:#b5b3ae;box-shadow:0 0 0 3px var(--paper)}
.tl.st-scheduled i{background:#6f8fc9}.tl.st-pending i{background:var(--accent)}.tl.st-won i{background:var(--ok)}
.tl.st-contacted i{background:#a99be0}.tl.st-new i{background:#8fb2c6}.tl.st-lost i{background:#d9604c}
.tl-top{display:flex;justify-content:space-between;gap:12px}
.tl-top strong{font-weight:600;font-size:13px}
.tl-top span{font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.tl p{font-size:12px;color:var(--ink-2);margin-top:2px}
.cc-calls{display:grid;gap:6px}
.cc-call{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;font-size:13px}
.cc-call .badge{margin-left:6px}
@media(max-width:650px){.cc-stats{grid-template-columns:1fr 1fr}}
/* ---- Perfil y ajustes ---- */
.profile-chip{cursor:pointer;transition:transform .15s}
.profile-chip:hover{transform:scale(1.05)}
.profile-chip:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.pf-dialog{width:min(820px,100%)}
.pf-tabs{display:inline-flex;gap:4px;padding:4px;background:var(--sunk);border-radius:999px;margin-bottom:20px;flex-wrap:wrap}
.pf-tabs button{border:0;background:transparent;border-radius:999px;padding:7px 14px;color:var(--ink-2);font-weight:500;font-size:13px}
.pf-tabs button.active{background:var(--paper);color:var(--ink);font-weight:600;box-shadow:0 1px 2px #1a18121a}
.pf-hero{display:flex;align-items:center;gap:14px;padding:16px;border-radius:18px;background:var(--glow);color:#fff;margin-bottom:18px}
.pf-hero img{width:56px;height:56px;border-radius:50%;object-fit:cover;border:2px solid #ffffff55}
.pf-hero strong{display:block;font-size:18px;letter-spacing:-.02em}
.pf-hero span{font-size:12px;color:#e7e2dc}
.pf-dialog .formgrid label{color:var(--muted);font-weight:500}
.pf-dialog .formgrid input,.pf-dialog .formgrid select{color:var(--ink);font-size:14px}
.pf-note{font-size:12px;color:var(--muted);margin:0 0 14px}
.pf-member{border:1px solid var(--line);border-radius:16px;padding:14px;margin-bottom:10px;background:var(--paper)}
.pf-member.off{opacity:.55}
.pf-who{display:flex;align-items:center;gap:12px}
.pf-who>div{flex:1;min-width:0}
.pf-who strong{display:block;font-size:14px}.pf-who strong em{font-style:normal;color:var(--muted);font-weight:500}
.pf-who span:not(.avatar){font-size:12px;color:var(--muted)}
.pf-who select{width:auto}
.pf-perms{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:12px}
.pf-switch{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--ink-2);cursor:pointer;user-select:none}
.pf-switch input{position:absolute;opacity:0;pointer-events:none}
.pf-switch i{width:30px;height:18px;border-radius:999px;background:var(--line-2);position:relative;flex-shrink:0;transition:background .15s}
.pf-switch i::after{content:'';position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0003;transition:transform .15s}
.pf-switch input:checked+i{background:var(--ok)}
.pf-switch input:checked+i::after{transform:translateX(12px)}
.pf-switch input:focus-visible+i{outline:2px solid var(--accent);outline-offset:2px}
.pf-switch input:disabled+i{opacity:.5}
.pf-switch.big i{width:40px;height:24px}.pf-switch.big i::after{width:20px;height:20px}
.pf-switch.big input:checked+i::after{transform:translateX(16px)}
.pf-row-actions{display:flex;gap:16px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.pf-invite{margin-top:18px;padding:16px;border:1px dashed var(--line-2);border-radius:16px}
.pf-invite h3{font-size:14px;margin-bottom:12px}
.pf-h{font-size:14px;margin:18px 0 8px}.pf-h:first-child{margin-top:0}
.pf-pref{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);cursor:pointer}
.pf-pref strong{display:block;font-size:13px}.pf-pref span{font-size:12px;color:var(--muted)}
.pf-danger{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px;border:1px solid #d9604c55;border-radius:14px;background:#d9604c0d}
.pf-danger strong{display:block;font-size:13px}.pf-danger span{font-size:12px;color:var(--muted)}
.pf-danger.confirm .btn{background:#c4452f;border-color:#c4452f;color:#fff}
#viewas-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px 10px 18px;margin-bottom:18px;border-radius:999px;background:var(--glow);color:#fff;font-size:13px}
#viewas-bar .btn{background:#ffffff1f;border-color:#ffffff33;color:#fff;box-shadow:none;padding:7px 14px}
@media(max-width:650px){.pf-who{flex-wrap:wrap}.pf-danger{display:block}.pf-danger .btn{margin-top:10px}}
/* stage chips (Contactos): selected state */
.status-chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.status-chip.on b{background:#ffffff26;color:#fff}
html.dark .status-chip.on{color:#111214}
html.dark .status-chip.on b{background:#0000001a;color:#111214}
.status-chip.st-all i{background:conic-gradient(#6f8fc9 0 25%,#e2703f 0 50%,#3f7a55 0 75%,#a99be0 0)}
.stage-strip{margin:4px 0 18px}
