*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f7f8fa;--bg2:#ffffff;--bg3:#f0f2f5;--bg4:#e8eaed;
  --border:#e2e5ea;--border2:#cdd0d8;
  --text:#111318;--text2:#5a6070;--text3:#9aa0ad;
  --accent:#2563eb;--accent-light:#eff4ff;--accent-text:#1d4ed8;
  --green:#16a34a;--green-bg:#f0fdf4;--green-text:#15803d;
  --amber:#d97706;--amber-bg:#fffbeb;--amber-text:#b45309;
  --red:#dc2626;--red-bg:#fef2f2;--red-text:#b91c1c;
  --purple:#7c3aed;--purple-bg:#f5f3ff;--purple-text:#6d28d9;
  --teal:#0d9488;--teal-bg:#f0fdfa;--teal-text:#0f766e;
  --radius:8px;--radius-lg:12px;--radius-xl:16px;
  --font:'Geist',sans-serif;--shadow:0 1px 3px rgba(0,0,0,.06);
  --sidebar:230px;
  --brand:#2563eb;
}
[data-theme="dark"]{
  --bg:#0f1117;--bg2:#171922;--bg3:#1e212b;--bg4:#272b36;
  --border:#2a2e3a;--border2:#383d4a;
  --text:#e8e9ec;--text2:#a8adba;--text3:#6b7280;
  --accent:#3b82f6;--accent-light:#1e293b;--accent-text:#60a5fa;
  --green:#22c55e;--green-bg:#052e16;--green-text:#4ade80;
  --amber:#f59e0b;--amber-bg:#451a03;--amber-text:#fbbf24;
  --red:#ef4444;--red-bg:#450a0a;--red-text:#f87171;
  --purple:#a78bfa;--purple-bg:#2e1065;--purple-text:#c4b5fd;
  --teal:#2dd4bf;--teal-bg:#042f2e;--teal-text:#5eead4;
  --shadow:0 1px 3px rgba(0,0,0,.5);
}
[data-theme="dark"] .notif-item.sla-notif{background:#450a0a}
.theme-icon-dark{display:none}
[data-theme="dark"] .theme-icon-light{display:none}
[data-theme="dark"] .theme-icon-dark{display:inline-block}
.avatar{overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
body{font-family:var(--font);background:var(--bg);color:var(--text);min-height:100vh;display:flex;font-size:14px;line-height:1.5}
button,input,select,textarea{font-family:var(--font)}

/* SLA WARNING BANNER */
#sla-warning-banner{display:none;position:fixed;top:0;left:0;right:0;z-index:1000;background:linear-gradient(90deg,#dc2626,#b91c1c);color:#fff;padding:10px 20px;font-size:13px;font-weight:500;text-align:center;box-shadow:0 2px 8px rgba(220,38,38,.4);animation:slideDown .3s ease}
@keyframes slideDown{from{transform:translateY(-100%)}to{transform:translateY(0)}}
#sla-warning-banner .banner-close{position:absolute;right:16px;top:50%;transform:translateY(-50%);background:none;border:none;color:#fff;font-size:18px;cursor:pointer;opacity:.8}
#sla-warning-banner .banner-close:hover{opacity:1}

/* SLA DASHBOARD WARNING */
.sla-alert-box{background:linear-gradient(135deg,#fef2f2,#fee2e2);border:1.5px solid #fca5a5;border-radius:var(--radius-lg);padding:14px 16px;margin-bottom:16px;display:none}
.sla-alert-box.visible{display:block}
.sla-alert-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.tf-sla-hide{border:0;background:transparent;color:#b91c1c;font:inherit;font-size:11px;font-weight:650;cursor:pointer;padding:4px 7px;border-radius:7px}.tf-sla-hide:hover{background:rgba(255,255,255,.55)}.tf-sla-panel-show{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:-6px 0 14px;color:var(--text3);font-size:10.5px}.tf-sla-panel-show button{border:0;background:transparent;color:#dc2626;font:inherit;font-size:11px;font-weight:650;cursor:pointer;padding:5px 8px;border-radius:7px}.tf-sla-panel-show button:hover{background:#fee2e2}
.sla-alert-title{font-size:13px;font-weight:600;color:var(--red);display:flex;align-items:center;gap:7px;margin-bottom:8px}
.sla-alert-items{display:flex;flex-direction:column;gap:5px}
.sla-alert-item{font-size:12px;color:var(--red-text);display:flex;align-items:center;gap:6px;padding:4px 8px;background:rgba(255,255,255,.5);border-radius:6px}

/* LOADING */
#loading-screen{display:flex;align-items:center;justify-content:center;min-height:100vh;width:100%;flex-direction:column;gap:12px}
.spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* LOGIN */
#login-screen{display:none;align-items:center;justify-content:center;min-height:100vh;background:var(--bg);width:100%}
#login-screen.visible{display:flex}
.auth-text-button{display:block;margin:8px 0 12px auto;border:0;background:none;color:var(--brand);font:inherit;font-size:12px;cursor:pointer;padding:0}
.login-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-xl);padding:36px;width:380px;box-shadow:var(--shadow)}
.login-logo{display:flex;align-items:center;gap:10px;margin-bottom:28px}
.login-logo-icon{width:36px;height:36px;background:var(--brand);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;font-weight:700;overflow:hidden}
.login-logo-icon img{width:100%;height:100%;object-fit:cover}
.login-logo-text{font-size:20px;font-weight:600}
.login-title{font-size:22px;font-weight:600;margin-bottom:4px}
.login-sub{font-size:13px;color:var(--text2);margin-bottom:24px}
.auth-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:20px;border-radius:12px;background:var(--bg3)}
.auth-mode-tab{padding:8px 12px;border:0;border-radius:9px;background:transparent;color:var(--text2);font-size:13px;font-weight:600;cursor:pointer}
.auth-mode-tab.active{background:var(--bg2);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.form-group{margin-bottom:14px}
.form-label{font-size:12px;font-weight:500;color:var(--text2);margin-bottom:5px;display:block}
.form-input{width:100%;padding:9px 12px;border:1px solid var(--border2);border-radius:var(--radius);font-size:13px;color:var(--text);background:var(--bg2);transition:border .15s}
.form-input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.password-field{position:relative}
.password-field .form-input,.password-field input{padding-right:58px}
.password-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);border:0;background:none;color:var(--accent-text);font-size:11px;font-weight:600;cursor:pointer;padding:4px}
.password-requirements{margin-top:9px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:var(--bg);display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}
.password-requirements-title{grid-column:1/-1;font-size:11px;font-weight:600;color:var(--text2);margin-bottom:2px}
.password-rule{font-size:11px;color:var(--text3);display:flex;align-items:center;gap:5px}
.password-rule::before{content:'○';font-size:13px;line-height:1}
.password-rule.valid{color:var(--green-text)}
.password-rule.valid::before{content:'✓'}
.workplace-id-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.workplace-id-chip{border:1px solid var(--border);background:var(--bg3);color:var(--text2);border-radius:999px;padding:5px 9px;font-size:11px;font-weight:600;cursor:pointer}
.workplace-id-chip:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}
.lead-intake-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.lead-intake-step{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:14px;display:flex;gap:12px;align-items:flex-start;box-shadow:var(--shadow)}
.lead-intake-step span{width:30px;height:30px;border-radius:10px;background:var(--accent-light);color:var(--brand);display:grid;place-items:center;font-weight:850;flex-shrink:0}
.lead-intake-step strong{font-size:13px;color:var(--text)}
.lead-intake-step p{font-size:11.5px;color:var(--text3);line-height:1.45;margin:3px 0 0}
.lead-intake-layout{display:grid;grid-template-columns:minmax(340px,460px) 1fr;gap:16px;align-items:start}
.lead-intake-panel{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:18px}
.li-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.li-eyebrow{font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;color:var(--brand);margin-bottom:4px}
.li-sub{font-size:12px;color:var(--text3);margin-top:4px;line-height:1.45}
.li-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.li-form-grid .fg{display:flex;flex-direction:column;gap:6px}
.li-form-grid label{font-size:12px;font-weight:650;color:var(--text2)}
.lead-intake-note{margin-top:10px;font-size:11.5px;color:var(--text3);line-height:1.45;background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:10px 12px}
.li-source-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:12px 0 14px}
.li-source-grid>div{background:var(--bg3);border-radius:12px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center}
.li-source-grid span{font-size:11px;color:var(--text3)}
.li-source-grid strong{font-size:16px;color:var(--text)}
.lead-intake-list{display:flex;flex-direction:column;gap:10px}
.lead-intake-card{display:flex;justify-content:space-between;gap:14px;padding:13px 14px;background:var(--bg2);border:1px solid var(--border);border-radius:14px;cursor:pointer;transition:.15s ease}
.lead-intake-card:hover{transform:translateY(-1px);border-color:var(--brand);box-shadow:var(--shadow)}
.li-card-main{flex:1;min-width:0}
.li-card-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px}
.li-card-meta{font-size:12px;color:var(--text3);margin-bottom:8px}
.li-card-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:110px;font-size:12px;color:var(--text3)}
.li-card-side strong{color:var(--text);font-size:12px}
.li-card-side .btn{font-size:10.5px;padding:5px 9px;margin-top:auto}
.li-assign-row{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px;align-items:center;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.li-assign-row select{height:34px;font-size:11.5px}
.li-assign-row .btn{height:34px;padding:0 12px;font-size:11px}
.lead-intake-empty{border:1px dashed var(--border2);background:var(--bg3);border-radius:16px;padding:28px 18px;text-align:center;display:grid;justify-items:center;gap:8px;color:var(--text2)}
.lead-intake-empty-icon{width:42px;height:42px;border-radius:14px;background:var(--accent-light);color:var(--brand);font-size:24px;font-weight:600;display:grid;place-items:center}
.lead-intake-empty strong{font-size:15px;color:var(--text)}
.lead-intake-empty p{font-size:12px;color:var(--text3);line-height:1.5;max-width:520px;margin:0 0 4px}
.public-form-link{display:inline-flex;max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:7px 9px;font-size:11px;color:var(--text2)}
.published-field-row{display:grid;grid-template-columns:72px minmax(130px,1fr) minmax(112px,145px) minmax(140px,190px) 92px;gap:8px;align-items:center;background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:8px 10px;margin-bottom:8px}
.published-field-row label{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--text2)}
.published-field-row input:not([type=checkbox]),.published-field-row select{height:34px;border-radius:10px;border:1px solid var(--border);background:var(--bg2);padding:0 9px;color:var(--text)}
.published-field-actions{display:flex;gap:6px;grid-column:1/-1;justify-content:flex-end}
.published-field-actions .btn{font-size:10px;padding:4px 8px}
.published-field-options{grid-column:2/-1}
@media(max-width:900px){.lead-intake-overview,.lead-intake-layout{grid-template-columns:1fr}.li-form-grid{grid-template-columns:1fr}.li-panel-head{flex-direction:column}.li-panel-head .search-box{width:100%;max-width:none}}
@media(max-width:620px){.lead-intake-card{flex-direction:column}.li-card-side{align-items:flex-start;flex-direction:row;min-width:0}.li-assign-row{grid-template-columns:1fr}}
@media(max-width:760px){.published-field-row{grid-template-columns:1fr}.public-form-link{max-width:100%;width:100%}}
.stay-signed-in{display:flex;align-items:center;gap:8px;margin:-2px 0 14px;color:var(--text2);font-size:12px;cursor:pointer;width:max-content}
.stay-signed-in input{width:15px;height:15px;accent-color:var(--brand);cursor:pointer}
.btn-login{width:100%;padding:10px;background:var(--brand);color:#fff;border:none;border-radius:var(--radius);font-size:14px;font-weight:500;cursor:pointer;transition:background .15s}
.btn-login:hover{opacity:.9}
.login-error{color:var(--red-text);font-size:12px;margin-top:8px;display:none}
.org-register-form{display:none}
.org-register-form.visible{display:block}
.setup-banner{padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--bg);margin-bottom:18px}
.setup-banner-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:3px}
.setup-banner-sub,.setup-note{font-size:12px;color:var(--text3);line-height:1.45}
.setup-note{margin-top:12px;text-align:center}
.login-accounts{margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}
.login-accounts p{font-size:11px;color:var(--text3);margin-bottom:8px}
.account-chips{display:flex;flex-wrap:wrap;gap:6px}
.account-chip{font-size:11px;padding:4px 10px;border-radius:20px;border:1px solid var(--border2);color:var(--text2);cursor:pointer;transition:all .15s}
.account-chip:hover{background:var(--accent-light);border-color:var(--brand);color:var(--accent-text)}
.tf-onboarding-card{background:linear-gradient(135deg,var(--bg2),var(--accent-light));border:1px solid color-mix(in srgb,var(--brand),transparent 75%);border-radius:18px;padding:18px 20px;margin-bottom:20px;box-shadow:var(--shadow)}
.tf-onboarding-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px}
.tf-onboarding-eyebrow{font-size:9px;letter-spacing:.12em;font-weight:700;color:var(--accent-text)}
.tf-onboarding-title{font-size:17px;font-weight:700;margin-top:2px}.tf-onboarding-sub{font-size:11px;color:var(--text3);margin-top:2px}
.tf-onboarding-progress{width:180px;height:8px;border-radius:999px;background:var(--bg4);overflow:hidden}.tf-onboarding-progress span{display:block;height:100%;border-radius:inherit;background:var(--brand);transition:width .25s ease}
.tf-onboarding-head-actions{display:flex;align-items:center;gap:12px}.tf-onboarding-hide{border:0;background:transparent;color:var(--text3);font:inherit;font-size:11px;font-weight:600;cursor:pointer;padding:5px 7px;border-radius:7px}.tf-onboarding-hide:hover{background:var(--bg3);color:var(--text)}
.tf-onboarding-show{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:-6px 0 14px;color:var(--text3);font-size:10.5px}.tf-onboarding-show button{border:0;background:transparent;color:var(--accent-text);font:inherit;font-size:11px;font-weight:650;cursor:pointer;padding:5px 8px;border-radius:7px}.tf-onboarding-show button:hover{background:var(--accent-light)}
.tf-migration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.tf-migration-card{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:14px;display:grid;grid-template-columns:auto 1fr;gap:10px}.tf-migration-card p{font-size:10.5px;line-height:1.45;color:var(--text3);margin:4px 0 0}.tf-migration-order{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--accent-light);color:var(--accent-text);font-size:11px;font-weight:700}.tf-migration-actions{grid-column:1/-1;display:flex;gap:7px;flex-wrap:wrap}
.tf-training-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px;border-radius:18px;background:linear-gradient(135deg,var(--bg2),var(--accent-light));border:1px solid var(--border);box-shadow:var(--shadow)}.tf-training-hero h2{margin:4px 0;font-size:24px}.tf-training-hero p{margin:0;color:var(--text3);font-size:12px;max-width:620px}.tf-training-hero-actions{display:flex;gap:8px;flex-wrap:wrap}.tf-training-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.tf-training-card{display:flex;gap:13px;text-align:left;border:1px solid var(--border);background:var(--bg2);color:var(--text);border-radius:14px;padding:16px;cursor:pointer;font:inherit}.tf-training-card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.tf-training-number{font:600 11px var(--mono);color:var(--accent-text);background:var(--accent-light);width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:none}.tf-training-card strong,.tf-training-card small,.tf-training-card em{display:block}.tf-training-card strong{font-size:13px}.tf-training-card small{font-size:11px;color:var(--text3);line-height:1.45;margin-top:4px}.tf-training-card em{font-size:10.5px;color:var(--accent-text);font-style:normal;font-weight:600;margin-top:9px}.tf-training-faq details{border-bottom:1px solid var(--border);padding:11px 0}.tf-training-faq summary{font-size:12px;font-weight:600;cursor:pointer}.tf-training-faq p{font-size:11px;color:var(--text3);margin:7px 0 0}.tf-tour-overlay{position:fixed;inset:0;background:rgba(15,23,42,.44);z-index:10000;display:flex;align-items:flex-end;justify-content:center;padding:28px;pointer-events:auto}.tf-tour-card{width:min(460px,calc(100vw - 32px));background:var(--bg2);border:1px solid var(--border);border-radius:18px;padding:20px;box-shadow:0 24px 70px rgba(0,0,0,.28)}.tf-tour-card h3{font-size:18px;margin:5px 0}.tf-tour-card p{font-size:12px;color:var(--text3);line-height:1.55}.tf-tour-card label{font-size:10.5px;color:var(--text3)}.tf-tour-progress{font-size:9px;font-weight:700;letter-spacing:.1em;color:var(--accent-text);text-transform:uppercase}.tf-tour-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.tf-tour-target{position:relative!important;z-index:10001!important;box-shadow:0 0 0 4px #fff,0 0 0 7px var(--brand)!important;background:var(--bg2)!important}
.tf-academy-stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.tf-academy-stats span{background:var(--bg2);border:1px solid var(--border);border-radius:999px;padding:5px 9px;font-size:10.5px;font-weight:650}.tf-academy-progress{height:10px;background:var(--bg4);border-radius:999px;overflow:hidden;margin:18px 0}.tf-academy-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--brand),#22c55e);border-radius:inherit;transition:width .6s ease}.tf-academy-path{max-width:720px;margin:0 auto}.tf-academy-stop{position:relative;padding:0 0 14px 48px}.tf-academy-stop:before{content:'';position:absolute;left:20px;top:38px;bottom:-5px;width:3px;background:var(--border)}.tf-academy-stop:last-child:before{display:none}.tf-academy-stop button{width:100%;display:flex;align-items:center;gap:14px;text-align:left;padding:15px;border:1px solid var(--border);border-radius:15px;background:var(--bg2);color:var(--text);font:inherit;cursor:pointer;transition:.2s}.tf-academy-stop button:hover{transform:translateX(4px);box-shadow:var(--shadow)}.tf-academy-stop button>span:last-child>*{display:block}.tf-academy-stop small{font-size:11px;color:var(--text3);margin-top:3px}.tf-academy-stop em{font-size:10.5px;color:var(--accent-text);font-style:normal;font-weight:650;margin-top:6px}.tf-academy-node{position:absolute;left:4px;width:36px;height:36px;border-radius:50%;display:grid!important;place-items:center;background:var(--brand);color:#fff;font-weight:750;box-shadow:0 5px 14px color-mix(in srgb,var(--brand),transparent 60%)}.tf-academy-stop.complete .tf-academy-node{background:#16a34a}.tf-academy-stop.locked{opacity:.5}.tf-academy-stop.locked button{cursor:not-allowed}.tf-lesson-demo{display:flex;align-items:center;gap:12px;background:var(--accent-light);border-radius:13px;padding:14px}.tf-lesson-demo p{margin:0;font-size:12px;line-height:1.5}.tf-lesson-question{font-size:14px;font-weight:700;margin:20px 0 10px}.tf-lesson-answers{display:grid;gap:8px}.tf-lesson-answers button{padding:11px;text-align:left;border:1px solid var(--border2);background:var(--bg2);color:var(--text);border-radius:11px;cursor:pointer;font:inherit;font-size:12px}.tf-lesson-answers button:hover{border-color:var(--brand);background:var(--accent-light)}.tf-lesson-feedback{margin-top:12px;padding:10px;border-radius:10px;font-size:12px}.tf-lesson-feedback.wrong{background:#fee2e2;color:#b91c1c}.tf-lesson-feedback.correct{background:var(--green-bg);color:var(--green-text);display:flex;align-items:center;justify-content:space-between}.tf-academy-celebrate{position:fixed;inset:0;z-index:12000;pointer-events:none;display:grid;place-items:center}.tf-academy-celebrate strong{background:var(--bg2);padding:16px 24px;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.25);animation:tf-pop 1.2s ease both}.tf-academy-celebrate i{position:absolute;left:50%;top:50%;width:9px;height:9px;border-radius:2px;background:hsl(calc(var(--i)*37),80%,55%);animation:tf-confetti 1.2s ease-out both;transform:rotate(calc(var(--i)*31deg))}
@keyframes tf-pop{0%{transform:scale(.5);opacity:0}30%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:0}}@keyframes tf-confetti{to{translate:calc(cos(calc(var(--i)*20deg))*180px) calc(sin(calc(var(--i)*20deg))*180px);rotate:360deg;opacity:0}}
@media(prefers-reduced-motion:reduce){.tf-academy-progress span,.tf-academy-stop button,.tf-training-card{transition:none!important}.tf-academy-celebrate i{display:none}.tf-academy-celebrate strong{animation:none}}
.agt-outcome-animation{position:fixed;inset:0;z-index:13000;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(15,23,42,.18);animation:agt-outcome-fade 1.5s ease both}.agt-outcome-animation:before{content:'';position:absolute;width:260px;height:260px;border-radius:50%;background:var(--bg2);box-shadow:0 25px 80px rgba(0,0,0,.22);animation:agt-outcome-pop .7s cubic-bezier(.2,1.4,.4,1) both}.agt-outcome-symbol,.agt-outcome-title,.agt-outcome-task{position:relative;z-index:1}.agt-outcome-symbol{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:42px;font-weight:800}.agt-outcome-animation.won .agt-outcome-symbol{background:#16a34a;box-shadow:0 0 0 12px #dcfce7}.agt-outcome-animation.lost .agt-outcome-symbol{background:#64748b;box-shadow:0 0 0 12px #e2e8f0}.agt-outcome-title{font-size:24px;font-weight:800;margin-top:17px}.agt-outcome-animation.won .agt-outcome-title{color:#15803d}.agt-outcome-animation.lost .agt-outcome-title{color:#475569}.agt-outcome-task{font-size:11px;color:var(--text3);max-width:210px;text-align:center;margin-top:5px}.agt-outcome-confetti i{position:absolute;left:50%;top:50%;width:8px;height:14px;background:hsl(calc(var(--i)*29),85%,55%);animation:agt-outcome-confetti 1.25s ease-out both;animation-delay:calc(var(--i)*8ms);transform:rotate(calc(var(--i)*23deg))}.task-card.agt-card-won{animation:agt-card-won 1.2s ease}.task-card.agt-card-lost{animation:agt-card-lost 1s ease}
@keyframes agt-outcome-pop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}@keyframes agt-outcome-fade{0%,72%{opacity:1}100%{opacity:0}}@keyframes agt-outcome-confetti{to{translate:calc(cos(calc(var(--i)*16deg))*210px) calc(sin(calc(var(--i)*16deg))*210px);rotate:540deg;opacity:0}}@keyframes agt-card-won{40%{box-shadow:0 0 0 4px #22c55e,0 12px 30px #16a34a55;transform:scale(1.025)}}@keyframes agt-card-lost{45%{filter:grayscale(.75);opacity:.55;transform:scale(.98)}}
@media(prefers-reduced-motion:reduce){.agt-outcome-animation,.agt-outcome-animation:before,.agt-outcome-confetti i,.task-card.agt-card-won,.task-card.agt-card-lost{animation:none!important}.agt-outcome-confetti{display:none}.agt-outcome-animation{background:transparent}.agt-outcome-animation:before{width:240px;height:220px}}
.tf-onboarding-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.tf-onboarding-item{background:var(--bg2);border:1px solid var(--border);border-radius:13px;padding:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:145px}
.tf-onboarding-item.done{background:color-mix(in srgb,var(--green-bg),var(--bg2) 45%)}.tf-onboarding-check{width:25px;height:25px;border-radius:50%;background:var(--accent-light);color:var(--accent-text);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}.tf-onboarding-item.done .tf-onboarding-check{background:var(--green);color:#fff}
.tf-onboarding-copy{flex:1}.tf-onboarding-item-title{font-size:12px;font-weight:650}.tf-onboarding-item-sub{font-size:10.5px;color:var(--text3);margin-top:3px;line-height:1.4}.tf-onboarding-complete{font-size:10.5px;color:var(--green-text);font-weight:600}
.tf-import-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tf-import-choice{border:1px solid var(--border);background:var(--bg2);border-radius:13px;padding:16px;text-align:left;cursor:pointer;color:var(--text)}.tf-import-choice:hover{border-color:var(--brand);background:var(--accent-light)}.tf-import-choice strong,.tf-import-choice span{display:block}.tf-import-choice span{font-size:11px;color:var(--text3);margin-top:4px}
@media(max-width:1100px){.tf-onboarding-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.tf-onboarding-head{align-items:flex-start;flex-direction:column}.tf-onboarding-head-actions{width:100%}.tf-onboarding-progress{width:auto;flex:1}.tf-onboarding-list,.tf-import-choice-grid{grid-template-columns:1fr}.tf-onboarding-item{min-height:auto}}
@media(max-width:700px){.tf-migration-grid{grid-template-columns:1fr}}
@media(max-width:700px){.tf-training-grid{grid-template-columns:1fr}.tf-training-hero{align-items:flex-start;flex-direction:column}}

/* APP */
#app{display:none;width:100%;min-height:100vh}
#app.visible{display:flex}
#sidebar{width:var(--sidebar);background:var(--bg2);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100vh;position:sticky;top:0;flex-shrink:0}
.sidebar-logo{padding:16px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;min-height:56px}
.sidebar-logo-icon{width:28px;height:28px;background:var(--brand);border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:700;flex-shrink:0;overflow:hidden}
.sidebar-logo-icon img{width:100%;height:100%;object-fit:cover}
.sidebar-logo-text{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-nav{padding:10px 8px;flex:1;overflow-y:auto}
.nav-section{font-size:10px;font-weight:600;color:var(--text3);letter-spacing:.07em;text-transform:uppercase;padding:8px 8px 4px}
.nav-btn{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:var(--radius);color:var(--text2);font-size:13px;border:none;background:none;width:100%;text-align:left;cursor:pointer;transition:all .12s}
.nav-btn:hover{background:var(--bg3);color:var(--text)}
.nav-btn.active{background:var(--accent-light);color:var(--accent-text);font-weight:500}
.nav-btn svg{width:15px;height:15px;flex-shrink:0}
.nav-badge{margin-left:auto;font-size:10px;padding:1px 6px;border-radius:20px;font-family:'Geist Mono',monospace}
.nav-btn.active .nav-badge{background:var(--brand);color:#fff}
.nav-btn:not(.active) .nav-badge{background:var(--bg4);color:var(--text2)}
.nav-badge.alert{background:var(--red)!important;color:#fff!important}
.nav-btn.superadmin-nav{background:linear-gradient(135deg,#1e1b4b11,#312e8111);color:#312e81;border:1px solid #312e8130}
.nav-btn.superadmin-nav.active{background:linear-gradient(135deg,#1e1b4b,#312e81);color:#fff}
.sidebar-user{padding:10px 8px;border-top:1px solid var(--border)}
.user-row{display:flex;align-items:center;gap:9px;padding:8px;border-radius:var(--radius);cursor:pointer}
.user-row:hover{background:var(--bg3)}
.avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;flex-shrink:0}
.av-0{background:var(--accent-light);color:var(--accent-text)}
.av-1{background:var(--green-bg);color:var(--green-text)}
.av-2{background:var(--purple-bg);color:var(--purple-text)}
.av-3{background:var(--amber-bg);color:var(--amber-text)}
.av-4{background:var(--teal-bg);color:var(--teal-text)}
.av-sa{background:linear-gradient(135deg,#1e1b4b,#312e81);color:#fff}
.user-info{flex:1;min-width:0}
.user-name{font-size:12px;font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-role{font-size:10px;color:var(--text3)}
.logout-btn{font-size:10px;color:var(--text3);border:none;background:none;cursor:pointer;padding:2px 4px;border-radius:4px}
.logout-btn:hover{color:var(--red)}

/* MAIN */
#main{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100vh}
.topbar{display:flex;align-items:center;gap:12px;padding:0 20px;border-bottom:1px solid var(--border);background:var(--bg2);flex-shrink:0;height:52px}
.page-title{font-size:15px;font-weight:600;flex:1}
.btn{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:var(--radius);font-size:12px;font-weight:500;cursor:pointer;transition:all .12s;border:none}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{opacity:.9}
.btn-ghost{background:transparent;color:var(--text2);border:1px solid var(--border2)}
.btn-ghost:hover{background:var(--bg3);color:var(--text)}
.btn-danger{background:var(--red-bg);color:var(--red-text);border:1px solid #fca5a5}
.btn-danger:hover{background:#fee2e2}
.btn-export{background:linear-gradient(135deg,#16a34a,#15803d);color:#fff}
.btn-export:hover{opacity:.9}
.btn-excel{background:linear-gradient(135deg,#1d6f42,#134d2f);color:#fff}
.btn-excel:hover{opacity:.9}
.content{flex:1;overflow-y:auto;padding:20px}
.page{display:none}.page.active{display:block}

/* GLOBAL SEARCH */
.search-global{position:relative}
.search-global input{padding:6px 12px 6px 32px;border:1px solid var(--border2);border-radius:var(--radius);font-size:12px;width:220px;background:var(--bg3);color:var(--text);transition:all .2s}
.search-global input:focus{outline:none;border-color:var(--brand);background:var(--bg2);width:280px}
.search-global svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--text3)}
.search-results{position:absolute;top:36px;left:0;width:340px;background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:300;max-height:360px;overflow-y:auto;display:none}
.search-results.open{display:block}
.sr-section{font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;padding:8px 12px 4px}
.sr-item{padding:8px 12px;cursor:pointer;display:flex;align-items:center;gap:8px;transition:background .1s}
.sr-item:hover{background:var(--bg3)}
.sr-icon{width:24px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:11px}
.sr-title{font-size:12px;font-weight:500;color:var(--text)}
.sr-sub{font-size:11px;color:var(--text3)}
.sr-empty{padding:16px;text-align:center;font-size:12px;color:var(--text3)}

/* STATS */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.stat-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 16px;box-shadow:var(--shadow)}
.stat-label{font-size:11px;color:var(--text3);font-weight:500;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}
.stat-value{font-size:22px;font-weight:600;line-height:1}
.stat-sub{font-size:11px;margin-top:3px}
.up{color:var(--green)}.warn{color:var(--amber)}.danger{color:var(--red)}

/* BOARD */
.board-wrap{overflow-x:auto;padding-bottom:8px}
.board{display:flex;gap:14px;min-width:max-content}
.col{background:var(--bg3);border-radius:var(--radius-lg);width:260px;flex-shrink:0;display:flex;flex-direction:column;max-height:calc(100vh - 160px)}
.col-head{padding:10px 12px;display:flex;align-items:center;gap:7px;flex-shrink:0}
.col-dot{width:7px;height:7px;border-radius:50%}
.col-title{font-size:12px;font-weight:600;flex:1}
.col-count{font-size:10px;background:var(--bg4);color:var(--text2);padding:1px 6px;border-radius:10px}
.col-sla{font-size:9px;padding:1px 5px;border-radius:4px;font-weight:500}
.col-cards{padding:0 8px 8px;display:flex;flex-direction:column;gap:7px;overflow-y:auto;flex:1}
.task-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);padding:10px;cursor:pointer;transition:all .12s;box-shadow:var(--shadow)}
.task-card:hover{border-color:var(--border2);box-shadow:0 2px 8px rgba(0,0,0,.08)}
.task-card.selected{border-color:var(--brand);box-shadow:0 0 0 3px rgba(88,101,242,.14),var(--neu-out-sm)}
.task-card.overdue{border-left:3px solid var(--red)}
.task-card.due-soon{border-left:3px solid var(--amber)}
.tc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.tc-head .tc-title{flex:1;min-width:0}
.tc-actions{display:flex;gap:6px;flex-shrink:0;align-items:center}
.tc-tracker-btn{width:28px;height:28px;border:1px solid transparent;border-radius:8px;background:var(--bg3);color:var(--text2);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:all .12s;padding:0}
.tc-tracker-btn:hover{border-color:var(--brand);color:var(--brand);background:var(--accent-light);box-shadow:0 6px 14px rgba(15,23,42,.08)}
.tc-tracker-btn svg{width:15px;height:15px}
.pipeline-timeline-panel{margin-bottom:14px;border:1px solid var(--border);background:var(--bg2);border-radius:18px;padding:14px;box-shadow:var(--neu-out-sm)}
.pipeline-timeline-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.pipeline-timeline-head.is-collapsed{margin-bottom:8px}
.pipeline-timeline-kicker{font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;color:var(--brand)}
.pipeline-timeline-title{font-size:17px;font-weight:850;color:var(--text);margin-top:2px}
.pipeline-timeline-sub{font-size:11.5px;color:var(--text3);margin-top:4px}.pipeline-timeline-sub strong{color:var(--text2)}
.pipeline-timeline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.pipeline-timeline-filter{border:1px solid var(--border);background:var(--bg3);border-radius:999px;padding:7px 11px;font-size:11px;color:var(--text2);font-weight:700;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.pipeline-timeline-filter svg{width:14px;height:14px}
.pipeline-timeline-compact{width:100%;border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:9px 11px;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;text-align:left;color:inherit;cursor:pointer;transition:all .12s}
.pipeline-timeline-compact:hover{border-color:var(--brand);background:var(--accent-light);box-shadow:0 8px 18px rgba(15,23,42,.08)}
.pipeline-timeline-counts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.pipeline-timeline-counts span{font-size:10px;color:var(--text2);background:var(--bg2);border:1px solid var(--border);border-radius:999px;padding:4px 7px;font-weight:700}
.pipeline-timeline-chips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.pipeline-timeline-chips span{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--bg3);border-radius:999px;padding:5px 9px;font-size:10.5px;color:var(--text2);font-weight:750}.pipeline-timeline-chips svg{width:13px;height:13px;color:var(--brand)}
.pipeline-timeline-list{display:grid;gap:8px}
.pipeline-timeline-item{border:1px solid var(--border);background:var(--bg3);border-radius:13px;padding:10px;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:start;text-align:left;cursor:pointer;color:inherit;transition:all .12s}
.pipeline-timeline-item:hover{border-color:var(--brand);background:var(--accent-light);box-shadow:0 10px 20px rgba(15,23,42,.08)}
.pipeline-timeline-dot{width:30px;height:30px;border-radius:10px;margin-top:1px;background:color-mix(in srgb,var(--event-color),transparent 86%);color:var(--event-color);display:inline-flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--event-color),transparent 64%)}
.pipeline-timeline-dot svg{width:15px;height:15px}
.pipeline-timeline-main{min-width:0;display:grid;gap:2px}
.pipeline-timeline-main strong{font-size:12px;color:var(--text);font-weight:850;line-height:1.25}
.pipeline-timeline-main span{font-size:11px;color:var(--text2);overflow-wrap:anywhere}
.pipeline-timeline-side{display:grid;gap:2px;text-align:right;min-width:76px}
.pipeline-timeline-side strong{font-size:10.5px;color:var(--text2);font-weight:750}
.pipeline-timeline-side span{font-size:10px;color:var(--text3)}
.pipeline-timeline-empty{display:flex;align-items:center;gap:14px;padding:18px;border:1px dashed var(--border2);background:var(--bg3);border-radius:16px}.pipeline-timeline-empty-icon{width:42px;height:42px;border-radius:14px;background:var(--accent-light);color:var(--brand);display:grid;place-items:center;flex-shrink:0}.pipeline-timeline-empty-icon svg{width:20px;height:20px}.pipeline-timeline-empty p{margin:4px 0 0;font-size:12px;color:var(--text3);line-height:1.45}
.tc-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:7px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-tags{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}
.tag{font-size:10px;padding:2px 6px;border-radius:4px;font-weight:500}
.tag-blue{background:var(--accent-light);color:var(--accent-text)}
.tag-amber{background:var(--amber-bg);color:var(--amber-text)}
.tag-red{background:var(--red-bg);color:var(--red-text)}
.tag-purple{background:var(--purple-bg);color:var(--purple-text)}
.tag-teal{background:var(--teal-bg);color:var(--teal-text)}
.tag-green{background:var(--green-bg);color:var(--green-text)}
.tag-gray{background:var(--bg4);color:var(--text2)}
.tc-footer{display:flex;align-items:center;gap:6px;min-width:0}
.tc-assignee{font-size:11px;color:var(--text2);margin-right:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-due{font-size:10px;color:var(--text3);white-space:nowrap}
.tc-sla{font-size:9px;padding:3px 6px;border-radius:5px;font-weight:700;white-space:nowrap}
.sla-ok{background:var(--green-bg);color:var(--green-text)}
.sla-warn{background:var(--amber-bg);color:var(--amber-text)}
.sla-breach{background:var(--red-bg);color:var(--red-text)}
.add-card-btn{margin:0 8px 8px;padding:6px;border:1.5px dashed var(--border2);border-radius:var(--radius);background:none;color:var(--text3);font-size:12px;cursor:pointer;transition:all .12s;text-align:center}
.add-card-btn:hover{background:var(--bg2);color:var(--brand);border-color:var(--brand)}

/* PANEL */
#panel-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.38);z-index:50}
#panel-overlay.open{display:block}
#task-panel{display:none;position:fixed;inset:0;width:100vw;height:100vh;max-height:none;transform:none;background:var(--bg2);border:0;border-radius:0;z-index:51;flex-direction:column;box-shadow:none;overflow:hidden}
#task-panel.open{display:flex}
.pipeline-work-hint{margin-bottom:14px;display:flex;align-items:center;gap:11px;padding:12px 14px;border:1px solid var(--border);background:var(--bg2);border-radius:14px;box-shadow:var(--neu-out-sm);color:var(--brand)}
.pipeline-work-hint svg{width:20px;height:20px;flex:none}.pipeline-work-hint div{display:grid;gap:2px}.pipeline-work-hint strong{font-size:12px;color:var(--text)}.pipeline-work-hint span{font-size:11px;color:var(--text3)}
.panel-top{min-height:62px;align-items:center}.task-back{width:34px;height:34px;border:1px solid var(--border);border-radius:10px;background:var(--bg3);color:var(--text2);font-size:20px;line-height:1;cursor:pointer}.task-back:hover{background:var(--accent-light);border-color:var(--brand);color:var(--brand)}
.panel-title-block{display:grid;gap:3px;min-width:0;flex:1}.panel-task-title{flex:unset}.panel-task-subtitle{font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-stage-rail{display:flex;align-items:flex-start;justify-content:center;gap:0;padding:14px max(24px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--border);background:var(--bg2);overflow-x:auto}.task-stage-node{position:relative;min-width:120px;display:grid;justify-items:center;gap:5px;color:var(--text3);font-size:10px;text-align:center}.task-stage-node:not(:last-child)::after{content:"";position:absolute;height:2px;background:var(--border);top:11px;left:calc(50% + 13px);right:calc(-50% + 13px)}.task-stage-node.complete:not(:last-child)::after{background:var(--stage-color)}.task-stage-node span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--border2);background:var(--bg2);font-size:10px;font-weight:800;z-index:1}.task-stage-node strong{font-size:10.5px;font-weight:700;white-space:nowrap}.task-stage-node.complete{color:var(--stage-color)}.task-stage-node.complete span,.task-stage-node.active span{border-color:var(--stage-color);color:#fff;background:var(--stage-color)}.task-stage-node.active{color:var(--text)}
.task-workspace-tabs{display:flex;gap:3px;padding:8px max(24px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--border);background:var(--bg2);overflow-x:auto;flex:none}.task-workspace-tabs .task-panel-tab{white-space:nowrap}.task-workspace-tabs .task-panel-tab.active{box-shadow:none}
.panel-body{padding:0;max-height:none}.task-workspace-layout{max-width:1320px;min-height:calc(100vh - 220px);margin:0 auto;display:grid;grid-template-columns:280px minmax(0,1fr)}.task-record-sidebar{padding:24px 20px;border-right:1px solid var(--border);background:var(--bg2)}.task-record-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);font-weight:800;margin-bottom:9px}.task-record-customer{width:100%;display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:0;text-align:left;color:var(--text);cursor:pointer}.task-record-customer:disabled{cursor:default}.task-record-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--accent-light);color:var(--accent-text);font-size:11px;font-weight:800}.task-record-customer strong,.task-record-customer small{display:block}.task-record-customer strong{font-size:13px;line-height:1.25}.task-record-customer small{margin-top:3px;font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-record-section{padding-top:22px;margin-top:22px;border-top:1px solid var(--border)}.task-record-sidebar .desc-text{padding:0;background:transparent;border-radius:0;font-size:12px}.task-record-details{display:grid;gap:11px;margin:0}.task-record-details div{display:grid;gap:3px}.task-record-details dt{font-size:10px;color:var(--text3)}.task-record-details dd{margin:0;font-size:12px;font-weight:650;color:var(--text)}
.task-workspace-main{min-width:0;padding:24px 30px;background:var(--bg)}.task-panel-section{max-width:none}.task-workspace-main .panel-section-label{margin-bottom:10px}.workspace-empty-state{display:grid;gap:4px;padding:18px;border:1px dashed var(--border2);border-radius:13px;background:var(--bg2);color:var(--text2)}.workspace-empty-state strong{font-size:13px;color:var(--text)}.workspace-empty-state span{font-size:12px;color:var(--text3);line-height:1.5}.task-upload-label{display:flex;align-items:center;gap:7px;padding:8px 10px;border:1.5px dashed var(--border2);border-radius:10px;cursor:pointer;font-size:12px;color:var(--text2)}.task-upload-label:hover{border-color:var(--brand);color:var(--brand);background:var(--accent-light)}.related-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.related-record{border:1px solid var(--border);background:var(--bg2);border-radius:12px;padding:14px;text-align:left;color:var(--text);cursor:pointer}.related-record:hover{border-color:var(--brand);background:var(--accent-light)}.related-record strong,.related-record span{display:block}.related-record strong{font-size:12px}.related-record span{font-size:11px;color:var(--text3);line-height:1.45;margin-top:4px}
.workspace-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.workspace-section-head p{margin:3px 0 0;font-size:12px;color:var(--text3);line-height:1.45}.workspace-actions{display:flex;gap:8px;flex:none}.task-owner-block{margin-top:20px;padding-top:20px;border-top:1px solid var(--border)}.task-email-list{display:grid;gap:10px}.task-email-row{display:grid;grid-template-columns:auto minmax(0,1fr)120px;gap:12px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}.task-email-direction{align-self:start;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:750;background:#eef2ff;color:#4338ca}.task-email-direction.inbound{background:#ecfdf5;color:#047857}.task-email-main{min-width:0}.task-email-main strong,.task-email-main span{display:block}.task-email-main strong{font-size:13px;color:var(--text)}.task-email-main span{margin-top:3px;font-size:11px;color:var(--text3)}.task-email-main p{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--text2);overflow-wrap:anywhere}.task-email-row time{font-size:10px;text-align:right;color:var(--text3);line-height:1.4}.task-email-empty{display:grid;gap:5px;padding:28px 18px;border:1px dashed var(--border2);border-radius:12px;background:var(--bg2);font-size:12px;color:var(--text3)}.task-email-empty strong{color:var(--text);font-size:13px}.task-email-recipient{display:grid;grid-template-columns:52px 1fr;gap:3px 10px;padding:12px 14px;margin-bottom:16px;border-radius:10px;background:var(--bg2);font-size:12px}.task-email-recipient span{grid-row:span 2;color:var(--text3);font-weight:700}.task-email-recipient strong{font-size:13px}.task-email-recipient small{color:var(--text3)}.task-product-card{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}.task-product-card strong,.task-product-card p{display:block}.task-product-card strong{margin-top:5px;font-size:15px}.task-product-card p{margin:5px 0 0;font-size:12px;line-height:1.45;color:var(--text3)}.task-product-label{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:var(--text3)}.task-related-list{display:grid;gap:8px}.task-related-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:13px 14px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);color:var(--text);text-align:left;cursor:pointer}.task-related-row:hover{border-color:var(--brand);background:var(--accent-light)}.task-related-row strong,.task-related-row small{display:block}.task-related-row strong{font-size:13px}.task-related-row small,.task-related-muted{margin-top:3px;font-size:11px;color:var(--text3)}.task-related-row b{font-size:11px;color:var(--brand)}
.email-template-control{display:flex;gap:8px}.email-template-control select{min-width:0;flex:1}.email-template-control .btn{white-space:nowrap}
.task-notes-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.task-notes-actions span{font-size:11px;color:var(--text3)}.email-template-library{min-height:420px}.email-template-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.email-template-library-head p{max-width:500px;margin:0;color:var(--text3);font-size:12px;line-height:1.55}.email-template-library-list{border-top:1px solid var(--border)}.email-template-library-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--border)}.email-template-library-row>div:first-child{min-width:0;display:grid;gap:3px}.email-template-library-row strong{font-size:13px;color:var(--text)}.email-template-library-row span{font-size:12px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-template-library-row small{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text3)}.email-template-library-actions{display:flex;gap:6px;flex:none}.email-template-library-actions .btn{padding:7px 9px;font-size:11px}.modal-subtitle{margin-top:3px;color:var(--text3);font-size:11px}
#modal-overlay.tf-email-compose-fullscreen{padding:0;background:rgba(15,23,42,.28);backdrop-filter:blur(5px);z-index:11000}#modal-overlay.tf-email-compose-fullscreen .modal{width:min(1180px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));max-height:none;border-radius:12px;box-shadow:0 28px 80px rgba(15,23,42,.3)}.outlook-compose{height:100%;display:flex;flex-direction:column;background:var(--bg2)}.outlook-compose-head{height:58px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);flex:none}.outlook-compose-head>div{display:flex;align-items:baseline;gap:9px}.outlook-compose-head span{font-size:15px;font-weight:750;color:var(--text)}.outlook-compose-head small{font-size:11px;color:var(--text3)}.outlook-compose-toolbar{display:flex;align-items:center;gap:4px;min-height:48px;padding:7px 16px;border-bottom:1px solid var(--border);background:var(--bg3);flex:none}.outlook-compose-toolbar select{width:190px;height:31px;border:1px solid var(--border2);border-radius:7px;background:var(--bg2);color:var(--text);padding:0 8px;font:inherit;font-size:11px}.outlook-compose-toolbar button{height:31px;min-width:31px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--text2);font:inherit;font-size:11px;cursor:pointer}.outlook-compose-toolbar button:hover{background:var(--bg2);color:var(--text)}.outlook-toolbar-divider{width:1px;height:23px;background:var(--border);margin:0 4px}.outlook-toolbar-spacer{flex:1}.outlook-compose-body{flex:1;min-height:0;display:flex;flex-direction:column;padding:14px 28px 0}.outlook-address-row{display:grid;grid-template-columns:74px minmax(0,1fr)auto;align-items:center;min-height:44px;border-bottom:1px solid var(--border)}.outlook-address-row>span{font-size:12px;font-weight:700;color:var(--text2)}.outlook-address-row>input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:13px;padding:8px 0}.outlook-address-row>button{border:0;background:transparent;color:var(--brand);font:inherit;font-size:11px;font-weight:700;cursor:pointer;padding:6px}.outlook-recipient-chip{display:flex;align-items:baseline;gap:7px;min-width:0}.outlook-recipient-chip b{font-size:13px;color:var(--text)}.outlook-recipient-chip small{font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.outlook-cc-row{display:none;grid-template-columns:74px minmax(0,1fr)}.outlook-cc-row.open{display:grid}.outlook-editor{flex:1;min-height:250px;padding:20px 0;outline:0;color:var(--text);font-size:14px;line-height:1.6;overflow:auto}.outlook-editor:empty:before{content:attr(data-placeholder);color:var(--text3);pointer-events:none}.outlook-editor p{margin:0 0 12px}.outlook-editor ul,.outlook-editor ol{margin:0 0 12px;padding-left:23px}.outlook-compose-hint{padding:10px 0;color:var(--text3);font-size:11px;line-height:1.4;border-top:1px solid var(--border)}.outlook-compose-foot{height:62px;padding:0 20px;display:flex;align-items:center;gap:10px;border-top:1px solid var(--border);background:var(--bg3);flex:none}.outlook-send{border:0;border-radius:8px;padding:10px 20px;background:var(--brand);color:#fff;font:inherit;font-size:12px;font-weight:750;cursor:pointer;box-shadow:0 8px 18px color-mix(in srgb,var(--brand) 23%,transparent)}.outlook-send:hover{filter:brightness(.96)}
@media(max-width:760px){.task-stage-rail{justify-content:flex-start;padding:12px 16px}.task-stage-node{min-width:98px}.task-workspace-tabs{padding:8px 12px}.task-workspace-layout{grid-template-columns:1fr}.task-record-sidebar{border-right:0;border-bottom:1px solid var(--border);padding:18px 16px}.task-record-section{display:none}.task-workspace-main{padding:18px 16px}.related-record-grid{grid-template-columns:1fr}.workspace-section-head{display:grid}.workspace-actions{width:100%}.workspace-actions .btn{flex:1}.task-email-row{grid-template-columns:1fr}.task-email-row time{text-align:left}.panel-top{padding:12px 16px}.panel-top .btn{display:none!important}.panel-top #btn-edit-task{display:inline-flex!important}}
@media(max-width:760px){#modal-overlay.tf-email-compose-fullscreen .modal{width:100vw;height:100vh;border-radius:0}.outlook-compose-toolbar{overflow-x:auto}.outlook-compose-toolbar select{width:160px;flex:none}.outlook-compose-body{padding:8px 16px 0}.outlook-address-row{grid-template-columns:54px minmax(0,1fr)auto}.outlook-cc-row{grid-template-columns:54px minmax(0,1fr)}.outlook-recipient-chip{display:grid;gap:1px}.outlook-editor{font-size:13px;padding-top:16px}.outlook-compose-hint{font-size:10px}.outlook-compose-head{padding:0 14px}}
.panel-top{padding:16px max(24px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:10px;background:var(--bg2)}
.panel-close{border:none;background:none;color:var(--text2);cursor:pointer;font-size:18px;padding:2px;line-height:1;margin-left:auto}
.panel-task-title{font-size:15px;font-weight:600;flex:1;line-height:1.4}
.task-panel-tabs{display:flex;gap:4px;padding:10px max(24px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--border);background:var(--bg2);flex:none}
.task-panel-tab{border:0;background:transparent;color:var(--text2);padding:8px 12px;border-radius:8px;font:650 12px/1 inherit;cursor:pointer}.task-panel-tab:hover{background:var(--bg3);color:var(--text)}.task-panel-tab.active{background:var(--accent-light);color:var(--accent-text)}
.panel-body{flex:1;overflow-y:auto;padding:24px max(24px,calc((100vw - 1120px)/2));max-height:none;background:var(--bg)}
.task-panel-section{display:none;max-width:1120px;margin:0 auto}.task-panel-section.active{display:block}
.panel-section{margin-bottom:22px}
.panel-section-label{font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.07em;margin-bottom:8px}
.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.meta-item{background:var(--bg3);border-radius:var(--radius);padding:8px 10px}
.meta-label{font-size:10px;color:var(--text3);margin-bottom:2px}
.meta-value{font-size:12px;font-weight:500;color:var(--text)}
.desc-text{font-size:13px;color:var(--text2);background:var(--bg3);border-radius:var(--radius);padding:10px 12px;line-height:1.6}
.stage-pills{display:flex;gap:6px;flex-wrap:wrap}
.stage-pill{padding:5px 10px;border-radius:20px;font-size:11px;font-weight:500;border:1.5px solid transparent;cursor:pointer;transition:all .12s;background:var(--bg3);color:var(--text2);border-color:var(--border)}
.stage-pill.active{border-color:currentColor}
.stage-pill:hover:not(.active){background:var(--bg4)}
.stage-change-row,.reassign-control-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.stage-current-pill{display:inline-flex;align-items:center;border:1px solid currentColor;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700;margin-bottom:8px}
.stage-change-row select,.reassign-control-row select{flex:1;min-width:190px}
.reassign-dropdown{max-width:760px}.reassign-dropdown>label{display:block;font-size:11px;font-weight:650;color:var(--text2);margin-bottom:6px}.reassign-dropdown select{height:42px;background:var(--bg2)}
.task-panel-hint{font-size:10.5px;color:var(--text3);margin-top:6px}
.customer-contact-check{margin-top:8px;padding:8px 10px;border-radius:8px;font-size:11px;line-height:1.4}.customer-contact-check.missing{background:var(--amber-bg);color:var(--amber-text)}.customer-contact-check.valid{background:var(--green-bg);color:var(--green-text)}.customer-contact-check.duplicate{background:var(--red-bg);color:var(--red-text)}.customer-contact-check button{border:0;background:transparent;color:inherit;text-decoration:underline;font:700 11px/1 inherit;cursor:pointer;padding:0}
.reassign-picker{display:grid;grid-template-columns:minmax(0,760px);gap:8px;max-height:none;overflow:visible;padding:0}
.reassign-picker-row{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--border);background:var(--bg2);border-radius:10px;padding:10px 12px;color:var(--text);text-align:left;cursor:pointer;transition:all .12s}
.reassign-picker-row:hover{border-color:var(--border2);background:var(--bg4)}
.reassign-picker-row.selected{border-color:var(--brand);background:var(--accent-light);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand),transparent 84%)}
.reassign-picker-name{display:block;font-size:12.5px;font-weight:750;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reassign-picker-role{display:block;font-size:10.5px;color:var(--text3);margin-top:4px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reassign-picker-check{width:20px;height:20px;border-radius:50%;border:1px solid var(--border2);display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;font-weight:800}
.reassign-picker-row.selected .reassign-picker-check{background:var(--brand);border-color:var(--brand)}
.assign-row{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--radius);border:1px solid var(--border);background:var(--bg3);cursor:pointer;transition:all .12s;margin-bottom:5px}
.assign-row:hover,.assign-row.selected{border-color:var(--brand);background:var(--accent-light)}
.assign-name{font-size:12px;font-weight:500;flex:1}
.assign-check{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--border2);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:9px}
.assign-check.checked{background:var(--brand);border-color:var(--brand);color:#fff}
.comment-list{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.comment-item{display:flex;gap:8px}
.comment-body{flex:1;background:var(--bg3);border-radius:var(--radius);padding:9px 11px}
.comment-author{font-size:11px;font-weight:500;color:var(--text)}
.comment-time{font-size:10px;color:var(--text3);margin-left:5px}
.comment-text{font-size:12px;color:var(--text2);margin-top:2px;line-height:1.5}
.comment-input-wrap{display:flex;gap:8px;align-items:flex-end}
.comment-textarea{flex:1;padding:9px 11px;border:1px solid var(--border2);border-radius:var(--radius);font-size:12px;color:var(--text);background:var(--bg2);resize:none;min-height:60px;transition:border .15s}
.comment-textarea:focus{outline:none;border-color:var(--brand)}
.panel-footer{padding:12px max(24px,calc((100vw - 1240px)/2));border-top:1px solid var(--border);display:flex;gap:8px;background:var(--bg2)}
@media(max-width:640px){.panel-top{padding:14px 16px}.task-panel-tabs{padding:8px 12px;overflow-x:auto}.task-panel-tab{white-space:nowrap}.panel-body{padding:18px 16px}.panel-footer{padding:10px 16px}.panel-footer .btn{font-size:11px;padding-left:9px;padding-right:9px}}

/* FOLLOWUP */
.followup-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 16px;margin-bottom:10px;display:flex;align-items:flex-start;gap:12px;box-shadow:var(--shadow)}
.followup-urgency{width:4px;border-radius:2px;align-self:stretch;flex-shrink:0}
.followup-main{flex:1}
.followup-title{font-size:13px;font-weight:500;color:var(--text);margin-bottom:3px}
.followup-meta{font-size:11px;color:var(--text2);display:flex;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.followup-note{font-size:12px;color:var(--text2);background:var(--bg3);border-radius:var(--radius);padding:6px 9px;line-height:1.5}
.followup-actions{display:flex;gap:6px;margin-top:8px}
.followup-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:4px}
.followup-head-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.followup-seq{display:inline-flex;align-items:center;border-radius:999px;background:var(--accent-light);color:var(--accent-text);font-size:10.5px;font-weight:800;padding:4px 8px;white-space:nowrap}
.followup-icon-btn{width:34px;height:34px;border-radius:999px;border:1px solid var(--border);background:var(--bg2);color:var(--text2);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:var(--shadow);transition:all .12s}
.followup-icon-btn:hover{background:var(--accent-light);border-color:var(--brand);color:var(--accent-text);transform:translateY(-1px)}
.followup-context{font-size:11px;color:var(--text3);margin-bottom:8px}
.followup-timeline{display:grid;gap:6px;margin-top:8px;padding:8px 10px;border-radius:12px;background:var(--bg3);border:1px solid var(--border)}
.followup-timeline-row{display:grid;grid-template-columns:56px 1fr auto;gap:8px;align-items:center;font-size:11px;color:var(--text2)}
.followup-timeline-row strong{color:var(--text)}
.followup-workflow-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.followup-outcome-btn{border:1px solid var(--border2);background:var(--bg3);color:var(--text2);border-radius:12px;padding:9px 10px;font-size:12px;font-weight:650;cursor:pointer;text-align:left}
.followup-outcome-btn.active{border-color:var(--brand);background:var(--accent-light);color:var(--accent-text);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand),transparent 86%)}

/* TABLE */
.table-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow)}
.table-toolbar{padding:10px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.search-box{padding:6px 11px;border:1px solid var(--border2);border-radius:var(--radius);font-size:12px;color:var(--text);background:var(--bg)}
.search-box:focus{outline:none;border-color:var(--brand)}
table{width:100%;border-collapse:collapse}
thead th{font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;padding:9px 14px;text-align:left;border-bottom:1px solid var(--border);background:var(--bg3)}
tbody tr{border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s}
tbody tr:last-child{border-bottom:none}
tbody tr:hover{background:var(--bg3)}
td{padding:10px 14px;font-size:12px;color:var(--text2)}
td.bold{color:var(--text);font-weight:500}
.pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:500}
.pill-green{background:var(--green-bg);color:var(--green-text)}
.pill-amber{background:var(--amber-bg);color:var(--amber-text)}
.pill-red{background:var(--red-bg);color:var(--red-text)}
.pill-blue{background:var(--accent-light);color:var(--accent-text)}
.pill-gray{background:var(--bg4);color:var(--text2)}
.pill-dot{width:4px;height:4px;border-radius:50%;background:currentColor}
.pill-purple{background:var(--purple-bg);color:var(--purple-text)}

/* MODAL */
#modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:100;align-items:center;justify-content:center;padding:16px}
#modal-overlay.open{display:flex}
.modal{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-xl);width:min(1280px,calc(100vw - 32px));height:calc(100vh - 32px);max-height:calc(100vh - 32px);overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.15);display:flex;flex-direction:column}
.modal-head{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--bg2);z-index:1;flex:none}
.modal-title{font-size:15px;font-weight:600}
.modal-body{padding:18px 20px;display:flex;flex-direction:column;gap:12px;overflow:auto;flex:1;min-height:0}
.tf-modal-window-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.tf-modal-window-button,.modal-head .panel-close{width:30px;height:30px;display:inline-grid;place-items:center;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:var(--text2);font:500 18px/1 inherit;cursor:pointer}.tf-modal-window-button:hover,.modal-head .panel-close:hover{background:var(--bg3);color:var(--text)}.modal-head>.panel-close{display:none}#modal-overlay.tf-modal-minimized{align-items:flex-end;justify-content:flex-end;padding:16px;background:transparent;pointer-events:none}#modal-overlay.tf-modal-minimized .modal{width:min(480px,calc(100vw - 32px));height:62px;min-height:62px;max-height:62px;border-radius:10px;pointer-events:auto;box-shadow:0 16px 42px rgba(15,23,42,.26)}#modal-overlay.tf-modal-minimized .modal-body,#modal-overlay.tf-modal-minimized .modal-foot{display:none}#modal-overlay.tf-modal-minimized .modal-head{height:62px;padding:0 14px;border:0}.tf-required-label{color:var(--brand)!important;font-weight:800!important}
.task-product-picker{margin-top:2px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}.task-product-picker .form-row{margin-bottom:8px}.form-hint{margin-top:5px;font-size:11px;line-height:1.35;color:var(--text3)}.task-product-form-summary{min-height:30px}.task-product-summary-empty{display:block;padding-top:4px;font-size:11px;color:var(--text3)}.task-product-summary-title{display:flex;justify-content:space-between;gap:12px;padding-top:3px;font-size:12px;font-weight:700;color:var(--text)}.task-product-summary-title small{font-size:10px;font-weight:650;color:var(--text3)}.task-product-summary-values{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:8px;margin-top:10px}.task-product-summary-values span,.task-product-summary-values strong{display:flex;justify-content:space-between;gap:8px;padding:8px 9px;border-radius:7px;background:var(--bg);font-size:11px;color:var(--text3)}.task-product-summary-values b{font-size:12px;color:var(--text)}.task-product-summary-values strong{background:var(--accent-light);color:var(--brand)}
.task-product-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.task-product-picker-head strong,.task-product-picker-head span{display:block}.task-product-picker-head strong{font-size:13px}.task-product-picker-head span{margin-top:3px;font-size:11px;color:var(--text3);line-height:1.35}.task-product-picker-actions{display:flex;align-items:center;gap:8px}.task-product-picker-actions select{height:34px;min-width:74px;padding:0 8px;border:1px solid var(--border2);border-radius:7px;background:var(--bg);font-size:12px}.task-product-lines-empty{padding:16px;border:1px dashed var(--border2);border-radius:8px;background:var(--bg);font-size:12px;color:var(--text3)}.task-line-scroll{overflow-x:auto}.task-line-table{width:100%;min-width:780px;border-collapse:collapse}.task-line-table th{padding:0 8px 8px;text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--text3);font-weight:750}.task-line-table td{padding:8px;border-top:1px solid var(--border);vertical-align:middle;font-size:12px;color:var(--text2)}.task-line-table select,.task-line-table input{width:100%;height:34px;padding:0 8px;border:1px solid var(--border2);border-radius:7px;background:var(--bg);font:inherit;color:var(--text)}.task-line-table td:first-child{min-width:190px}.task-line-table td:nth-child(2),.task-line-table td:nth-child(3),.task-line-table td:nth-child(5){width:92px}.task-line-table td:nth-child(4){width:148px}.task-line-table small{display:block;margin-top:3px;font-size:10px;color:var(--text3)}.task-line-discount{display:grid;grid-template-columns:76px 1fr;gap:5px}.task-line-discount.no-value{grid-template-columns:1fr}.task-line-remove{width:30px;height:30px;border:0;border-radius:6px;background:transparent;color:var(--text3);font-size:20px;line-height:1;cursor:pointer}.task-line-remove:hover{background:#fef2f2;color:var(--red)}.task-product-summary-values{grid-template-columns:repeat(4,1fr)}.task-product-record-table{border:1px solid var(--border);border-radius:8px;background:var(--bg2);overflow:hidden}.task-product-record-table .task-line-table td{background:var(--bg)}.task-product-record-total{display:flex;justify-content:flex-end;gap:18px;flex-wrap:wrap;padding:13px 16px;border-top:1px solid var(--border);font-size:12px;color:var(--text3)}.task-product-record-total span,.task-product-record-total strong{display:flex;gap:7px}.task-product-record-total b{color:var(--text)}.task-product-record-total strong{color:var(--brand)}
.modal-form-intro{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--bg2)}.modal-form-intro strong{font-size:13px}.modal-form-intro span{font-size:11px;line-height:1.4;color:var(--text3)}.acct-products-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:var(--bg2)}.acct-products-intro strong,.acct-products-intro span{display:block}.acct-products-intro strong{font-size:13px}.acct-products-intro>div>span{margin-top:3px;font-size:11px;color:var(--text3);line-height:1.4}.acct-catalog-permission{padding:5px 8px;border-radius:999px;background:var(--accent-light);color:var(--accent-text);font-size:10px;font-weight:750;white-space:nowrap}
.modal-foot{padding:12px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:0;background:var(--bg2);flex:none}
.fg label{display:block;font-size:11px;font-weight:500;color:var(--text2);margin-bottom:4px}
.fg input,.fg select,.fg textarea{width:100%;padding:8px 11px;border:1px solid var(--border2);border-radius:var(--radius);font-size:12px;color:var(--text);background:var(--bg2);transition:border .15s}
.fg input:focus,.fg select:focus,.fg textarea:focus{outline:none;border-color:var(--brand)}
.fg textarea{resize:vertical;min-height:72px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.customer-category-create{display:flex;gap:8px;margin-top:8px}.customer-category-create[hidden]{display:none}.customer-category-row{display:flex;gap:6px;align-items:center}.customer-category-row select{flex:1;min-width:0}.tf-inline-icon-btn{flex:none;width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--border2);border-radius:9px;background:var(--bg2);color:var(--text2);cursor:pointer;transition:.12s}.tf-inline-icon-btn:hover{color:var(--brand);border-color:var(--brand)}.tf-inline-icon-btn.is-active{background:var(--brand);border-color:var(--brand);color:#fff}.customer-category-create input{min-width:0;flex:1}.customer-category-create .btn{flex:0 0 auto;padding-inline:12px}
.form-tabs{display:flex;gap:6px;position:sticky;top:-18px;z-index:3;background:var(--bg2);border-bottom:1px solid var(--border);padding:0 0 12px;margin-bottom:4px;overflow:auto}
.form-tabs button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--bg);color:var(--text2);border-radius:999px;padding:8px 12px;font:inherit;font-size:12px;font-weight:750;white-space:nowrap;cursor:pointer}.form-tabs button .mdi{font-size:15px;line-height:1}
.form-tabs button:hover{border-color:var(--border2);background:var(--bg3)}
.form-tabs button.active{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 8px 22px color-mix(in srgb,var(--brand),transparent 72%)}
.form-tab-section{display:none;border:1px solid var(--border);background:var(--bg);border-radius:18px;padding:18px;box-shadow:var(--shadow);min-height:320px}
.form-tab-section.active{display:block}
.form-template-bar{display:none;gap:12px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);box-shadow:0 14px 40px rgba(15,23,42,.18)}.form-template-bar.open{display:grid;position:absolute;top:62px;right:16px;z-index:6;width:min(460px,calc(100% - 32px))}.modal{position:relative}.tf-template-toggle.is-active{background:var(--brand);border-color:var(--brand);color:#fff}.tf-template-toggle.has-template:not(.is-active){color:var(--brand);border-color:var(--brand)}.tf-template-toggle.has-template::after{content:'';position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:var(--brand)}.tf-template-toggle{position:relative}.form-template-bar .fg{margin:0}#nc-tpl-fields:empty,#nt-tpl-fields:empty{display:none}
.form-tab-section>.form-row:last-child,.form-tab-section>.fg:last-child{margin-bottom:0}
.configured-template-tabs{display:grid;gap:12px}
.configured-template-title{font-size:12px;font-weight:800;color:var(--text);margin-top:2px}
.configured-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.configured-template-grid section{border:1px solid var(--border);border-radius:14px;background:var(--bg2);padding:12px;display:grid;gap:10px;align-content:start}
.configured-template-grid h4{margin:0;font-size:12px;color:var(--text);font-weight:850}
.configured-template-grid p{margin:0;color:var(--text3);font-size:11px}
.tpl-tab-manager{border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:14px;display:grid;gap:10px}
.tpl-tab-manager-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.tpl-tab-manager-head label{font-size:11px;font-weight:800;color:var(--text2);margin:0}
.tpl-tab-manager-head span{font-size:11px;color:var(--text3)}
.tpl-tab-chip-row{display:flex;flex-wrap:wrap;gap:8px}
.tpl-tab-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border2);background:var(--bg2);border-radius:999px;padding:7px 9px 7px 12px;font-size:12px;font-weight:750;color:var(--text)}
.tpl-tab-chip button{border:0;background:var(--bg3);color:var(--text3);border-radius:999px;width:20px;height:20px;line-height:18px;cursor:pointer}
.tpl-tab-chip button:hover{background:var(--red-bg);color:var(--red-text)}
.tpl-tab-add-row{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px}
.tpl-tab-add-row input{width:100%;padding:8px 11px;border:1px solid var(--border2);border-radius:var(--radius);font-size:12px;color:var(--text);background:var(--bg2)}

/* TOAST */
#toast{position:fixed;bottom:20px;right:20px;background:var(--text);color:#fff;padding:10px 16px;border-radius:var(--radius-lg);font-size:13px;display:none;align-items:center;gap:8px;z-index:500;box-shadow:0 4px 20px rgba(0,0,0,.2)}
#toast.show{display:flex}

/* NOTIFICATIONS */
.notif-wrap{position:relative}
.notif-panel{display:none;position:absolute;top:40px;right:0;width:320px;background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:200;overflow:hidden}
.notif-panel.open{display:block}
.notif-header{padding:10px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.notif-list{max-height:320px;overflow-y:auto}
.notif-item{padding:10px 14px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:var(--bg3)}
.notif-item.unread{background:var(--accent-light)}
.notif-item.sla-notif{background:#fef2f2}
.notif-title{font-size:12px;font-weight:500;color:var(--text)}
.notif-sub{font-size:11px;color:var(--text3);margin-top:2px}
.notif-dot{position:absolute;top:4px;right:4px;width:8px;height:8px;background:var(--red);border-radius:50%;border:2px solid var(--bg2);display:none}

/* AUDIT */
.audit-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}
.audit-item:last-child{border-bottom:none}
.audit-icon{width:28px;height:28px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px}
.audit-body{flex:1}
.audit-text{font-size:12px;color:var(--text);line-height:1.5}
.audit-meta{font-size:11px;color:var(--text3);margin-top:2px}
.entry-timeline{display:grid;gap:10px}
.entry-timeline-item{display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:flex-start}
.entry-timeline-dot{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--accent-light);color:var(--accent-text);font-size:12px;font-weight:800}
.entry-timeline-card{background:var(--bg3);border:1px solid var(--border);border-radius:14px;padding:10px 12px}
.entry-timeline-title{font-size:12px;font-weight:750;color:var(--text)}
.entry-timeline-meta{font-size:10.5px;color:var(--text3);margin-top:3px}
.task-tracker-card{border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:12px;display:grid;gap:10px}
.task-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.task-tracker-kicker{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text3)}
.task-tracker-title{font-size:15px;font-weight:800;color:var(--text);margin-top:3px}
.task-tracker-action{padding:7px 10px;font-size:11px;gap:6px;white-space:nowrap}
.task-tracker-action svg{width:14px;height:14px}
.task-tracker-summary{display:flex;gap:6px;flex-wrap:wrap}
.task-tracker-summary span{border:1px solid var(--border);background:var(--bg2);border-radius:999px;padding:4px 8px;font-size:10.5px;color:var(--text2);font-weight:650}
.task-tracker-path{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.task-tracker-step{display:inline-flex;align-items:center;gap:6px;border:1px solid color-mix(in srgb,var(--step),transparent 62%);background:color-mix(in srgb,var(--step),transparent 90%);color:var(--text2);border-radius:999px;padding:5px 8px;font-size:10.5px;font-weight:750}
.task-tracker-step i{width:7px;height:7px;border-radius:50%;background:var(--step);flex-shrink:0}
.task-tracker-events,.task-history-full{display:grid;gap:8px}
.task-history-row{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:start;padding:8px 0;border-top:1px solid var(--border)}
.task-history-row:first-child{border-top:0}
.task-history-dot{width:30px;height:30px;border-radius:10px;margin-top:1px;background:color-mix(in srgb,var(--event-color),transparent 86%);color:var(--event-color);display:inline-flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--event-color),transparent 64%)}
.task-history-dot svg{width:15px;height:15px}
.task-history-dot-exchange{--event-color:#0f766e}
.task-history-dot-approval{--event-color:#7c3aed}
.task-history-dot-assignment{--event-color:#2563eb}
.task-history-dot-audit{--event-color:#64748b}
.task-history-main{min-width:0}
.task-history-title{font-size:12px;font-weight:800;color:var(--text)}
.task-history-detail{font-size:11px;color:var(--text2);margin-top:2px;overflow-wrap:anywhere}
.task-history-context{display:grid;gap:3px;margin-top:7px;padding:7px 9px;border-left:2px solid var(--event-color);border-radius:0 7px 7px 0;background:color-mix(in srgb,var(--event-color),transparent 93%);font-size:11px;line-height:1.35;color:var(--text2);overflow-wrap:anywhere}
.task-history-context strong{color:var(--text);font-weight:750}
.task-history-side{text-align:right;font-size:10.5px;color:var(--text3);display:grid;gap:2px;min-width:92px}
.task-history-side strong{font-size:10.5px;color:var(--text2);font-weight:750}
.task-status-history-empty{border:1px dashed var(--border2);border-radius:12px;padding:11px;color:var(--text3);font-size:11.5px;background:var(--bg2)}
.task-tracker-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border:1px solid var(--border);background:var(--bg3);border-radius:16px;padding:14px;margin-bottom:12px}
.task-tracker-modal-head h3{font-size:18px;margin:3px 0;color:var(--text)}
.task-tracker-modal-head p{font-size:11px;color:var(--text3);margin:0;overflow-wrap:anywhere}
.task-history-full{border:1px solid var(--border);background:var(--bg2);border-radius:16px;padding:8px 14px}
.entry-lookup-card{padding:14px;margin-bottom:14px}
.entry-lookup-search{display:flex;gap:8px;align-items:center}
.entry-result-list{display:grid;gap:8px;margin-top:12px}
.entry-result-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:10px 12px;cursor:pointer;transition:all .12s}
.entry-result-row:hover{border-color:var(--brand);background:var(--accent-light)}
.entry-id-badge{display:inline-flex;align-items:center;border-radius:999px;background:var(--bg4);color:var(--text2);font-family:'Geist Mono',monospace;font-size:10.5px;font-weight:800;padding:5px 8px;white-space:nowrap}
.entry-type-pill{font-size:10.5px;font-weight:750;border-radius:999px;padding:4px 8px;background:var(--accent-light);color:var(--accent-text);white-space:nowrap}
.entry-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.55fr);gap:14px;align-items:start}
.entry-detail-panel{background:var(--bg2);border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);padding:16px}
.entry-detail-title{font-size:18px;font-weight:800;color:var(--text);margin-bottom:5px}
.entry-detail-sub{font-size:12px;color:var(--text3);margin-bottom:12px}
.entry-info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.entry-info-item{background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:10px}
.entry-info-label{font-size:10.5px;color:var(--text3);margin-bottom:4px}
.entry-info-value{font-size:12.5px;font-weight:700;color:var(--text);word-break:break-word}

/* REPORTS */
.bar-row{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.bar-label{font-size:11px;color:var(--text2);width:90px;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{flex:1;height:10px;background:var(--bg3);border-radius:5px;overflow:hidden}
.bar-fill{height:100%;border-radius:5px;transition:width .6s ease}
.bar-val{font-size:11px;color:var(--text3);min-width:28px;text-align:right}

/* ATTACHMENT */
.attach-item{display:flex;align-items:center;gap:8px;padding:6px 9px;background:var(--bg3);border-radius:var(--radius);font-size:12px;margin-bottom:5px}
.attach-name{flex:1;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.attach-name:hover{color:var(--brand);text-decoration:underline}
.attach-size{font-size:10px;color:var(--text3)}
.attach-del{border:none;background:none;color:var(--text3);cursor:pointer;font-size:15px;padding:0 2px}
.attach-del:hover{color:var(--red)}

/* SETTINGS TABS */
.settings-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:20px}
.stab{padding:8px 16px;font-size:13px;color:var(--text2);border:none;background:none;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s}
.stab.active{color:var(--brand);border-bottom-color:var(--brand);font-weight:500}
.stab:hover:not(.active){color:var(--text)}
.stab-content{display:none}.stab-content.active{display:block}

/* RBAC */
.rbac-row{display:flex;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border);gap:12px}
.rbac-row:last-child{border-bottom:none}
.perm-check{width:16px;height:16px;cursor:pointer;accent-color:var(--brand)}
.role-badge{font-size:10px;padding:2px 8px;border-radius:20px;font-weight:500}
.role-admin{background:#fef3c7;color:#92400e}
.role-manager{background:var(--accent-light);color:var(--accent-text)}
.role-agent{background:var(--green-bg);color:var(--green-text)}
.role-viewer{background:var(--bg4);color:var(--text2)}
.role-superadmin{background:linear-gradient(135deg,#1e1b4b,#312e81);color:#fff}

/* SLA */
.sla-config{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--border);font-size:12px}
.sla-config:last-child{border-bottom:none}

/* ===== PHASE 2 STYLES ===== */
.quick-action-btn{display:flex;align-items:center;gap:8px;padding:10px 16px;border-radius:var(--radius-lg);border:1.5px solid var(--border2);background:var(--bg2);color:var(--text);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s;box-shadow:var(--shadow)}
.quick-action-btn:hover{border-color:var(--brand);background:var(--accent-light);color:var(--accent-text)}
.quick-action-btn .qa-icon{width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}
/* KPI card with accent top border */
.kpi-card{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 16px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;border-radius:var(--radius-lg) var(--radius-lg) 0 0}
.kpi-blue::before{background:var(--brand)}
.kpi-green::before{background:var(--green)}
.kpi-amber::before{background:var(--amber)}
.kpi-red::before{background:var(--red)}
.kpi-purple::before{background:var(--purple)}
.kpi-teal::before{background:var(--teal)}
.kpi-label{font-size:10.5px;color:var(--text3);font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.kpi-value{font-size:24px;font-weight:700;color:var(--text);line-height:1}
.kpi-sub{font-size:11px;margin-top:4px}
/* Horizontal bar chart */
.chart-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.chart-bar-label{font-size:11.5px;color:var(--text2);width:88px;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-bar-track{flex:1;height:12px;background:var(--bg4);border-radius:6px;overflow:hidden}
.chart-bar-fill{height:100%;border-radius:6px;transition:width .8s cubic-bezier(.4,0,.2,1)}
.chart-bar-val{font-size:11.5px;color:var(--text3);min-width:26px;text-align:right;font-weight:500}
/* SLA donut-style legend */
.sla-legend-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--radius);background:var(--bg3)}
.sla-legend-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.sla-legend-label{font-size:12px;color:var(--text2);flex:1}
.sla-legend-count{font-size:14px;font-weight:700;color:var(--text)}
.sla-legend-pct{font-size:10.5px;color:var(--text3)}
/* Activity feed */
.activity-item{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--border)}
.activity-item:last-child{border-bottom:none}
.activity-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:5px}
.activity-text{font-size:12px;color:var(--text2);line-height:1.5;flex:1}
.activity-time{font-size:10.5px;color:var(--text3);white-space:nowrap;margin-top:1px}
/* Customer profile */
.cp-hero{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-xl);padding:20px 24px;margin-bottom:16px;display:flex;align-items:flex-start;gap:18px;box-shadow:var(--shadow)}
.cp-av{width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;flex-shrink:0}
.cp-name{font-size:18px;font-weight:700;margin-bottom:3px}
.cp-meta{font-size:12.5px;color:var(--text2);display:flex;gap:14px;flex-wrap:wrap;margin-bottom:8px}
.cp-tags{display:flex;gap:6px;flex-wrap:wrap}
.cp-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px}
.cp-section{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow);margin-bottom:14px}
.cp-section-head{padding:11px 16px;border-bottom:1px solid var(--border);font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:space-between}
.cp-section-body{padding:14px 16px}
.timeline-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}
.timeline-item:last-child{border-bottom:none}
.tl-icon{width:30px;height:30px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:13px}
.tl-body{flex:1}
.tl-text{font-size:12.5px;color:var(--text);line-height:1.5}
.tl-time{font-size:10.5px;color:var(--text3);margin-top:2px}
.note-item{background:var(--bg3);border-radius:var(--radius);padding:10px 12px;margin-bottom:8px;font-size:12.5px;color:var(--text2);line-height:1.6;position:relative}
.note-meta{font-size:10.5px;color:var(--text3);margin-top:4px}
.note-del{position:absolute;top:8px;right:8px;border:none;background:none;color:var(--text3);cursor:pointer;font-size:15px}
.note-del:hover{color:var(--red)}
.pdot-high{background:var(--red)}.pdot-med{background:var(--amber)}.pdot-low{background:var(--green)}
::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border2);border-radius:4px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.section-title{font-size:13px;font-weight:600;color:var(--text2)}
.chip-filter{display:flex;gap:6px;flex-wrap:wrap}
.chip{padding:4px 10px;border-radius:20px;font-size:11px;border:1px solid var(--border2);cursor:pointer;transition:all .12s;color:var(--text2);background:var(--bg2)}
.chip.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.status-badge-group{display:flex;gap:8px;flex-wrap:wrap;align-items:center;min-height:38px}
.status-badge-btn{border:1px solid var(--border2);background:var(--bg3);color:var(--text2);border-radius:999px;padding:6px 12px;font-size:12px;font-weight:500;cursor:pointer;transition:all .12s}
.status-badge-btn.active{border-color:var(--brand);background:var(--accent-light);color:var(--accent-text);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.status-badge-btn[data-status="Completed"].active{border-color:var(--green);background:var(--green-bg);color:var(--green-text)}
.status-badge-btn[data-status="Sent"].active{border-color:var(--purple);background:var(--purple-bg);color:var(--purple-text)}
.access-denied{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px;text-align:center;color:var(--text3)}

/* ===== SUPER ADMIN PANEL ===== */
#superadmin-app{display:none;width:100%;min-height:100vh;background:#0f0e1a}
#superadmin-app.visible{display:flex}
.sa-sidebar{width:220px;background:#1a1830;border-right:1px solid #2d2b45;display:flex;flex-direction:column;height:100vh;position:sticky;top:0;flex-shrink:0}
.sa-logo{padding:18px 16px;border-bottom:1px solid #2d2b45;display:flex;align-items:center;gap:10px}
.sa-logo-icon{width:30px;height:30px;background:linear-gradient(135deg,#6366f1,#8b5cf6);border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:700}
.sa-logo-text{font-size:14px;font-weight:600;color:#e2e0f8}
.sa-logo-sub{font-size:10px;color:#6b69a0;margin-top:1px}
.sa-nav{padding:12px 8px;flex:1;overflow-y:auto}
.sa-nav-section{font-size:9px;font-weight:700;color:#4a4870;letter-spacing:.1em;text-transform:uppercase;padding:10px 8px 4px}
.sa-nav-btn{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;color:#9896c8;font-size:13px;border:none;background:none;width:100%;text-align:left;cursor:pointer;transition:all .12s}
.sa-nav-btn:hover{background:#2d2b45;color:#e2e0f8}
.sa-nav-btn.active{background:linear-gradient(135deg,#4338ca22,#6366f122);color:#818cf8;font-weight:500;border:1px solid #4338ca44}
.sa-nav-btn svg{width:15px;height:15px;flex-shrink:0}
.sa-user{padding:12px 8px;border-top:1px solid #2d2b45}
.sa-user-row{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;cursor:pointer}
.sa-user-row:hover{background:#2d2b45}
.sa-av{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#8b5cf6);display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;font-weight:700;flex-shrink:0}
.sa-user-info{flex:1;min-width:0}
.sa-user-name{font-size:12px;font-weight:500;color:#e2e0f8}
.sa-user-role{font-size:10px;color:#6b69a0}
.sa-logout{font-size:10px;color:#6b69a0;border:none;background:none;cursor:pointer;padding:2px 4px}
.sa-logout:hover{color:#f87171}
.sa-main{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100vh}
.sa-topbar{display:flex;align-items:center;gap:12px;padding:0 20px;border-bottom:1px solid #2d2b45;background:#1a1830;flex-shrink:0;height:52px}
.sa-page-title{font-size:15px;font-weight:600;flex:1;color:#e2e0f8}
.sa-content{flex:1;overflow-y:auto;padding:20px}
.sa-page{display:none}.sa-page.active{display:block}
.sa-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.sa-stat-card{background:#1a1830;border:1px solid #2d2b45;border-radius:12px;padding:16px;position:relative;overflow:hidden}
.sa-stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px}
.sa-stat-card.indigo::before{background:linear-gradient(90deg,#6366f1,#8b5cf6)}
.sa-stat-card.green::before{background:linear-gradient(90deg,#10b981,#34d399)}
.sa-stat-card.amber::before{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.sa-stat-card.red::before{background:linear-gradient(90deg,#ef4444,#f87171)}
.sa-stat-label{font-size:10px;color:#6b69a0;font-weight:600;text-transform:uppercase;letter-spacing:.07em;margin-bottom:6px}
.sa-stat-value{font-size:26px;font-weight:700;color:#e2e0f8;line-height:1}
.sa-stat-sub{font-size:11px;color:#4a4870;margin-top:4px}
.sa-card{background:#1a1830;border:1px solid #2d2b45;border-radius:12px;overflow:hidden;margin-bottom:16px}
.sa-card-head{padding:14px 16px;border-bottom:1px solid #2d2b45;display:flex;align-items:center;justify-content:space-between}
.sa-card-title{font-size:13px;font-weight:600;color:#e2e0f8}
.sa-table{width:100%;border-collapse:collapse}
.sa-table thead th{font-size:10px;font-weight:600;color:#4a4870;text-transform:uppercase;letter-spacing:.06em;padding:10px 16px;text-align:left;border-bottom:1px solid #2d2b45;background:#0f0e1a}
.sa-table tbody tr{border-bottom:1px solid #1e1c35;transition:background .1s;cursor:pointer}
.sa-table tbody tr:last-child{border-bottom:none}
.sa-table tbody tr:hover{background:#2d2b4540}
.sa-table td{padding:11px 16px;font-size:12px;color:#9896c8}
.sa-table td.bold{color:#e2e0f8;font-weight:500}
.sa-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:500}
.sa-pill-green{background:#10b98120;color:#34d399}
.sa-pill-amber{background:#f59e0b20;color:#fbbf24}
.sa-pill-red{background:#ef444420;color:#f87171}
.sa-pill-blue{background:#6366f120;color:#818cf8}
.sa-pill-gray{background:#2d2b45;color:#6b69a0}
.sa-btn{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:500;cursor:pointer;transition:all .12s;border:none}
.sa-btn-primary{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}
.sa-btn-primary:hover{opacity:.9}
.sa-btn-ghost{background:transparent;color:#9896c8;border:1px solid #2d2b45}
.sa-btn-ghost:hover{background:#2d2b45;color:#e2e0f8}
.sa-btn-danger{background:#ef444420;color:#f87171;border:1px solid #ef444440}
.sa-btn-danger:hover{background:#ef444430}
.sa-btn-export{background:linear-gradient(135deg,#10b981,#059669);color:#fff}
.sa-btn-excel{background:linear-gradient(135deg,#1d6f42,#134d2f);color:#fff}
.sa-search{padding:7px 12px 7px 32px;border:1px solid #2d2b45;border-radius:8px;font-size:12px;background:#0f0e1a;color:#e2e0f8;font-family:var(--font);width:200px}
.sa-search:focus{outline:none;border-color:#6366f1}
.sa-search::placeholder{color:#4a4870}
.sa-select{padding:7px 11px;border:1px solid #2d2b45;border-radius:8px;font-size:12px;background:#0f0e1a;color:#e2e0f8;font-family:var(--font)}
.sa-select:focus{outline:none;border-color:#6366f1}
.sa-input{padding:8px 12px;border:1px solid #2d2b45;border-radius:8px;font-size:13px;background:#0f0e1a;color:#e2e0f8;font-family:var(--font);width:100%}
.sa-input:focus{outline:none;border-color:#6366f1}
.sa-label{font-size:11px;font-weight:500;color:#9896c8;margin-bottom:5px;display:block}
.sa-fg{margin-bottom:14px}
.sa-fg label{display:block;font-size:11px;font-weight:500;color:#9896c8;margin-bottom:4px}
.sa-fg input,.sa-fg select,.sa-fg textarea{width:100%;padding:8px 12px;border:1px solid #2d2b45;border-radius:8px;font-size:12px;color:#e2e0f8;background:#0f0e1a;font-family:var(--font)}
.sa-fg input:focus,.sa-fg select:focus,.sa-fg textarea:focus{outline:none;border-color:#6366f1}
.sa-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sa-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.sa-bar-label{font-size:11px;color:#9896c8;width:100px;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sa-bar-track{flex:1;height:8px;background:#2d2b45;border-radius:4px;overflow:hidden}
.sa-bar-fill{height:100%;border-radius:4px;transition:width .6s ease}
.sa-bar-val{font-size:11px;color:#4a4870;min-width:28px;text-align:right}
.sa-modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200;align-items:center;justify-content:center}
.sa-modal-overlay.open{display:flex}
.sa-modal{background:#1a1830;border:1px solid #2d2b45;border-radius:16px;width:560px;max-height:90vh;overflow-y:auto;box-shadow:0 24px 60px rgba(0,0,0,.5)}
.sa-modal-head{padding:16px 20px;border-bottom:1px solid #2d2b45;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#1a1830;z-index:1}
.sa-modal-title{font-size:15px;font-weight:600;color:#e2e0f8}
.sa-modal-body{padding:20px;display:flex;flex-direction:column;gap:14px}
.sa-modal-foot{padding:14px 20px;border-top:1px solid #2d2b45;display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:0;background:#1a1830}
.sa-close-btn{border:none;background:none;color:#6b69a0;cursor:pointer;font-size:18px;padding:2px;line-height:1}
.sa-close-btn:hover{color:#e2e0f8}
.sa-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sa-detail-item{background:#0f0e1a;border-radius:8px;padding:10px 12px}
.sa-detail-label{font-size:10px;color:#4a4870;margin-bottom:3px}
.sa-detail-value{font-size:13px;color:#e2e0f8;font-weight:500}
.sa-activity-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #2d2b45}
.sa-activity-item:last-child{border-bottom:none}
.sa-activity-dot{width:8px;height:8px;border-radius:50%;background:#6366f1;flex-shrink:0;margin-top:4px}
.sa-activity-text{font-size:12px;color:#9896c8;line-height:1.5}
.sa-activity-time{font-size:10px;color:#4a4870;margin-top:2px}
.sa-export-bar{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#0f0e1a;border-top:1px solid #2d2b45}
.sa-report-tabs{display:flex;gap:2px;border-bottom:1px solid #2d2b45;margin-bottom:20px}
.sa-rtab{padding:8px 16px;font-size:12px;color:#6b69a0;border:none;background:none;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s}
.sa-rtab.active{color:#818cf8;border-bottom-color:#6366f1;font-weight:500}
.sa-rtab-content{display:none}.sa-rtab-content.active{display:block}

/* ===== VISUAL POLISH: hover/transition consistency + gentle elevation ===== */
.kpi-card,.table-card,.login-card{transition:box-shadow .15s ease,transform .15s ease,border-color .15s ease}
.kpi-card:hover,.table-card:hover{box-shadow:0 6px 20px rgba(17,19,24,.08);border-color:var(--border2)}
[data-theme="dark"] .kpi-card:hover,[data-theme="dark"] .table-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.35)}
.btn,.nav-btn,.account-chip,.logout-btn,.avatar{transition:background .15s ease,color .15s ease,border-color .15s ease,transform .1s ease,box-shadow .15s ease}
.btn:active{transform:translateY(1px)}
.btn-primary{box-shadow:0 1px 2px rgba(37,99,235,.25)}
.btn-primary:hover{box-shadow:0 2px 8px rgba(37,99,235,.35)}
.nav-btn:hover{transform:translateX(1px)}
tr{transition:background .1s ease}
.modal,.sa-modal{transition:transform .15s ease,opacity .15s ease}

/* ===== SKELETON LOADING STATE ===== */
.skeleton{position:relative;overflow:hidden;background:var(--bg3);border-radius:var(--radius);color:transparent!important}
.skeleton::after{content:'';position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);animation:skeleton-shimmer 1.3s infinite}
[data-theme="dark"] .skeleton::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent)}
@keyframes skeleton-shimmer{100%{transform:translateX(100%)}}
.skeleton-kpi{height:74px}
.skeleton-row{height:38px;margin-bottom:6px}

/* ===== RESPONSIVE: hamburger toggle (hidden on desktop) ===== */
#sidebar-toggle-btn{display:none}
#sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:90}
#sidebar-backdrop.open{display:block}

/* ===== RESPONSIVE: tablet ===== */
@media (max-width:1024px){
  :root{--sidebar:200px}
  .stats-grid,.sa-stat-grid{grid-template-columns:repeat(2,1fr)!important}
  div[style*="grid-template-columns:3fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"]{grid-template-columns:1fr 1fr!important}
}

/* ===== RESPONSIVE: mobile ===== */
@media (max-width:768px){
  body{font-size:13px}
  #sidebar{position:fixed;top:0;left:0;z-index:95;width:230px;transform:translateX(-100%);transition:transform .2s ease;box-shadow:0 0 30px rgba(0,0,0,.25)}
  #sidebar.mobile-open{transform:translateX(0)}
  #main{width:100%}
  #sidebar-toggle-btn{display:inline-flex}
  .content{padding:12px}
  div[style*="padding:14px 22px 0"]{padding:10px 12px 0!important}
  .stats-grid,.sa-stat-grid,.sa-detail-grid,.form-row,.sa-form-row,.meta-grid,.cp-grid{grid-template-columns:1fr!important}
  div[style*="grid-template-columns:3fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns:repeat(4,1fr)"]{grid-template-columns:1fr!important}
  .modal,.sa-modal{width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)}
  .search-global{display:none}
  .login-card{width:calc(100vw - 40px);padding:26px}
  .table-toolbar{gap:6px}
  .board-wrap{-webkit-overflow-scrolling:touch}
}

/* ============================================================
   MODERNIZATION LAYER — design system refresh
   Additive overrides only; base rules above are untouched.
   ============================================================ */

/* Layered, softer elevation (replaces the flat 1px shadow) */
:root{--shadow:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.06)}
[data-theme="dark"]{--shadow:0 1px 2px rgba(0,0,0,.4),0 1px 4px rgba(0,0,0,.35)}

/* Typography rhythm */
.section-title{font-size:13px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.kpi-value{letter-spacing:-.02em}
::selection{background:var(--accent-light);color:var(--accent-text)}

/* Premium login screen */
#login-screen{background:radial-gradient(900px 480px at 15% -8%,var(--accent-light) 0%,transparent 60%),radial-gradient(700px 420px at 110% 110%,var(--accent-light) 0%,transparent 55%),var(--bg)}
.login-card{border-radius:20px;box-shadow:0 1px 3px rgba(16,24,40,.06),0 16px 48px rgba(16,24,40,.12)}
[data-theme="dark"] .login-card{box-shadow:0 1px 3px rgba(0,0,0,.5),0 16px 48px rgba(0,0,0,.55)}

/* Softer card borders + calm hover */
.table-card,.kpi-card,.stat-card,.followup-card,.cp-hero,.cp-section{border-color:var(--border)}
.content{scroll-behavior:smooth}

/* Accessibility: visible focus for keyboard users only */
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}
.form-input:focus-visible,.fg input:focus-visible,.fg select:focus-visible,.fg textarea:focus-visible,.comment-textarea:focus-visible{outline:none}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .content{scroll-behavior:auto}
}

/* kbd hints */
.tf-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:5px;border:1px solid var(--border2);background:var(--bg3);color:var(--text3);font-size:10px;font-family:'Geist Mono',monospace;line-height:1}

/* ===== COLLAPSIBLE SIDEBAR (icon-only) ===== */
#sidebar{transition:width .18s ease}
#sidebar-collapse-btn{margin-left:auto;border:none;background:none;color:var(--text3);cursor:pointer;padding:4px;border-radius:6px;display:flex;flex-shrink:0}
#sidebar-collapse-btn:hover{background:var(--bg3);color:var(--text)}
.nav-btn{white-space:nowrap}
#sidebar.collapsed{width:64px;min-width:64px}
#sidebar.collapsed .sidebar-logo-text,#sidebar.collapsed .nav-badge,#sidebar.collapsed .user-info,#sidebar.collapsed .logout-btn{display:none}
/* !important needed: applyRoleUI() sets an inline display on #admin-section */
#sidebar.collapsed .nav-section{display:none!important}
/* Nav labels are bare text nodes inside the buttons, so hide them by
   zeroing the font; the SVG icons keep their CSS-defined size. */
#sidebar.collapsed .nav-btn{font-size:0;gap:0;justify-content:center;padding:10px 0}
#sidebar.collapsed .nav-btn svg{width:17px;height:17px}
#sidebar.collapsed .sidebar-logo{justify-content:center;padding:16px 8px}
#sidebar.collapsed #sidebar-collapse-btn{margin:0}
#sidebar.collapsed .user-row{justify-content:center;padding:8px 0}
@media (max-width:768px){
  #sidebar.collapsed{width:230px;min-width:230px}
  #sidebar.collapsed .sidebar-logo-text,#sidebar.collapsed .user-info{display:block}
  #sidebar.collapsed .nav-section{display:block!important}
  #sidebar.collapsed .nav-badge,#sidebar.collapsed .logout-btn{display:inline-flex}
  #sidebar.collapsed .nav-btn{font-size:13px;gap:9px;justify-content:flex-start;padding:7px 8px}
  #sidebar-collapse-btn{display:none}
}

/* ===== DENSITY MODES ===== */
[data-density="compact"] body,[data-density="compact"]{font-size:13px}
[data-density="compact"] .content{padding:14px}
[data-density="compact"] td{padding:6px 12px}
[data-density="compact"] thead th{padding:7px 12px}
[data-density="compact"] .kpi-card{padding:10px 12px}
[data-density="compact"] .kpi-value{font-size:20px}
[data-density="compact"] .nav-btn{padding:5px 8px}
[data-density="compact"] .stats-grid{gap:8px}
[data-density="compact"] .followup-card{padding:10px 12px}

/* ===== COMMAND PALETTE (Ctrl+K) ===== */
#tf-cmdk{display:none;position:fixed;inset:0;z-index:600;background:rgba(15,17,23,.45);backdrop-filter:blur(3px);align-items:flex-start;justify-content:center;padding-top:12vh}
#tf-cmdk.open{display:flex}
.tf-cmdk-panel{width:580px;max-width:calc(100vw - 32px);background:var(--bg2);border:1px solid var(--border);border-radius:14px;box-shadow:0 24px 70px rgba(16,24,40,.28);overflow:hidden;animation:tfCmdIn .14s ease}
@keyframes tfCmdIn{from{opacity:0;transform:translateY(-8px) scale(.985)}to{opacity:1;transform:none}}
.tf-cmdk-inputwrap{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border)}
.tf-cmdk-inputwrap svg{color:var(--text3);flex-shrink:0}
#tf-cmdk-input{flex:1;border:none;background:none;font-size:15px;color:var(--text);outline:none;font-family:var(--font)}
#tf-cmdk-input::placeholder{color:var(--text3)}
#tf-cmdk-results{max-height:46vh;overflow-y:auto;padding:6px}
.tf-cmdk-section{font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.07em;padding:8px 10px 4px}
.tf-cmdk-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;cursor:pointer;font-size:13px;color:var(--text)}
.tf-cmdk-item .tf-cmdk-sub{font-size:11px;color:var(--text3);margin-left:auto;white-space:nowrap}
.tf-cmdk-item.active{background:var(--accent-light);color:var(--accent-text)}
.tf-cmdk-item.active .tf-cmdk-sub{color:var(--accent-text);opacity:.75}
.tf-cmdk-icon{width:26px;height:26px;border-radius:7px;background:var(--bg3);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px}
.tf-cmdk-item.active .tf-cmdk-icon{background:rgba(255,255,255,.5)}
[data-theme="dark"] .tf-cmdk-item.active .tf-cmdk-icon{background:rgba(255,255,255,.08)}
.tf-cmdk-empty{padding:24px;text-align:center;font-size:13px;color:var(--text3)}
.tf-cmdk-foot{display:flex;gap:14px;align-items:center;padding:9px 14px;border-top:1px solid var(--border);background:var(--bg3);font-size:11px;color:var(--text3)}
.tf-cmdk-foot span{display:flex;gap:5px;align-items:center}

/* ============================================================
   THEME V2 — complete visual overhaul.
   Final cascade layer: redefines the design tokens and restyles
   every major surface. No markup or logic is touched; removing
   this block restores the previous look entirely.
   ============================================================ */

/* --- New palette: warm neutrals, hairline borders, refined indigo accent --- */
:root{
  --bg:#f7f7f8;--bg2:#ffffff;--bg3:#f1f1f3;--bg4:#e8e8ec;
  --border:#e9e9ee;--border2:#d8d8e0;
  --text:#17181c;--text2:#5f606b;--text3:#9d9ea8;
  --accent:#5865f2;--accent-light:#eef0fe;--accent-text:#4552d9;
  --radius:10px;--radius-lg:14px;--radius-xl:18px;
  --shadow:0 1px 2px rgba(23,24,28,.04),0 1px 3px rgba(23,24,28,.05);
}
[data-theme="dark"]{
  --bg:#0e0f12;--bg2:#15161a;--bg3:#1b1c21;--bg4:#232429;
  --border:#26272e;--border2:#34353d;
  --text:#ececee;--text2:#a4a5af;--text3:#6e6f7a;
  --accent:#6c78f5;--accent-light:#232645;--accent-text:#98a2ff;
  --shadow:0 1px 2px rgba(0,0,0,.45),0 1px 4px rgba(0,0,0,.35);
}

body{line-height:1.55;-webkit-font-smoothing:antialiased}

/* --- Sidebar: calm, borderless-feeling rail --- */
#sidebar{background:transparent}
.sidebar-logo{border-bottom:none;padding:18px 14px 8px;min-height:0}
.sidebar-logo-icon{border-radius:9px}
.nav-btn{border-radius:8px;padding:7px 10px;font-weight:500}
.nav-btn.active{font-weight:600}
.nav-section{padding:12px 10px 5px}
.sidebar-user{border-top:1px solid var(--border)}

/* --- Page header: airy, borderless --- */
div[style*="padding:14px 22px 0"]{background:transparent!important;border-bottom:none!important}
@media (min-width:769px){
  div[style*="padding:14px 22px 0"]{padding:20px 26px 0!important}
  .content{padding:6px 26px 26px}
}
#page-title{font-size:22px!important;letter-spacing:-.02em}
#page-subtitle{margin-top:2px!important}
#page-subtitle:has(.tf-dashboard-local-time){display:flex;align-items:center;gap:9px;flex-wrap:wrap}.tf-dashboard-local-time{display:inline-flex;align-items:center;font-size:10.5px;font-weight:600;color:var(--accent-text);background:var(--accent-light);border:1px solid color-mix(in srgb,var(--brand),transparent 75%);border-radius:999px;padding:3px 8px;font-variant-numeric:tabular-nums}

/* --- Buttons: flat, confident, softly elevated primary --- */
.btn{padding:7px 14px;border-radius:9px;font-size:12.5px;gap:6px}
.btn-primary{box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 2px rgba(23,24,28,.18)}
.btn-primary:hover{opacity:1;filter:brightness(1.07);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 3px 10px rgba(88,101,242,.35)}
.btn-ghost{background:var(--bg2);border:1px solid var(--border)}
.btn-ghost:hover{background:var(--bg3);border-color:var(--border2)}
.btn-login{border-radius:11px;padding:11px;font-weight:600}

/* --- Inputs: rounder, calmer focus --- */
.form-input,.fg input,.fg select,.fg textarea,.comment-textarea,.search-box{border-radius:9px;border-color:var(--border)}
.form-input:focus,.fg input:focus,.fg select:focus,.fg textarea:focus,.comment-textarea:focus,.search-box:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.search-global input{border-radius:9px;background:var(--bg3);border-color:transparent}
.search-global input:focus{background:var(--bg2);border-color:var(--accent)}

/* --- Cards & tables: hairline borders, generous padding --- */
.table-card,.stat-card,.followup-card,.cp-section,.cp-hero{border-radius:var(--radius-lg)}
thead th{background:transparent;font-size:10.5px;padding:10px 16px}
td{padding:12px 16px}
.table-toolbar{padding:12px 16px}

/* --- KPI cards: clean, no colored strips, bigger numbers --- */
.kpi-card{padding:18px;border-radius:var(--radius-lg)}
.kpi-card::before{display:none}
.kpi-value{font-size:26px;letter-spacing:-.03em}
.kpi-label{margin-bottom:8px}

/* --- Kanban: softer columns, rounder cards --- */
.col{border-radius:var(--radius-lg)}
.task-card{border-radius:10px;padding:12px}
.add-card-btn{border-radius:9px}

/* --- Modals & overlays: glass backdrop, larger radius --- */
#modal-overlay,.sa-modal-overlay,#panel-overlay{backdrop-filter:blur(4px)}
.modal{border-radius:var(--radius-xl)}
#task-panel{box-shadow:0 30px 90px rgba(15,23,42,.28)}
.notif-panel,.search-results{border-radius:var(--radius-lg)}

/* --- Toast: pill with depth --- */
#toast{border-radius:12px;padding:11px 18px;font-size:12.5px;box-shadow:0 8px 30px rgba(23,24,28,.25)}

/* --- Login: bigger, calmer card --- */
.login-card{width:400px;padding:40px;border-radius:22px}
.login-logo-icon{border-radius:11px}

/* --- Avatars: subtle ring --- */
.avatar{box-shadow:inset 0 0 0 1px rgba(23,24,28,.05)}
[data-theme="dark"] .avatar{box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}

/* --- Pills / tags / chips: consistent rounding --- */
.chip{border-radius:8px}
.stage-pill{border-radius:8px}

/* --- Settings tabs --- */
.stab{padding:8px 14px;font-size:12.5px}

/* --- Dashboard section titles breathe more --- */
.section-head{margin-bottom:14px}

/* --- Dates and status pills never wrap mid-value --- */
td:last-child{white-space:nowrap}

/* ============================================================
   THEME V3 — NEUMORPHIC SOFT UI
   Raised white surfaces on a cool gray-blue base, dual-direction
   shadows, inset inputs, gradient pill buttons. Final cascade
   layer; delete this block to fall back to Theme V2.
   ============================================================ */
:root{
  --bg:#e9edf4;--bg2:#f7f9fd;--bg3:#eef1f8;--bg4:#e2e7f0;
  --border:rgba(255,255,255,.65);--border2:#cfd7e6;
  --radius:14px;--radius-lg:20px;--radius-xl:24px;
  --neu-out:7px 7px 18px rgba(163,177,203,.42),-6px -6px 14px rgba(255,255,255,.92);
  --neu-out-sm:3px 3px 8px rgba(163,177,203,.35),-3px -3px 7px rgba(255,255,255,.85);
  --neu-in:inset 2px 2px 6px rgba(163,177,203,.4),inset -2px -2px 6px rgba(255,255,255,.9);
  --shadow:var(--neu-out-sm);
}
[data-theme="dark"]{
  --bg:#171a21;--bg2:#1e222c;--bg3:#232834;--bg4:#2a303d;
  --border:rgba(255,255,255,.05);--border2:#39404f;
  --neu-out:7px 7px 18px rgba(0,0,0,.5),-5px -5px 12px rgba(255,255,255,.03);
  --neu-out-sm:3px 3px 8px rgba(0,0,0,.45),-2px -2px 6px rgba(255,255,255,.03);
  --neu-in:inset 2px 2px 6px rgba(0,0,0,.5),inset -2px -2px 5px rgba(255,255,255,.03);
  --shadow:var(--neu-out-sm);
}

/* --- Raised surfaces --- */
.table-card,.kpi-card,.stat-card,.followup-card,.cp-hero,.cp-section,.login-card,.modal,.notif-panel,.search-results,.tf-cmdk-panel,.quick-action-btn{
  border:1px solid var(--border);box-shadow:var(--neu-out)
}
.kpi-card:hover,.table-card:hover{box-shadow:9px 9px 22px rgba(163,177,203,.5),-7px -7px 16px rgba(255,255,255,.95);border-color:var(--border)}
[data-theme="dark"] .kpi-card:hover,[data-theme="dark"] .table-card:hover{box-shadow:9px 9px 22px rgba(0,0,0,.6),-6px -6px 14px rgba(255,255,255,.04)}
.login-card{border-radius:28px}
.modal,.tf-cmdk-panel{border-radius:var(--radius-xl)}

/* --- Gradient pill primary buttons --- */
.btn{border-radius:12px}
.btn-primary,.btn-login{
  background:var(--brand);
  background:linear-gradient(135deg,color-mix(in srgb,var(--brand),#fff 14%),color-mix(in srgb,var(--brand),#000 12%));
  box-shadow:0 6px 16px color-mix(in srgb,var(--brand),transparent 62%),inset 0 1px 0 rgba(255,255,255,.25)
}
.btn-primary:hover,.btn-login:hover{filter:brightness(1.06);box-shadow:0 8px 22px color-mix(in srgb,var(--brand),transparent 52%),inset 0 1px 0 rgba(255,255,255,.25)}
.btn-login{border-radius:999px;padding:12px}
.btn-ghost{background:var(--bg2);border:1px solid var(--border);box-shadow:var(--neu-out-sm)}
.btn-ghost:hover{background:var(--bg2);box-shadow:var(--neu-out);color:var(--text)}
.btn:active{transform:translateY(1px);box-shadow:var(--neu-in)}

/* --- Inset inputs (soft carved wells) --- */
.form-input,.fg input,.fg select,.fg textarea,.comment-textarea,.search-box,.search-global input{
  background:var(--bg3);border:1px solid transparent;box-shadow:var(--neu-in);border-radius:12px
}
.form-input:focus,.fg input:focus,.fg select:focus,.fg textarea:focus,.comment-textarea:focus,.search-box:focus,.search-global input:focus{
  background:var(--bg3);border-color:color-mix(in srgb,var(--brand),transparent 55%);box-shadow:var(--neu-in),0 0 0 3px color-mix(in srgb,var(--brand),transparent 85%)
}

/* --- Sidebar: raised pill for the active item --- */
.nav-btn{border-radius:12px}
.nav-btn.active{background:var(--bg2);box-shadow:var(--neu-out-sm);color:var(--accent-text)}
.nav-btn:hover:not(.active){background:var(--bg3)}
.accounting-nav-items{display:grid;gap:1px;margin:0 0 5px}.nav-accounting-item{padding-left:19px;font-size:12px}.nav-accounting-item svg{width:15px;height:15px}.nav-accounting-item.active{box-shadow:none;background:var(--accent-light)}
#sidebar.collapsed .accounting-nav-items{display:grid}#sidebar.collapsed .nav-accounting-item{padding:9px 0}
.sidebar-logo-icon,.login-logo-icon{box-shadow:0 4px 10px color-mix(in srgb,var(--brand),transparent 60%)}

/* --- Kanban: carved columns, floating cards --- */
.col{background:var(--bg4);box-shadow:var(--neu-in);border-radius:var(--radius-lg)}
.task-card{border:1px solid var(--border);box-shadow:var(--neu-out-sm);border-radius:14px}
.task-card:hover{box-shadow:var(--neu-out)}

/* --- Small raised details --- */
.avatar{box-shadow:var(--neu-out-sm)}
.nav-badge,.pill,.tag,.col-count{border-radius:999px}
.tf-kbd{box-shadow:var(--neu-out-sm);border-color:var(--border)}
.stage-pill,.chip{border-radius:999px}
.chip.active,.stage-pill.active{box-shadow:var(--neu-out-sm)}
#toast{border-radius:999px;padding:12px 22px}
.account-chip{border-radius:999px}

/* App rail: navigation is deliberately visual first, with an icon and
   concise label on every item. This keeps CRM and finance discoverable
   without turning the left edge into a dense text menu. */
:root{--sidebar:116px}
#sidebar{background:#f7fbfa;border-right:1px solid #dce9e6;transition:width .2s ease,min-width .2s ease}
.sidebar-logo{position:relative;min-height:auto;justify-content:center;padding:20px 12px 12px;border:0}
.sidebar-logo-icon{width:42px;height:42px;border-radius:13px;background:var(--bg2);color:var(--brand);box-shadow:0 5px 14px rgba(88,101,242,.2)}
.sidebar-logo-text{display:none}
#sidebar-collapse-btn{position:absolute;right:-12px;top:28px;display:grid;place-items:center;width:24px;height:24px;margin:0;padding:0;border:1px solid #d7e5e1;border-radius:50%;background:#fff;color:#5e6f6b;box-shadow:0 2px 6px rgba(28,57,50,.12);z-index:4}
#sidebar-collapse-btn:hover{background:#e4f5f0;color:#0f8878}
.sidebar-nav{padding:3px 7px 12px;display:flex;flex:1;flex-direction:column;align-items:stretch}
.sidebar-section-group{width:100%}
.sidebar-section-toggle{display:flex;align-items:center;justify-content:center;gap:2px;width:100%;padding:13px 0 7px;border:0;background:transparent;color:var(--text3);font:800 9px/1 inherit;letter-spacing:.1em;text-transform:uppercase;cursor:pointer}
.sidebar-section-toggle:hover{color:#0f8878}.sidebar-section-toggle svg{width:13px;height:13px;transition:transform .18s ease}.sidebar-section-toggle[aria-expanded="false"] svg{transform:rotate(-90deg)}
.sidebar-section-body{display:grid;gap:1px;overflow:hidden;max-height:0;opacity:0;transition:max-height .22s ease,opacity .16s ease}.sidebar-section-body.is-open{max-height:1400px;opacity:1}
.sidebar-subsection-label{padding:12px 0 5px;text-align:center;color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.nav-btn,.nav-accounting-item{position:relative;min-height:60px;padding:7px 4px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border-radius:10px;font-size:10.5px;font-weight:650;line-height:1.08;text-align:center;white-space:normal}
.nav-btn svg,.nav-accounting-item svg{width:20px;height:20px;stroke-width:1.9}
.nav-btn.active{background:#dff7f1;box-shadow:none;color:#0f8878}
.nav-btn:hover:not(.active){background:#eaf4f1;color:#176f65;transform:none}
.nav-badge{position:absolute;top:6px;right:6px;min-width:17px;padding:1px 4px;font-size:9px;line-height:1.35}
.accounting-nav-items{display:grid;gap:1px;margin:0}.nav-accounting-item{padding-left:4px;font-size:10px;min-height:57px}
.sidebar-secondary-nav{display:block;margin:4px 0 0;padding-top:8px;border-top:1px solid #dce9e6}
.sidebar-quick-access{display:block;border-bottom:1px solid #dce9e6;padding:0 0 8px;margin-bottom:2px}
.sidebar-quick-access-head{display:flex;align-items:center;justify-content:center;gap:5px;padding:2px 0 5px;color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.sidebar-quick-access-head button{display:grid;place-items:center;width:17px;height:17px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--text3);cursor:pointer}
.sidebar-quick-access-head button:hover{background:#e4f1ee;color:#0f8878}.sidebar-quick-access-head svg{width:12px;height:12px}
.quick-access-item{position:relative;min-height:57px!important;font-size:9px!important}.quick-access-item svg{width:21px!important;height:21px!important}.quick-access-item .nav-badge{display:none}
.sidebar-user{padding:10px 6px;border-top:1px solid #dce9e6;background:#f7fbfa}.user-row{display:grid;justify-items:center;gap:6px;padding:4px}.user-info{display:none}.logout-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:30px;padding:6px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text3);font:700 10px/1 inherit;cursor:pointer}.logout-btn svg{width:15px;height:15px}.logout-btn:hover{background:#fff1f1;border-color:#f3c9c9;color:var(--red-text)}.avatar{width:34px;height:34px;font-size:11px}
#sidebar.collapsed{width:54px;min-width:54px}#sidebar.collapsed .sidebar-logo{padding:16px 6px 10px}#sidebar.collapsed .sidebar-logo-icon{width:30px;height:30px;border-radius:9px;font-size:11px}#sidebar.collapsed #sidebar-collapse-btn{right:-12px;top:19px;transform:rotate(180deg)}#sidebar.collapsed .sidebar-nav{padding:3px 4px 8px}#sidebar.collapsed .sidebar-section-toggle,#sidebar.collapsed .sidebar-subsection-label{display:none!important}#sidebar.collapsed .sidebar-section-body{display:grid!important;max-height:1400px!important;opacity:1!important}#sidebar.collapsed .nav-btn,#sidebar.collapsed .nav-accounting-item{min-height:45px;padding:6px 0;font-size:0;gap:0;border-radius:8px}#sidebar.collapsed .nav-btn svg,#sidebar.collapsed .nav-accounting-item svg{width:18px;height:18px}#sidebar.collapsed .nav-badge{display:none}#sidebar.collapsed .sidebar-secondary-nav{margin-top:3px;padding-top:3px}#sidebar.collapsed .sidebar-user{padding:7px 4px}#sidebar.collapsed .avatar{display:none}#sidebar.collapsed .logout-btn{width:34px;min-height:32px;padding:0;border:1px solid #dce9e6;font-size:0}#sidebar.collapsed .logout-btn svg{width:16px;height:16px}#sidebar.collapsed .sidebar-quick-access{display:none}
@media (max-width:768px){#sidebar{width:116px}.sidebar-nav{padding-inline:6px}.nav-btn,.nav-accounting-item{min-height:56px;font-size:9px}.nav-btn svg,.nav-accounting-item svg{width:19px;height:19px}#sidebar-collapse-btn{display:none}}

/* CRM home: one operational surface, designed for starting and progressing
   customer work rather than reading a passive report. */
.crm-home-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;background:var(--bg2);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);margin-bottom:14px}
.crm-home-eyebrow,.crm-home-panel header span{display:block;font-size:10px;font-weight:800;letter-spacing:.09em;color:var(--accent-text);text-transform:uppercase}.crm-home-hero h2{margin:4px 0;font-size:24px;letter-spacing:0}.crm-home-hero p{margin:0;color:var(--text3);font-size:12px}.crm-home-hero-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.crm-home-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.crm-home-action{display:flex;align-items:center;gap:10px;padding:13px;border:1px solid var(--border);border-radius:13px;background:var(--bg2);color:var(--text);text-align:left;cursor:pointer;box-shadow:var(--shadow)}.crm-home-action:hover{border-color:#9bd7cd;background:#f5fcfa}.crm-home-action.primary{background:#e5f8f3;border-color:#abe4d8}.crm-home-action-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#d7f3ed;color:#087d70;font-size:18px;font-weight:800;flex:none}.crm-home-action strong,.crm-home-action small{display:block}.crm-home-action strong{font-size:12px}.crm-home-action small{font-size:10.5px;color:var(--text3);line-height:1.35;margin-top:2px}.crm-home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.crm-home-metric{min-height:105px;padding:15px 16px;border:1px solid var(--border);border-radius:13px;background:var(--bg2);box-shadow:var(--shadow);text-align:left;color:var(--text);cursor:pointer}.crm-home-metric:hover{border-color:#9bd7cd;transform:translateY(-1px)}.crm-home-metric span,.crm-home-metric small{display:block;color:var(--text3)}.crm-home-metric span{font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.crm-home-metric strong{display:block;font-size:28px;line-height:1.05;margin:8px 0 4px;letter-spacing:0}.crm-home-metric small{font-size:10.5px}.crm-home-metric.risk{background:#fff9f9;border-color:#f5d1d1}.crm-home-metric.risk strong{color:var(--red-text)}.crm-home-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:14px}.crm-home-panel{min-width:0;border:1px solid var(--border);background:var(--bg2);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.crm-home-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--border)}.crm-home-panel header h3{font-size:15px;margin:2px 0 0}.crm-home-panel header .btn{flex:none;padding:5px 8px;font-size:10.5px}.crm-home-work-list,.crm-home-followup-list,.crm-home-team-list,.crm-home-activity-list{padding:4px 12px 10px}.crm-home-work-row{display:grid;grid-template-columns:7px minmax(0,1fr) auto;gap:9px;align-items:center;width:100%;padding:10px 4px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);text-align:left;cursor:pointer}.crm-home-work-row:last-child{border-bottom:0}.crm-home-work-row:hover strong,.crm-home-followup-row:hover strong{color:#087d70}.crm-home-state{width:7px;height:7px;border-radius:50%;background:#94a3b8}.crm-home-state.late{background:var(--red)}.crm-home-state.today{background:var(--amber)}.crm-home-work-copy{min-width:0}.crm-home-work-copy strong,.crm-home-work-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-home-work-copy strong{font-size:12px}.crm-home-work-copy small,.crm-home-work-date{font-size:10.5px;color:var(--text3);margin-top:2px}.crm-home-work-date{white-space:nowrap}.crm-home-work-date.late{color:var(--red-text);font-weight:700}.crm-home-work-date.today{color:var(--amber-text);font-weight:700}.crm-home-stage-list{padding:11px 16px}.crm-home-stage-row{display:grid;grid-template-columns:116px minmax(0,1fr) 20px;align-items:center;gap:9px;width:100%;padding:7px 0;border:0;background:transparent;color:var(--text);font-size:11px;text-align:left;cursor:pointer}.crm-home-stage-row:hover{color:#087d70}.crm-home-stage-row>div{height:7px;border-radius:99px;background:#edf2f3;overflow:hidden}.crm-home-stage-row i{display:block;height:100%;border-radius:inherit;background:#10a294}.crm-home-stage-row b{font-size:11px;text-align:right}.crm-home-followup-row{display:flex;gap:10px;align-items:center;width:100%;padding:9px 4px;border:0;border-bottom:1px solid var(--border);background:transparent;text-align:left;color:var(--text);cursor:pointer}.crm-home-followup-row:last-child{border-bottom:0}.crm-home-followup-dot{width:7px;height:29px;border-radius:8px;background:#64c8ba;flex:none}.crm-home-followup-dot.high{background:var(--red)}.crm-home-followup-dot.medium{background:var(--amber)}.crm-home-followup-row strong,.crm-home-followup-row small{display:block}.crm-home-followup-row strong{font-size:12px}.crm-home-followup-row small{font-size:10.5px;color:var(--text3);margin-top:2px}.crm-home-sources{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px}.crm-home-sources button{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--border);border-radius:10px;background:var(--bg);padding:10px;color:var(--text);font-size:11px;text-align:left;cursor:pointer}.crm-home-sources button:hover{border-color:#9bd7cd;background:#f5fcfa}.crm-home-sources b{font-size:14px;color:#087d70}.crm-home-team{grid-column:1}.crm-home-team-list>button{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:9px 4px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);text-align:left;cursor:pointer}.crm-home-team-list>button:last-child{border-bottom:0}.crm-home-team-list strong,.crm-home-team-list small{display:block}.crm-home-team-list strong{font-size:12px}.crm-home-team-list small{font-size:10.5px;color:var(--text3);margin-top:1px}.crm-home-team-list b{font-size:12px;color:#087d70}.crm-home-avatar{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e4f4f0;color:#087d70;font-size:10px;font-weight:800}.crm-home-activity{grid-column:2}.crm-home-activity-list>div{display:grid;grid-template-columns:6px minmax(0,1fr) auto;gap:8px;align-items:start;padding:9px 4px;border-bottom:1px solid var(--border)}.crm-home-activity-list>div:last-child{border-bottom:0}.crm-home-activity-list i{width:6px;height:6px;border-radius:50%;background:#10a294;margin-top:5px}.crm-home-activity-list span{font-size:11px;color:var(--text2);line-height:1.4}.crm-home-activity-list small{font-size:9.5px;color:var(--text3);white-space:nowrap}.crm-home-empty{padding:22px 16px;text-align:center;color:var(--text3)}.crm-home-empty strong,.crm-home-empty span{display:block}.crm-home-empty strong{font-size:12px;color:var(--text2)}.crm-home-empty span{font-size:10.5px;line-height:1.45;margin:4px auto 0;max-width:260px}.quick-access-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quick-access-choice{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--bg);font-size:12px;color:var(--text2);cursor:pointer}.quick-access-choice:has(input:checked){border-color:#10a294;background:#e7f8f4;color:#087d70;font-weight:700}.quick-access-choice input{accent-color:#10a294}.quick-access-choice-icon{display:grid;place-items:center;width:24px;height:24px;color:#087d70}.quick-access-choice-icon svg{width:20px;height:20px}
@media(max-width:1100px){.crm-home-actions,.crm-home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-home-grid{grid-template-columns:1fr}.crm-home-team,.crm-home-activity{grid-column:auto}}
@media(max-width:720px){.crm-home-hero{align-items:flex-start;flex-direction:column}.crm-home-hero-actions{justify-content:flex-start}.crm-home-actions,.crm-home-metrics,.quick-access-picker{grid-template-columns:1fr}.crm-home-stage-row{grid-template-columns:92px minmax(0,1fr) 20px}.crm-home-work-row{grid-template-columns:7px minmax(0,1fr)}.crm-home-work-date{grid-column:2}.crm-home-activity-list>div{grid-template-columns:6px minmax(0,1fr)}.crm-home-activity-list small{grid-column:2}}

/* Accounting home uses the same command-center grammar as CRM, while keeping
   sales, purchasing, banking, and control actions visibly separate. */
.acct-home-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border:1px solid var(--border);border-radius:16px;background:var(--bg2);box-shadow:var(--shadow);margin-bottom:14px}.acct-home-hero>div:first-child>span,.acct-home-transactions header span,.acct-home-insights span{display:block;font-size:10px;font-weight:850;letter-spacing:.09em;color:var(--accent-text);text-transform:uppercase}.acct-home-hero h2{font-size:30px;line-height:1;margin:7px 0;letter-spacing:0}.acct-home-hero p{margin:0;color:var(--text3);font-size:12px;max-width:650px}.acct-home-hero>div:last-child{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.acct-home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.acct-home-metrics>button{min-height:108px;padding:15px 16px;border:1px solid var(--border);border-radius:13px;background:var(--bg2);box-shadow:var(--shadow);text-align:left;color:var(--text);cursor:pointer}.acct-home-metrics>button:hover{border-color:#a9d9d0;transform:translateY(-1px)}.acct-home-metrics span,.acct-home-metrics small{display:block;color:var(--text3)}.acct-home-metrics span{font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.acct-home-metrics strong{display:block;font-size:24px;line-height:1.1;margin:9px 0 4px;letter-spacing:0}.acct-home-metrics small{font-size:10.5px}.acct-home-metrics .warn{background:#fffafa;border-color:#f1d1d1}.acct-home-metrics .warn strong{color:var(--red-text)}.acct-home-transactions{border:1px solid var(--border);border-radius:14px;background:var(--bg2);box-shadow:var(--shadow);overflow:hidden;margin-bottom:14px}.acct-home-transactions header{padding:15px 17px;border-bottom:1px solid var(--border)}.acct-home-transactions h3{margin:2px 0 0;font-size:15px}.acct-home-action-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:var(--border)}.acct-home-action{display:flex;align-items:center;gap:10px;min-height:112px;padding:14px;background:var(--bg2)}.acct-home-action-icon{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:#dff7f1;color:#087d70;font-size:15px;font-weight:850}.acct-home-action>div{min-width:0}.acct-home-action strong{display:block;font-size:12px;margin-bottom:6px}.acct-home-action>div>div{display:flex;gap:5px;flex-wrap:wrap}.acct-home-action .btn{padding:4px 7px;font-size:10px;border-radius:7px;box-shadow:none}.acct-home-insights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.acct-home-insights article{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:15px;border:1px solid var(--border);border-radius:13px;background:var(--bg2);box-shadow:var(--shadow)}.acct-home-insights strong,.acct-home-insights small{display:block}.acct-home-insights strong{font-size:13px;margin:5px 0}.acct-home-insights small{font-size:10.5px;line-height:1.45;color:var(--text3)}.acct-home-insights .btn{padding:5px 7px;font-size:10px;flex:none;box-shadow:none}@media(max-width:1200px){.acct-home-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.acct-home-metrics,.acct-home-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.acct-home-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.acct-home-hero{align-items:flex-start;flex-direction:column}.acct-home-hero>div:last-child{justify-content:flex-start}.acct-home-metrics,.acct-home-insights,.acct-home-action-grid{grid-template-columns:1fr}.acct-home-action{min-height:92px}}

/* --- Tables inside raised cards need no double frame --- */
thead th{background:transparent}
tbody tr:hover{background:var(--bg3)}
.table-toolbar{border-bottom:1px solid var(--bg4)}
tbody tr{border-bottom:1px solid var(--bg3)}
thead th{border-bottom:1px solid var(--bg4)}

/* --- Login screen: soft vignette --- */
#login-screen{background:radial-gradient(1100px 600px at 50% -10%,#f2f5fb 0%,transparent 60%),var(--bg)}
[data-theme="dark"] #login-screen{background:radial-gradient(1100px 600px at 50% -10%,#1d2129 0%,transparent 60%),var(--bg)}

/* --- Command palette on the soft base --- */
#tf-cmdk{background:rgba(163,177,203,.3);backdrop-filter:blur(5px)}
[data-theme="dark"] #tf-cmdk{background:rgba(0,0,0,.5)}

/* --- Scrollbar --- */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:999px}

/* --- Readable line length on wide monitors: center content --- */
.page{max-width:1400px;margin:0 auto}
div[style*="padding:14px 22px 0"]>div{max-width:1400px;margin-left:auto;margin-right:auto}

/* ===== IMAGE ADJUSTER (avatar/banner crop) ===== */
#tf-crop{display:none;position:fixed;inset:0;z-index:650;background:rgba(15,17,23,.5);backdrop-filter:blur(4px);align-items:center;justify-content:center}
#tf-crop.open{display:flex}
.tf-crop-panel{background:var(--bg2);border:1px solid var(--border);border-radius:20px;padding:20px;box-shadow:var(--neu-out);width:560px;max-width:calc(100vw - 32px)}
#tf-crop-stage{position:relative;display:flex;justify-content:center;overflow:hidden;border-radius:12px;background:var(--bg4)}
#tf-crop-canvas{display:block;max-width:100%;cursor:grab;touch-action:none}
#tf-crop-canvas:active{cursor:grabbing}
#tf-crop-ring{position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 999px rgba(20,22,30,.45);pointer-events:none}

/* ===== TINTED KPI CARDS (reference-style soft fills) ===== */
.kpi-blue{background:linear-gradient(135deg,#eef1fd,#f8faff)}
.kpi-teal{background:linear-gradient(135deg,#e9f7f5,#f6fcfb)}
.kpi-amber{background:linear-gradient(135deg,#fdf4e7,#fffaf2)}
.kpi-red{background:linear-gradient(135deg,#fdecec,#fff7f7)}
.kpi-green{background:linear-gradient(135deg,#eaf7ee,#f6fcf8)}
.kpi-purple{background:linear-gradient(135deg,#f3effd,#faf8ff)}
[data-theme="dark"] .kpi-blue{background:linear-gradient(135deg,#1c2033,#171a24)}
[data-theme="dark"] .kpi-teal{background:linear-gradient(135deg,#14262a,#141d20)}
[data-theme="dark"] .kpi-amber{background:linear-gradient(135deg,#2a2115,#1f1a13)}
[data-theme="dark"] .kpi-red{background:linear-gradient(135deg,#2a1717,#1f1414)}
[data-theme="dark"] .kpi-green{background:linear-gradient(135deg,#16251b,#141d17)}
[data-theme="dark"] .kpi-purple{background:linear-gradient(135deg,#221a33,#1a1626)}

/* ===== ORGANIZATION CHART ===== */
.tf-org-card{display:inline-flex;align-items:center;gap:10px;padding:9px 14px 9px 10px;background:var(--bg2);border:1px solid var(--border);border-radius:12px;box-shadow:var(--neu-out-sm);max-width:280px}
.tf-org-card.me{outline:2px solid var(--brand);outline-offset:1px}
.tf-org-children{margin:8px 0 4px 16px;padding-left:18px;border-left:2px solid var(--border2);display:flex;flex-direction:column;gap:8px}
.org-page{display:flex;flex-direction:column;gap:16px}
.org-hero{border-radius:20px;overflow:hidden;box-shadow:var(--neu-out);background:var(--bg3)}
.org-hero-img{aspect-ratio:7/1;background-position:center;background-size:cover}
.org-nav{position:sticky;top:0;z-index:20;display:flex;gap:8px;align-items:center;overflow-x:auto;padding:10px;background:rgba(247,248,250,.88);backdrop-filter:blur(14px);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}
[data-theme="dark"] .org-nav{background:rgba(15,17,23,.88)}
.org-nav a{white-space:nowrap;text-decoration:none;color:var(--text2);font-size:12px;font-weight:500;padding:7px 11px;border-radius:999px;border:1px solid transparent}
.org-nav a:hover{background:var(--bg3);color:var(--text)}
.org-nav a.primary{background:var(--brand);color:#fff;box-shadow:var(--neu-out-sm)}
.org-grid{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(420px,1.15fr);gap:16px;align-items:start}
.org-section{scroll-margin-top:76px}
.org-card{background:var(--bg2);border:1px solid var(--border);border-radius:18px;box-shadow:var(--neu-out-sm)}
.org-card-pad{padding:20px}
.org-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.org-section-title{font-size:15px;font-weight:700;color:var(--text)}
.org-section-sub{font-size:12px;color:var(--text3);margin-top:3px}
.org-metrics{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px}
.org-metric{background:var(--bg3);border:1px solid var(--border);border-radius:14px;padding:12px 14px}
.org-metric-label{font-size:11px;color:var(--text3);margin-bottom:4px}
.org-metric-value{font-size:22px;font-weight:700;color:var(--text);line-height:1}
.org-actions-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.org-empty{font-size:12px;color:var(--text3);padding:12px;background:var(--bg3);border-radius:12px}
.config-nav{position:sticky;top:0;z-index:18;display:flex;gap:8px;align-items:center;overflow-x:auto;padding:10px;background:rgba(247,248,250,.9);backdrop-filter:blur(14px);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}
[data-theme="dark"] .config-nav{background:rgba(15,17,23,.9)}
.config-nav a{white-space:nowrap;text-decoration:none;color:var(--text2);font-size:12px;font-weight:600;padding:7px 11px;border-radius:999px;border:1px solid transparent}
.config-nav a:hover{background:var(--bg3);color:var(--text)}
.config-nav a.primary{background:var(--brand);color:#fff;box-shadow:var(--neu-out-sm)}
.config-category{scroll-margin-top:84px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:6px 0 -4px}
.config-category-title{font-size:18px;font-weight:750;color:var(--text)}
.config-category-sub{font-size:12px;color:var(--text3);margin-top:2px}
.config-two-col{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px;align-items:start}
.config-list-row{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}
.config-list-row:last-child{border-bottom:0}
.template-kind-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px;margin-bottom:12px}
.template-kind-card{border:1px solid var(--border);background:var(--bg3);color:var(--text);border-radius:14px;padding:12px;text-align:left;cursor:pointer;display:grid;gap:6px;min-height:112px}
.template-kind-card:disabled{cursor:default;opacity:.72}
.template-kind-card svg{width:18px;height:18px;color:var(--accent-text)}
.template-kind-card strong{font-size:12.5px}
.template-kind-card small{font-size:10.5px;line-height:1.35;color:var(--text3)}
.template-kind-card.active{background:var(--accent-light);border-color:color-mix(in srgb,var(--brand),transparent 45%);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand),transparent 86%)}
.template-required-basics{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:11px 12px;margin-bottom:12px}
.template-required-basics strong{font-size:11.5px;color:var(--text)}
.template-required-basics span,.template-chip-row{display:flex;gap:6px;flex-wrap:wrap}
.template-required-basics em{font-style:normal;font-size:10px;font-weight:750;color:var(--green-text);background:var(--green-bg);border-radius:999px;padding:3px 7px}
.tpl-builder-shell{display:grid;grid-template-columns:250px minmax(440px,1.35fr) minmax(320px,.9fr);gap:14px;align-items:start}
.tpl-builder-card{border:1px solid var(--border);background:var(--bg3);border-radius:16px;padding:14px;box-shadow:var(--shadow);min-width:0}
.tpl-builder-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.tpl-builder-head strong{font-size:13px;color:var(--text)}
.tpl-builder-head span{font-size:11px;color:var(--text3)}
.tpl-tab-chip-row{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}
.tpl-tab-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--bg2);border-radius:999px;padding:6px 8px 6px 10px;font-size:11.5px;font-weight:700;color:var(--text2)}
.tpl-tab-chip button{border:0;background:var(--bg3);color:var(--text3);border-radius:50%;width:18px;height:18px;line-height:18px;display:grid;place-items:center;cursor:pointer}
.tpl-tab-chip button:hover{background:var(--red-bg);color:var(--red-text)}
.tpl-tab-add-row{display:flex;gap:8px}
.tpl-tab-add-row input{min-width:0}
.tpl-field-table{border:1px solid var(--border);border-radius:14px;overflow:auto;background:var(--bg2)}
.tpl-field-row{display:grid;grid-template-columns:110px 120px minmax(150px,1fr) 120px 95px 125px;gap:10px;align-items:center;width:100%;border:0;border-bottom:1px solid var(--border);background:transparent;text-align:left;padding:10px 12px;color:var(--text);font:inherit;font-size:12px;cursor:pointer}
.tpl-field-row:last-child{border-bottom:0}
.tpl-field-row:hover,.tpl-field-row.active{background:var(--accent-light)}
.tpl-field-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tpl-field-header{position:sticky;top:0;background:var(--bg3);font-size:10px;font-weight:850;text-transform:uppercase;color:var(--text3);cursor:default;z-index:1}
.tpl-table-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.tpl-empty-fields{border:1px dashed var(--border2);border-radius:12px;padding:18px;color:var(--text3);font-size:12px;background:var(--bg2)}
.tpl-properties-card{display:grid;gap:12px}
.tpl-scan-toggle{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--text2)}
.tpl-scan-toggle input{width:16px;height:16px}
.template-library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px}
.template-type-section{border:1px solid var(--border);background:var(--bg3);border-radius:16px;padding:14px;display:grid;gap:10px;align-content:start}
.template-type-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.template-type-head>div{display:grid;grid-template-columns:auto 1fr;gap:4px 8px}
.template-type-head svg{width:18px;height:18px;color:var(--accent-text);grid-row:1/3}
.template-type-head strong{font-size:13px;color:var(--text)}
.template-type-head small{font-size:10.5px;color:var(--text3);line-height:1.35}
.template-standard-row,.template-list-card{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.template-standard-row strong,.template-list-title strong{font-size:12.5px;color:var(--text)}
.template-standard-row small,.template-list-card small{display:block;font-size:10.5px;color:var(--text3);margin-top:3px}
.template-list-card{align-items:flex-start}
.template-list-title{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.template-chip-row{margin-top:8px}
.template-list-card .org-actions-row{justify-content:flex-end}
@media(max-width:1200px){.tpl-builder-shell{grid-template-columns:1fr}.tpl-field-row{grid-template-columns:repeat(2,minmax(0,1fr))}.tpl-field-header{display:none}}
.tf-360-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:16px;align-items:start}
.tf-360-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.tf-360-tab{border:1px solid var(--border);background:var(--bg2);color:var(--text2);border-radius:999px;padding:6px 10px;font-size:11.5px;font-weight:600;cursor:pointer}
.tf-360-tab.active{background:var(--brand);border-color:var(--brand);color:#fff}
.tf-seg-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.tf-mini-panel{background:var(--bg3);border:1px solid var(--border);border-radius:14px;padding:12px}
.tf-mini-label{font-size:10.5px;color:var(--text3);margin-bottom:4px}
.tf-mini-value{font-size:13px;font-weight:700;color:var(--text)}
.tf-chat-box{height:260px;overflow-y:auto;background:var(--bg3);border:1px solid var(--border);border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:8px}
.tf-chat-msg{max-width:82%;padding:8px 10px;border-radius:12px;background:var(--bg2);border:1px solid var(--border);box-shadow:var(--shadow)}
.tf-chat-msg.mine{align-self:flex-end;background:var(--accent-light);border-color:color-mix(in srgb,var(--brand),transparent 65%)}
.tf-chat-meta{font-size:10px;color:var(--text3);margin-bottom:2px}
.tf-chat-unread-badge{display:none;min-width:18px;height:18px;border-radius:999px;background:var(--red);color:#fff;font-size:10px;font-weight:800;align-items:center;justify-content:center;padding:0 5px;margin-left:2px}
#modal-overlay.tf-chat-fullscreen{padding:0;background:var(--bg);backdrop-filter:none;z-index:11000}#modal-overlay.tf-chat-fullscreen .modal{width:100vw;height:100vh;max-height:none;border:0;border-radius:0;overflow:hidden;box-shadow:none}.tf-chat-shell{height:100vh;display:flex;flex-direction:column;background:var(--bg)}.tf-chat-header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:var(--bg2);border-bottom:1px solid var(--border)}.tf-chat-header>div:first-child{display:flex;align-items:baseline;gap:10px}.tf-chat-header span{font-size:10.5px;color:var(--text3)}.tf-chat-window-actions{display:flex;gap:5px}.tf-chat-window-actions button{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:var(--text2);font-size:20px;cursor:pointer}.tf-chat-window-actions button:hover{background:var(--bg3)}.tf-chat-body{flex:1;min-height:0;display:grid;grid-template-columns:240px 1fr}.tf-chat-sidebar{padding:18px 12px;background:var(--bg2);border-right:1px solid var(--border)}.tf-chat-sidebar>strong{font-size:11px;color:var(--text3);padding:0 10px}.tf-chat-sidebar button{display:flex;gap:10px;width:100%;border:0;background:transparent;color:var(--text);padding:11px;border-radius:10px;text-align:left;margin-top:8px;cursor:pointer}.tf-chat-sidebar button.active{background:var(--accent-light);color:var(--accent-text)}.tf-chat-sidebar button>span:first-child{font-size:18px}.tf-chat-sidebar button span{font-size:12px;font-weight:650}.tf-chat-sidebar button small{display:block;font-size:9.5px;color:var(--text3);font-weight:400;margin-top:2px}.tf-chat-main{min-width:0;display:flex;flex-direction:column;background:var(--bg)}.tf-chat-fullscreen .tf-chat-box{flex:1;height:auto;border:0;border-radius:0;background:var(--bg);padding:22px max(24px,calc((100vw - 1120px)/2));gap:12px}.tf-chat-row{display:flex;align-items:flex-start;gap:9px;max-width:760px}.tf-chat-row.mine{align-self:flex-end;flex-direction:row-reverse}.tf-chat-avatar{width:34px;height:34px;border-radius:50%;overflow:hidden;background:var(--accent-light);color:var(--accent-text);display:grid;place-items:center;font-size:10px;font-weight:750;flex:none}.tf-chat-avatar img{width:100%;height:100%;object-fit:cover}.tf-chat-message-wrap{max-width:min(650px,75vw)}.tf-chat-message-head{display:flex;align-items:center;gap:7px;margin:0 3px 4px}.tf-chat-row.mine .tf-chat-message-head{justify-content:flex-end}.tf-chat-message-head strong{font-size:11px}.tf-chat-message-head time{font-size:9.5px;color:var(--text3)}.tf-chat-message-head button{opacity:0;border:0;background:none;color:var(--red);font-size:9.5px;cursor:pointer}.tf-chat-row:hover .tf-chat-message-head button{opacity:1}.tf-chat-msg{max-width:none;padding:10px 12px}.tf-chat-msg.deleted{font-size:11px;color:var(--text3);box-shadow:none;background:var(--bg3);border-style:dashed}.tf-chat-text{font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}.tf-chat-mention{color:var(--accent-text);background:var(--accent-light);padding:1px 3px;border-radius:4px;font-weight:650}.tf-chat-media{display:block;max-width:min(460px,65vw);max-height:380px;border-radius:11px;object-fit:contain;cursor:zoom-in;margin-top:6px;background:#111}.tf-chat-empty{margin:auto;color:var(--text3);font-size:12px}.tf-chat-composer{padding:10px max(20px,calc((100vw - 1080px)/2)) 16px;background:var(--bg2);border-top:1px solid var(--border)}.tf-chat-tools{display:flex;gap:4px;position:relative}.tf-chat-tools>button{border:0;background:transparent;color:var(--text2);height:30px;min-width:30px;border-radius:7px;cursor:pointer;font-size:14px;font-weight:700}.tf-chat-tools>button:hover{background:var(--bg3)}.tf-chat-compose-row{display:flex;align-items:flex-end;gap:9px}.tf-chat-compose-row textarea{flex:1;resize:none;min-height:42px;max-height:120px;padding:11px 13px;border:1px solid var(--border2);border-radius:12px;background:var(--bg);color:var(--text);font:inherit;font-size:12px;outline:none}.tf-chat-compose-row textarea:focus{border-color:var(--brand)}.tf-chat-emoji-picker{display:none;position:absolute;bottom:36px;left:0;width:220px;padding:9px;background:var(--bg2);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);grid-template-columns:repeat(6,1fr);z-index:2}.tf-chat-emoji-picker.open{display:grid}.tf-chat-emoji-picker button{border:0;background:transparent;font-size:19px;padding:5px;border-radius:6px;cursor:pointer}.tf-chat-emoji-picker button:hover{background:var(--bg3)}.tf-chat-pending{display:flex;align-items:center;gap:9px;padding:8px max(20px,calc((100vw - 1080px)/2));background:var(--bg2)}.tf-chat-pending img{width:52px;height:42px;object-fit:cover;border-radius:8px}.tf-chat-pending span{font-size:10.5px;color:var(--text3)}.tf-chat-pending button{border:0;background:var(--bg3);border-radius:50%;cursor:pointer}.tf-chat-mini{position:fixed;right:22px;bottom:22px;z-index:9000;display:flex;align-items:center;gap:9px;border:1px solid var(--border);background:var(--bg2);color:var(--text);border-radius:999px;padding:10px 14px;box-shadow:0 12px 35px rgba(0,0,0,.2);cursor:pointer}.tf-chat-mini span{font-size:20px}.tf-chat-mini strong{font-size:11.5px}.tf-chat-mini small{display:none;width:19px;height:19px;place-items:center;background:var(--red);color:#fff;border-radius:50%;font-size:9px}
@media(max-width:700px){.tf-chat-body{grid-template-columns:1fr}.tf-chat-sidebar{display:none}.tf-chat-header{padding:0 14px}.tf-chat-fullscreen .tf-chat-box{padding:14px}.tf-chat-composer{padding:8px 12px 12px}.tf-chat-message-wrap{max-width:82vw}.tf-chat-media{max-width:72vw}}
.tf-mention-menu{position:fixed;z-index:7000;min-width:240px;max-width:min(360px,calc(100vw - 24px));max-height:260px;overflow:auto;background:var(--bg2);border:1px solid var(--border);border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.18);padding:6px}
.tf-mention-item{width:100%;display:flex;align-items:center;gap:9px;border:0;background:transparent;color:var(--text);text-align:left;border-radius:10px;padding:8px;cursor:pointer}
.tf-mention-item:hover,.tf-mention-item.active{background:var(--accent-light)}
.tf-mention-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:750;background:var(--brand);color:#fff;flex-shrink:0}
.tf-mention-name{display:block;font-size:12.5px;font-weight:750;color:var(--text);line-height:1.2}
.tf-mention-role{display:block;font-size:10.5px;color:var(--text3);margin-top:3px;line-height:1.2}
.tf-quality-list{display:grid;gap:8px}
.tf-quality-item{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}
.tf-quality-icon{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:11px}
.tf-quality-warn .tf-quality-icon{background:var(--amber-bg);color:var(--amber-text)}
.tf-quality-danger .tf-quality-icon{background:var(--red-bg);color:var(--red-text)}
.tf-quality-ok .tf-quality-icon{background:var(--green-bg);color:var(--green-text)}
.tf-report-click{cursor:pointer;position:relative}
.tf-report-click::after{content:'Report';position:absolute;right:14px;top:14px;font-size:10px;font-weight:700;color:var(--accent-text);background:var(--accent-light);border-radius:999px;padding:3px 8px;opacity:0;transform:translateY(-2px);transition:all .12s}
.tf-report-click:hover::after{opacity:1;transform:translateY(0)}
.report-config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.report-color-field{display:flex;align-items:center;gap:10px;background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:8px 10px}
.report-color-field input[type=color]{appearance:none;-webkit-appearance:none;width:42px;height:32px;border:1px solid var(--border2);border-radius:9px;background:transparent;padding:0;cursor:pointer;overflow:hidden;box-shadow:var(--shadow)}
.report-color-field input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.report-color-field input[type=color]::-webkit-color-swatch{border:0;border-radius:8px}
.report-color-hex{font-size:12px;font-family:'Geist Mono',monospace;color:var(--text2);min-width:72px}
.report-theme-preview{border:1px solid var(--border);border-radius:14px;background:var(--bg2);overflow:hidden;box-shadow:var(--shadow)}
.report-theme-preview-top{height:8px;display:grid;grid-template-columns:2fr 1fr 1fr}
.report-theme-preview-body{padding:12px 14px;display:grid;gap:8px}
.report-theme-preview-line{height:8px;border-radius:999px;background:var(--bg4)}
.theme-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.theme-preset-card{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:12px;box-shadow:var(--shadow);cursor:pointer;text-align:left;color:var(--text);transition:transform .12s,border-color .12s,box-shadow .12s}
.theme-preset-card:hover{transform:translateY(-1px);border-color:var(--border2);box-shadow:var(--neu-out-sm)}
.theme-preset-card.active{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand),transparent 84%)}
.theme-preset-swatches{display:flex;gap:5px;margin-bottom:10px}
.theme-preset-swatches span{height:24px;flex:1;border-radius:8px;border:1px solid rgba(0,0,0,.08)}
.theme-preset-name{font-size:12px;font-weight:700;color:var(--text)}
.theme-preset-note{font-size:10.5px;color:var(--text3);margin-top:2px}
.cover-theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.cover-theme-card{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:10px;box-shadow:var(--shadow);cursor:pointer;text-align:left;color:var(--text);transition:transform .12s,border-color .12s,box-shadow .12s}
.cover-theme-card:hover{transform:translateY(-1px);border-color:var(--border2);box-shadow:var(--neu-out-sm)}
.cover-theme-card.active{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand),transparent 84%)}
.cover-theme-preview{height:112px;border-radius:10px;overflow:hidden;border:1px solid var(--border);background:var(--bg3);margin-bottom:9px;position:relative}
.cover-theme-title{font-size:12px;font-weight:700;color:var(--text)}
.cover-theme-note{font-size:10.5px;color:var(--text3);margin-top:2px}
@media(max-width:1100px){.org-grid{grid-template-columns:1fr}.org-metrics{grid-template-columns:repeat(2,1fr)}.tf-360-grid{grid-template-columns:1fr}}
@media(max-width:640px){.org-metrics{grid-template-columns:1fr}.org-card-pad{padding:16px}.org-hero-img{aspect-ratio:3/1}.config-two-col{grid-template-columns:1fr}.config-list-row{grid-template-columns:1fr}.tf-chat-msg{max-width:100%}}

/* Branching top-down tree (Teams-style) */
.tf-tree{display:inline-block;min-width:100%;text-align:center;padding:6px 4px}
.tf-tree ul{display:flex;justify-content:center;position:relative;padding:26px 0 0;margin:0;list-style:none}
.tf-tree>ul{padding-top:0}
.tf-tree ul ul::before{content:'';position:absolute;top:0;left:50%;border-left:2px solid var(--border2);height:26px}
.tf-tree li{display:flex;flex-direction:column;align-items:center;position:relative;padding:26px 10px 0}
.tf-tree>ul>li{padding-top:0}
.tf-tree li::before,.tf-tree li::after{content:'';position:absolute;top:0;right:50%;width:50%;height:26px;border-top:2px solid var(--border2)}
.tf-tree li::after{right:auto;left:50%;border-left:2px solid var(--border2)}
.tf-tree li:only-child::before,.tf-tree li:only-child::after{display:none}
.tf-tree li:first-child::before,.tf-tree li:last-child::after{border:0 none}
.tf-tree li:last-child::before{border-right:2px solid var(--border2);border-radius:0 8px 0 0}
.tf-tree li:first-child::after{border-radius:8px 0 0 0}
.tf-tree>ul>li::before,.tf-tree>ul>li::after{display:none}

/* Rich team chat pickers and selectable window layouts */
#modal-overlay.tf-chat-side{padding:0;background:rgba(15,23,42,.16);backdrop-filter:none;align-items:stretch;justify-content:flex-end;z-index:11000}.tf-chat-shell{position:relative}
#modal-overlay.tf-chat-side .modal{width:min(520px,100vw);height:100vh;max-height:none;border:0;border-left:1px solid var(--border);border-radius:0;overflow:hidden;box-shadow:-18px 0 45px rgba(15,23,42,.18)}
.tf-chat-side .tf-chat-shell{height:100vh}.tf-chat-side .tf-chat-body{grid-template-columns:1fr}.tf-chat-side .tf-chat-sidebar{display:none}.tf-chat-side .tf-chat-box{flex:1;height:auto;border:0;border-radius:0;padding:16px 14px}.tf-chat-side .tf-chat-composer{padding:8px 12px 12px}.tf-chat-side .tf-chat-message-wrap{max-width:78%}.tf-chat-side .tf-chat-media{max-width:310px}
.tf-chat-picker,.tf-chat-emoji-picker.tf-chat-picker{display:none;position:absolute;bottom:38px;left:0;width:min(390px,calc(100vw - 34px));height:390px;padding:0;background:var(--bg2);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-lg);z-index:20;overflow:hidden;grid-template-columns:none}
.tf-chat-picker.open,.tf-chat-emoji-picker.tf-chat-picker.open{display:flex;flex-direction:column}
.tf-picker-search{padding:12px 12px 8px}.tf-picker-search input{width:100%;height:38px;border:1px solid var(--border2);border-radius:10px;background:var(--bg);color:var(--text);padding:0 11px;outline:none;font:inherit;font-size:11.5px}.tf-picker-search input:focus{border-color:var(--brand)}
.tf-emoji-tabs{display:flex;gap:2px;padding:0 9px 8px;border-bottom:1px solid var(--border);overflow-x:auto}.tf-emoji-tabs button{flex:1;min-width:34px;border:0;border-bottom:2px solid transparent;background:transparent;border-radius:7px;padding:6px 2px;cursor:pointer;font-size:17px}.tf-emoji-tabs button:hover{background:var(--bg3)}.tf-emoji-tabs button.active{background:var(--accent-light);border-bottom-color:var(--brand)}
.tf-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;padding:10px;overflow-y:auto;align-content:start}.tf-emoji-grid button{border:0;background:transparent;border-radius:7px;padding:5px 1px;cursor:pointer;font-size:21px;line-height:1.25}.tf-emoji-grid button:hover{background:var(--bg3);transform:scale(1.12)}.tf-emoji-grid p,.tf-gif-grid p{grid-column:1/-1;margin:auto;color:var(--text3);font-size:11px;text-align:center;padding:25px}
.tf-chat-gif-picker{width:min(440px,calc(100vw - 34px));height:440px}.tf-gif-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:105px;gap:5px;padding:5px 10px 10px;overflow-y:auto;flex:1}.tf-gif-grid button{border:0;border-radius:8px;overflow:hidden;padding:0;background:var(--bg3);cursor:pointer}.tf-gif-grid button:hover{outline:2px solid var(--brand);outline-offset:1px}.tf-gif-grid img{width:100%;height:100%;object-fit:cover;display:block}.tf-gif-credit{font-size:8.5px;color:var(--text3);padding:5px 12px 9px;text-align:right}.tf-picker-error{color:var(--red)!important}
@media(max-width:700px){#modal-overlay.tf-chat-side .modal{width:100vw}.tf-chat-picker,.tf-chat-emoji-picker.tf-chat-picker,.tf-chat-gif-picker{position:fixed;left:8px;right:8px;bottom:84px;width:auto;height:min(420px,58vh)}.tf-emoji-grid{grid-template-columns:repeat(7,1fr)}.tf-gif-grid{grid-template-columns:repeat(2,1fr)}}

.tf-chat-avatar{border:0;cursor:pointer;padding:0}.tf-chat-avatar:hover{outline:2px solid var(--brand);outline-offset:2px}.tf-chat-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:0 8px}.tf-chat-sidebar-head button{width:28px!important;height:28px;padding:0!important;margin:0!important;display:grid!important;place-items:center;font-size:19px!important}.tf-chat-people-search{position:relative;padding:10px 7px 4px}.tf-chat-people-search>input,.tf-group-create>input{width:100%;height:35px;border:1px solid var(--border);border-radius:9px;background:var(--bg);color:var(--text);padding:0 10px;font:inherit;font-size:10.5px}.tf-chat-people-search>div{position:absolute;left:7px;right:7px;top:49px;background:var(--bg2);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-lg);z-index:15;max-height:280px;overflow:auto}.tf-chat-people-search>div:empty{display:none}.tf-chat-people-search>div button{margin:0;border-radius:0;align-items:center}.tf-chat-people-search p{font-size:10px;color:var(--text3);padding:10px}.tf-person-avatar,.tf-room-avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--accent-light);color:var(--accent-text);font-size:9px;font-weight:750;flex:none}.tf-person-avatar img,.tf-room-avatar img,.tf-profile-avatar img{width:100%;height:100%;object-fit:cover}.tf-chat-sidebar button .tf-room-avatar{font-size:13px}.tf-group-create{margin:7px;padding:8px;border:1px solid var(--border);border-radius:10px;background:var(--bg)}.tf-group-members{max-height:190px;overflow:auto;margin:7px 0}.tf-group-members label{display:flex;align-items:center;gap:7px;padding:5px;font-size:10px;cursor:pointer}.tf-group-members label:hover{background:var(--bg3);border-radius:7px}.tf-group-members .tf-person-avatar{width:25px;height:25px}.tf-group-create .btn{width:100%;font-size:10px;padding:7px}.tf-chat-conversation-head{height:46px;display:flex;align-items:center;gap:8px;padding:0 18px;border-bottom:1px solid var(--border);background:var(--bg2)}.tf-chat-conversation-head strong{font-size:12px}.tf-chat-conversation-head small{font-size:9.5px;color:var(--text3)}
#tf-chat-profile-preview{position:absolute;inset:0;pointer-events:none;z-index:30;background:transparent;transition:background .2s}#tf-chat-profile-preview.open{pointer-events:auto;background:rgba(15,23,42,.18)}.tf-profile-drawer{position:absolute;right:0;top:0;bottom:0;width:min(390px,100%);background:var(--bg2);border-left:1px solid var(--border);box-shadow:-18px 0 45px rgba(15,23,42,.2);padding:20px;overflow:auto;transform:translateX(100%);animation:tf-profile-in .22s ease forwards}@keyframes tf-profile-in{to{transform:translateX(0)}}.tf-profile-close{position:absolute;right:14px;top:12px;border:0;background:transparent;color:var(--text2);font-size:22px;cursor:pointer}.tf-profile-hero{text-align:center;padding:18px 0;border-bottom:1px solid var(--border)}.tf-profile-avatar{width:78px;height:78px;margin:auto;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--accent-light);color:var(--accent-text);font-weight:800;font-size:20px}.tf-profile-hero h3{margin:10px 0 3px;font-size:17px}.tf-profile-hero p{margin:0 0 12px;color:var(--text3);font-size:11px}.tf-org-preview{display:flex;flex-direction:column;gap:7px;padding-top:16px}.tf-org-preview>strong{font-size:12px;margin-bottom:4px}.tf-org-preview>small{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);margin-top:7px}.tf-org-person{display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:var(--bg);border-radius:10px;padding:8px}.tf-org-person b{display:block;font-size:10.5px}.tf-org-person small{display:block;color:var(--text3);font-size:9px;margin-top:2px}.tf-org-focus{border-left:3px solid var(--brand);padding-left:6px}
.tf-chat-side .tf-chat-sidebar{display:block;position:absolute;inset:64px auto 0 0;width:210px;z-index:4;transform:translateX(-100%);transition:transform .2s}.tf-chat-side .tf-chat-sidebar:focus-within,.tf-chat-side .tf-chat-sidebar:hover{transform:translateX(0)}.tf-chat-side .tf-chat-main{position:relative}.tf-chat-side .tf-chat-main:before{content:'Chats';position:absolute;left:0;top:8px;z-index:5;background:var(--brand);color:#fff;border-radius:0 8px 8px 0;padding:6px 8px;font-size:9px;pointer-events:none}.tf-chat-side .tf-chat-conversation-head{padding-left:50px}
@media(max-width:700px){.tf-chat-sidebar{position:absolute;z-index:10;inset:64px auto 0 0;width:250px;display:block;transform:translateX(-100%);transition:transform .2s}.tf-chat-sidebar:focus-within,.tf-chat-sidebar:hover{transform:translateX(0)}.tf-chat-conversation-head{padding-left:50px}.tf-chat-main:before{content:'Chats';position:absolute;left:0;top:72px;z-index:11;background:var(--brand);color:white;padding:6px 8px;border-radius:0 8px 8px 0;font-size:9px}}

/* Searchable Academy and app-wide contextual button help */
.tf-training-search-wrap{height:50px;margin:18px 0;display:flex;align-items:center;gap:10px;padding:0 14px;background:var(--bg2);border:1px solid var(--border2);border-radius:14px;box-shadow:var(--shadow)}.tf-training-search-wrap>span{font-size:22px;color:var(--text3)}.tf-training-search-wrap input{flex:1;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:12.5px}.tf-training-search-wrap kbd{font:600 9px var(--mono);color:var(--text3);background:var(--bg3);border:1px solid var(--border);border-radius:5px;padding:3px 5px}.tf-training-section{margin-top:20px}.tf-training-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.tf-training-section-head strong{font-size:13px}.tf-training-section-head span{font-size:9.5px;color:var(--text3)}.tf-training-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tf-training-library-card{display:flex;gap:12px;text-align:left;border:1px solid var(--border);background:var(--bg2);color:var(--text);border-radius:14px;padding:14px;cursor:pointer;font:inherit;min-height:112px}.tf-training-library-card:hover{border-color:var(--brand);transform:translateY(-1px);box-shadow:var(--shadow)}.tf-training-library-card.complete{border-color:color-mix(in srgb,#16a34a,transparent 55%)}.tf-training-library-card>span:last-child>*{display:block}.tf-training-library-card strong{font-size:12.5px}.tf-training-library-card small{font-size:10.5px;line-height:1.45;color:var(--text3);margin-top:4px}.tf-training-library-card em{font-style:normal;color:var(--accent-text);font-size:9.5px;font-weight:650;margin-top:8px}.tf-training-library mark{background:#fde68a;color:#713f12;border-radius:3px;padding:0 2px}.tf-training-empty{text-align:center;border:1px dashed var(--border2);border-radius:14px;padding:38px;color:var(--text3)}.tf-training-empty strong{color:var(--text);font-size:13px}.tf-training-empty p{font-size:11px}.tf-lesson-steps{list-style:none;padding:0;margin:18px 0;display:grid;gap:9px}.tf-lesson-steps li{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);padding:10px}.tf-lesson-steps li>span{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--accent-light);color:var(--accent-text);font-size:9px;font-weight:800;flex:none}.tf-lesson-steps p{font-size:11.5px;line-height:1.5;margin:3px 0;color:var(--text2)}
.tf-button-help-mode button[data-tf-help]{outline:2px dashed var(--brand)!important;outline-offset:2px!important;cursor:help!important}.tf-button-help-mode:after{content:'Button help is active — select a highlighted button · Esc to exit';position:fixed;left:50%;top:14px;transform:translateX(-50%);z-index:20000;background:#111827;color:#fff;border-radius:999px;padding:8px 14px;font-size:10px;box-shadow:0 8px 28px rgba(0,0,0,.25);pointer-events:none}#tf-button-help-card{position:fixed;width:320px;z-index:20001;background:var(--bg2);border:1px solid var(--brand);border-radius:14px;padding:15px;box-shadow:0 18px 55px rgba(0,0,0,.28)}#tf-button-help-card>strong{display:block;font-size:14px;margin-top:4px}#tf-button-help-card p{font-size:11px;line-height:1.5;color:var(--text3);margin:7px 0 13px}#tf-button-help-card>div:last-child{display:flex;justify-content:flex-end;gap:7px}
@media(max-width:700px){.tf-training-library{grid-template-columns:1fr}.tf-training-search-wrap{margin:14px 0}#tf-button-help-card{left:12px!important;right:12px;width:auto}.tf-button-help-mode:after{top:auto;bottom:12px;width:calc(100vw - 24px);text-align:center}}

/* ACCOUNTING */
.acct-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.acct-modern-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;border:1px solid var(--border);background:linear-gradient(135deg,var(--bg2),var(--bg3));border-radius:24px;padding:22px;margin-bottom:16px;box-shadow:var(--neu-out)}
.acct-modern-hero span{display:block;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.1em;color:var(--accent-text);margin-bottom:8px}
.acct-modern-hero h2{font-size:34px;line-height:1;margin:0 0 8px;color:var(--text)}
.acct-modern-hero p{margin:0;max-width:780px;color:var(--text3);font-size:12.5px;line-height:1.55}
.acct-hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.acct-kpi{position:relative;border:1px solid var(--border);background:var(--bg2);border-radius:18px;box-shadow:var(--neu-out);padding:16px;text-align:left;color:var(--text);cursor:pointer;min-height:118px;overflow:hidden}
.acct-kpi:hover{border-color:var(--border2);transform:translateY(-1px)}
.acct-kpi i{position:absolute;right:14px;top:14px;width:18px;height:18px;color:var(--accent-text);opacity:.8}
.acct-kpi span,.acct-kpi small{display:block}
.acct-kpi span{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--text3)}
.acct-kpi strong{display:block;font-size:24px;margin:12px 0 5px}
.acct-kpi small{font-size:11px;color:var(--text3);line-height:1.35}
.acct-page-context{margin-bottom:16px;padding:18px 20px;border:1px solid var(--border);background:var(--bg2);border-radius:18px;box-shadow:var(--neu-out)}.acct-page-context span,.acct-page-context strong,.acct-page-context p{display:block}.acct-page-context span{font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--accent-text)}.acct-page-context strong{font-size:22px;margin-top:6px}.acct-page-context p{margin:5px 0 0;color:var(--text3);font-size:12px}
.acct-shell{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--neu-out);padding:18px}
.acct-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:14px;overflow:auto}
.acct-nav-groups{display:flex;gap:7px;flex-wrap:wrap;padding-bottom:13px;border-bottom:1px solid var(--border)}
.acct-nav-group{border:1px solid transparent;background:transparent;color:var(--text2);padding:8px 12px;border-radius:10px;font:600 12px/1 inherit;cursor:pointer}.acct-nav-group:hover{background:var(--bg3);color:var(--text)}.acct-nav-group.active{background:var(--accent-light);border-color:color-mix(in srgb,var(--brand),transparent 76%);color:var(--accent-text)}
.acct-subtabs{display:flex;gap:4px;margin:12px 0 14px;overflow:auto}.acct-subtabs .stab{white-space:nowrap}
.pipeline-timeline-panel:empty{display:none}
#kanban-board.board{display:block;min-width:0}
.work-hub-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.work-hub-tabs{display:flex;align-items:center;gap:3px;padding:3px;background:var(--bg3);border:1px solid var(--border);border-radius:11px}
.work-hub-tab{display:flex;align-items:center;gap:7px;border:0;border-radius:8px;background:transparent;color:var(--text2);padding:8px 11px;font:700 12px/1 inherit;cursor:pointer}.work-hub-tab:hover{background:var(--bg2);color:var(--text)}.work-hub-tab.active{background:var(--bg2);color:var(--accent-text);box-shadow:var(--neu-out-sm)}.work-hub-tab small{min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px;border-radius:99px;background:var(--bg4);color:var(--text3);font-size:9px}.work-hub-tab small.attention{background:var(--red-bg);color:var(--red-text)}
.work-hub-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}.work-hub-controls .search-box{width:195px}
.work-hub-followups{border:1px solid var(--border);border-radius:16px;background:var(--bg2);box-shadow:var(--neu-out-sm);overflow:hidden}.work-hub-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--border)}.work-hub-list-heading>div{display:grid;gap:4px}.work-hub-list-heading span{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.work-hub-list-heading strong{font-size:15px}.work-hub-list-wrap{overflow:auto}.work-hub-followup-table{width:100%;border-collapse:collapse;min-width:760px}.work-hub-followup-table th{padding:10px 16px;text-align:left;background:var(--bg3);font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--text3);white-space:nowrap}.work-hub-followup-table td{padding:12px 16px;border-top:1px solid var(--border);font-size:11.5px;vertical-align:middle}.work-hub-followup-table td:nth-child(2){min-width:235px}.work-hub-followup-table td strong,.work-hub-followup-table td small{display:block}.work-hub-followup-table td strong{font-size:12px;color:var(--text)}.work-hub-followup-table td small{max-width:330px;margin-top:3px;color:var(--text3);font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-hub-followup-table tbody tr:hover{background:var(--bg3)}.work-hub-customer-link{border:0;background:none;padding:0;color:var(--accent-text);font:700 11.5px inherit;cursor:pointer;text-align:left}.work-hub-customer-link:hover{text-decoration:underline}.work-hub-muted{font-size:11px;color:var(--text3)}.work-hub-owner{display:flex;align-items:center;gap:7px;white-space:nowrap}.work-hub-owner .avatar{width:23px;height:23px;font-size:8.5px}.work-hub-due,.work-hub-status{display:inline-flex;align-items:center;white-space:nowrap;border-radius:99px;padding:4px 7px;font-size:10px;font-weight:800}.work-hub-due.neutral{background:var(--bg4);color:var(--text2)}.work-hub-due.today{background:var(--amber-bg);color:var(--amber-text)}.work-hub-due.overdue{background:var(--red-bg);color:var(--red-text)}.work-hub-due.complete,.work-hub-status.complete{background:var(--green-bg);color:var(--green-text)}.work-hub-status.open{background:var(--accent-light);color:var(--accent-text)}.work-hub-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.work-hub-row-actions .btn{font-size:10.5px;padding:6px 9px}.work-hub-empty{display:grid;justify-items:center;gap:5px;padding:46px 20px;color:var(--text3);text-align:center}.work-hub-empty strong{color:var(--text);font-size:13px}.work-hub-empty span{font-size:11.5px}
.team-pipelines-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:14px;align-items:start}.team-pipeline-rail{position:sticky;top:12px;display:grid;gap:10px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--bg2);box-shadow:var(--neu-out-sm)}.team-pipeline-rail-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 2px 7px}.team-pipeline-rail-head>div{display:grid;gap:3px}.team-pipeline-rail-head span{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--text3)}.team-pipeline-rail-head strong{font-size:14px}.team-pipeline-rail-head .icon-btn{width:30px;height:30px}.team-pipeline-rail-list{display:grid;gap:5px}.team-pipeline-item{width:100%;display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:start;gap:9px;padding:10px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}.team-pipeline-item:hover{background:var(--bg3);transform:translateX(1px)}.team-pipeline-item.active{border-color:color-mix(in srgb,var(--brand),transparent 68%);background:var(--accent-light)}.team-pipeline-color{width:8px;height:30px;border-radius:99px}.team-pipeline-item-copy{display:grid;min-width:0;gap:3px}.team-pipeline-item-copy strong{font-size:11.5px;font-weight:800;line-height:1.2}.team-pipeline-item-copy small{font-size:10px;color:var(--text3);line-height:1.32;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.team-pipeline-count{align-self:center;min-width:20px;padding:3px 5px;border-radius:99px;background:var(--bg4);color:var(--text2);font-size:10px;font-weight:800;text-align:center}.team-pipeline-item.active .team-pipeline-count{background:var(--brand);color:#fff}.team-pipeline-add{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px dashed var(--border2);border-radius:9px;background:transparent;color:var(--accent-text);font:700 11px inherit;padding:9px;cursor:pointer}.team-pipeline-add:hover{background:var(--accent-light);border-color:var(--brand)}.team-pipeline-workspace{min-width:0}.pipeline-switcher{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 14px;margin-bottom:12px;border:1px solid var(--border);background:var(--bg2);border-radius:14px;box-shadow:var(--neu-out-sm)}
.pipeline-switcher-copy{display:grid;gap:3px}.pipeline-switcher-copy span{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-text);font-weight:800}.pipeline-switcher-copy strong{font-size:15px}.pipeline-switcher-copy small{font-size:11px;color:var(--text3)}
.pipeline-workflow-metrics{display:flex;gap:14px;margin-left:auto}.pipeline-workflow-metrics span{display:grid;gap:2px;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text3)}.pipeline-workflow-metrics b{font-size:12px;color:var(--text);letter-spacing:0;text-transform:none}.pipeline-switcher-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pipeline-switcher-controls select{min-width:190px;height:38px;border:1px solid var(--border);border-radius:10px;background:var(--bg3);color:var(--text);padding:0 10px;font:inherit;font-size:12px}.pipeline-switcher-controls .mdi{font-size:15px;vertical-align:-1px}
.kanban-workflow-board{display:flex;gap:12px;min-width:max-content}
.pipeline-control-label{display:grid;gap:3px;color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.pipeline-control-label select{min-width:154px!important;height:36px!important;background:var(--bg)!important;color:var(--text)!important;text-transform:none;letter-spacing:0;font-weight:600}
.kanban-workflow-board{align-items:stretch;gap:14px;padding:2px 1px 10px;min-height:calc(100vh - 300px)}
.kanban-workflow-board .col{width:292px;max-height:none;min-height:480px;border:1px solid transparent;background:var(--bg3);transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.kanban-workflow-board .col.is-terminal{background:color-mix(in srgb,var(--bg3),var(--text3) 4%)}
.kanban-workflow-board .col.is-drop-target{border-color:var(--brand);background:var(--accent-light);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand),transparent 80%),var(--neu-out-sm);transform:translateY(-2px)}
.kanban-workflow-board .col-head{min-height:45px;padding:12px 13px;border-bottom:1px solid color-mix(in srgb,var(--border),transparent 18%)}.kanban-workflow-board .col-title{display:grid;gap:2px}.kanban-workflow-board .col-title strong{font-size:13px;line-height:1.15}.kanban-workflow-board .col-title small{font-size:9.5px;font-weight:600;color:var(--text3)}
.kanban-workflow-board .col-title{font-size:13px;font-weight:800}.kanban-workflow-board .col-count{font-weight:750}.kanban-workflow-board .col-cards{padding:10px;gap:9px;min-height:120px}
.kanban-workflow-board .task-card{position:relative;padding:13px 12px;border-radius:10px;box-shadow:0 3px 10px rgba(15,23,42,.06);transition:transform .18s ease,opacity .18s ease,border-color .18s ease,box-shadow .18s ease;animation:tf-kanban-card-in .28s ease both}
.kanban-workflow-board .task-card[draggable="true"]{cursor:grab}.kanban-workflow-board .task-card[draggable="true"]:active{cursor:grabbing}.kanban-workflow-board .task-card:hover{transform:translateY(-2px);box-shadow:0 9px 20px rgba(15,23,42,.1)}
.kanban-workflow-board .task-card.is-dragging{opacity:.42;transform:rotate(1.5deg) scale(.98);box-shadow:0 16px 30px rgba(15,23,42,.18)}
.tc-actions{display:flex;align-items:center;gap:3px;flex-shrink:0}.tc-transfer-btn{width:24px;height:24px;display:inline-grid;place-items:center;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--text3);cursor:pointer;opacity:.82;transition:opacity .16s ease,color .16s ease,border-color .16s ease,background .16s ease}.task-card:hover .tc-transfer-btn,.task-card:focus-within .tc-transfer-btn{opacity:1}.tc-transfer-btn:hover{border-color:var(--brand);background:var(--accent-light);color:var(--brand)}.tc-transfer-btn .mdi{font-size:14px}.tc-drag-handle{margin:-3px -3px 0 0;color:var(--text3);font-size:14px;letter-spacing:-2px;line-height:1;cursor:grab;user-select:none}.tc-customer{display:flex;align-items:center;gap:4px;margin:-2px 0 8px;color:var(--text2);font-size:10.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tc-customer .mdi{color:var(--text3);font-size:13px}.tc-value{margin:-2px 0 10px;color:var(--accent-text);font-size:12px;font-weight:800}
.kanban-workflow-board .add-card-btn{margin:0 10px 10px;padding:8px;border-radius:8px;font-weight:700}.kanban-workflow-board .add-card-btn:hover{transform:translateY(-1px)}
@keyframes tf-kanban-card-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}

/* Keep forms focused in the center; dedicated mail and chat workspaces retain their full-screen layouts. */
#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side){padding:28px;background:rgba(15,23,42,.44);backdrop-filter:blur(3px)}
#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side) .modal{width:min(980px,calc(100vw - 56px));height:min(820px,calc(100vh - 56px));max-height:calc(100vh - 56px);border-radius:16px;box-shadow:0 28px 72px rgba(15,23,42,.24)}
#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side) .modal-head{padding:18px 22px}.modal-title{font-size:17px;font-weight:750}
#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side) .modal-body{padding:18px 22px}.form-tab-section{min-height:0;border-radius:12px;padding:16px}.form-tabs{top:-18px;background:var(--bg2)}
@media(max-width:760px){#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side){padding:0}#modal-overlay:not(.tf-email-compose-fullscreen):not(.tf-chat-fullscreen):not(.tf-chat-side) .modal{width:100vw;height:100vh;max-height:none;border-radius:0}.pipeline-control-label{flex:1}.pipeline-control-label select{width:100%;min-width:0!important}.kanban-workflow-board{min-height:calc(100vh - 340px)}.kanban-workflow-board .col{width:min(82vw,320px)}}
@media(prefers-reduced-motion:reduce){.kanban-workflow-board .task-card,.kanban-workflow-board .col{animation:none!important;transition:none!important}}
.tf-pipeline-template{display:flex;align-items:end;gap:14px;margin-bottom:14px;padding:13px 14px;border:1px solid var(--border);border-radius:12px;background:var(--bg3)}.tf-pipeline-template .fg{width:min(330px,100%);margin:0}.tf-pipeline-template p{margin:0;max-width:430px;color:var(--text3);font-size:11px;line-height:1.45}.tf-pipeline-manager-list{display:grid;gap:10px}.tf-pipeline-manager-row{display:grid;grid-template-columns:12px minmax(140px,.8fr) 110px minmax(210px,1.4fr) 58px 34px;gap:9px;align-items:end;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--bg3)}.tf-pipeline-manager-row .fg{margin:0}.tf-pipeline-manager-row .fg label{font-size:10px}.tf-pipeline-color{width:12px;height:38px;border-radius:99px}.tf-pipeline-manager-row input{width:100%;height:36px;box-sizing:border-box}.tf-pipeline-description-wrap{grid-column:2/7}.tf-pipeline-remove{align-self:end;width:34px;height:34px;color:var(--red-text)}.tf-pipeline-remove:hover{background:var(--red-bg);color:var(--red-text)}
.tf-pipeline-handoff{grid-column:2/-1;display:grid;grid-template-columns:20px minmax(145px,.8fr) 18px minmax(145px,.8fr) minmax(130px,.7fr);align-items:end;gap:8px;padding:10px 11px;border:1px solid color-mix(in srgb,var(--brand),transparent 78%);border-radius:10px;background:var(--accent-light)}.tf-pipeline-handoff>.mdi{align-self:center;color:var(--accent-text);font-size:17px}.tf-pipeline-handoff-arrow{align-self:center;color:var(--text3);font-size:16px;font-weight:800}.tf-pipeline-handoff .fg{display:grid;gap:4px}.tf-pipeline-handoff select{width:100%;height:34px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text);padding:0 8px;font:inherit;font-size:11px}
.pipeline-transfer-modal{display:grid;gap:16px}.pipeline-transfer-record{display:flex;align-items:center;gap:10px;padding:12px 13px;border:1px solid var(--border);border-radius:10px;background:var(--bg3)}.pipeline-transfer-record>.mdi{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:var(--accent-light);color:var(--brand);font-size:17px}.pipeline-transfer-record div{display:grid;gap:3px;min-width:0}.pipeline-transfer-record strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pipeline-transfer-record small{font-size:10.5px;color:var(--text3)}.pipeline-transfer-mode{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:4px;border:1px solid var(--border);border-radius:10px;background:var(--bg3)}.pipeline-transfer-mode button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px;border:0;border-radius:7px;background:transparent;color:var(--text2);font:700 11px inherit;cursor:pointer}.pipeline-transfer-mode button.active{background:var(--bg2);color:var(--brand);box-shadow:0 2px 7px rgba(15,23,42,.08)}.pipeline-transfer-mode .mdi{font-size:14px}.form-label-optional{color:var(--text3);font-weight:400}.stage-change-record{padding:8px 10px;border-left:3px solid var(--brand);border-radius:5px;background:var(--bg3);color:var(--text2);font-size:12px;font-weight:700}
@media(max-width:760px){.work-hub-toolbar{align-items:flex-start;flex-direction:column}.work-hub-controls{width:100%;justify-content:space-between}.work-hub-controls .search-box{width:150px}.work-hub-controls .chip-filter{overflow:auto;flex-wrap:nowrap;max-width:calc(100vw - 185px)}.work-hub-controls .chip{white-space:nowrap}.team-pipelines-layout{display:block}.team-pipeline-rail{position:static;margin-bottom:12px}.team-pipeline-rail-list{display:flex;overflow:auto}.team-pipeline-item{min-width:190px}.pipeline-switcher{align-items:flex-start;flex-direction:column}.pipeline-workflow-metrics{margin-left:0}.pipeline-switcher-controls{width:100%}.pipeline-switcher-controls select{flex:1}.tf-pipeline-template{align-items:flex-start;flex-direction:column}.tf-pipeline-manager-row{grid-template-columns:10px 1fr 1fr;align-items:end}.tf-pipeline-stages-wrap,.tf-pipeline-description-wrap{grid-column:2/-1}.tf-pipeline-handoff{grid-column:2/-1;grid-template-columns:18px 1fr}.tf-pipeline-handoff-arrow{display:none}.tf-pipeline-handoff>.mdi{grid-row:1/4}.tf-pipeline-manager-row .btn:not(.tf-pipeline-remove){grid-column:2/-1}.acct-nav-groups{flex-wrap:nowrap;overflow:auto}.acct-nav-group{white-space:nowrap}}

/* Pipeline workspace view controls and compact list mode. */
.team-pipelines-layout.rail-hidden{grid-template-columns:minmax(0,1fr)}
.pipeline-view-controls{display:inline-flex;align-items:center;gap:4px;padding:3px;border:1px solid var(--border);border-radius:11px;background:var(--bg3)}
.pipeline-view-btn{width:31px;height:31px;border-radius:8px;color:var(--text3);box-shadow:none}
.pipeline-view-btn:hover{color:var(--brand);background:var(--accent-light)}
.pipeline-view-btn.active{color:var(--brand);background:var(--accent-light);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand),transparent 72%)}
.pipeline-view-divider{width:1px;height:18px;margin:0 1px;background:var(--border)}
.pipeline-list-view{border:1px solid var(--border);border-radius:14px;background:var(--bg2);box-shadow:var(--neu-out-sm);overflow:hidden}
.pipeline-list-scroll{overflow:auto}
.pipeline-list-view table{width:100%;min-width:920px;border-collapse:collapse}
.pipeline-list-view th{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--bg3);color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.08em;text-align:left;text-transform:uppercase;white-space:nowrap}
.pipeline-list-sort{display:inline-flex;align-items:center;gap:5px;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer}.pipeline-list-sort .mdi{font-size:13px;opacity:.45;transition:opacity .16s ease,color .16s ease}.pipeline-list-sort:hover,.pipeline-list-sort.active{color:var(--brand)}.pipeline-list-sort:hover .mdi,.pipeline-list-sort.active .mdi{opacity:1}
.pipeline-list-view td{padding:11px 14px;border-bottom:1px solid color-mix(in srgb,var(--border),transparent 32%);vertical-align:middle;font-size:12px}
.pipeline-list-view tbody tr{transition:background .16s ease,box-shadow .16s ease}
.pipeline-list-view tbody tr:hover{background:var(--bg3);box-shadow:inset 3px 0 0 var(--brand)}
.pipeline-list-view tbody tr.is-overdue{box-shadow:inset 3px 0 0 #ef4444}
.pipeline-list-view tbody tr:last-child td{border-bottom:0}
.pipeline-list-record,.pipeline-list-customer{display:grid;gap:4px;border:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer;padding:0}
.pipeline-list-record strong{font-size:12px;font-weight:800}.pipeline-list-record>span{display:flex;align-items:center;gap:5px;color:var(--text3);font-size:10px}.pipeline-list-record em{padding-left:5px;border-left:1px solid var(--border);color:var(--accent-text);font-style:normal}
.pipeline-list-customer{display:inline-flex;align-items:center;gap:5px;color:var(--text2);white-space:nowrap}.pipeline-list-customer:hover{color:var(--brand)}
.pipeline-list-stage{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:99px;background:color-mix(in srgb,var(--stage-color),transparent 90%);color:var(--text2);font-size:10px;font-weight:800;white-space:nowrap}.pipeline-list-stage i{width:7px;height:7px;border-radius:50%;background:var(--stage-color)}
.pipeline-list-value{color:var(--brand);font-size:12px;white-space:nowrap}.pipeline-list-owner{display:inline-flex;align-items:center;gap:6px;color:var(--text2);white-space:nowrap}.pipeline-list-owner .avatar{width:22px;height:22px;font-size:8px}.pipeline-list-due{display:inline-flex;padding:4px 7px;border-radius:7px;background:var(--bg4);color:var(--text2);font-size:10px;font-weight:700;white-space:nowrap}.pipeline-list-due.breach{background:#fef0f0;color:#d92d20}.pipeline-list-due.warn{background:#fff6e8;color:#c66a00}.pipeline-list-muted{color:var(--text3);font-size:11px}.pipeline-list-actions{display:flex;justify-content:flex-end;gap:5px}.pipeline-list-actions .icon-btn{width:29px;height:29px;color:var(--text3);box-shadow:none}.pipeline-list-actions .icon-btn:hover{color:var(--brand);background:var(--accent-light)}
.pipeline-list-empty{display:grid;justify-items:center;gap:7px;padding:58px 20px;border:1px dashed var(--border2);border-radius:14px;background:var(--bg2);color:var(--text3);text-align:center}.pipeline-list-empty>.mdi{font-size:28px;color:var(--brand)}.pipeline-list-empty strong{color:var(--text);font-size:14px}.pipeline-list-empty small{font-size:11px}
@media(max-width:760px){.team-pipelines-layout.rail-hidden{display:block}.pipeline-switcher-controls{gap:7px}.pipeline-view-controls{order:-1}.pipeline-list-view{border-radius:11px}.pipeline-list-view th,.pipeline-list-view td{padding:10px 11px}}
.acct-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}
.acct-toolbar strong,.acct-toolbar span{display:block}
.acct-toolbar strong{font-size:16px}
.acct-toolbar span{font-size:11.5px;color:var(--text3);margin-top:4px}
.acct-actions{display:flex;gap:8px;flex:none}
.acct-control-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px;padding:10px;border:1px solid var(--border);background:var(--bg);border-radius:14px}
.acct-control-bar .form-row{margin:0;flex:1}
.acct-search,.acct-filter-select{height:40px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);color:var(--text);font:inherit;font-size:12px;padding:0 12px;outline:none;box-shadow:var(--neu-in)}
.acct-search{flex:1;min-width:220px}
.acct-filter-select{width:190px;box-shadow:none}
.acct-search:focus,.acct-filter-select:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--ring)}
.acct-table-wrap{width:100%;overflow:auto;border:1px solid var(--border);border-radius:14px;background:var(--bg)}
.acct-table-wrap table{width:100%;border-collapse:collapse}
.acct-table-wrap th{white-space:nowrap}
.acct-table-wrap td small{display:block;color:var(--text3);font-size:10px;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.acct-row-actions{display:flex;gap:6px;flex-wrap:wrap}
.acct-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10.5px;font-weight:800;white-space:nowrap;background:var(--bg4);color:var(--text2)}
.acct-status-draft{background:var(--bg4);color:var(--text2)}
.acct-status-sent,.acct-status-submitted,.acct-status-open{background:var(--accent-light);color:var(--accent-text)}
.acct-status-paid,.acct-status-approved,.acct-status-reimbursed{background:var(--green-bg);color:var(--green-text)}
.acct-status-partially-paid{background:#fff7ed;color:#c2410c}
.acct-status-void,.acct-status-rejected{background:#fee2e2;color:#b91c1c}
.acct-status-pending-approval{background:var(--amber-bg);color:var(--amber-text)}
.acct-status-refunded,.acct-status-closed,.acct-status-cash-in{background:var(--green-bg);color:var(--green-text)}
.acct-status-cash-out,.acct-status-refund{background:var(--red-bg);color:var(--red-text)}
.acct-status-credit-note,.acct-status-apply-to-future-invoice,.acct-status-invoice-correction,.acct-status-service-cancellation{background:var(--accent-light);color:var(--accent-text)}
.acct-empty{padding:22px;border:1px dashed var(--border2);border-radius:14px;background:var(--bg);color:var(--text3);font-size:12px}
.acct-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.acct-report-card{box-shadow:none}
.acct-report-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--border)}
.acct-report-head strong{font-size:13px}
.acct-report-head span{font-size:10.5px;color:var(--text3)}
.acct-payment-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:12px}
.acct-payment-summary span{font-size:11px;color:var(--text3)}
.acct-payment-summary strong{font-size:15px}
.acct-lines-card{border:1px solid var(--border);background:var(--bg);border-radius:16px;padding:14px;margin:12px 0;display:grid;gap:10px}
.acct-line-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.acct-line-head strong,.acct-line-head span{display:block}
.acct-line-head strong{font-size:13px}
.acct-line-head span{font-size:10.5px;color:var(--text3);margin-top:3px}
.acct-line-grid-head,.acct-line-row{display:grid;grid-template-columns:minmax(180px,1.8fr) 80px 120px 140px 110px 42px;gap:8px;align-items:center}
.acct-line-grid-head{color:var(--text3);font-size:9.5px;font-weight:850;text-transform:uppercase;letter-spacing:.07em;padding:0 2px}
.acct-line-row input,.acct-line-row select{height:38px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);color:var(--text);font:inherit;font-size:11.5px;padding:0 10px;outline:none}
.acct-line-row input:focus,.acct-line-row select:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--ring)}
.acct-line-total{font-size:11.5px;text-align:right}
.acct-line-remove{min-width:36px!important;width:36px!important;padding:0!important}
.acct-live-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:10px;color:var(--text2);font-size:11px}
.acct-live-total span b{color:var(--text);margin-left:4px}
.acct-live-total strong{font-size:14px;color:var(--text)}
.acct-discount-row{align-items:end}
.acct-record-hero{display:flex;justify-content:space-between;gap:18px;border:1px solid var(--border);background:var(--bg3);border-radius:18px;padding:18px;margin-bottom:14px}
.acct-record-hero span{display:block;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);margin-bottom:7px}
.acct-record-hero h3{font-size:22px;margin:0 0 7px;color:var(--text)}
.acct-record-hero p{font-size:11.5px;color:var(--text3);margin:0;line-height:1.45}
.acct-record-badges{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.acct-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.acct-detail-card{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:12px;min-height:74px}
.acct-detail-card span{display:block;font-size:9.5px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;color:var(--text3);margin-bottom:9px}
.acct-detail-card strong{font-size:15px;color:var(--text)}
.acct-detail-section{border:1px solid var(--border);background:var(--bg);border-radius:18px;padding:14px;margin-top:12px}
.acct-payment-list{display:grid;gap:8px}
.acct-payment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);background:var(--bg2);border-radius:13px;padding:11px}
.acct-payment-row strong,.acct-payment-row span,.acct-payment-row b{display:block}
.acct-payment-row strong{font-size:13px}
.acct-payment-row b{font-size:11px;text-align:right}
.acct-payment-row span{font-size:10.5px;color:var(--text3);margin-top:3px}
.acct-note-block{white-space:pre-wrap;border:1px solid var(--border);background:var(--bg2);border-radius:13px;padding:12px;color:var(--text2);font-size:11.5px;line-height:1.5}
.acct-ledger-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.acct-ledger-summary>div{border:1px solid var(--border);background:var(--bg);border-radius:14px;padding:14px;box-shadow:var(--shadow)}
.acct-ledger-summary span{display:block;font-size:9.5px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;color:var(--text3);margin-bottom:9px}
.acct-ledger-summary strong{font-size:18px;color:var(--text)}
.acct-debit{color:#047857;font-weight:800}
.acct-credit{color:#b91c1c;font-weight:800}
@media(max-width:900px){.acct-kpi-grid,.acct-report-grid{grid-template-columns:1fr 1fr}.acct-toolbar{flex-direction:column}.acct-actions{width:100%;justify-content:flex-start}}
@media(max-width:620px){.acct-kpi-grid,.acct-report-grid{grid-template-columns:1fr}}
@media(max-width:900px){.form-tab-section{min-height:auto}}
.acct-kpi-grid-wide{grid-template-columns:repeat(4,minmax(0,1fr))}
.acct-kpi-warn{border-color:color-mix(in srgb,var(--red),transparent 72%);background:linear-gradient(180deg,var(--bg2),var(--red-bg))}
.acct-dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:14px}
.acct-insight-card{border:1px solid var(--border);background:var(--bg);border-radius:18px;padding:18px;box-shadow:var(--shadow);min-height:150px}
.acct-insight-main{grid-row:span 2}
.acct-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.acct-section-head span{display:block;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);margin-bottom:4px}
.acct-section-head strong{display:block;font-size:18px;color:var(--text)}
.acct-insight-card p{font-size:12px;color:var(--text2);line-height:1.55;margin:0}
.acct-flow{display:grid;gap:10px;margin-top:18px}
.acct-flow div{border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:12px}
.acct-flow small{display:block;font-size:10px;color:var(--text3);margin-bottom:5px}
.acct-flow strong{font-size:20px}
.acct-compliance-card{background:linear-gradient(180deg,var(--bg),var(--accent-light))}
.acct-einvoice-layout,.acct-settings-grid{display:grid;gap:14px}
.acct-einvoice-hero{display:flex;justify-content:space-between;gap:24px;align-items:stretch;background:linear-gradient(135deg,var(--bg2),var(--accent-light))}
.acct-einvoice-hero>div:first-child span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-text);font-weight:850;margin-bottom:8px}
.acct-einvoice-hero h3{font-size:24px;margin:0 0 8px}
.acct-einvoice-hero p{max-width:720px}
.acct-einvoice-profile{min-width:220px;border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:14px;display:grid;gap:5px;align-content:center}
.acct-einvoice-profile small{font-size:10px;color:var(--text3);text-transform:uppercase;font-weight:800}
.acct-einvoice-profile strong{font-size:13px;margin-bottom:8px}
.acct-deadline-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.acct-deadline-card{border:1px solid var(--border);background:var(--bg);border-radius:14px;padding:13px;display:grid;gap:5px}
.acct-deadline-card small{font-size:10px;color:var(--text3)}
.acct-deadline-card strong{font-size:13px}
.acct-deadline-card span{font-size:12px;color:var(--accent-text);font-weight:750}
.acct-readiness-list{border:1px solid var(--border);background:var(--bg2);border-radius:18px;padding:16px;box-shadow:var(--shadow);display:grid;gap:10px}
.acct-readiness-row{display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(220px,1fr) auto;gap:12px;align-items:center;border:1px solid var(--border);background:var(--bg);border-radius:14px;padding:12px}
.acct-readiness-row strong,.acct-readiness-row span{display:block}
.acct-readiness-row strong{font-size:13px}
.acct-readiness-row span,.acct-readiness-row p{font-size:11px;color:var(--text3);margin:0;line-height:1.4}
.acct-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.acct-form-panel{border:1px solid var(--border);background:var(--bg);border-radius:18px;padding:18px;box-shadow:var(--shadow)}
.acct-template-panel{grid-column:1/-1}
.acct-form-note{border:1px solid var(--border);background:var(--bg3);border-radius:12px;padding:10px 12px;margin-bottom:12px;font-size:11.5px;color:var(--text2);line-height:1.45}
.acct-form-tabs{display:flex;gap:6px;position:sticky;top:-18px;z-index:3;background:var(--bg2);border-bottom:1px solid var(--border);padding:0 0 12px;margin-bottom:4px;overflow:auto}
.acct-form-tabs button{border:1px solid var(--border);background:var(--bg);color:var(--text2);border-radius:999px;padding:8px 12px;font:inherit;font-size:12px;font-weight:750;white-space:nowrap;cursor:pointer}
.acct-form-tabs button:hover{border-color:var(--border2);background:var(--bg3)}
.acct-form-tabs button.active{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 8px 22px color-mix(in srgb,var(--brand),transparent 72%)}
.acct-form-section{display:none;border:1px solid var(--border);background:var(--bg);border-radius:18px;padding:18px;box-shadow:var(--shadow);min-height:320px}
.acct-form-section.active{display:block}
.acct-form-section>.form-row:last-child,.acct-form-section>.fg:last-child{margin-bottom:0}
.acct-template-fields{border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:12px;margin-top:12px;display:grid;gap:10px}
.acct-template-fields>div:first-child strong{display:block;font-size:12px;color:var(--text)}
.acct-template-fields>div:first-child span{display:block;font-size:10.5px;color:var(--text3);margin-top:2px}
.acct-check{display:flex;align-items:center;gap:8px;color:var(--text2);font-size:12px;font-weight:650;margin-bottom:12px}
.acct-check input{width:16px;height:16px;accent-color:var(--brand)}
.acct-template-list{display:grid;gap:10px}
.acct-template-row{display:grid;grid-template-columns:minmax(220px,1fr) auto auto auto;gap:10px;align-items:center;border:1px solid var(--border);background:var(--bg2);border-radius:14px;padding:12px}
.acct-template-row strong,.acct-template-row span{display:block}
.acct-template-row strong{font-size:13px;margin-bottom:7px}
.acct-template-row span{display:flex;gap:5px;flex-wrap:wrap}
.acct-template-row em{font-style:normal;background:var(--bg4);color:var(--text2);border-radius:999px;padding:3px 7px;font-size:10px;font-weight:750}
.acct-new-customer-fields{border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:12px;margin-bottom:12px}
.acct-return-source-card{border:1px solid var(--border);background:var(--bg3);border-radius:14px;padding:14px;margin:6px 0 12px;color:var(--text3);font-size:12px}
.acct-return-source-card strong,.acct-return-source-card span{display:block}
.acct-return-source-card strong{color:var(--text);font-size:14px;margin-bottom:4px}
.acct-status-ready{background:var(--green-bg);color:var(--green-text)}
.acct-status-reported{background:var(--accent-light);color:var(--accent-text)}
.acct-status-not-ready{background:var(--amber-bg);color:var(--amber-text)}
.acct-status-rejected{background:var(--red-bg);color:var(--red-text)}
@media(max-width:1200px){.acct-kpi-grid-wide{grid-template-columns:repeat(2,minmax(0,1fr))}.acct-dashboard-grid{grid-template-columns:1fr 1fr}.acct-insight-main{grid-row:auto;grid-column:1/-1}.acct-modern-hero{display:grid}.acct-hero-actions{justify-content:flex-start}}
@media(max-width:900px){.acct-settings-grid,.acct-einvoice-hero{grid-template-columns:1fr}.acct-einvoice-hero{display:grid}.acct-readiness-row{grid-template-columns:1fr}.acct-template-row{grid-template-columns:1fr}.acct-template-row .btn,.acct-template-row .acct-check{justify-self:start}.acct-line-grid-head{display:none}.acct-line-row{grid-template-columns:1fr 1fr}.acct-line-row .acct-line-desc{grid-column:1/-1}.acct-line-total{text-align:left}.acct-control-bar{flex-direction:column;align-items:stretch}.acct-filter-select{width:100%}.acct-detail-grid{grid-template-columns:1fr 1fr}.acct-record-hero{display:grid}.acct-form-section{min-height:auto}}
@media(max-width:620px){.acct-kpi-grid-wide,.acct-dashboard-grid,.acct-detail-grid,.acct-ledger-summary{grid-template-columns:1fr}}

/* Lead workspace: a dense, familiar record view rather than a full-screen modal. */
#task-panel{background:var(--bg);box-shadow:none}
#task-panel .panel-top{min-height:56px;padding:12px max(28px,calc((100vw - 1440px)/2));align-items:center;background:var(--bg2)}
#task-panel .panel-task-title{font-size:16px;font-weight:760;letter-spacing:0}
#task-panel .panel-task-subtitle{font-size:10.5px}
#task-panel .task-back{width:32px;height:32px;border-radius:7px;font-size:18px}
#task-panel .task-cancel-header{display:none;padding:6px 9px;font-size:10.5px}
#task-panel .task-stage-rail{min-height:52px;padding:8px max(28px,calc((100vw - 1180px)/2));align-items:center;background:var(--bg);border-bottom:1px solid var(--border)}
#task-panel .task-stage-node{min-width:112px;gap:3px;font-size:9px}
#task-panel .task-stage-node:not(:last-child)::after{top:10px;left:calc(50% + 12px);right:calc(-50% + 12px);height:1px}
#task-panel .task-stage-node span{width:21px;height:21px;font-size:9px}
#task-panel .task-stage-node strong{font-size:9.5px;font-weight:720}
#task-panel .task-workspace-tabs{gap:0;padding:0 max(28px,calc((100vw - 1440px)/2));background:var(--bg2);border-bottom:1px solid var(--border)}
#task-panel .task-panel-tab{position:relative;display:inline-flex;align-items:center;gap:6px;border:0;border-bottom:0!important;border-radius:0;padding:13px 14px;color:var(--text2);font-size:12px;font-weight:680}
#task-panel .task-panel-tab:hover{background:transparent;color:var(--text)}
#task-panel .task-panel-tab.active{background:transparent;border-bottom-color:transparent!important;color:var(--accent-text)}
#task-panel .task-panel-tab.active::after{content:"";position:absolute;bottom:0;left:50%;width:44px;height:2px;border-radius:99px;background:var(--brand);transform:translateX(-50%)}
#task-panel .task-record-avatar.has-photo{overflow:hidden;background:var(--bg3)}#task-panel .task-record-avatar img{width:100%;height:100%;object-fit:cover}
.lead-editor-customer-card{display:flex;align-items:center;gap:10px;margin-bottom:16px;padding:11px 12px;border:1px solid var(--border);border-radius:9px;background:var(--bg3)}.lead-editor-customer-card>div:nth-child(2){min-width:0;flex:1}.lead-editor-customer-card strong,.lead-editor-customer-card span{display:block}.lead-editor-customer-card strong{font-size:12px}.lead-editor-customer-card span{margin-top:3px;overflow:hidden;color:var(--text3);font-size:10.5px;text-overflow:ellipsis;white-space:nowrap}.lead-editor-customer-avatar{display:grid;place-items:center;width:40px;height:40px;overflow:hidden;border-radius:50%;background:var(--accent-light);color:var(--accent-text);font-size:12px;font-weight:800;flex:none}.lead-editor-customer-avatar img{width:100%;height:100%;object-fit:cover}.lead-editor-photo-button{position:relative;flex:none;font-size:10.5px!important}.lead-editor-photo-button input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.lead-editor-customer-empty{margin-bottom:16px;padding:10px 12px;border:1px dashed var(--border2);border-radius:8px;background:var(--bg3);color:var(--text3);font-size:11px;line-height:1.45}
#task-panel .task-panel-tab em{display:none;min-width:17px;height:17px;place-items:center;border-radius:50%;background:var(--bg4);color:var(--text3);font-size:9px;font-style:normal;font-weight:800}
#task-panel .task-panel-tab em:not(:empty){display:grid}
#task-panel .task-panel-tab.active em{background:var(--accent-light);color:var(--accent-text)}
#task-panel .panel-body{background:var(--bg3)}
#task-panel .task-workspace-layout{max-width:none;min-height:calc(100vh - 122px);grid-template-columns:320px minmax(0,1fr);background:var(--bg)}
#task-panel .task-record-sidebar{padding:24px;border-right:1px solid var(--border);background:var(--bg2)}
#task-panel .task-record-section{padding-top:18px;margin-top:18px}
#task-panel .task-workspace-main{padding:26px 34px;background:var(--bg)}
#task-panel .task-panel-section.active{max-width:1040px;margin:0}
#task-panel .panel-section-label{font-size:10px;font-weight:800;letter-spacing:.08em}
#task-panel .workspace-section-head{padding-bottom:14px;margin-bottom:16px;border-bottom:1px solid var(--border)}
#task-panel .workspace-section-head p{max-width:660px}
#task-panel .workspace-empty-state{max-width:740px;border-radius:8px;padding:18px}
#task-panel .task-product-overview{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr);border:1px solid var(--border);border-radius:8px;background:var(--bg2);overflow:hidden}
#task-panel .task-product-primary{padding:22px;border-right:1px solid var(--border)}
#task-panel .task-product-primary strong{display:block;margin-top:6px;font-size:20px;line-height:1.2}
#task-panel .task-product-primary p{max-width:450px;margin:7px 0 0;font-size:12px;line-height:1.5;color:var(--text3)}
#task-panel .task-product-facts{display:grid;grid-template-columns:1fr 1fr;align-content:start}
#task-panel .task-product-facts>div{padding:16px;border-bottom:1px solid var(--border)}
#task-panel .task-product-facts>div:nth-child(odd){border-right:1px solid var(--border)}
#task-panel .task-product-facts>div:last-child{grid-column:1/-1;border-bottom:0}
#task-panel .task-product-facts span,#task-panel .task-product-facts strong{display:block}
#task-panel .task-product-facts span{font-size:10px;color:var(--text3)}
#task-panel .task-product-facts strong{margin-top:4px;font-size:12px;color:var(--text)}
@media(max-width:760px){#task-panel .panel-top{padding:11px 14px}#task-panel .task-stage-rail{padding:8px 14px}#task-panel .task-workspace-tabs{padding:0 8px}#task-panel .task-panel-tab{padding:12px 10px}#task-panel .task-workspace-layout{grid-template-columns:1fr}#task-panel .task-record-sidebar{padding:16px;border-right:0}#task-panel .task-workspace-main{padding:18px 16px}#task-panel .task-product-overview{grid-template-columns:1fr}#task-panel .task-product-primary{border-right:0;border-bottom:1px solid var(--border)}#task-panel .task-cancel-header{display:none!important}}

/* Scheduled CRM work is intentionally separate from the audit timeline. */
.activity-workspace-head{align-items:flex-start}.task-activity-filters{display:flex;gap:5px;margin:0 0 12px}.task-activity-filters button{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--text2);font:650 11px/1 inherit;cursor:pointer}.task-activity-filters button:hover{background:var(--bg3)}.task-activity-filters button.active{border-color:#a8ddd4;background:#e7f8f4;color:#087d70}.task-activity-filters span{display:grid;place-items:center;min-width:16px;height:16px;border-radius:50%;background:var(--bg4);font-size:9px}.task-activity-list{border:1px solid var(--border);border-radius:9px;background:var(--bg2);overflow:hidden}.task-activity-row{display:grid;grid-template-columns:34px minmax(0,1fr) 112px auto;gap:10px;align-items:center;padding:12px;border-bottom:1px solid var(--border)}.task-activity-row:last-child{border-bottom:0}.task-activity-row.complete{opacity:.58}.task-activity-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:8px}.task-activity-icon svg{width:16px;height:16px}.task-activity-icon.call{background:#e6f1ff;color:#2765c8}.task-activity-icon.event{background:#f2eaff;color:#7446b7}.task-activity-icon.task{background:#e6f8f2;color:#087d70}.task-activity-main{min-width:0}.task-activity-main strong,.task-activity-main span,.task-activity-main small{display:block}.task-activity-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-activity-main span,.task-activity-main small{margin-top:3px;color:var(--text3);font-size:10.5px}.task-activity-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-activity-owner{display:flex;align-items:center;gap:6px;min-width:0}.task-activity-owner .avatar{width:24px;height:24px;font-size:9px;flex:none}.task-activity-owner small{font-size:10px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-activity-actions{display:flex;gap:4px}.task-activity-actions .icon-btn{width:28px;height:28px;font-size:15px}
.activity-type-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}.activity-type-picker button{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text2);font:700 12px/1 inherit;cursor:pointer}.activity-type-picker button svg{width:16px;height:16px}.activity-type-picker button.active{border-color:#76cfc1;background:#e7f8f4;color:#087d70}.activity-modal-body textarea{min-height:88px}

/* Product selection stays inside the lead, with a searchable catalog and inline pricing. */
.task-product-quick-add{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:10px;align-items:end;margin-bottom:12px}.task-product-quick-add label{display:block;margin-bottom:6px;color:var(--text2);font-size:11px;font-weight:700}.task-product-quick-add select{height:36px;padding:0 8px;border:1px solid var(--border2);border-radius:7px;background:var(--bg2);font:inherit;font-size:12px;color:var(--text)}.task-product-search-wrap{position:relative}.task-product-search-wrap .search-box{width:100%;max-width:none;height:36px}.task-product-search-results{position:absolute;top:calc(100% + 4px);right:0;left:0;z-index:6;max-height:252px;overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg2);box-shadow:0 12px 28px rgba(15,23,42,.14)}.task-product-search-results:empty{display:none}.task-product-search-results>button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:9px 10px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);text-align:left;cursor:pointer}.task-product-search-results>button:last-child{border-bottom:0}.task-product-search-results>button:hover{background:#eef9f6}.task-product-search-results strong,.task-product-search-results small{display:block}.task-product-search-results strong{font-size:11px}.task-product-search-results small{margin-top:2px;color:var(--text3);font-size:10px}.task-product-search-results b{color:#087d70;font-size:11px;white-space:nowrap}.task-product-search-empty{padding:10px;color:var(--text3);font-size:11px}.task-product-search-empty button{margin-left:4px;padding:0;border:0;background:transparent;color:#087d70;font:700 11px/1 inherit;cursor:pointer}.task-product-inline-editor{border:1px solid var(--border);border-radius:9px;background:var(--bg2);overflow:hidden}.task-product-inline-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid var(--border)}.task-product-inline-head strong{font-size:12px}.task-product-inline-head .btn{font-size:10.5px;padding:5px 8px}.task-product-inline-editor .task-product-lines{padding:0 5px}.task-product-inline-editor .task-product-form-summary{padding:0 11px 11px}.task-product-inline-editor .task-product-lines-empty{margin:10px 5px}

/* Calendar is a compact weekly planner: one visual language for calls, events, tasks, and lead dates. */
.activity-calendar{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:660px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);overflow:hidden}.activity-calendar-side{padding:15px;border-right:1px solid var(--border);background:var(--bg)}.activity-calendar-side-head,.activity-calendar-head,.activity-calendar-nav,.activity-calendar-actions{display:flex;align-items:center}.activity-calendar-side-head{justify-content:space-between;font-size:13px;font-weight:800}.activity-calendar-mini-month{margin:16px 0 12px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);font-size:12px;font-weight:750}.activity-calendar-mini-month small{display:block;margin-top:4px;color:var(--text3);font-size:10px;font-weight:500}.activity-calendar-filter-list{display:grid;gap:3px}.activity-calendar-filter-list button{display:grid;grid-template-columns:10px 1fr auto;gap:8px;align-items:center;width:100%;padding:8px;border:0;border-radius:7px;background:transparent;color:var(--text2);font:650 11px/1 inherit;text-align:left;cursor:pointer}.activity-calendar-filter-list button:hover{background:var(--bg3)}.activity-calendar-filter-list button.active{background:#e7f8f4;color:#087d70}.activity-calendar-filter-list i,.activity-calendar-upcoming i{width:8px;height:8px;border-radius:50%;background:#8b99a6}.activity-calendar-filter-list i.call,.activity-calendar-upcoming i.call{background:#2765c8}.activity-calendar-filter-list i.event,.activity-calendar-upcoming i.event{background:#7446b7}.activity-calendar-filter-list i.task,.activity-calendar-upcoming i.task{background:#087d70}.activity-calendar-filter-list i.lead,.activity-calendar-upcoming i.lead{background:#d97706}.activity-calendar-filter-list b{font-size:10px}.activity-calendar-upcoming{display:grid;gap:6px;margin-top:20px;padding-top:15px;border-top:1px solid var(--border)}.activity-calendar-upcoming>span{color:var(--text3);font-size:9.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.activity-calendar-upcoming button{display:grid;grid-template-columns:8px minmax(0,1fr);gap:8px;align-items:start;padding:6px 0;border:0;background:transparent;color:var(--text);text-align:left;cursor:pointer}.activity-calendar-upcoming i{margin-top:4px}.activity-calendar-upcoming strong,.activity-calendar-upcoming small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-calendar-upcoming strong{font-size:10.5px}.activity-calendar-upcoming small,.activity-calendar-upcoming p{margin-top:2px;color:var(--text3);font-size:9.5px}.activity-calendar-main{min-width:0}.activity-calendar-head{justify-content:space-between;gap:12px;padding:14px;border-bottom:1px solid var(--border)}.activity-calendar-nav{gap:8px}.activity-calendar-nav strong{font-size:13px;white-space:nowrap}.activity-calendar-actions{gap:6px}.activity-calendar-head .icon-btn{width:28px;height:28px;font-size:20px}.activity-calendar-head .btn{font-size:10.5px;padding:6px 9px}.activity-calendar-week{display:grid;grid-template-columns:54px minmax(0,1fr);min-width:840px}.activity-calendar-times{padding-top:43px}.activity-calendar-times span{display:block;height:72px;padding:4px 6px 0 0;color:var(--text3);font-size:9px;text-align:right}.activity-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(118px,1fr));border-left:1px solid var(--border)}.activity-calendar-day{min-width:0;border-right:1px solid var(--border)}.activity-calendar-day>header{height:43px;padding:13px 8px 0;color:var(--text2);font-size:10px;font-weight:760;text-align:center}.activity-calendar-day.today>header{color:#087d70}.activity-calendar-grid{position:relative;height:720px;border-top:1px solid var(--border);background:repeating-linear-gradient(to bottom,transparent 0,transparent 71px,var(--border) 72px)}.activity-calendar-position{position:absolute;right:3px;left:3px;z-index:1}.activity-calendar-card{display:grid;grid-template-columns:17px minmax(0,1fr);gap:4px;width:100%;height:100%;padding:5px;border:0;border-left:3px solid #087d70;border-radius:5px;background:#e6f8f2;color:#145d56;text-align:left;cursor:pointer;overflow:hidden}.activity-calendar-card:hover{filter:brightness(.97)}.activity-calendar-card.call{border-color:#2765c8;background:#e6f1ff;color:#2557a8}.activity-calendar-card.event{border-color:#7446b7;background:#f2eaff;color:#64379e}.activity-calendar-card.lead{border-color:#d97706;background:#fff3db;color:#9a5a0d}.activity-calendar-card.complete{opacity:.52}.activity-calendar-card-icon svg{width:13px;height:13px}.activity-calendar-card b,.activity-calendar-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-calendar-card b{font-size:9.5px}.activity-calendar-card small{margin-top:2px;font-size:8.5px}@media(max-width:980px){.activity-calendar{grid-template-columns:1fr}.activity-calendar-side{display:none}.activity-calendar-main{overflow-x:auto}}@media(max-width:760px){.task-activity-row{grid-template-columns:34px minmax(0,1fr) auto}.task-activity-owner{display:none}.activity-workspace-head .workspace-actions{margin-top:10px}.activity-calendar-head{align-items:flex-start;flex-direction:column}.activity-calendar-actions{align-self:stretch}.activity-calendar-actions .btn{flex:1}.activity-calendar-week{min-width:700px}}

/* ══════════════════════════════════════════════════════
   Activity Modal v3 — Teams-style, type-specific forms
══════════════════════════════════════════════════════ */

/* Override the default modal size for activity modal */
#modal-overlay.open .modal:has(.am2-shell),
#modal-overlay.open .modal.am2-modal {
  width: min(900px, 96vw);
  height: min(620px, 92vh);
  max-height: min(620px, 92vh);
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}

.am2-shell { display: flex; height: 100%; }

/* ── Left panel ── */
.am2-left { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

/* Top bar */
.am2-topbar { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0 18px 0 14px; min-height: 50px; }
.am2-tabs { display: flex; gap: 0; }
.am2-tab { display: flex; align-items: center; gap: 7px; padding: 0 16px; border: none; background: none; font: 500 12px/1 inherit; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; transition: .15s; }
.am2-tab:hover { color: var(--text); background: var(--bg3); }
.am2-tab.active { color: var(--brand, #2563eb); border-bottom-color: var(--brand, #2563eb); }
.am2-x { display: flex; align-items: center; justify-content: center; width: 32px; border: none; background: none; border-radius: 6px; color: var(--text2); cursor: pointer; }
.am2-x:hover { background: var(--bg3); color: var(--text); }

/* Body */
.am2-body { flex: 1; overflow-y: auto; padding: 16px 20px 8px; display: flex; flex-direction: column; gap: 0; }

/* Title row */
.am2-title-wrap { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--text3); }
.am2-title { flex: 1; border: none; outline: none; font: 600 19px/1.4 inherit; color: var(--text); background: transparent; }
.am2-title::placeholder { color: var(--text3); font-weight: 400; font-size: 17px; }

/* Field rows — clean underline style like Teams/Outlook */
.am2-row { display: flex; align-items: flex-start; gap: 14px; padding: 0; min-height: 44px; border-bottom: 1px solid var(--border); }
.am2-row:last-child { border-bottom: none; }
.am2-row > svg { flex-shrink: 0; margin-top: 15px; color: var(--text3); }
.am2-row-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; }
.am2-dt { flex: 1; min-width: 130px; padding: 4px 0; border: none; font: 13px/1 inherit; color: var(--text); background: transparent; outline: none; }
.am2-arr { color: var(--text3); font-size: 14px; flex-shrink: 0; }
.am2-sel { flex: 1; min-width: 100px; padding: 4px 0; border: none; font: 13px/1 inherit; color: var(--text); background: transparent; outline: none; cursor: pointer; appearance: auto; }
.am2-sel-label { font-size: 11px; color: var(--text3); flex-shrink: 0; }
.am2-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.am2-notes-row > svg { margin-top: 12px; }
.am2-notes { width: 100%; min-height: 80px; padding: 8px 0; border: none; font: 13px/1.6 inherit; color: var(--text); background: transparent; resize: none; outline: none; }

/* Invitees (Event) */
.am2-invitees-wrap { position: relative; flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 32px; }
.am2-invitees-input { border: none; outline: none; font: 13px/1 inherit; color: var(--text); background: transparent; min-width: 160px; flex: 1; padding: 2px 0; }
.am2-invitees-input::placeholder { color: var(--text3); }
.am2-invitee-results { position: absolute; top: calc(100% + 8px); left: -34px; right: 0; z-index: 20; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.15); overflow: hidden; min-width: 260px; }
.am2-invitee-results:empty { display: none; }
.am2-inv-label { padding: 8px 12px 4px; font: 600 10px/1 inherit; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.am2-inv-result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: none; background: transparent; cursor: pointer; text-align: left; }
.am2-inv-result:hover { background: var(--bg3); }
.am2-inv-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand, #2563eb); color: #fff; display: flex; align-items: center; justify-content: center; font: 600 12px/1 inherit; flex-shrink: 0; }
.am2-inv-info { display: flex; flex-direction: column; gap: 2px; }
.am2-inv-info strong { font-size: 13px; color: var(--text); }
.am2-inv-info small { font-size: 11px; color: var(--text3); }

/* Pills */
.am2-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 20px; background: var(--bg3); border: 1px solid var(--border); font-size: 12px; color: var(--text2); }
.am2-pill-opt { opacity: .7; border-style: dashed; }
.am2-pill-av { width: 20px; height: 20px; border-radius: 50%; background: var(--brand, #2563eb); color: #fff; display: flex; align-items: center; justify-content: center; font: 600 10px/1 inherit; flex-shrink: 0; }
.am2-pill button { border: none; background: none; cursor: pointer; color: var(--text3); padding: 0 2px; font-size: 12px; line-height: 1; }
.am2-pill button:hover { color: var(--text); }

/* Footer */
.am2-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
.am2-footer-left { display: flex; align-items: center; gap: 8px; }
.am2-email-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--text2); user-select: none; }
.am2-email-toggle input { accent-color: var(--brand, #2563eb); }

/* ── Right panel ── */
.am2-right { width: 236px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--bg2); display: flex; flex-direction: column; overflow: hidden; }
.am2-mini-cal { padding: 16px 14px 10px; flex-shrink: 0; }
.am2-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.am2-cal-head span { font: 600 12px/1 inherit; color: var(--text); }
.am2-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.am2-dow { text-align: center; font: 500 10px/26px inherit; color: var(--text3); }
.am2-cd { text-align: center; font: 11px/26px inherit; color: var(--text2); border-radius: 50%; }
.am2-cd.tod { color: var(--brand, #2563eb); font-weight: 700; }
.am2-cd.sel { background: var(--brand, #2563eb); color: #fff; font-weight: 700; border-radius: 50%; }
.am2-cd.empty { visibility: hidden; }
.am2-timeline { flex: 1; overflow-y: auto; padding: 0 14px 12px; border-top: 1px solid var(--border); }
.am2-tl-head { font: 600 10px/1 inherit; color: var(--text3); padding: 10px 0 8px; letter-spacing: .5px; }
.am2-slot { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.am2-st { font: 10px/22px 'Geist Mono', monospace; color: var(--text3); width: 40px; flex-shrink: 0; }
.am2-sb { flex: 1; height: 22px; border-radius: 4px; background: var(--bg3); position: relative; }
.am2-sb-on { background: color-mix(in srgb, var(--brand,#2563eb) 15%, transparent); border: 1px solid color-mix(in srgb, var(--brand,#2563eb) 30%, transparent); }
.am2-sb-start::before { content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--brand, #2563eb); }

/* ── Product Editor Modal ── */
.pe-section-label{font:700 10px/1 inherit;color:var(--text3);text-transform:uppercase;letter-spacing:.6px;padding-bottom:4px;border-bottom:1px solid var(--border);margin-bottom:2px}
.pe-price-preview{background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;margin-top:4px}
.pe-preview-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--text2)}
.pe-preview-row strong{font-size:12px;color:var(--text)}
.pe-preview-total{padding-top:8px;border-top:1px solid var(--border);margin-top:2px}
.pe-preview-total span{font-size:13px;font-weight:700;color:var(--text)}
.pe-preview-total strong{font-size:14px;font-weight:700;color:var(--brand,#2563eb)}

/* ── Accounting Dashboard — prominent transaction cards & report grid ── */
.ah-tx-section{border:1px solid var(--border);border-radius:14px;background:var(--bg2);box-shadow:var(--shadow);overflow:hidden;margin-bottom:14px}
.ah-section-head{display:flex;align-items:center;gap:10px;padding:15px 18px;border-bottom:1px solid var(--border)}
.ah-section-head span{font-size:10px;font-weight:850;letter-spacing:.09em;color:var(--accent-text);text-transform:uppercase;flex-shrink:0}
.ah-section-head h3{margin:0;font-size:15px;flex:1}
.ah-tx-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:1px;background:var(--border)}

/* Transaction card — bigger, icon-led */
.ah-tx-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:20px 18px 16px;background:var(--bg2);cursor:pointer;transition:background .12s}
.ah-tx-card:hover{background:var(--bg3)}
.ah-tx-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;flex-shrink:0;transition:transform .15s}
.ah-tx-card:hover .ah-tx-icon{transform:scale(1.06)}

/* Per-type colours */
.ah-tx-invoice  {background:#e0f0ff;color:#1d6cba}
.ah-tx-payment  {background:#e8f8f0;color:#0d7a52}
.ah-tx-return   {background:#fef0e6;color:#b05a10}
.ah-tx-expense  {background:#fce8f4;color:#a0178a}
.ah-tx-bill     {background:#fff0e0;color:#b06000}
.ah-tx-supplier {background:#e8eeff;color:#2c4dba}
.ah-tx-banking  {background:#e6f7f4;color:#0d7a6e}
.ah-tx-journal  {background:#f4eeff;color:#6b35b8}
.ah-tx-chart    {background:#eef6e8;color:#3d7a10}
.ah-tx-einvoice {background:#e8fff4;color:#0a7a44}

.ah-tx-body{display:flex;flex-direction:column;gap:8px;width:100%}
.ah-tx-body strong{font-size:12px;font-weight:700;color:var(--text);line-height:1.2}
.ah-tx-btns{display:flex;gap:6px}
.ah-btn-add{padding:5px 12px;border-radius:8px;border:none;background:var(--brand,#2563eb);color:#fff;font:600 11px/1 inherit;cursor:pointer;transition:.12s}
.ah-btn-add:hover{filter:brightness(.92)}
.ah-btn-list{padding:5px 10px;border-radius:8px;border:1px solid var(--border2);background:var(--bg);color:var(--text2);font:500 11px/1 inherit;cursor:pointer;transition:.12s}
.ah-btn-list:hover{background:var(--bg3);color:var(--text)}

/* Report cards */
.ah-report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border)}
.ah-report-card{display:flex;align-items:center;gap:14px;padding:18px 20px;background:var(--bg2);border:none;text-align:left;cursor:pointer;transition:background .12s;width:100%}
.ah-report-card:hover{background:var(--bg3)}
.ah-report-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--bg3);color:var(--brand,#2563eb);flex-shrink:0;border:1px solid var(--border)}
.ah-report-card:hover .ah-report-icon{background:color-mix(in srgb,var(--brand,#2563eb) 10%,var(--bg3));border-color:color-mix(in srgb,var(--brand,#2563eb) 30%,transparent)}
.ah-report-body{flex:1;min-width:0}
.ah-report-body strong{display:block;font-size:12px;font-weight:700;color:var(--text);margin-bottom:3px}
.ah-report-body span{display:block;font-size:11px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ah-report-arrow{color:var(--text3);flex-shrink:0;opacity:0;transition:.12s;transform:translateX(-4px)}
.ah-report-card:hover .ah-report-arrow{opacity:1;transform:translateX(0)}

@media(max-width:1200px){.ah-tx-grid{grid-template-columns:repeat(4,1fr)}.ah-report-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.ah-tx-grid{grid-template-columns:repeat(3,1fr)}.ah-report-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.ah-tx-grid{grid-template-columns:repeat(2,1fr)}.ah-report-grid{grid-template-columns:1fr}}

/* ══ Teams-style People Picker (tpp) ══════════════════════════════ */
.tpp-row-body { align-items: flex-start !important; padding: 0 !important; flex: 1; }

.tpp-wrap { position: relative; flex: 1; }

.tpp-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 5px 0;
  cursor: text;
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s;
}
.tpp-field:focus-within { border-bottom-color: var(--brand, #2563eb); }

.tpp-pills { display: flex; flex-wrap: wrap; gap: 5px; }

.tpp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 6px 3px 4px; border-radius: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 12px; color: var(--text); max-width: 180px;
  cursor: default;
}
.tpp-pill.tpp-opt { border-style: dashed; opacity: .75; }
.tpp-pill-av {
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 10px/1 inherit; flex-shrink: 0;
}
.tpp-pill-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.tpp-pill-opt-btn, .tpp-pill-rm {
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; padding: 0;
  color: var(--text3); line-height: 1; flex-shrink: 0;
}
.tpp-pill-opt-btn { font-size: 10px; width: 14px; }
.tpp-pill-rm { width: 14px; height: 14px; border-radius: 50%; }
.tpp-pill-rm:hover { background: var(--border2); color: var(--text); }
.tpp-pill-opt-btn:hover { color: var(--text); }

.tpp-input {
  border: none; outline: none; background: transparent;
  font: 13px/1 inherit; color: var(--text); min-width: 140px; flex: 1;
  padding: 2px 0;
}
.tpp-input::placeholder { color: var(--text3); }

/* Dropdown */
.tpp-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: -2px; right: 0;
  z-index: 30; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15,23,42,.16);
  overflow: hidden; min-width: 260px; max-height: 280px; overflow-y: auto;
}
.tpp-dropdown.open { display: block; }

.tpp-group-label {
  padding: 10px 14px 4px;
  font: 700 10px/1 inherit; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px;
  background: var(--bg2); position: sticky; top: 0;
}

.tpp-person {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 14px;
  border: none; background: transparent; cursor: pointer; text-align: left;
  transition: background .1s;
}
.tpp-person:hover { background: var(--bg3); }

.tpp-av {
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 inherit; flex-shrink: 0;
}
.tpp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpp-info strong { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpp-info small  { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpp-add { color: var(--text3); flex-shrink: 0; opacity: 0; transition: .12s; }
.tpp-person:hover .tpp-add { opacity: 1; color: var(--brand, #2563eb); }

/* ── Activity Modal v3 shell ── */
#modal-overlay.open .modal:has(.am2-shell),
#modal-overlay.open .modal.am2-modal {
  width: min(900px, 96vw); height: min(620px, 92vh);
  max-height: min(620px, 92vh); padding: 0;
  overflow: hidden; border-radius: 14px;
}
.am2-shell { display: flex; height: 100%; }
.am2-left  { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.am2-topbar { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0 18px 0 14px; min-height: 50px; }
.am2-tabs   { display: flex; }
.am2-tab    { display: flex; align-items: center; gap: 7px; padding: 0 16px; border: none; background: none; font: 500 12px/1 inherit; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; transition: .15s; }
.am2-tab:hover  { color: var(--text); }
.am2-tab.active { color: var(--brand,#2563eb); border-bottom-color: var(--brand,#2563eb); }
.am2-x { display: flex; align-items: center; justify-content: center; width: 32px; border: none; background: none; border-radius: 6px; color: var(--text2); cursor: pointer; }
.am2-x:hover { background: var(--bg3); color: var(--text); }

.am2-body { flex: 1; overflow-y: auto; padding: 14px 20px 8px; display: flex; flex-direction: column; gap: 0; }

.am2-title-wrap { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--text3); }
.am2-title { flex: 1; border: none; outline: none; font: 600 19px/1.4 inherit; color: var(--text); background: transparent; }
.am2-title::placeholder { color: var(--text3); font-weight: 400; font-size: 17px; }

.am2-row { display: flex; align-items: flex-start; gap: 14px; min-height: 44px; border-bottom: 1px solid var(--border); }
.am2-row:last-child { border-bottom: none; }
.am2-row > svg { flex-shrink: 0; margin-top: 15px; color: var(--text3); }
.am2-row-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; }
.am2-dt  { flex: 1; min-width: 130px; padding: 4px 0; border: none; font: 13px/1 inherit; color: var(--text); background: transparent; outline: none; }
.am2-arr { color: var(--text3); font-size: 14px; flex-shrink: 0; }
.am2-sel { flex: 1; min-width: 100px; padding: 4px 0; border: none; font: 13px/1 inherit; color: var(--text); background: transparent; outline: none; cursor: pointer; }
.am2-sel-label { font-size: 11px; color: var(--text3); flex-shrink: 0; }
.am2-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.am2-notes-row > svg { margin-top: 12px; }
.am2-notes { width: 100%; min-height: 80px; padding: 8px 0; border: none; font: 13px/1.6 inherit; color: var(--text); background: transparent; resize: none; outline: none; }

.am2-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
.am2-footer-left { display: flex; align-items: center; gap: 8px; }
.am2-email-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--text2); user-select: none; }
.am2-email-toggle input { accent-color: var(--brand,#2563eb); }

/* Right panel */
.am2-right { width: 220px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--bg2); display: flex; flex-direction: column; overflow: hidden; }
.am2-mini-cal { padding: 16px 14px 10px; flex-shrink: 0; }
.am2-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.am2-cal-head span { font: 600 12px/1 inherit; color: var(--text); }
.am2-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.am2-dow { text-align: center; font: 500 10px/26px inherit; color: var(--text3); }
.am2-cd  { text-align: center; font: 11px/26px inherit; color: var(--text2); border-radius: 50%; }
.am2-cd.tod { color: var(--brand,#2563eb); font-weight: 700; }
.am2-cd.sel { background: var(--brand,#2563eb); color: #fff; font-weight: 700; }
.am2-cd.empty { visibility: hidden; }
.am2-timeline { flex: 1; overflow-y: auto; padding: 0 14px 12px; border-top: 1px solid var(--border); }
.am2-tl-head  { font: 600 10px/1 inherit; color: var(--text3); padding: 10px 0 8px; letter-spacing: .5px; }
.am2-slot { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.am2-st   { font: 10px/22px 'Geist Mono',monospace; color: var(--text3); width: 40px; flex-shrink: 0; }
.am2-sb   { flex: 1; height: 22px; border-radius: 4px; background: var(--bg3); position: relative; }
.am2-sb-on    { background: color-mix(in srgb,var(--brand,#2563eb) 15%,transparent); border: 1px solid color-mix(in srgb,var(--brand,#2563eb) 30%,transparent); }
.am2-sb-start::before { content:''; position:absolute; left:-5px; top:50%; transform:translateY(-50%); width:7px; height:7px; border-radius:50%; background:var(--brand,#2563eb); }

.tpp-empty { padding: 10px 14px; font-size: 12px; color: var(--text3); }

/* ── Product panel fixes ── */
.task-line-remove {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--text3); cursor: pointer; font-size: 16px; line-height: 1;
  transition: .12s;
}
.task-line-remove:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

.tpqa-search-block { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tpqa-actions { display: flex; gap: 8px; }
.tpqa-create-btn { font-size: 11px; padding: 5px 10px; }

/* Product search results — only show when not empty */
.task-product-search-results:empty { display: none; }

/* ══ Modern Product Lines (pll) ══════════════════════════════════ */

/* Empty state */
.pll-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 32px 20px; color: var(--text3);
  border: 1.5px dashed var(--border2); border-radius: 12px; text-align: center;
  font-size: 13px;
}
.pll-empty svg { opacity: .35; }

/* Product card — each line is a card */
.pll-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  transition: box-shadow .15s;
}
.pll-card:hover { box-shadow: 0 2px 12px rgba(15,23,42,.07); }

.pll-card-top {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px;
}
.pll-product-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Remove button — always visible, top right of card */
.pll-remove {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  border: 1px solid var(--border2); border-radius: 8px;
  background: transparent; color: var(--text3); cursor: pointer;
  margin-top: 18px; transition: .12s;
}
.pll-remove:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* Field grid */
.pll-card-fields {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 80px 1fr;
  gap: 10px; align-items: end;
}

.pll-field { display: flex; flex-direction: column; gap: 4px; }
.pll-field-discount { grid-column: span 1; }

.pll-label {
  font: 700 10px/1 inherit; color: var(--text3);
  text-transform: uppercase; letter-spacing: .5px;
}

.pll-input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border2); border-radius: 8px;
  font: 13px/1 inherit; color: var(--text); background: var(--bg);
  outline: none; transition: border-color .12s;
}
.pll-input:focus { border-color: var(--brand,#2563eb); }

.pll-select {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border2); border-radius: 8px;
  font: 13px/1 inherit; color: var(--text); background: var(--bg);
  outline: none; cursor: pointer;
}

.pll-discount-wrap { display: flex; gap: 6px; }
.pll-disc-type { flex: 0 0 70px; }
.pll-disc-val  { flex: 1; }

.pll-field-total { justify-content: flex-end; }
.pll-total {
  font: 700 14px/1 inherit; color: var(--text);
  padding: 8px 0; text-align: right;
}

/* Summary bar */
.pll-summary {
  margin-top: 4px; border-top: 1px solid var(--border);
  padding: 12px 4px 4px; display: flex; flex-direction: column; gap: 6px;
}
.pll-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text2);
}
.pll-summary-row b { font-size: 13px; color: var(--text); }
.pll-disc-row { color: var(--red-text,#dc2626); }
.pll-disc-row b { color: var(--red-text,#dc2626); }
.pll-summary-total {
  padding-top: 8px; border-top: 1px solid var(--border);
  font-weight: 700; color: var(--text);
}
.pll-summary-total b { font-size: 16px; color: var(--brand,#2563eb); font-weight: 700; }

/* Search area modernisation */
.task-product-quick-add {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.tpqa-search-block { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tpqa-search-block label { font: 700 11px/1 inherit; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.task-product-search-wrap { position: relative; }
.task-product-search-wrap .search-box {
  width: 100%; padding: 9px 14px;
  border: 1.5px solid var(--border2); border-radius: 10px;
  font: 13px/1 inherit; background: var(--bg2); color: var(--text);
}
.task-product-search-wrap .search-box:focus { border-color: var(--brand,#2563eb); outline: none; }
.task-product-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12); overflow: hidden;
}
.task-product-search-results button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px; border: none; background: transparent;
  cursor: pointer; text-align: left; transition: background .1s;
}
.task-product-search-results button:hover { background: var(--bg3); }
.task-product-search-results button span { display: flex; flex-direction: column; gap: 2px; }
.task-product-search-results button strong { font-size: 13px; color: var(--text); }
.task-product-search-results button small { font-size: 11px; color: var(--text3); }
.task-product-search-results button b { font-size: 13px; font-weight: 700; color: var(--brand,#2563eb); white-space: nowrap; }
.task-product-search-empty { padding: 12px 14px; font-size: 12px; color: var(--text3); }
.task-product-search-empty button { display: inline; padding: 0; border: none; background: none; color: var(--brand,#2563eb); cursor: pointer; font-size: 12px; text-decoration: underline; }
.task-product-search-empty button + button { margin-left: 12px; }
.tpqa-actions { flex-wrap: wrap; }

/* Inline editor header */
.task-product-inline-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.task-product-inline-head strong { font-size: 13px; font-weight: 700; color: var(--text); }

@media(max-width:700px){
  .pll-card-fields { grid-template-columns: 1fr 1fr; }
  .pll-field-discount { grid-column: span 2; }
  .pll-field-total { grid-column: span 2; text-align: right; }
}

/* Sidebar layout */
.task-record-sidebar {
  width: 240px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 0;
  border-right: 1px solid var(--border);
  background: var(--bg2);
  overflow-y: auto; padding: 0;
}

.trs-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.trs-section:last-child { border-bottom: none; }

.trs-label {
  font: 700 10px/1 inherit; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px;
}

/* Customer card */
.trs-customer-card {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); cursor: pointer; text-align: left;
  transition: border-color .12s, box-shadow .12s;
}
.trs-customer-card:hover:not(:disabled) {
  border-color: var(--brand,#2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand,#2563eb) 10%,transparent);
}
.trs-customer-card:disabled { opacity: .6; cursor: default; }
.trs-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand,#2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 inherit;
}
.trs-customer-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trs-customer-info strong { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trs-customer-info small  { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trs-customer-card > svg  { color: var(--text3); flex-shrink: 0; }

/* Vitals grid */
.trs-vitals { display: flex; flex-direction: column; gap: 8px; }
.trs-vital {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.trs-vital > svg { color: var(--text3); flex-shrink: 0; }
.trs-vital-label { color: var(--text3); flex: 1; }
.trs-vital-val { font-weight: 600; color: var(--text); text-align: right; }

/* Assignee */
.trs-assignee {
  display: flex; align-items: center; gap: 8px;
}
.trs-assignee-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 11px/1 inherit;
}
.trs-assignee-name {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.trs-assignee-name small { font-size: 11px; font-weight: 400; color: var(--text3); }

/* Description */
.trs-desc {
  font-size: 12px; line-height: 1.6; color: var(--text2);
  max-height: 120px; overflow-y: auto;
}

/* Stage control inside sidebar */
#pt-stages { margin-top: 2px; }
.stage-current-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font: 600 12px/1 inherit; margin-bottom: 8px;
}
.stage-change-row {
  display: flex; gap: 6px; margin-top: 8px;
}
.stage-change-row select {
  flex: 1; padding: 6px 8px; border: 1px solid var(--border2);
  border-radius: 8px; font: 12px/1 inherit;
  background: var(--bg); color: var(--text); outline: none;
}
.stage-change-row .btn { padding: 6px 12px; font-size: 11px; }

/* Make the panel wider and panel body look better */
/* task-panel is full screen via line 318 *
.task-workspace-layout { display: flex; height: 100%; }
.task-workspace-main { flex: 1; min-width: 0; overflow-y: auto; }

/* Tab bar modernization */
.task-workspace-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  overflow-x: auto; background: var(--bg2); flex-shrink: 0;
  scrollbar-width: none;
}
.task-workspace-tabs::-webkit-scrollbar { display: none; }
.task-panel-tab {
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 11px 16px; border: none; background: transparent;
  font: 500 12px/1 inherit; color: var(--text2); cursor: pointer;
  border-bottom: 2px solid transparent; transition: .15s; flex-shrink: 0;
}
.task-panel-tab:hover { color: var(--text); background: var(--bg3); }
.task-panel-tab.active { color: var(--brand,#2563eb); border-bottom-color: var(--brand,#2563eb); }
.task-panel-tab em {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bg3); color: var(--text2); font-style: normal;
  font: 700 10px/1 inherit; margin-left: 2px;
}
.task-panel-tab.active em { background: color-mix(in srgb,var(--brand,#2563eb) 12%,transparent); color: var(--brand,#2563eb); }

/* Panel top header */
.panel-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
.panel-title-block { flex: 1; min-width: 0; }
.panel-task-title { font: 700 16px/1.3 inherit; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-task-subtitle { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* Stage rail */
.task-stage-rail {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); display: flex; align-items: center;
  gap: 0; overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}

/* ══ Services Page v2 ════════════════════════════════════════════ */
.svcpage-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:24px; }
.svcpage-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:16px; margin-bottom:32px; }

/* Card */
.svc-card { background:var(--bg2); border:1px solid var(--border); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; cursor:pointer; transition:box-shadow .15s,transform .12s; }
.svc-card:hover { box-shadow:0 6px 24px rgba(15,23,42,.10); transform:translateY(-1px); }
.svc-card-color-bar { height:4px; flex-shrink:0; }
.svc-card-top { display:flex; align-items:flex-start; gap:12px; padding:16px 16px 10px; }
.svc-card-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.svc-card-body { flex:1; min-width:0; }
.svc-card-name { font:700 14px/1.3 inherit; color:var(--text); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.svc-card-desc { font-size:12px; color:var(--text3); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.svc-default-badge { font:500 10px/1 inherit; color:var(--text3); background:var(--bg3); border:1px solid var(--border); border-radius:10px; padding:2px 7px; }
.svc-card-remove { display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:7px; border:none; background:transparent; color:var(--text3); cursor:pointer; flex-shrink:0; transition:.12s; }
.svc-card-remove:hover { background:#fee2e2; color:#dc2626; }

/* Metrics row */
.svc-card-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.svc-metric { display:flex; flex-direction:column; align-items:center; padding:10px 6px; border-right:1px solid var(--border); }
.svc-metric:last-child { border-right:none; }
.svc-metric-val { font:700 18px/1 inherit; color:var(--text); }
.svc-metric-label { font-size:10px; color:var(--text3); margin-top:3px; text-transform:uppercase; letter-spacing:.4px; }

/* Pricing */
.svc-card-pricing { padding:10px 16px; display:flex; flex-direction:column; gap:5px; }
.svc-pricing-row { display:flex; justify-content:space-between; align-items:center; font-size:12px; }
.svc-pricing-row span { color:var(--text3); }
.svc-pricing-row strong { color:var(--text); font-weight:600; }

/* Footer */
.svc-card-footer { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; border-top:1px solid var(--border); background:var(--bg3); margin-top:auto; }
.svc-edit-hint { font-size:11px; color:var(--text3); }

/* Add card */
.svc-card-add { border:2px dashed var(--border2); background:transparent; min-height:180px; }
.svc-card-add:hover { border-color:var(--brand,#2563eb); background:color-mix(in srgb,var(--brand,#2563eb) 4%,transparent); }
.svc-card-add-inner { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; height:100%; padding:32px; color:var(--text3); font-size:13px; }
.svc-card-add:hover .svc-card-add-inner { color:var(--brand,#2563eb); }

/* Editor modal */
.svc-editor-section { font:700 10px/1 inherit; color:var(--text3); text-transform:uppercase; letter-spacing:.6px; padding-bottom:4px; border-bottom:1px solid var(--border); }
.svc-color-swatch { width:26px; height:26px; border-radius:50%; border:2px solid transparent; cursor:pointer; transition:.12s; flex-shrink:0; }
.svc-color-swatch.active { border-color:var(--text); transform:scale(1.15); }
.svc-icon-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; }
.svc-icon-btn { display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:8px; border:1px solid var(--border); background:var(--bg2); cursor:pointer; color:var(--text2); transition:.12s; }
.svc-icon-btn:hover { background:var(--bg3); color:var(--text); }
.svc-icon-btn.active { background:color-mix(in srgb,var(--brand,#2563eb) 12%,transparent); border-color:var(--brand,#2563eb); color:var(--brand,#2563eb); }

/* Settings rows */
.svc-row { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius); margin-bottom:6px; background:var(--bg2); }
.svc-row span:nth-child(2) { flex:1; font-size:13px; color:var(--text); }
.svc-remove { display:flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:6px; border:none; background:transparent; color:var(--text3); cursor:pointer; transition:.12s; }
.svc-remove:hover { background:#fee2e2; color:#dc2626; }
.svc-required { font-size:10px; color:var(--text3); }

/* ── MDI Icon Picker ─────────────────────────────────────────── */
.mdi-picker-wrap { display:flex; flex-direction:column; gap:8px; }

.mdi-picker-search-row {
  display:flex; align-items:center; gap:8px;
}
.mdi-search-box {
  display:flex; align-items:center; gap:8px; flex:1;
  border:1.5px solid var(--border2); border-radius:10px;
  padding:8px 12px; background:var(--bg2);
  transition:border-color .15s;
}
.mdi-search-box:focus-within { border-color:var(--brand,#2563eb); }
.mdi-search-box svg { color:var(--text3); flex-shrink:0; }
.mdi-search-box input {
  border:none; outline:none; background:transparent;
  font:13px/1 inherit; color:var(--text); flex:1;
}
.mdi-search-box input::placeholder { color:var(--text3); }

.mdi-selected-preview {
  display:flex; align-items:center; gap:8px;
  padding:8px 12px; border:1.5px solid var(--border2);
  border-radius:10px; background:var(--bg3); min-width:130px; flex-shrink:0;
}
.mdi-selected-preview .mdi { font-size:20px; color:var(--brand,#2563eb); }
.mdi-selected-preview span:last-child {
  font-size:11px; color:var(--text3);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:80px;
}

.mdi-grid {
  display:grid;
  grid-template-columns:repeat(10,1fr);
  gap:3px;
  max-height:200px;
  overflow-y:auto;
  padding:6px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--bg2);
  scrollbar-width:thin;
}
.mdi-icon-btn {
  display:flex; align-items:center; justify-content:center;
  aspect-ratio:1; border-radius:7px; border:1px solid transparent;
  background:transparent; cursor:pointer; color:var(--text2);
  font-size:18px; transition:.1s; padding:4px;
}
.mdi-icon-btn:hover {
  background:var(--bg3); color:var(--text);
  border-color:var(--border2);
}
.mdi-icon-btn.active {
  background:color-mix(in srgb,var(--brand,#2563eb) 12%,transparent);
  color:var(--brand,#2563eb);
  border-color:color-mix(in srgb,var(--brand,#2563eb) 30%,transparent);
}

/* Customer card */
.trs-customer-card {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); cursor: pointer; text-align: left;
  transition: border-color .12s;
}
.trs-customer-card:hover:not(:disabled) { border-color: var(--brand, #2563eb); }
.trs-customer-card:disabled { opacity: .6; cursor: default; }
.trs-customer-card > svg { color: var(--text3); flex-shrink: 0; }
.trs-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 inherit;
}
.trs-customer-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trs-customer-info strong { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trs-customer-info small  { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Vitals */
.trs-vitals { display: flex; flex-direction: column; gap: 6px; }
.trs-vital { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.trs-vital > svg { color: var(--text3); flex-shrink: 0; }
.trs-vital-label { color: var(--text3); flex: 1; font-size: 11px; }
.trs-vital-val { font-weight: 600; color: var(--text); font-size: 12px; text-align: right; }

/* Stage */
.trs-stage-wrap { display: flex; flex-direction: column; gap: 8px; }
.trs-stage-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px; border: 1px solid;
  font: 600 12px/1 inherit; width: fit-content;
}
.trs-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.trs-stage-change { display: flex; gap: 6px; align-items: center; }
.trs-stage-select {
  flex: 1; padding: 5px 8px; border: 1px solid var(--border2);
  border-radius: 7px; font: 12px/1 inherit;
  background: var(--bg); color: var(--text); outline: none;
}

/* Assignee */
.trs-assignee { display: flex; align-items: center; gap: 8px; }
.trs-assignee-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 10px/1 inherit;
}
.trs-assignee-name { font-size: 12px; font-weight: 600; color: var(--text); }
.trs-assignee-name small { display: block; font-size: 11px; font-weight: 400; color: var(--text3); margin-top: 1px; }

/* Description */
.trs-desc {
  font-size: 12px; line-height: 1.6; color: var(--text2);
  max-height: 100px; overflow-y: auto;
}

/* Sidebar width in panel layout */
#task-panel .task-workspace-layout { grid-template-columns: 220px minmax(0,1fr); }

/* Remove old stage pill/hint styles */
.stage-current-pill, .stage-change-row, .task-panel-hint { display: none !important; }

/* Task panel — full width, no centering padding */
#task-panel .panel-body {
  padding: 0 !important;
  background: var(--bg) !important;
}

/* Layout */
.task-record-sidebar {
  width: 320px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto; overflow-x: hidden;
}

/* ══ Lead Panel Sidebar — collapsible, draggable ════════════════ */

/* Task panel — zero padding on panel-body */
#task-panel .panel-body { padding: 0 !important; background: var(--bg) !important; }

/* Layout */
#task-panel .task-workspace-layout {
  max-width: none !important;
  min-height: calc(100vh - 122px);
  grid-template-columns: 300px minmax(0,1fr);
  background: var(--bg);
}

/* Sidebar */
.task-record-sidebar {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width .2s ease;
  min-height: calc(100vh - 122px);
}

/* Collapsed state */
.task-record-sidebar.trs-collapsed .trs-sidebar-inner { display: none; }
.task-record-sidebar.trs-collapsed .trs-drag-handle   { display: none; }
.task-record-sidebar.trs-collapsed { width: 48px !important; }

/* Toggle button */
.trs-collapse-btn {
  position: absolute; top: 14px; right: -14px; z-index: 10;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text3);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: color .12s, background .12s;
}
.trs-collapse-btn:hover { background: var(--bg3); color: var(--text); }

/* Drag handle */
.trs-drag-handle {
  position: absolute; top: 0; right: 0;
  width: 5px; height: 100%;
  cursor: col-resize; z-index: 9;
  background: transparent;
  transition: background .15s;
}
.trs-drag-handle:hover { background: var(--brand,#2563eb); opacity: .3; }

/* Inner scroll container */
.trs-sidebar-inner {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding-right: 4px; /* space for drag handle */
}

/* ── Hero ── */
.trs-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px 20px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.trs-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand,#2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 26px/1 inherit; margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(37,99,235,.22);
  flex-shrink: 0;
}
.trs-hero-name {
  font: 700 16px/1.3 inherit; color: var(--text); margin-bottom: 4px;
}
.trs-hero-sub {
  font-size: 12px; color: var(--text3); margin-bottom: 16px;
  max-width: 220px;
}
.trs-hero-actions { display: flex; gap: 8px; }
.trs-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--border2); background: var(--bg);
  font: 500 12px/1 inherit; color: var(--text2); cursor: pointer;
  transition: .12s;
}
.trs-action-btn:hover { border-color: var(--brand,#2563eb); color: var(--brand,#2563eb); }
.trs-edit-btn { background: var(--brand,#2563eb); border-color: var(--brand,#2563eb); color: #fff; }
.trs-edit-btn:hover { filter: brightness(.92); color: #fff; }

/* ── Social links ── */
.trs-social { padding: 0 20px 16px; border-bottom: 1px solid var(--border); }
.trs-social:empty { display: none; }
.trs-social-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trs-social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid; text-decoration: none;
  transition: transform .12s, opacity .12s;
}
.trs-social-btn:hover { transform: scale(1.1); opacity: .85; }
.trs-social-icon { width: 18px; height: 18px; display: flex; align-items: center; }
.trs-social-icon svg { width: 100%; height: 100%; }

/* ── Info sections ── */
.trs-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.trs-section:last-child { border-bottom: none; }
.trs-section-head {
  display: flex; align-items: center; justify-content: space-between;
  font: 700 10px/1 inherit; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 12px;
}
.trs-inline-edit-btn {
  border: none; background: none; cursor: pointer;
  color: var(--brand,#2563eb); font: 500 11px/1 inherit;
  padding: 3px 8px; border-radius: 5px;
  background: color-mix(in srgb,var(--brand,#2563eb) 8%,transparent);
}
.trs-inline-edit-btn:hover { background: color-mix(in srgb,var(--brand,#2563eb) 15%,transparent); }

/* Fields */
.trs-field {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  cursor: pointer; transition: background .1s;
  margin: 0 -10px 2px;
}
.trs-field:hover { background: var(--bg3); }
.trs-field--static { cursor: default; }
.trs-field--static:hover { background: transparent; }
.trs-field > svg:first-child { color: var(--text3); flex-shrink: 0; }
.trs-field-body { flex: 1; min-width: 0; }
.trs-field-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.trs-field-val { font: 600 13px/1.3 inherit; color: var(--text); }
.trs-field-edit { color: var(--text3); flex-shrink: 0; opacity: 0; transition: .12s; }
.trs-field:hover .trs-field-edit { opacity: 1; }

/* Assignee */
.trs-assignee-av {
  width: 28px; height: 28px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 11px/1 inherit; flex-shrink: 0;
}

/* Stage */
.trs-stage-current {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 20px; border: 1px solid;
  margin-bottom: 10px; font: 600 12px/1 inherit;
}
.trs-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.trs-stage-mover { display: flex; gap: 6px; align-items: center; }
.trs-stage-select {
  flex: 1; padding: 7px 10px;
  border: 1px solid var(--border2); border-radius: 8px;
  font: 12px/1 inherit; background: var(--bg); color: var(--text); outline: none;
}
.trs-stage-move-btn {
  padding: 7px 14px; border-radius: 8px; border: none;
  background: var(--brand,#2563eb); color: #fff;
  font: 600 11px/1 inherit; cursor: pointer; white-space: nowrap;
}
.trs-stage-move-btn:hover { filter: brightness(.92); }

/* Description */
.trs-desc { font-size: 12px; line-height: 1.7; color: var(--text2); }

/* ── Customer edit modal styles ── */
.cse-section-label {
  display: flex; align-items: center; gap: 10px;
  font: 700 13px/1 inherit; color: var(--text);
  margin-bottom: 14px;
}
.cse-step {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand,#2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 11px/1 inherit; flex-shrink: 0;
}
.cse-required { color: var(--red,#dc2626); }
.cse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cse-social-icon svg { width: 16px; height: 16px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--text3); pointer-events: none;
}
.input-icon-wrap input { padding-left: 36px !important; }

/* Stage change modal */
input[list] { appearance: none; -webkit-appearance: none; }

@media(max-width:760px){
  #task-panel .task-workspace-layout { grid-template-columns: 1fr; }
  .task-record-sidebar { min-height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .trs-collapse-btn { display: none; }
  .cse-grid { grid-template-columns: 1fr; }
}

/* Follow-up work hub */
.followup-workspace{display:grid;gap:12px}
.followup-workspace-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.followup-metric{display:flex;align-items:center;gap:10px;min-height:66px;padding:11px 13px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);box-shadow:var(--neu-out-sm)}
.followup-metric>.mdi{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;font-size:17px}
.followup-metric>div{display:grid;gap:3px}.followup-metric small{color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.followup-metric strong{font-size:18px;line-height:1}
.followup-metric.blue>.mdi{background:var(--accent-light);color:var(--brand)}.followup-metric.amber>.mdi{background:var(--amber-bg);color:var(--amber-text)}.followup-metric.red>.mdi{background:var(--red-bg);color:var(--red-text)}.followup-metric.green>.mdi{background:var(--green-bg);color:var(--green-text)}
.followup-workspace-tabs{display:inline-flex;justify-self:start;align-items:center;gap:3px;padding:3px;border:1px solid var(--border);border-radius:11px;background:var(--bg3)}
.followup-workspace-tab{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:var(--text2);font:700 11.5px/1 inherit;cursor:pointer}.followup-workspace-tab:hover{background:var(--bg2);color:var(--text)}.followup-workspace-tab.active{background:var(--bg2);color:var(--accent-text);box-shadow:var(--neu-out-sm)}.followup-workspace-tab>.mdi{font-size:15px}.followup-workspace-tab b{min-width:18px;height:18px;display:grid;place-items:center;padding:0 5px;border-radius:99px;background:var(--bg4);color:var(--text3);font-size:9px}.followup-workspace-tab.active b{background:var(--accent-light);color:var(--accent-text)}
.followup-won-filter{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--green),transparent 65%);border-radius:9px;background:var(--green-bg);color:var(--green-text);font-size:11px;font-weight:800;white-space:nowrap}.followup-won-filter .mdi{font-size:15px}
.work-hub-list-heading{align-items:flex-start;padding:15px 16px}.work-hub-list-heading>.work-hub-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.work-hub-heading-actions .btn{display:inline-flex;align-items:center;gap:5px;padding:7px 9px;font-size:10.5px}.work-hub-heading-actions .btn .mdi{font-size:14px}
.work-hub-followup-table td{padding:12px 16px}.work-hub-person,.work-hub-record-link{display:inline-flex;align-items:center;gap:8px;max-width:210px;border:0;background:transparent;color:var(--text);font:inherit;text-align:left}.work-hub-person.customer,.work-hub-record-link{cursor:pointer}.work-hub-person>span:last-child,.work-hub-record-link>span:last-child{display:grid;min-width:0;gap:3px}.work-hub-person strong,.work-hub-record-link strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px}.work-hub-person small,.work-hub-record-link small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text3);font-size:10px}.work-hub-person.customer:hover strong,.work-hub-record-link:hover strong{color:var(--brand)}
.work-hub-avatar{width:28px;height:28px;display:grid;place-items:center;overflow:hidden;flex:0 0 auto;border-radius:50%;background:var(--accent-light);color:var(--accent-text);font-size:9px;font-weight:800}.work-hub-avatar.customer{background:#e7f5ff;color:#1677b8}.work-hub-avatar.owner{background:var(--green-bg);color:var(--green-text)}.work-hub-avatar img{width:100%;height:100%;object-fit:cover}.work-hub-person.muted{color:var(--text3);cursor:default}.work-hub-person.muted .work-hub-avatar{background:var(--bg4);color:var(--text3)}
.work-hub-followup-copy{display:grid;min-width:230px;gap:3px}.work-hub-followup-copy strong,.work-hub-followup-copy small{display:block;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-hub-followup-copy>span{display:inline-flex;align-items:center;gap:4px;color:var(--text3);font-size:9.5px;font-weight:650}.work-hub-followup-copy>span .mdi{font-size:12px;color:var(--accent-text)}
.work-hub-owner{gap:7px}.work-hub-owner .work-hub-avatar{width:25px;height:25px;font-size:8px}.work-hub-row-actions .icon-btn{width:30px;height:30px;border:1px solid transparent;border-radius:8px;color:var(--text3);box-shadow:none}.work-hub-row-actions .icon-btn:hover{border-color:var(--border2);background:var(--accent-light);color:var(--brand)}.work-hub-row-actions .icon-btn .mdi{font-size:15px}.work-hub-row-actions .btn{display:inline-flex;align-items:center;min-height:30px}
.work-hub-won-table td:nth-child(1){min-width:245px}.work-hub-record-icon{width:29px;height:29px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:var(--green-bg);color:var(--green-text)}.work-hub-record-icon .mdi{font-size:16px}.work-hub-value{color:var(--green-text);font-size:12px;white-space:nowrap}.work-hub-won-date{display:inline-flex;align-items:center;gap:5px;color:var(--green-text);font-size:10.5px;font-weight:800;white-space:nowrap}.work-hub-won-date .mdi{font-size:14px}
.work-hub-empty>.mdi{font-size:28px;color:var(--accent-text)}.work-hub-note-history{display:grid;gap:5px;margin-bottom:14px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:var(--bg3)}.work-hub-note-history>span{color:var(--text3);font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.work-hub-note-history p{max-height:126px;margin:0;overflow:auto;color:var(--text2);font-size:11.5px;line-height:1.5;white-space:pre-wrap}
@media(max-width:900px){.followup-workspace-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.work-hub-list-heading{align-items:flex-start;flex-direction:column}.work-hub-heading-actions{justify-content:flex-start}}
@media(max-width:560px){.followup-workspace-metrics{grid-template-columns:1fr 1fr;gap:8px}.followup-metric{min-height:58px;padding:9px}.followup-metric>.mdi{width:28px;height:28px;font-size:15px}.followup-metric strong{font-size:16px}.followup-workspace-tabs{width:100%;justify-content:stretch}.followup-workspace-tab{flex:1;justify-content:center;padding:7px}.followup-workspace-tab b{display:none}.work-hub-heading-actions{width:100%}.work-hub-heading-actions .btn{flex:1;justify-content:center}.work-hub-heading-actions .btn:last-child{flex-basis:100%}}

/* ── Products page ────────────────────────────────────────────── */
/* Card view reuses the .svc-card* shell from the Services page so the
   two pages stay visually identical. Only the extras live here. */
.prod-card-archived { opacity:.62; }
.prod-card-archived:hover { opacity:1; }
.prod-archived-badge { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; padding:2px 7px; border-radius:999px; background:#fee2e2; color:#b91c1c; }
.prod-card-sku { font-size:11px; color:var(--text3); font-variant-numeric:tabular-nums; }

.prod-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between; margin-bottom:18px; }
.prod-search-wrap { position:relative; flex:1; min-width:220px; max-width:420px; display:flex; align-items:center; }
.prod-search-wrap svg { position:absolute; left:14px; color:var(--text3); pointer-events:none; }
.prod-search-wrap input { width:100%; height:40px; border-radius:999px; border:1px solid var(--border); background:var(--bg2); color:var(--text); padding:0 16px 0 40px; font-size:13px; outline:none; transition:border-color .15s, box-shadow .15s; }
.prod-search-wrap input:focus { border-color:var(--brand,#2563eb); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand,#2563eb) 14%,transparent); }
.prod-toolbar-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.prod-filter-select { height:36px; border-radius:9px; border:1px solid var(--border); background:var(--bg2); color:var(--text); font-size:12px; padding:0 8px; cursor:pointer; outline:none; }
.prod-filter-select:focus { border-color:var(--brand,#2563eb); }

.prod-view-toggle { display:inline-flex; border:1px solid var(--border); border-radius:9px; overflow:hidden; background:var(--bg2); }
.prod-view-toggle button { border:none; background:transparent; color:var(--text3); width:34px; height:34px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:.12s; }
.prod-view-toggle button:hover { color:var(--text); background:var(--bg3); }
.prod-view-toggle button.is-active { background:var(--brand,#2563eb); color:#fff; }

.prod-table-card { background:var(--bg2); border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.prod-table { width:100%; border-collapse:collapse; font-size:13px; }
.prod-table thead th { text-align:left; font-size:11px; font-weight:600; letter-spacing:.04em; color:var(--text3); padding:14px 16px; border-bottom:1px solid var(--border); cursor:pointer; user-select:none; white-space:nowrap; }
.prod-table thead th:hover { color:var(--text2); }
.prod-table thead th.prod-action-head { cursor:default; text-align:right; }
.prod-table tbody td { padding:12px 16px; border-bottom:1px solid var(--border); color:var(--text2); vertical-align:middle; }
.prod-table tbody tr:last-child td { border-bottom:none; }
.prod-table tbody tr:hover { background:var(--bg3); }
.prod-row-archived { opacity:.58; }
.prod-muted { color:var(--text3); }
.prod-empty { text-align:center; padding:36px 16px; color:var(--text3); }

.prod-sort { display:inline-flex; margin-left:4px; color:var(--text3); vertical-align:-1px; }
.prod-sort.is-active { color:var(--brand,#2563eb); }

.prod-name-cell { display:flex; align-items:center; gap:11px; min-width:0; }
.prod-thumb { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:18px; }
.prod-name-text { min-width:0; }
.prod-name-text strong { display:block; color:var(--text); font-weight:600; font-size:13px; }
.prod-name-text small { display:block; color:var(--text3); font-size:11px; margin-top:2px; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.prod-pill { display:inline-block; padding:4px 12px; border-radius:999px; font-size:11px; font-weight:600; }
.prod-pill-active { background:#dcfce7; color:#15803d; }
.prod-pill-archived { background:#fee2e2; color:#b91c1c; }

.prod-action-cell { position:relative; text-align:right; white-space:nowrap; }
.prod-action-btn { border:none; background:transparent; color:var(--text3); width:30px; height:30px; border-radius:8px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:.12s; }
.prod-action-btn:hover { background:var(--border); color:var(--text); }
.prod-action-menu { position:absolute; right:14px; top:calc(100% - 6px); z-index:40; min-width:168px; background:var(--bg2); border:1px solid var(--border); border-radius:11px; box-shadow:0 12px 32px rgba(15,23,42,.16); padding:5px; display:flex; flex-direction:column; }
.prod-action-menu button { border:none; background:transparent; text-align:left; padding:9px 11px; border-radius:7px; font-size:12.5px; color:var(--text2); cursor:pointer; }
.prod-action-menu button:hover { background:var(--bg3); color:var(--text); }
.prod-action-menu button.is-danger:hover { background:#fee2e2; color:#b91c1c; }

.prod-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; flex-wrap:wrap; }
.prod-table-card .prod-pagination { border-top:1px solid var(--border); background:var(--bg3); }
.prod-page-nav { display:inline-flex; align-items:center; gap:6px; border:none; background:transparent; color:var(--text2); font-size:12.5px; cursor:pointer; padding:6px 8px; border-radius:7px; }
.prod-page-nav:hover:not(:disabled) { background:var(--bg2); color:var(--text); }
.prod-page-nav:disabled { color:var(--text3); opacity:.5; cursor:default; }
.prod-page-nums { display:flex; align-items:center; gap:4px; }
.prod-page-num { min-width:30px; height:30px; border-radius:8px; border:none; background:transparent; color:var(--text2); font-size:12.5px; cursor:pointer; }
.prod-page-num:hover { background:var(--bg2); }
.prod-page-num.is-active { background:var(--brand,#2563eb); color:#fff; font-weight:600; }
.prod-page-gap { color:var(--text3); padding:0 2px; font-size:12px; }

@media (max-width:820px) {
  .prod-toolbar { flex-direction:column; align-items:stretch; }
  .prod-search-wrap { max-width:none; }
  .prod-table thead th:nth-child(4), .prod-table tbody td:nth-child(4),
  .prod-table thead th:nth-child(5), .prod-table tbody td:nth-child(5) { display:none; }
}

/* Services table view reuses the shared .prod-table shell */
.svc-table .svc-default-badge { margin-left:4px; }
.svc-table td:nth-child(6), .svc-table td:nth-child(7) { font-weight:600; }
.svc-table .prod-action-cell { display:flex; align-items:center; justify-content:flex-end; gap:2px; }
@media (max-width:900px) {
  .svc-table thead th:nth-child(4), .svc-table tbody td:nth-child(4),
  .svc-table thead th:nth-child(7), .svc-table tbody td:nth-child(7) { display:none; }
}

/* ── Template Studio (full-screen builder) ─────────────────────── */
.tpl-bar-new { display:inline-flex; align-items:center; gap:6px; margin-top:8px; padding:7px 12px; border:1px dashed var(--border2); border-radius:9px; background:transparent; color:var(--brand,#2563eb); font:inherit; font-size:11.5px; font-weight:650; cursor:pointer; transition:.14s; }
.tpl-bar-new:hover { background:color-mix(in srgb,var(--brand,#2563eb) 8%,transparent); border-style:solid; }

#tpl-studio-overlay { display:none; position:fixed; inset:0; z-index:12000; background:var(--bg); }
#tpl-studio-overlay.open { display:block; }
.studio-shell { height:100vh; display:flex; flex-direction:column; background:var(--bg); }

.studio-top { height:66px; flex:none; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 22px; background:var(--bg2); border-bottom:1px solid var(--border); }
.studio-top-left { display:flex; align-items:center; gap:13px; min-width:0; }
.studio-badge { padding:5px 11px; border-radius:999px; background:color-mix(in srgb,var(--brand,#2563eb) 12%,transparent); color:var(--brand,#2563eb); font-size:11px; font-weight:700; }
.studio-top-left strong { display:block; font-size:15px; color:var(--text); }
.studio-top-left small { display:block; font-size:11px; color:var(--text3); margin-top:2px; }
.studio-top-right { display:flex; align-items:center; gap:8px; }

.studio-body { flex:1; min-height:0; display:grid; grid-template-columns:248px minmax(0,1fr) 340px; }
.studio-rail { padding:20px 12px; background:var(--bg2); border-right:1px solid var(--border); overflow:auto; }
.studio-rail-step { display:flex; align-items:flex-start; gap:11px; width:100%; padding:12px; border:none; background:transparent; border-radius:11px; text-align:left; cursor:pointer; margin-bottom:4px; transition:.12s; }
.studio-rail-step:hover { background:var(--bg3); }
.studio-rail-step.active { background:color-mix(in srgb,var(--brand,#2563eb) 10%,transparent); }
.studio-rail-num { width:24px; height:24px; flex:none; border-radius:50%; display:grid; place-items:center; background:var(--border); color:var(--text3); font-size:11px; font-weight:700; }
.studio-rail-step.active .studio-rail-num { background:var(--brand,#2563eb); color:#fff; }
.studio-rail-step.done .studio-rail-num { background:#16a34a; color:#fff; }
.studio-rail-text strong { display:block; font-size:13px; color:var(--text); font-weight:650; }
.studio-rail-text small { display:block; font-size:11px; color:var(--text3); margin-top:2px; }

.studio-main { min-width:0; overflow:auto; padding:28px 32px 40px; }
.studio-step-head { margin-bottom:22px; }
.studio-step-head h3 { margin:0; font-size:21px; font-weight:700; color:var(--text); }
.studio-step-head p { margin:6px 0 0; font-size:13px; color:var(--text3); }
.studio-note { margin-top:16px; padding:11px 14px; border-radius:10px; background:var(--bg3); border:1px solid var(--border); font-size:12px; color:var(--text3); }
.studio-alert { margin-bottom:18px; padding:12px 15px; border-radius:10px; background:#fef3c7; border:1px solid #fcd34d; color:#92400e; font-size:12.5px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.studio-alert button { border:none; background:#92400e; color:#fff; border-radius:7px; padding:5px 11px; font:inherit; font-size:11px; font-weight:650; cursor:pointer; }
.studio-hint { font-size:11px; color:var(--text3); margin-top:5px; }
.studio-empty { padding:30px 16px; text-align:center; color:var(--text3); font-size:12.5px; }

.studio-kind-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:22px; }
.studio-kind-card { display:flex; flex-direction:column; gap:6px; padding:16px; border:1.5px solid var(--border); border-radius:13px; background:var(--bg2); text-align:left; cursor:pointer; transition:.14s; }
.studio-kind-card:hover:not(:disabled) { border-color:var(--brand,#2563eb); transform:translateY(-1px); }
.studio-kind-card.active { border-color:var(--brand,#2563eb); background:color-mix(in srgb,var(--brand,#2563eb) 7%,transparent); }
.studio-kind-card.is-disabled { opacity:.4; cursor:not-allowed; }
.studio-kind-card strong { font-size:13.5px; color:var(--text); }
.studio-kind-card small { font-size:11.5px; color:var(--text3); line-height:1.45; }
.studio-kind-icon { color:var(--brand,#2563eb); }

.studio-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

.studio-group-list { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:16px; }
.studio-group-chip { display:inline-flex; align-items:center; gap:9px; padding:9px 13px; border:1px solid var(--border); border-radius:10px; background:var(--bg2); }
.studio-group-chip span { font-size:12.5px; font-weight:650; color:var(--text); }
.studio-group-chip small { font-size:11px; color:var(--text3); }
.studio-group-chip button { border:none; background:transparent; color:var(--text3); cursor:pointer; display:grid; place-items:center; padding:2px; border-radius:5px; }
.studio-group-chip button:hover { background:#fee2e2; color:#b91c1c; }
.studio-group-add { display:flex; gap:8px; max-width:440px; }
.studio-group-add input { flex:1; height:38px; border:1px solid var(--border); border-radius:9px; background:var(--bg2); color:var(--text); padding:0 12px; font:inherit; font-size:12.5px; outline:none; }
.studio-group-add input:focus { border-color:var(--brand,#2563eb); }

.studio-quick-add { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:18px; }
.studio-quick-add button { padding:8px 13px; border:1px solid var(--border); border-radius:999px; background:var(--bg2); color:var(--text2); font:inherit; font-size:11.5px; font-weight:600; cursor:pointer; transition:.12s; }
.studio-quick-add button:hover { border-color:var(--brand,#2563eb); color:var(--brand,#2563eb); }

.studio-fields-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:18px; align-items:start; }
.studio-field-list { border:1px solid var(--border); border-radius:13px; background:var(--bg2); overflow:hidden; max-height:60vh; overflow-y:auto; }
.studio-field-item { display:flex; align-items:center; gap:11px; width:100%; padding:11px 13px; border:none; border-bottom:1px solid var(--border); background:transparent; text-align:left; cursor:pointer; }
.studio-field-item:last-child { border-bottom:none; }
.studio-field-item:hover { background:var(--bg3); }
.studio-field-item.active { background:color-mix(in srgb,var(--brand,#2563eb) 9%,transparent); }
.studio-field-order { width:21px; height:21px; flex:none; border-radius:6px; background:var(--border); color:var(--text3); font-size:10.5px; font-weight:700; display:grid; place-items:center; }
.studio-field-main { flex:1; min-width:0; }
.studio-field-main strong { display:block; font-size:12.5px; color:var(--text); font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.studio-field-main small { display:block; font-size:10.5px; color:var(--text3); margin-top:2px; }
.studio-field-mode { flex:none; font-size:10px; font-weight:650; padding:3px 8px; border-radius:999px; background:var(--bg3); color:var(--text3); }
.studio-mode-mandatory { background:#fee2e2; color:#b91c1c; }
.studio-mode-display { background:#e0e7ff; color:#4338ca; }
.studio-mode-hidden { background:var(--border); color:var(--text3); }

.studio-props { border:1px solid var(--border); border-radius:13px; background:var(--bg2); padding:16px; display:flex; flex-direction:column; gap:13px; }
.studio-props-head { display:flex; align-items:center; justify-content:space-between; }
.studio-props-head strong { font-size:12px; color:var(--text3); letter-spacing:.04em; }
.studio-props-actions { display:flex; gap:3px; }
.studio-props-actions button { width:28px; height:28px; border:1px solid var(--border); border-radius:7px; background:var(--bg); color:var(--text2); cursor:pointer; font-size:12px; }
.studio-props-actions button:hover:not(:disabled) { background:var(--bg3); color:var(--text); }
.studio-props-actions button:disabled { opacity:.35; cursor:default; }
.studio-props-actions button.is-danger:hover { background:#fee2e2; color:#b91c1c; border-color:#fecaca; }

.studio-side { border-left:1px solid var(--border); background:var(--bg2); overflow:auto; padding:20px; }
.studio-preview { border:1px solid var(--border); border-radius:13px; background:var(--bg); overflow:hidden; }
.studio-preview-head { padding:13px 15px; border-bottom:1px solid var(--border); background:var(--bg3); }
.studio-preview-head strong { display:block; font-size:13px; color:var(--text); }
.studio-preview-head span { display:block; font-size:10.5px; color:var(--text3); margin-top:3px; }
.studio-preview-body { padding:15px; }
.studio-preview-body section { margin-bottom:16px; }
.studio-preview-body h5 { margin:0 0 9px; font-size:10.5px; font-weight:700; letter-spacing:.05em; color:var(--text3); }
.studio-prev-locked { padding:10px 12px; border-radius:9px; background:var(--bg3); margin-bottom:15px; }
.studio-prev-locked span { display:block; font-size:10px; font-weight:700; letter-spacing:.04em; color:var(--text3); margin-bottom:5px; }
.studio-prev-locked em { display:inline-block; font-style:normal; font-size:10.5px; padding:2px 8px; margin:2px 3px 2px 0; border-radius:999px; background:var(--bg2); border:1px solid var(--border); color:var(--text2); }
.studio-prev-field { margin-bottom:11px; }
.studio-prev-field label { display:block; font-size:11px; color:var(--text2); font-weight:600; margin-bottom:4px; }
.studio-prev-field label em { color:var(--brand,#2563eb); font-style:normal; }
.studio-prev-input { height:32px; border:1px solid var(--border); border-radius:8px; background:var(--bg2); display:flex; align-items:center; padding:0 10px; font-size:11.5px; color:var(--text3); }
.studio-prev-area { height:56px; align-items:flex-start; padding-top:8px; }
.studio-prev-select::after { content:'▾'; margin-left:auto; color:var(--text3); }
.studio-prev-check { width:17px; height:17px; border:1px solid var(--border2); border-radius:5px; background:var(--bg2); }
.studio-prev-readonly { font-size:11.5px; color:var(--text2); padding:7px 10px; background:var(--bg3); border-radius:8px; }
.studio-prev-dep { display:block; font-size:10px; color:var(--text3); margin-top:4px; font-style:italic; }
.studio-prev-empty { padding:24px 10px; text-align:center; font-size:11.5px; color:var(--text3); }

.studio-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:11px; }
.studio-summary > div { padding:13px 15px; border:1px solid var(--border); border-radius:11px; background:var(--bg2); }
.studio-summary span { display:block; font-size:10.5px; color:var(--text3); font-weight:600; letter-spacing:.03em; }
.studio-summary strong { display:block; font-size:17px; color:var(--text); margin-top:5px; }

.studio-foot { height:64px; flex:none; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 22px; background:var(--bg2); border-top:1px solid var(--border); }
.studio-foot-progress { font-size:11.5px; color:var(--text3); }

@media (max-width:1180px) {
  .studio-body { grid-template-columns:210px minmax(0,1fr); }
  .studio-side { display:none; }
  .studio-fields-split { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .studio-body { grid-template-columns:1fr; }
  .studio-rail { display:flex; gap:6px; overflow-x:auto; padding:10px; border-right:none; border-bottom:1px solid var(--border); }
  .studio-rail-step { width:auto; flex:none; }
  .studio-rail-text small { display:none; }
  .studio-main { padding:18px 16px 30px; }
  .studio-field-grid { grid-template-columns:1fr; }
}

/* Service type derived from selected lines (lead form) */
.derived-service-chip{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 12px;border:1px dashed var(--border2);border-radius:9px;background:var(--bg3);color:var(--text);font-size:13px;font-weight:600}
.derived-service-chip .mdi{font-size:16px}
.derived-service-chip small{font-size:10.5px;font-weight:500;color:var(--text3);margin-left:2px}

/* ══ Dashboard engine ═══════════════════════════════════════════════ */
.dash-root{display:flex;flex-direction:column;gap:12px}
.dash-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.dash-greet h2{margin:0;font-size:20px;font-weight:700;color:var(--text);letter-spacing:-.01em}
.dash-greet p{margin:4px 0 0;font-size:12.5px;color:var(--text3)}
.dash-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.dash-ctl{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border:1px solid var(--border);border-radius:9px;background:var(--bg2);color:var(--text2);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:.12s;white-space:nowrap}
.dash-ctl:hover{border-color:var(--border2);color:var(--text);background:var(--bg3)}
.dash-ctl .mdi{font-size:15px}
.dash-ctl.is-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.dash-ctl.is-primary:hover{filter:brightness(.95);color:#fff}
.dash-ctl.dash-icon{width:32px;padding:0;justify-content:center}
.dash-select-wrap{position:relative}
.dash-select{font-weight:700;color:var(--text)}

.dash-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:60;min-width:190px;background:var(--bg2);border:1px solid var(--border);border-radius:11px;box-shadow:0 14px 36px rgba(15,23,42,.16);padding:5px;display:flex;flex-direction:column}
.dash-dashboards-menu{left:0;right:auto;min-width:230px}
.dash-menu button{display:flex;align-items:center;gap:8px;border:none;background:transparent;text-align:left;padding:8px 10px;border-radius:7px;font:inherit;font-size:12px;color:var(--text2);cursor:pointer}
.dash-menu button:hover{background:var(--bg3);color:var(--text)}
.dash-menu button.is-active{color:var(--brand);font-weight:700}
.dash-menu button.is-danger:hover{background:#fee2e2;color:#b91c1c}
.dash-menu button .mdi{font-size:15px;color:var(--text3)}
.dash-menu hr{border:none;border-top:1px solid var(--border);margin:4px 0}
.dash-menu-label{font-size:10px;font-weight:700;letter-spacing:.05em;color:var(--text3);padding:6px 10px 2px;text-transform:uppercase}
.dash-viz-row{display:flex;gap:3px;padding:2px 6px 6px}
.dash-viz-row button{width:30px;height:28px;padding:0;justify-content:center;border:1px solid var(--border);border-radius:6px;font-size:11px;font-weight:700}
.dash-viz-row button.is-active{background:var(--brand);border-color:var(--brand);color:#fff}
.dash-viz-row button.is-active .mdi{color:#fff}

.dash-filters{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:6px 8px;border:1px solid var(--border);border-radius:10px;background:var(--bg2)}
.dash-period{display:flex;align-items:center;gap:2px;flex-wrap:wrap}
.dash-period button{height:26px;padding:0 10px;border:none;border-radius:6px;background:transparent;color:var(--text3);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer}
.dash-period button:hover{background:var(--bg3);color:var(--text)}
.dash-period button.is-active{background:var(--brand);color:#fff}
.dash-period input[type=date]{height:26px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);font:inherit;font-size:11px;padding:0 6px;margin-left:6px}
.dash-period span{color:var(--text3);font-size:11px;margin:0 4px}
.dash-filter-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dash-filter-group label{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text3);font-weight:600}
.dash-filter-group select{height:26px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);font:inherit;font-size:11.5px;padding:0 6px;max-width:160px}
.dash-filter-reset{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 8px;border:none;border-radius:6px;background:transparent;color:var(--brand);font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.dash-refreshed{font-size:10.5px;color:var(--text3)}

.dash-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:96px;grid-auto-flow:dense;gap:12px}
.dash-card{position:relative;min-width:0;display:flex;flex-direction:column;background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:12px 14px;box-shadow:0 1px 2px rgba(15,23,42,.04);overflow:hidden;transition:box-shadow .15s,border-color .15s}
.dash-card:hover{border-color:var(--border2);box-shadow:0 4px 14px rgba(15,23,42,.06)}
.dash-card.is-clickable{cursor:pointer}
.dash-card.tone-red{border-color:#fecaca}.dash-card.tone-amber{border-color:#fde68a}
.dash-card-head{display:flex;align-items:center;gap:7px;min-height:20px;margin-bottom:6px;position:relative}
.dash-card-icon{font-size:15px;color:var(--text3)}
.dash-card-title{flex:1;min-width:0;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-card-menu-btn{width:22px;height:22px;border:none;background:transparent;color:var(--text3);border-radius:6px;cursor:pointer;display:grid;place-items:center;opacity:0;transition:.12s}
.dash-card:hover .dash-card-menu-btn,.dash-card-menu-btn:focus{opacity:1}
.dash-card-menu-btn:hover{background:var(--bg3);color:var(--text)}
.dash-widget-menu{top:26px;right:0}
.dash-drag-hint{font-size:16px;color:var(--text3);cursor:grab}

.dash-kpi{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
.dash-kpi-value{font-size:22px;font-weight:750;color:var(--text);letter-spacing:-.02em;line-height:1.1;font-variant-numeric:tabular-nums}
.dash-kpi-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:5px;min-height:16px}
.dash-delta{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700}
.dash-delta small{font-weight:500;color:var(--text3);margin-left:2px}
.dash-delta.is-up{color:#16a34a}.dash-delta.is-down{color:#dc2626}.dash-delta.is-flat{color:var(--text3)}
.dash-sub{font-size:11px;color:var(--text3)}
.dash-spark{width:72px;height:22px;color:var(--brand);opacity:.8;flex:none}
.tone-red .dash-kpi-value{color:#b91c1c}.tone-amber .dash-kpi-value{color:#b45309}

.dash-chart-wrap{flex:1;min-height:0;position:relative}
.dash-chart-wrap canvas{width:100%!important;height:100%!important}
.dash-donut-center{position:absolute;left:0;top:50%;transform:translateY(-50%);width:calc(100% - 110px);text-align:center;pointer-events:none}
.dash-donut-center strong{display:block;font-size:20px;font-weight:750;color:var(--text)}
.dash-donut-center span{font-size:10.5px;color:var(--text3)}

.dash-table-wrap{flex:1;min-height:0;overflow:auto;margin:0 -6px}
.dash-table{width:100%;border-collapse:collapse;font-size:12px}
.dash-table th{position:sticky;top:0;background:var(--bg2);text-align:left;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text3);padding:4px 6px;border-bottom:1px solid var(--border)}
.dash-table td{padding:6px;border-bottom:1px solid var(--border);color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.dash-table td:first-child{color:var(--text);font-weight:600}
.dash-table td.num,.dash-table th.num{text-align:right;font-variant-numeric:tabular-nums}
.dash-table tr:last-child td{border-bottom:none}
.dash-table tr.is-clickable{cursor:pointer}.dash-table tr.is-clickable:hover td{background:var(--bg3)}
.dash-table tr.tone-red td:first-child{color:#b91c1c}.dash-table tr.tone-amber td:first-child{color:#b45309}
.dash-table.is-compact td{padding:9px 6px;font-size:13px}.dash-table.is-compact td.num{font-size:18px;font-weight:750;color:var(--text)}

.dash-progress{flex:1;display:flex;flex-direction:column;justify-content:center;gap:8px}
.dash-progress-head{display:flex;align-items:baseline;gap:6px}
.dash-progress-head strong{font-size:22px;font-weight:750;color:var(--text)}.dash-progress-head span{font-size:12px;color:var(--text3)}
.dash-progress-bar{height:8px;border-radius:999px;background:var(--bg3);overflow:hidden}
.dash-progress-bar i{display:block;height:100%;border-radius:999px;background:var(--brand);transition:width .4s}
.dash-progress-foot{display:flex;justify-content:space-between;font-size:11px;color:var(--text3)}.dash-progress-foot b{color:var(--text)}

.dash-attention{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:3px;margin:0 -4px}
.dash-attention-row{display:flex;align-items:center;gap:9px;padding:7px 8px;border:none;border-radius:8px;background:transparent;text-align:left;font:inherit;font-size:12.5px;color:var(--text);cursor:pointer}
.dash-attention-row:hover{background:var(--bg3)}
.dash-attention-row i{width:8px;height:8px;border-radius:50%;flex:none}
.dash-attention-row span:nth-child(2){flex:1}
.dash-attention-row .mdi{color:var(--text3)}
.level-red i{background:#dc2626}.level-amber i{background:#f59e0b}.level-yellow i{background:#eab308}.level-blue i{background:#2563eb}.level-green i{background:#16a34a}

.dash-funnel{flex:1;display:flex;flex-direction:column;justify-content:center;gap:5px}
.dash-funnel-row{display:grid;grid-template-columns:82px 1fr 36px 36px;align-items:center;gap:8px;border:none;background:transparent;padding:2px 0;font:inherit;cursor:pointer;text-align:left}
.dash-funnel-row:hover .dash-funnel-bar i{filter:brightness(.92)}
.dash-funnel-label{font-size:11px;font-weight:600;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-funnel-bar{height:18px;background:var(--bg3);border-radius:5px;overflow:hidden}
.dash-funnel-bar i{display:block;height:100%;background:var(--brand);border-radius:5px;transition:width .3s}
.dash-funnel-val{font-size:12px;font-weight:750;color:var(--text);text-align:right;font-variant-numeric:tabular-nums}
.dash-funnel-pct{font-size:10.5px;color:var(--text3);text-align:right}

.dash-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:12px;color:var(--text3);padding:8px}
.dash-state .mdi{font-size:22px;opacity:.6}
.dash-card-error{border-color:#fecaca}.dash-card-restricted{opacity:.75}
.dash-grid-empty{display:block}
.dash-empty-state,.dash-error-page{display:flex;flex-direction:column;align-items:center;gap:8px;padding:50px 20px;text-align:center;border:1px dashed var(--border2);border-radius:12px;color:var(--text3);font-size:13px}
.dash-empty-state strong,.dash-error-page strong{font-size:15px;color:var(--text)}
.dash-empty-state .mdi,.dash-error-page .mdi{font-size:36px;opacity:.5}
.dash-empty-state>div{display:flex;gap:8px;margin-top:6px}

.dash-skel{background:linear-gradient(90deg,var(--bg3) 25%,var(--border) 50%,var(--bg3) 75%);background-size:200% 100%;animation:dashShimmer 1.3s infinite;border-radius:6px}
.dash-skel-body{flex:1;min-height:0}
@keyframes dashShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* customise mode */
.is-customizing .dash-grid{background-image:linear-gradient(var(--border) 1px,transparent 1px),linear-gradient(90deg,var(--border) 1px,transparent 1px);background-size:calc((100% + 12px)/12) 108px;background-position:-1px -1px;border-radius:12px;padding:1px}
.is-customizing .dash-card{cursor:grab;border-style:dashed;border-color:var(--border2)}
.is-customizing .dash-card.is-clickable{cursor:grab}
.is-customizing .dash-card.is-dragging{opacity:.4}
.is-customizing .dash-card.is-drop-target{border-color:var(--brand);border-style:solid;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 20%,transparent)}
.is-customizing .dash-card-menu-btn{opacity:1}
.dash-resize-handle{position:absolute;right:4px;bottom:4px;width:14px;height:14px;cursor:nwse-resize;border-right:2px solid var(--text3);border-bottom:2px solid var(--text3);border-radius:0 0 3px 0;opacity:.6}
.dash-resize-handle:hover{opacity:1;border-color:var(--brand)}

/* widget library drawer */
.dash-library-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.25);z-index:9000}
.dash-library{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);background:var(--bg2);border-left:1px solid var(--border);box-shadow:-16px 0 40px rgba(15,23,42,.14);z-index:9001;display:flex;flex-direction:column}
.dash-library header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border)}
.dash-library header strong{display:block;font-size:15px;color:var(--text)}.dash-library header span{font-size:11px;color:var(--text3)}
.dash-lib-search{display:flex;align-items:center;gap:8px;margin:12px 18px 8px;height:38px;padding:0 12px;border:1px solid var(--border);border-radius:999px;background:var(--bg)}
.dash-lib-search .mdi{color:var(--text3)}.dash-lib-search input{flex:1;border:none;background:transparent;font:inherit;font-size:13px;color:var(--text);outline:none}
.dash-lib-cats{display:flex;gap:4px;flex-wrap:wrap;padding:4px 18px 10px;border-bottom:1px solid var(--border)}
.dash-lib-cats button{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid var(--border);border-radius:999px;background:var(--bg);color:var(--text2);font:inherit;font-size:11px;font-weight:600;cursor:pointer}
.dash-lib-cats button.is-active{background:var(--brand);border-color:var(--brand);color:#fff}
.dash-lib-list{flex:1;overflow:auto;padding:10px 12px}
.dash-lib-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 10px;border:none;border-radius:10px;background:transparent;text-align:left;font:inherit;cursor:pointer}
.dash-lib-item:hover{background:var(--bg3)}
.dash-lib-item.in-use{opacity:.7}
.dash-lib-icon{width:34px;height:34px;border-radius:9px;background:color-mix(in srgb,var(--brand) 10%,transparent);color:var(--brand);display:grid;place-items:center;font-size:17px;flex:none}
.dash-lib-text{flex:1;min-width:0}.dash-lib-text strong{display:block;font-size:13px;color:var(--text)}.dash-lib-text small{display:block;font-size:11px;color:var(--text3);margin-top:2px;line-height:1.35}
.dash-lib-meta{display:flex;align-items:center;gap:8px;flex:none}.dash-lib-meta em{font-style:normal;font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;background:var(--bg3);color:var(--text3)}.dash-lib-meta i{color:var(--text3)}

@media (max-width:1100px){.dash-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.dash-card[style*="span 8"],.dash-card[style*="span 12"]{grid-column:span 6!important}.dash-card[style*="span 4"]{grid-column:span 3!important}}
@media (max-width:700px){.dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-card{grid-column:span 2!important}.dash-donut-center{width:100%}}

/* dashboard add/remove feedback */
.dash-lib-count{margin:0 18px 6px;font-size:11px;font-weight:600;color:var(--text3)}
.dash-lib-count.pulse{animation:dashPulse .45s ease}
@keyframes dashPulse{0%{color:var(--brand);transform:translateX(0)}40%{transform:translateX(3px)}100%{color:var(--text3);transform:translateX(0)}}
.dash-lib-state{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--border);color:var(--text3);transition:background .18s,border-color .18s,color .18s,transform .18s}
.dash-lib-item:hover .dash-lib-state{border-color:var(--brand);color:var(--brand)}
.dash-lib-item.in-use .dash-lib-state{background:#dcfce7;border-color:#86efac;color:#15803d}
.dash-lib-item.in-use:hover .dash-lib-state{background:#fee2e2;border-color:#fecaca;color:#b91c1c}
.dash-lib-item.in-use:hover .dash-lib-state i::before{content:"\F0156"}
.dash-lib-item.just-added{animation:dashRowAdded .7s ease}
.dash-lib-item.just-added .dash-lib-state{animation:dashStatePop .45s cubic-bezier(.34,1.56,.64,1)}
.dash-lib-item.just-removed{animation:dashRowRemoved .6s ease}
.dash-lib-item.just-removed .dash-lib-state{animation:dashStateShake .4s ease}
@keyframes dashRowAdded{0%{background:#dcfce7}100%{background:transparent}}
@keyframes dashRowRemoved{0%{background:#fee2e2}100%{background:transparent}}
@keyframes dashStatePop{0%{transform:scale(.6)}60%{transform:scale(1.25)}100%{transform:scale(1)}}
@keyframes dashStateShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
.dash-card-enter{animation:dashCardIn .42s cubic-bezier(.2,.8,.2,1)}
.dash-card-leave{animation:dashCardOut .22s ease forwards;pointer-events:none}
@keyframes dashCardIn{0%{opacity:0;transform:translateY(10px) scale(.97);box-shadow:0 0 0 0 color-mix(in srgb,var(--brand) 40%,transparent)}60%{box-shadow:0 0 0 6px color-mix(in srgb,var(--brand) 12%,transparent)}100%{opacity:1;transform:none;box-shadow:0 1px 2px rgba(15,23,42,.04)}}
@keyframes dashCardOut{to{opacity:0;transform:scale(.94)}}

/* ══ Employee directory (Staff page, admin) ═══════════════════════════ */
.dir{display:flex;flex-direction:column;gap:16px}
.dir-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.dir-head h2{margin:0;font-size:26px;font-weight:600;color:var(--text);letter-spacing:-.01em;display:flex;align-items:baseline;gap:8px}
.dir-head h2 strong{font-size:34px;font-weight:750;color:var(--brand)}
.dir-head h2 small{font-size:12px;color:var(--text3);font-weight:500}
.dir-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dir-search{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 14px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);min-width:280px}
.dir-search .mdi{color:var(--text3)}.dir-search input{flex:1;border:none;background:transparent;font:inherit;font-size:13px;color:var(--text);outline:none}
.dir-filter{position:relative}
.dir-filter summary{list-style:none;display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);color:var(--text2);font-size:12.5px;font-weight:600;cursor:pointer;user-select:none}
.dir-filter summary::-webkit-details-marker{display:none}
.dir-filter summary i{width:7px;height:7px;border-radius:50%;background:var(--brand)}
.dir-filter.is-active summary{border-color:var(--brand);color:var(--brand)}
.dir-filter-pop{position:absolute;top:calc(100% + 6px);right:0;z-index:40;width:240px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);box-shadow:0 14px 36px rgba(15,23,42,.14);display:flex;flex-direction:column;gap:9px}
.dir-filter-pop label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:600;color:var(--text3)}
.dir-filter-pop select{height:34px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font:inherit;font-size:12.5px;padding:0 8px}
.dir-add{height:38px;border-radius:11px;display:inline-flex;align-items:center;gap:6px;padding:0 16px}

.dir-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.dir-card{display:flex;flex-direction:column;gap:3px;padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--bg2);cursor:pointer;transition:.15s;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.dir-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(15,23,42,.08);border-color:var(--border2)}
.dir-card.is-inactive{opacity:.62}
.dir-card-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:8px}
.dir-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--brand);font-weight:700;overflow:hidden;flex:none}
.dir-avatar img{width:100%;height:100%;object-fit:cover}
.dir-avatar-wrap{position:relative;display:inline-block}
.dir-status{position:absolute;right:2px;bottom:2px;width:12px;height:12px;border-radius:50%;border:2px solid var(--bg2)}
.dir-status.on{background:#16a34a}.dir-status.off{background:#94a3b8}
.dir-menu-wrap{position:relative}
.dir-menu-btn{width:30px;height:30px;border:none;border-radius:8px;background:transparent;color:var(--text3);cursor:pointer;display:grid;place-items:center;font-size:18px}
.dir-menu-btn:hover{background:var(--bg3);color:var(--text)}
.dir-menu{position:absolute;top:32px;right:0;z-index:30;min-width:190px;padding:5px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);box-shadow:0 14px 36px rgba(15,23,42,.16);display:flex;flex-direction:column}
.dir-menu button{display:flex;align-items:center;gap:8px;border:none;background:transparent;text-align:left;padding:8px 10px;border-radius:7px;font:inherit;font-size:12px;color:var(--text2);cursor:pointer}
.dir-menu button:hover{background:var(--bg3);color:var(--text)}
.dir-menu button.is-danger:hover{background:#fee2e2;color:#b91c1c}
.dir-menu button .mdi{color:var(--text3);font-size:15px}
.dir-menu hr{border:none;border-top:1px solid var(--border);margin:4px 0}
.dir-name{font-size:15px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:6px}
.dir-name em{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--brand) 12%,transparent);color:var(--brand)}
.dir-title{font-size:12px;color:var(--text3)}
.dir-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 10px;padding:10px 12px;border-radius:10px;background:var(--bg3)}
.dir-facts span{display:block;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text3)}
.dir-facts strong{display:block;font-size:12.5px;color:var(--text);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-facts div:last-child{text-align:right}
.dir-contact{display:flex;flex-direction:column;gap:5px}
.dir-contact a{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--text2);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-contact a:hover{color:var(--brand)}
.dir-contact a.is-muted{color:var(--text3);pointer-events:none}
.dir-contact .mdi{font-size:15px;color:var(--text3)}
.dir-foot{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.dir-chip{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;font-weight:600;padding:3px 8px;border-radius:999px;background:var(--bg3);color:var(--text2)}
.dir-chip.is-brand{background:color-mix(in srgb,var(--brand) 12%,transparent);color:var(--brand)}
.dir-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:8px;padding:48px;text-align:center;color:var(--text3);font-size:13px;border:1px dashed var(--border2);border-radius:16px}
.dir-empty .mdi{font-size:32px;opacity:.5}

/* employee editor */
.modal-sub{font-size:11.5px;color:var(--text3);margin-top:2px}
.emp-form{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;align-items:start}
.emp-side{display:flex;flex-direction:column;align-items:center;gap:12px;position:sticky;top:0}
.emp-photo .dir-avatar{box-shadow:0 0 0 4px var(--bg2),0 0 0 5px var(--border)}
.emp-photo-hint{font-size:11px;color:var(--text3)}
.emp-upload{display:inline-flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}
.emp-side-facts{width:100%;display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:12px;background:var(--bg3)}
.emp-side-facts div{display:flex;justify-content:space-between;align-items:center;font-size:12px}
.emp-side-facts span{color:var(--text3)}.emp-side-facts strong{color:var(--text)}.emp-side-facts strong.is-off{color:#b91c1c}
.emp-main{display:flex;flex-direction:column;gap:18px;min-width:0}
.emp-section{display:flex;flex-direction:column;gap:2px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--bg2)}
.emp-section h4{display:flex;align-items:center;gap:7px;margin:0 0 10px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text3)}
.emp-section h4 .mdi{font-size:15px;color:var(--brand)}
@media (max-width:760px){.emp-form{grid-template-columns:1fr}.emp-side{position:static}}

/* member module toggles */
.member-modules-list{display:flex;flex-direction:column;gap:6px}
.member-module-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:var(--bg3);cursor:pointer}
.member-module-icon{font-size:18px;color:var(--text3)}
.member-module-text{flex:1;display:flex;flex-direction:column}.member-module-text strong{font-size:12.5px;color:var(--text)}.member-module-text small{font-size:11px;color:var(--text3)}
.tf-switch{position:relative;width:38px;height:22px;flex:none}
.tf-switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}
.tf-switch i{position:absolute;inset:0;border-radius:999px;background:var(--border2);transition:.16s}
.tf-switch i::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.16s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.tf-switch input:checked+i{background:var(--brand)}.tf-switch input:checked+i::after{transform:translateX(16px)}

@media (max-width:1000px){.hub-main{grid-template-columns:1fr}.hub-side{position:static}}

/* ══ Appearance panel ═══════════════════════════════════════════════ */
#tf-appearance-panel{display:none;position:fixed;top:64px;right:16px;z-index:11000;width:340px;max-height:calc(100vh - 80px);overflow:auto;background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:0 20px 50px rgba(15,23,42,.2)}
#tf-appearance-panel.open{display:block;animation:apIn .16s ease}
@keyframes apIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.ap-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border)}
.ap-head strong{display:block;font-size:14px;color:var(--text)}.ap-head span{font-size:11px;color:var(--text3)}
.ap-close{width:28px;height:28px;border:none;border-radius:8px;background:transparent;color:var(--text3);cursor:pointer;display:grid;place-items:center}
.ap-close:hover{background:var(--bg3);color:var(--text)}
.ap-body{padding:12px 16px 16px;display:flex;flex-direction:column;gap:14px}
.ap-body section h5{margin:0 0 7px;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text3)}
.ap-body section small{display:block;margin-top:6px;font-size:11px;color:var(--text3)}
.ap-row{display:flex;flex-wrap:wrap;gap:5px}
.ap-opt{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid var(--border);border-radius:999px;background:var(--bg);color:var(--text2);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer;transition:.12s}
.ap-opt:hover{border-color:var(--border2);color:var(--text)}
.ap-opt.is-active{background:var(--brand);border-color:var(--brand);color:#fff}
.ap-opt .mdi{font-size:14px}
.ap-tone{width:12px;height:12px;border-radius:4px;border:1px solid}
.ap-swatches{display:flex;flex-wrap:wrap;gap:7px}
.ap-swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;background:var(--c);cursor:pointer;position:relative;display:grid;place-items:center;color:#fff;font-size:13px;transition:.12s}
.ap-swatch:hover{transform:scale(1.08)}
.ap-swatch.is-active{box-shadow:0 0 0 2px var(--bg2),0 0 0 4px var(--c)}
.ap-swatch-custom input{position:absolute;inset:0;opacity:0;cursor:pointer}
.ap-swatch-custom{background:conic-gradient(#f87171,#fbbf24,#34d399,#60a5fa,#a78bfa,#f87171)}
.ap-toggle{display:flex;align-items:center;justify-content:space-between;font-size:12.5px;color:var(--text)}
.ap-reset{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;border:none;background:transparent;color:var(--text3);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer;padding:4px 0}
.ap-reset:hover{color:var(--text)}

/* density: the app's spacing scale reacts to data-density */
[data-density="compact"]{--dash-row:84px}[data-density="normal"]{--dash-row:96px}[data-density="comfortable"]{--dash-row:112px}
[data-density="compact"] .dash-card{padding:9px 11px}[data-density="comfortable"] .dash-card{padding:16px 18px}
[data-density="compact"] .dash-grid{gap:9px}[data-density="comfortable"] .dash-grid{gap:16px}
[data-density="compact"] .modal-body{padding:12px 14px;gap:8px}[data-density="compact"] .fg input,[data-density="compact"] .fg select{height:34px}
.dash-grid{grid-auto-rows:var(--dash-row,96px)}
body{font-family:var(--font)}

/* ══ Dashboard: welcome banner ═══════════════════════════════════════ */
.dash-banner{position:relative;border-radius:var(--radius-xl);overflow:hidden;min-height:112px;background-size:cover;background-position:center;border:1px solid var(--border)}
.dash-banner.is-gradient{background:linear-gradient(115deg,var(--brand) 0%,color-mix(in srgb,var(--brand) 55%,#0f172a) 60%,#0f172a 100%)}
.dash-banner-scrim{position:absolute;inset:0;background:linear-gradient(90deg,rgba(15,23,42,.72) 0%,rgba(15,23,42,.35) 55%,rgba(15,23,42,.15) 100%)}
.dash-banner.is-gradient .dash-banner-scrim{background:linear-gradient(90deg,rgba(0,0,0,.18),transparent)}
.dash-banner-inner{position:relative;display:flex;align-items:center;gap:16px;padding:18px 22px;color:#fff}
.dash-banner-avatar{width:60px;height:60px;border-radius:50%;flex:none;display:grid;place-items:center;background:rgba(255,255,255,.18);border:2px solid rgba(255,255,255,.7);font-size:20px;font-weight:700;overflow:hidden;backdrop-filter:blur(4px)}
.dash-banner-avatar img{width:100%;height:100%;object-fit:cover}
.dash-banner-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.dash-banner-kicker{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.dash-banner-text strong{font-size:22px;font-weight:750;letter-spacing:-.01em}
.dash-banner-sub{font-size:12.5px;opacity:.9}
.dash-banner-actions{display:flex;gap:4px;align-self:flex-start}
.dash-banner-actions button{width:30px;height:30px;border:none;border-radius:8px;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;display:grid;place-items:center;font-size:15px;transition:.12s}
.dash-banner-actions button:hover{background:rgba(255,255,255,.28)}

/* ══ Dashboard: edit mode + library drag ═════════════════════════════ */
.dash-card-remove{position:absolute;top:-8px;right:-8px;width:24px;height:24px;border:2px solid var(--bg2);border-radius:50%;background:#dc2626;color:#fff;cursor:pointer;display:grid;place-items:center;font-size:13px;box-shadow:0 2px 8px rgba(15,23,42,.2);transition:.12s;z-index:2}
.dash-card-remove:hover{transform:scale(1.12)}
.is-customizing .dash-card{overflow:visible}
.dash-drop-hint{grid-column:span 12;grid-row:span 1;display:flex;align-items:center;justify-content:center;gap:8px;border:2px dashed var(--border2);border-radius:12px;color:var(--text3);font-size:12.5px;font-weight:600;opacity:.55;transition:.15s}
.dash-drop-hint .mdi{font-size:20px}
.dash-drop-hint.is-armed{opacity:1;border-color:var(--brand);color:var(--brand);background:color-mix(in srgb,var(--brand) 5%,transparent)}
.dash-drop-hint.is-over{background:color-mix(in srgb,var(--brand) 12%,transparent);border-style:solid}
.dash-lib-item[draggable]{cursor:grab}
.dash-lib-item.is-dragging{opacity:.5}
.dash-lib-ghost{position:fixed;top:-200px;left:-200px;display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:var(--brand);color:#fff;font-size:12.5px;font-weight:700;box-shadow:0 8px 24px rgba(15,23,42,.25);pointer-events:none}
.dash-lib-create{border:1px dashed var(--border2);margin-bottom:6px}
.dash-lib-create .dash-lib-icon{background:var(--brand);color:#fff}
.dash-lib-create:hover{border-color:var(--brand)}

/* ══ Custom KPI builder ══════════════════════════════════════════════ */
.ck-form{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:20px;align-items:start}
.ck-main{display:flex;flex-direction:column;gap:14px;min-width:0}
.ck-preview{position:sticky;top:0;display:flex;flex-direction:column;gap:8px}
.ck-preview-label{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text3)}
.ck-preview small{font-size:11px;color:var(--text3)}
.ck-icons{display:flex;flex-wrap:wrap;gap:4px}
.ck-icons button{width:32px;height:32px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text2);cursor:pointer;font-size:16px;display:grid;place-items:center}
.ck-icons button:hover{border-color:var(--brand);color:var(--brand)}
.ck-icons button.is-active{background:var(--brand);border-color:var(--brand);color:#fff}
.ck-colors{display:flex;gap:6px}
.ck-colors button{width:24px;height:24px;border-radius:50%;border:2px solid transparent;background:var(--c);cursor:pointer}
.ck-colors button.is-active{box-shadow:0 0 0 2px var(--bg2),0 0 0 4px var(--c)}
@media (max-width:820px){.ck-form{grid-template-columns:1fr}.ck-preview{position:static}}

/* ══ Email: composer ═════════════════════════════════════════════════ */
.mc{display:flex;flex-direction:column;height:100%;min-height:0}
.mc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border);flex:none}
.mc-provider{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text3);margin-top:4px}
.mc-provider .mdi{font-size:14px}
.mc-body{flex:1;min-height:0;display:flex;flex-direction:column;padding:6px 20px 14px;overflow:auto}
.mc-row{display:flex;align-items:flex-start;gap:12px;padding:8px 0;border-bottom:1px solid var(--border)}
.mc-row>label{width:52px;flex:none;padding-top:6px;font-size:11.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text3)}
.mc-chips{flex:1;display:flex;flex-wrap:wrap;gap:5px;align-items:center;min-height:30px;cursor:text}
.mc-chips input{flex:1;min-width:140px;border:none;background:transparent;font:inherit;font-size:13px;color:var(--text);outline:none;height:28px}
.mc-chip{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 4px 0 10px;border-radius:999px;background:var(--bg3);border:1px solid var(--border);font-size:12px;color:var(--text)}
.mc-chip.is-bad{background:#fee2e2;border-color:#fecaca;color:#b91c1c}
.mc-chip b{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--text3);font-weight:400}
.mc-chip b:hover{background:var(--border);color:var(--text)}
.mc-row-actions{display:flex;gap:2px;padding-top:4px}
.mc-row-actions button{border:none;background:transparent;color:var(--text3);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer;padding:3px 6px;border-radius:6px}
.mc-row-actions button:hover{background:var(--bg3);color:var(--text)}
.mc-subject{flex:1;border:none;background:transparent;font:inherit;font-size:14px;font-weight:600;color:var(--text);outline:none;height:30px}
.mc-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--border)}
.mc-tools{display:flex;align-items:center;gap:2px;flex-wrap:wrap}
.mc-tools button{width:30px;height:30px;border:none;border-radius:7px;background:transparent;color:var(--text2);cursor:pointer;display:grid;place-items:center;font-size:17px}
.mc-tools button:hover{background:var(--bg3);color:var(--text)}
.mc-tools i{width:1px;height:18px;background:var(--border);margin:0 6px}
.mc-select{height:30px;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:var(--text2);font:inherit;font-size:11.5px;padding:0 6px;max-width:190px}
.mc-sig{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text3);white-space:nowrap}
.mc-editor{flex:1;min-height:220px;padding:14px 4px;font-size:13.5px;line-height:1.6;color:var(--text);outline:none;overflow:auto}
.mc-editor:empty::before{content:attr(data-placeholder);color:var(--text3);pointer-events:none}
.mc-editor p{margin:0 0 .6em}.mc-editor ul,.mc-editor ol{margin:.4em 0 .6em 1.2em}.mc-editor a{color:var(--brand)}
.mc-attach{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0 0;border-top:1px solid var(--border)}
.mc-file{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 6px 0 10px;border:1px solid var(--border);border-radius:8px;background:var(--bg3);font-size:12px;color:var(--text)}
.mc-file small{color:var(--text3)}.mc-file b{cursor:pointer;color:var(--text3);font-weight:400;padding:0 4px}.mc-file b:hover{color:#b91c1c}
.mc-attach-btn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px dashed var(--border2);border-radius:8px;font-size:12px;color:var(--text2);cursor:pointer}
.mc-attach-btn:hover{border-color:var(--brand);color:var(--brand)}
.mc-attach-hint{font-size:11px;color:var(--text3)}
.mc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid var(--border);background:var(--bg2);flex:none}
.mc-foot-note{font-size:11.5px;color:var(--text3)}
.mdi-spin{animation:tfSpin 1s linear infinite}@keyframes tfSpin{to{transform:rotate(360deg)}}

/* mail timeline + status */
.mail-timeline{display:flex;flex-direction:column;gap:3px}
.mail-row{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:none;border-radius:9px;background:transparent;text-align:left;font:inherit;cursor:pointer}
.mail-row:hover{background:var(--bg3)}
.mail-row>.mdi{font-size:16px;color:var(--text3);flex:none}
.mail-row-main{flex:1;min-width:0;display:flex;flex-direction:column}
.mail-row-main strong{font-size:12.5px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-row-main small{font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-status{flex:none;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:var(--bg3);color:var(--text3)}
.mail-status.st-sent{background:#dbeafe;color:#1d4ed8}.mail-status.st-delivered,.mail-status.st-opened,.mail-status.st-clicked{background:#dcfce7;color:#15803d}
.mail-status.st-failed,.mail-status.st-bounced,.mail-status.st-complained{background:#fee2e2;color:#b91c1c}.mail-status.st-skipped{background:#fef3c7;color:#b45309}
.mail-view{padding:18px;border:1px solid var(--border);border-radius:12px;background:#fff;color:#111827;font-size:13.5px;line-height:1.6;max-height:60vh;overflow:auto}
.mail-view table{max-width:100%}

/* settings → email */
.mail-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.mail-status-card{display:flex;align-items:flex-start;gap:12px}
.mail-status-card>.mdi{font-size:22px;color:var(--text3);flex:none;margin-top:2px}
.mail-status-card.is-ok>.mdi{color:#16a34a}.mail-status-card.is-warn>.mdi{color:#d97706}
.mail-status-card>div{flex:1;min-width:0}
.mail-status-card strong{display:block;font-size:13px;color:var(--text)}
.mail-status-card small{display:block;font-size:11.5px;color:var(--text3);margin-top:2px;line-height:1.45;word-break:break-word}
.mail-status-card code{font-size:11px;background:var(--bg3);padding:2px 6px;border-radius:5px}
.mail-fields{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.mail-fields code{font-size:11px;padding:3px 7px;border-radius:6px;background:var(--bg3);color:var(--text2);cursor:help}
.np-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-bottom:12px}

/* inbound mail */
.mail-row.is-inbound>.mdi{color:#16a34a}
.mail-row.is-unread{background:color-mix(in srgb,var(--brand) 6%,transparent)}
.mail-row.is-unread .mail-row-main strong{font-weight:750}
.mail-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--brand);margin-right:6px;vertical-align:middle}
.mail-status.st-received{background:#dcfce7;color:#15803d}
.mail-thread{display:flex;flex-direction:column;gap:8px}
.mail-msg{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--bg2)}
.mail-msg.is-in{border-left:3px solid #16a34a}
.mail-msg.is-out{border-left:3px solid var(--brand)}
.mail-msg header{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;background:var(--bg3)}
.mail-msg header:hover{background:var(--bg4)}
.mail-msg-who{font-size:12.5px;font-weight:700;color:var(--text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-msg-meta{font-size:11px;color:var(--text3);white-space:nowrap}
.mail-msg-body{display:none;padding:14px;font-size:13.5px;line-height:1.6;color:var(--text);max-height:340px;overflow:auto}
.mail-msg.is-open .mail-msg-body{display:block}
.mail-msg-body img{max-width:100%}
.mail-msg-body blockquote{margin:8px 0;padding-left:12px;border-left:3px solid var(--border2);color:var(--text3)}

/* ══ Customers & Leads workspace ═════════════════════════════════════ */
.cw{display:flex;flex-direction:column;gap:12px}
.cw-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.cw-kpi{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--border);border-radius:13px;background:var(--bg2);text-align:left;font:inherit;cursor:pointer;transition:.14s}
.cw-kpi:hover{border-color:var(--border2);transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.06)}
.cw-kpi span{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text3)}
.cw-kpi strong{font-size:22px;font-weight:750;color:var(--text);letter-spacing:-.02em;line-height:1.2}
.cw-kpi em{font-style:normal;font-size:11px;color:var(--text3)}
.cw-kpi.tone-amber strong{color:#b45309}.cw-kpi.tone-red strong{color:#b91c1c}
.cw-kpi.tone-amber{border-color:#fde68a}.cw-kpi.tone-red{border-color:#fecaca}

.cw-bar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}
.cw-bar>select,.cw-bar>.btn,.cw-bar>.cw-reset,.cw-bar>.cw-views{flex:0 0 auto}
.cw-search{display:flex;align-items:center;gap:8px;height:38px;padding:0 16px;border:1px solid var(--border);border-radius:999px;background:var(--bg);flex:1 1 100%;width:100%;min-width:0;overflow:hidden}
.cw-search:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent)}
.cw-search .mdi{flex:none}
.cw-search .mdi{color:var(--text3)}
.cw-search input{flex:1;width:100%;min-width:0;border:none;background:transparent;font:inherit;font-size:13px;color:var(--text);outline:none;text-overflow:ellipsis}
.cw-bar select{height:34px;border:1px solid var(--border);border-radius:9px;background:var(--bg);color:var(--text2);font:inherit;font-size:12px;padding:0 8px;max-width:160px;cursor:pointer}
.cw-bar select:focus{border-color:var(--brand);outline:none}
.cw-bar .btn{height:34px;display:inline-flex;align-items:center;gap:5px}
.cw-spacer{flex:1}
.cw-reset{display:inline-flex;align-items:center;gap:4px;height:34px;padding:0 10px;border:none;border-radius:9px;background:transparent;color:var(--brand);font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.cw-views{display:inline-flex;border:1px solid var(--border);border-radius:9px;overflow:hidden;background:var(--bg)}
.cw-views button{width:34px;height:34px;border:none;background:transparent;color:var(--text3);cursor:pointer;display:grid;place-items:center;font-size:16px;transition:.12s}
.cw-views button:hover{background:var(--bg3);color:var(--text)}
.cw-views button.is-active{background:var(--brand);color:#fff}

.cw-bulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 12px;border-radius:12px;background:color-mix(in srgb,var(--brand) 9%,transparent);border:1px solid color-mix(in srgb,var(--brand) 25%,transparent)}
.cw-bulk strong{font-size:12.5px;color:var(--brand)}
.cw-bulk select{height:30px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text2);font:inherit;font-size:11.5px;padding:0 8px}
.cw-bulk .btn{height:30px;font-size:11.5px}
.cw-meta{font-size:11.5px;color:var(--text3)}

.cw-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-weight:700;overflow:hidden;flex:none;background:var(--bg3);color:var(--text2)}
.cw-avatar img{width:100%;height:100%;object-fit:cover}
.cw-muted{color:var(--text3)}
.cw-stale{color:#b91c1c;font-weight:600}
.cw-stage{display:inline-block;font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--bg3);color:var(--text2);white-space:nowrap}
.cw-stage.stage-lead,.cw-stage.stage-newlead{background:#dbeafe;color:#1d4ed8}
.cw-stage.stage-prospect,.cw-stage.stage-contacted{background:#e0e7ff;color:#4338ca}
.cw-stage.stage-active,.cw-stage.stage-quoted{background:#fef3c7;color:#b45309}
.cw-stage.stage-won,.cw-stage.stage-confirmedwon{background:#dcfce7;color:#15803d}
.cw-stage.stage-followup{background:#f3e8ff;color:#7c3aed}
.cw-stage.stage-dormant{background:var(--bg4);color:var(--text3)}
.cw-stage.stage-lost{background:#fee2e2;color:#b91c1c}

.cw-table-wrap{border:1px solid var(--border);border-radius:14px;background:var(--bg2);overflow:auto}
.cw-table{width:100%;border-collapse:collapse;font-size:12.5px}
.cw-table th{position:sticky;top:0;z-index:1;background:var(--bg2);text-align:left;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text3);padding:12px 14px;border-bottom:1px solid var(--border);white-space:nowrap}
.cw-table td{padding:11px 14px;border-bottom:1px solid var(--border);color:var(--text2);vertical-align:middle}
.cw-table tr:last-child td{border-bottom:none}
.cw-table tbody tr{cursor:pointer}
.cw-table tbody tr:hover{background:var(--bg3)}
.cw-table tbody tr.is-selected{background:color-mix(in srgb,var(--brand) 7%,transparent)}
.cw-table .num,.cw-table th.num{text-align:right;font-variant-numeric:tabular-nums}
.cw-check{width:34px}.cw-check input{cursor:pointer;width:15px;height:15px;accent-color:var(--brand)}
.cw-actions-head{text-align:right}
.cw-actions-cell{position:relative;text-align:right;white-space:nowrap}
.cw-name-cell{display:flex;align-items:center;gap:10px;min-width:0}
.cw-name-text{min-width:0}
.cw-name-text strong{display:block;font-size:13px;font-weight:650;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-name-text small{display:block;font-size:11px;color:var(--text3);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-contact{display:flex;flex-direction:column}
.cw-contact small{font-size:11px;color:var(--text3)}
.cw-owner{font-size:12px}

.cw-quick{display:inline-flex;align-items:center;gap:2px;position:relative}
.cw-icon-btn{width:28px;height:28px;border:none;border-radius:8px;background:transparent;color:var(--text3);cursor:pointer;display:inline-grid;place-items:center;font-size:15px;text-decoration:none;transition:.12s}
.cw-icon-btn:hover{background:var(--bg4);color:var(--brand)}
.cw-menu{position:absolute;right:0;top:32px;z-index:40;min-width:190px;padding:5px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);box-shadow:0 14px 36px rgba(15,23,42,.18);display:flex;flex-direction:column;text-align:left}
.cw-menu button{display:flex;align-items:center;gap:8px;border:none;background:transparent;text-align:left;padding:8px 10px;border-radius:7px;font:inherit;font-size:12px;color:var(--text2);cursor:pointer}
.cw-menu button:hover{background:var(--bg3);color:var(--text)}
.cw-menu button.is-danger:hover{background:#fee2e2;color:#b91c1c}
.cw-menu button .mdi{font-size:15px;color:var(--text3)}
.cw-menu hr{border:none;border-top:1px solid var(--border);margin:4px 0}

.cw-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(262px,1fr));gap:12px}
.cw-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--bg2);cursor:pointer;transition:.15s}
.cw-card:hover{border-color:var(--border2);transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.cw-card.is-selected{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 20%,transparent)}
.cw-card-top{display:flex;align-items:center;gap:10px}
.cw-card-id{flex:1;min-width:0}
.cw-card-id strong{display:block;font-size:13.5px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-card-id small{display:block;font-size:11px;color:var(--text3);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-card-check input{width:15px;height:15px;accent-color:var(--brand);cursor:pointer}
.cw-card-lines{display:flex;flex-direction:column;gap:5px;padding-top:10px;border-top:1px solid var(--border)}
.cw-card-lines span{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-card-lines .mdi{font-size:14px;color:var(--text3);flex:none}
.cw-card-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:9px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.cw-card-stats div{text-align:center}
.cw-card-stats strong{display:block;font-size:13.5px;font-weight:750;color:var(--text)}
.cw-card-stats span{font-size:10px;color:var(--text3)}
.cw-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cw-card-tags{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.cw-owner-chip{width:26px;height:26px;border-radius:50%;background:var(--bg3);color:var(--text2);font-size:10px;font-weight:700;display:grid;place-items:center;flex:none}
.cw-card-tags{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.cw-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:9px;border-top:1px solid var(--border)}
.cw-card .cw-quick{opacity:.55;transition:opacity .14s}
.cw-card:hover .cw-quick,.cw-card.menu-open .cw-quick{opacity:1}
/* the row menu must escape the card instead of being clipped by it */
.cw-card{overflow:visible}
.cw-card.menu-open{z-index:60}
.cw-card .cw-menu{bottom:34px;top:auto}
.cw-table-wrap{overflow:visible}
.cw-table-wrap{overflow-x:auto}
.cw-menu{max-height:min(360px,60vh);overflow-y:auto}
.lw-card-title{font-size:14.5px;font-weight:700;color:var(--text);line-height:1.35}

.cw-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(240px,1fr);gap:10px;overflow-x:auto;padding-bottom:6px;align-items:start}
.cw-col{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--border);border-radius:14px;background:var(--bg3);min-height:120px;transition:.12s}
.cw-col.is-over{background:color-mix(in srgb,var(--brand) 8%,transparent);border-color:var(--brand)}
.cw-col header{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cw-col-count{font-size:11px;font-weight:700;color:var(--text3);background:var(--bg2);padding:2px 7px;border-radius:999px}
.cw-col-value{margin-left:auto;font-size:11px;font-weight:700;color:var(--text2)}
.cw-col-body{display:flex;flex-direction:column;gap:7px}
.cw-col-empty{padding:14px;text-align:center;font-size:11.5px;color:var(--text3)}
.cw-mini{display:flex;flex-direction:column;gap:5px;padding:10px;border:1px solid var(--border);border-radius:11px;background:var(--bg2);cursor:pointer;transition:.12s}
.cw-mini:hover{border-color:var(--border2);box-shadow:0 4px 12px rgba(15,23,42,.07)}
.cw-mini-top{display:flex;align-items:center;gap:7px}
.cw-mini-top strong{font-size:12.5px;font-weight:650;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-mini-meta{font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-mini-foot{display:flex;align-items:center;justify-content:space-between;gap:6px}
.cw-mini-value{font-size:11px;font-weight:700;color:var(--text2)}

.cw-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:56px 20px;text-align:center;border:1px dashed var(--border2);border-radius:16px;color:var(--text3);font-size:13px}
.cw-empty .mdi{font-size:34px;opacity:.5}
.cw-empty strong{font-size:15px;color:var(--text)}
.cw-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:6px}
.cw-pager button{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border:1px solid var(--border);border-radius:9px;background:var(--bg2);color:var(--text2);font:inherit;font-size:12px;cursor:pointer}
.cw-pager button:hover:not(:disabled){border-color:var(--brand);color:var(--brand)}
.cw-pager button:disabled{opacity:.45;cursor:default}
.cw-pager span{font-size:12px;color:var(--text3)}

.lw-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);overflow-x:auto}
.lw-tabs button{border:none;background:transparent;color:var(--text3);font:inherit;font-size:13px;font-weight:600;padding:9px 14px;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;transition:.12s}
.lw-tabs button:hover{color:var(--text)}
.lw-tabs button.is-active{color:var(--brand);border-bottom-color:var(--brand)}
.lw-temp{font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:999px}
.lw-temp.hot{background:#fee2e2;color:#b91c1c}
.lw-temp.warm{background:#fef3c7;color:#b45309}
.lw-temp.cold{background:#dbeafe;color:#1d4ed8}

@media (max-width:820px){
  .cw-bar{flex-direction:column;align-items:stretch}
  .cw-search{max-width:none}
  .cw-spacer{display:none}
  .cw-table th:nth-child(4),.cw-table td:nth-child(4),.cw-table th:nth-child(8),.cw-table td:nth-child(8),.cw-table th:nth-child(9),.cw-table td:nth-child(9){display:none}
}

/* ══ Appearance panel v2 ═════════════════════════════════════════════ */
#tf-appearance-panel{width:376px}
.ap-tabs{display:flex;gap:2px;padding:8px 12px 0;border-bottom:1px solid var(--border)}
.ap-tabs button{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;color:var(--text3);font:inherit;font-size:12.5px;font-weight:600;padding:8px 12px;cursor:pointer;border-bottom:2px solid transparent}
.ap-tabs button:hover{color:var(--text)}
.ap-tabs button.is-active{color:var(--brand);border-bottom-color:var(--brand)}
.ap-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 16px;border-top:1px solid var(--border)}
.ap-body section.is-disabled{opacity:.45;pointer-events:none}

.ap-themes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.ap-theme{display:flex;flex-direction:column;align-items:center;gap:5px;border:1.5px solid var(--border);border-radius:11px;background:var(--bg);padding:8px 4px;cursor:pointer;transition:.14s}
.ap-theme:hover{border-color:var(--border2);transform:translateY(-1px)}
.ap-theme.is-active{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 18%,transparent)}
.ap-theme-chip{position:relative;width:100%;height:30px;border-radius:7px;border:1px solid var(--border);overflow:hidden;display:block}
.ap-theme-chip i{position:absolute;left:4px;bottom:4px;width:60%;height:9px;border-radius:3px;display:block}
.ap-theme-chip b{position:absolute;right:4px;top:4px;width:12px;height:12px;border-radius:50%;display:block}
.ap-theme-name{font-size:10.5px;font-weight:600;color:var(--text2)}

.ap-banner-preview{position:relative;height:84px;border-radius:12px;overflow:hidden;margin-bottom:12px;border:1px solid var(--border)}
.ap-banner-scrim{position:absolute;inset:0;background:linear-gradient(90deg,#0f172a,transparent)}
.ap-banner-inner{position:relative;display:flex;align-items:center;gap:10px;height:100%;padding:0 14px;color:#fff}
.ap-banner-inner.is-center{justify-content:center;text-align:center}
.ap-banner-av{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.22);border:2px solid rgba(255,255,255,.7);display:grid;place-items:center;font-style:normal;font-size:13px;font-weight:700;flex:none}
.ap-banner-inner em{display:block;font-style:normal;font-size:9px;letter-spacing:.06em;text-transform:uppercase;opacity:.85}
.ap-banner-inner b{display:block;font-size:14px;font-weight:750}

.ap-grads{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-bottom:10px}
.ap-grad{height:34px;border-radius:9px;border:2px solid transparent;cursor:pointer;transition:.12s}
.ap-grad:hover{transform:scale(1.06)}
.ap-grad.is-active{border-color:var(--text);box-shadow:0 0 0 2px var(--bg2)}
.ap-stops{display:flex;gap:8px;margin-bottom:10px}
.ap-stops label{flex:1;display:flex;flex-direction:column;gap:4px;font-size:10.5px;font-weight:600;color:var(--text3);position:relative}
.ap-stops input[type=color]{width:100%;height:30px;padding:2px;border:1px solid var(--border);border-radius:8px;background:var(--bg);cursor:pointer}
.ap-stop-clear{position:absolute;right:4px;top:18px;width:18px;height:18px;border:none;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:12px;line-height:1;cursor:pointer}
.ap-slider{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--text3);margin-top:4px}
.ap-slider b{color:var(--text);min-width:38px}
.ap-slider input[type=range]{flex:1;accent-color:var(--brand)}
.ap-patterns{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:10px}
.ap-pattern{position:relative;height:48px;border-radius:9px;border:2px solid transparent;cursor:pointer;overflow:hidden;transition:.12s}
.ap-pattern:hover{transform:translateY(-1px)}
.ap-pattern.is-active{border-color:var(--text)}
.ap-pattern span{position:absolute;left:0;right:0;bottom:0;padding:2px;font-size:9px;font-weight:700;color:#fff;background:rgba(15,23,42,.55)}

/* ══ Widget gallery & preview ════════════════════════════════════════ */
.dash-library.is-gallery{width:min(640px,100vw)}
.dash-lib-head-actions{display:flex;align-items:center;gap:6px}
.dash-lib-layout{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.dash-lib-layout button{width:30px;height:30px;border:none;background:transparent;color:var(--text3);cursor:pointer;display:grid;place-items:center;font-size:15px}
.dash-lib-layout button.is-active{background:var(--brand);color:#fff}
.dash-lib-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.dash-lib-tile{margin:0;border:1px solid var(--border);border-radius:14px;background:var(--bg3);overflow:hidden;cursor:pointer;transition:.15s}
.dash-lib-tile:hover{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.1)}
.dash-lib-tile.in-use{border-color:#86efac}
.dash-lib-tile-preview{height:132px;padding:10px;overflow:hidden;pointer-events:none;transform-origin:top left}
.dash-lib-tile-preview .dash-card{box-shadow:none}
.dash-lib-tile figcaption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border-top:1px solid var(--border);background:var(--bg2)}
.dash-lib-tile-name{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:650;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-lib-tile-name .mdi{color:var(--text3);font-size:15px}
.dash-lib-tile-add{width:26px;height:26px;flex:none;border:1px solid var(--border);border-radius:50%;background:var(--bg);color:var(--text3);cursor:pointer;display:grid;place-items:center;transition:.12s}
.dash-lib-tile-add:hover{border-color:var(--brand);color:var(--brand)}
.dash-lib-tile.in-use .dash-lib-tile-add{background:#dcfce7;border-color:#86efac;color:#15803d}

.dash-preview-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:9100}
.dash-preview{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9101;width:min(720px,calc(100vw - 32px));background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:0 30px 70px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden;animation:dashCardIn .22s ease}
.dash-preview header{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border)}
.dash-preview header strong{display:block;font-size:15px;color:var(--text)}
.dash-preview header small{display:block;font-size:11.5px;color:var(--text3);margin-top:2px}
.dash-preview header>div{flex:1;min-width:0}
.dash-preview-stage{position:relative;display:flex;align-items:center;justify-content:center;padding:26px 56px;background:var(--bg3);min-height:220px}
.dash-preview-frame{min-width:230px;max-width:100%;transition:width .2s}
.dash-preview-frame .dash-card{min-height:96px}
.dash-preview-nav{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:1px solid var(--border);border-radius:50%;background:var(--bg2);color:var(--text2);cursor:pointer;display:grid;place-items:center;font-size:18px;transition:.12s}
.dash-preview-nav:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.dash-preview-nav.prev{left:12px}.dash-preview-nav.next{right:12px}
.dash-preview-variant{text-align:center;font-size:11.5px;font-weight:600;color:var(--text3);padding:10px 0 0}
.dash-preview-dots{display:flex;justify-content:center;gap:5px;padding:8px 0 4px}
.dash-preview-dots button{width:7px;height:7px;border-radius:50%;border:none;background:var(--border2);cursor:pointer;padding:0;transition:.12s}
.dash-preview-dots button.is-active{background:var(--brand);width:18px;border-radius:999px}
.dash-preview footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-top:1px solid var(--border)}
.dash-preview-note{font-size:11.5px;color:var(--text3)}

.dash-banner.h-slim{min-height:78px}
.dash-banner.h-normal{min-height:112px}
.dash-banner.h-tall{min-height:168px}
.dash-banner.is-center .dash-banner-inner{justify-content:center;text-align:center}
.dash-banner.is-center .dash-banner-text{flex:0 1 auto}
@media (max-width:700px){.dash-library.is-gallery{width:100vw}.dash-lib-gallery{grid-template-columns:1fr}}

/* restoring a hidden banner */
.dash-ctl-restore{border-color:var(--brand);color:var(--brand)}
.dash-ctl-restore:hover{background:color-mix(in srgb,var(--brand) 10%,transparent);color:var(--brand)}
.ap-restore{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px dashed var(--brand);border-radius:11px;background:color-mix(in srgb,var(--brand) 7%,transparent)}
.ap-restore span{flex:1;min-width:0}
.ap-restore strong{display:block;font-size:12.5px;color:var(--text)}
.ap-restore small{display:block;font-size:11px;color:var(--text3);margin-top:2px}

/* ══ Personal widgets ════════════════════════════════════════════════ */
.dash-profile{flex:1;display:flex;flex-direction:column;gap:9px;min-height:0}
.dash-profile-av{width:46px;height:46px;border-radius:50%;background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--brand);font-weight:700;font-size:16px;display:grid;place-items:center;overflow:hidden;flex:none}
.dash-profile-av img{width:100%;height:100%;object-fit:cover}
.dash-profile-id strong{display:block;font-size:14px;color:var(--text)}
.dash-profile-id small{display:block;font-size:11px;color:var(--text3);margin-top:1px}
.dash-profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:auto}
.dash-profile-stats div{text-align:center;padding:7px 4px;border-radius:9px;background:var(--bg3)}
.dash-profile-stats strong{display:block;font-size:15px;font-weight:750;color:var(--text)}
.dash-profile-stats span{font-size:10px;color:var(--text3)}
.dash-profile-foot{font-size:11px;color:var(--text3);text-align:center}
.dash-profile-foot b{color:var(--text)}

.dash-note{flex:1;width:100%;min-height:0;border:none;border-radius:10px;padding:11px 12px;font:inherit;font-size:13px;line-height:1.55;color:#3f3000;resize:none;outline:none;background:#fef9c3}
.dash-note::placeholder{color:rgba(0,0,0,.35)}
.dash-note.tone-blue{background:#dbeafe;color:#0c2d5e}
.dash-note.tone-green{background:#dcfce7;color:#0d3b21}
.dash-note.tone-pink{background:#fce7f3;color:#4a0d2c}
.dash-note.tone-plain{background:var(--bg3);color:var(--text)}
[data-theme="dark"] .dash-note{background:#45390d;color:#fef9c3}
[data-theme="dark"] .dash-note.tone-blue{background:#12294d;color:#dbeafe}
[data-theme="dark"] .dash-note.tone-green{background:#12331f;color:#dcfce7}
[data-theme="dark"] .dash-note.tone-pink{background:#3d1229;color:#fce7f3}

.dash-clock{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.dash-clock-time{font-size:28px;font-weight:750;letter-spacing:-.02em;color:var(--text);font-variant-numeric:tabular-nums}
.dash-clock-date{font-size:11px;color:var(--text3)}
.dash-clock-alt{font-size:10.5px;color:var(--text3);margin-top:4px;padding:2px 8px;border-radius:999px;background:var(--bg3)}

.dash-cal{flex:1;display:flex;flex-direction:column;gap:5px;min-height:0}
.dash-cal-head{font-size:12px;font-weight:700;color:var(--text);text-align:center}
.dash-cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dash-cal-dow span{text-align:center;font-size:9.5px;font-weight:700;color:var(--text3)}
.dash-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;flex:1}
.dash-cal-day{position:relative;display:grid;place-items:center;border-radius:7px;font-size:11px;color:var(--text2);min-height:22px}
.dash-cal-day.has-items{background:var(--bg3);font-weight:700;color:var(--text)}
.dash-cal-day.is-today{background:var(--brand);color:#fff;font-weight:750}
.dash-cal-day i{position:absolute;bottom:2px;width:4px;height:4px;border-radius:50%}
.dash-cal-day i.lead{background:var(--brand);left:calc(50% - 6px)}
.dash-cal-day i.fu{background:#16a34a;left:calc(50% + 2px)}
.dash-cal-day.is-today i{background:#fff!important}

.dash-timeline{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;position:relative;padding-left:4px}
.dash-tl-row{display:flex;gap:10px;padding:5px 0;position:relative}
.dash-tl-row:not(:last-child)::before{content:'';position:absolute;left:4px;top:16px;bottom:-5px;width:1px;background:var(--border)}
.dash-tl-dot{width:9px;height:9px;border-radius:50%;background:var(--brand);flex:none;margin-top:5px;box-shadow:0 0 0 2px var(--bg2)}
.dash-tl-body{min-width:0}
.dash-tl-body strong{display:block;font-size:12px;font-weight:600;color:var(--text);line-height:1.4}
.dash-tl-body small{display:block;font-size:10.5px;color:var(--text3)}

.dash-banner-card{position:relative;flex:1;min-height:70px;border-radius:11px;overflow:hidden;display:flex;align-items:center;padding:16px 20px;color:#fff}
.dash-banner-card-scrim{position:absolute;inset:0;background:linear-gradient(90deg,rgba(15,23,42,.45),transparent)}
.dash-banner-card>div{position:relative}
.dash-banner-card strong{display:block;font-size:19px;font-weight:750}
.dash-banner-card span{display:block;font-size:12.5px;opacity:.9;margin-top:2px}

.dash-quick{flex:1;display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:6px;align-content:center}
.dash-quick button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 6px;border:1px solid var(--border);border-radius:10px;background:var(--bg3);color:var(--text2);font:inherit;font-size:10.5px;font-weight:600;cursor:pointer;transition:.12s}
.dash-quick button:hover{border-color:var(--brand);color:var(--brand);transform:translateY(-1px)}
.dash-quick .mdi{font-size:18px}

/* appearance: layouts, done button, compact header */
.ap-foot{display:flex;align-items:center;gap:10px}
.ap-saved{flex:1;display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text3)}
.ap-saved .mdi{color:#16a34a;font-size:14px}
.ap-done{height:32px;padding:0 18px;font-size:12.5px}
.ap-layouts{display:flex;flex-direction:column;gap:7px}
.ap-layout{display:flex;align-items:center;gap:11px;padding:9px 11px;border:1px solid var(--border);border-radius:11px;background:var(--bg);cursor:pointer;text-align:left;transition:.13s}
.ap-layout:hover{border-color:var(--brand);transform:translateX(2px)}
.ap-layout-mini{display:grid;grid-template-columns:repeat(6,1fr);gap:2px;width:78px;flex:none;align-content:start}
.ap-layout-mini i{background:var(--border2);border-radius:2px;display:block}
.ap-layout:hover .ap-layout-mini i{background:var(--brand);opacity:.6}
.ap-layout-text{min-width:0}
.ap-layout-text strong{display:block;font-size:12.5px;color:var(--text)}
.ap-layout-text small{display:block;font-size:10.5px;color:var(--text3);margin-top:1px}
.dash-header.is-compact{align-items:center}
.dash-header.is-compact .dash-greet p{margin:0;font-size:13px;color:var(--text2)}

/* widget menu must never be clipped by a small card */
.dash-card.menu-open{overflow:visible;z-index:60}
.dash-widget-menu{max-height:min(420px,70vh);overflow-y:auto;overscroll-behavior:contain}
.dash-card.menu-narrow .dash-widget-menu{right:-6px;min-width:176px}
.dash-card.menu-short .dash-widget-menu{top:auto;bottom:calc(100% - 42px)}
.dash-widget-menu .dash-viz-row{flex-wrap:wrap}

/* consolidated dashboard settings menu */
.dash-ctl.dash-icon.is-open{background:var(--brand);border-color:var(--brand);color:#fff}
.dash-settings-menu{min-width:230px}
.dash-settings-menu button small{margin-left:auto;font-size:10px;color:var(--text3);font-weight:500}
.dash-settings-menu .dash-menu-label{padding-top:4px}

/* ══ Employee editor: tabs and toggles ══════════════════════════════ */
.emp-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:14px}
.emp-tab{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;color:var(--text3);font:inherit;font-size:13px;font-weight:600;padding:9px 14px;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;transition:.12s}
.emp-tab:hover{color:var(--text)}
.emp-tab.is-active{color:var(--brand);border-bottom-color:var(--brand)}
.emp-tab .mdi{font-size:15px}

/* the row is a <label>, and .fg label{display:block} was flattening it */
.emp-toggles{display:flex;flex-direction:column;gap:7px}
label.emp-toggle{display:flex!important;align-items:center;gap:12px;margin:0;padding:11px 13px;border:1px solid var(--border);border-radius:11px;background:var(--bg3);cursor:pointer;transition:.12s}
label.emp-toggle:hover{border-color:var(--border2)}
.emp-toggle-icon{font-size:19px;color:var(--text3);flex:none}
.emp-toggle-text{flex:1;min-width:0;display:flex;flex-direction:column}
.emp-toggle-text strong{font-size:12.5px;font-weight:650;color:var(--text)}
.emp-toggle-text small{font-size:11px;color:var(--text3);margin-top:1px}
label.emp-toggle .tf-switch{flex:none}
label.member-module-row{display:flex!important;align-items:center;gap:10px;margin:0}

.emp-perms{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto}
.emp-perm-group{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:9px;background:var(--bg3)}
.emp-perm-mod{display:inline-flex;align-items:center;gap:5px;min-width:120px;flex:none;font-size:12px;font-weight:650;color:var(--text)}
.emp-perm-mod em{font-style:normal;font-size:10px;font-weight:700;padding:1px 6px;border-radius:999px;background:var(--bg2);color:var(--text3)}
.emp-perm-actions{display:flex;flex-wrap:wrap;gap:4px}
.emp-perm-actions code{font-size:10.5px;padding:2px 7px;border-radius:5px;background:var(--bg2);color:var(--text2);border:1px solid var(--border)}

/* admin password reset */
.pwr-choice{display:flex;flex-direction:column;gap:7px;margin-bottom:10px}
.pwr-choice input[type=radio]{width:17px;height:17px;accent-color:var(--brand);flex:none}
.emp-pass-actions{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}
.emp-pass-actions .btn{font-size:11.5px;height:30px}
.pwr-done{margin-top:14px;padding:14px;border:1px solid #86efac;border-radius:12px;background:#f0fdf4}
.pwr-done-head{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:#15803d}
.pwr-code{display:flex;align-items:center;gap:8px;margin:10px 0 6px}
.pwr-code code{flex:1;font-size:16px;font-weight:700;letter-spacing:.02em;padding:10px 12px;border-radius:9px;background:#fff;border:1px solid #bbf7d0;color:#0f172a;user-select:all}
.pwr-done small{font-size:11px;color:#166534}

/* recent chats, stories style */
.dash-stories{display:flex;gap:14px;align-items:flex-start;overflow-x:auto;padding:4px 2px 2px;flex:1;min-height:0}
.dash-story{display:flex;flex-direction:column;align-items:center;gap:6px;border:none;background:transparent;cursor:pointer;flex:none;padding:0;font:inherit}
.dash-story-ring{position:relative;display:grid;place-items:center;border-radius:50%;padding:3px;background:var(--border2);transition:.14s}
.dash-story.has-unread .dash-story-ring{background:conic-gradient(from 210deg,var(--brand),#db2777,#f59e0b,var(--brand))}
.dash-story:hover .dash-story-ring{transform:scale(1.06)}
.dash-story-ring.is-dashed{background:transparent;border:2px dashed var(--border2);padding:1px}
.dash-story-av{width:100%;height:100%;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--bg3);color:var(--text2);font-weight:700;border:2px solid var(--bg2)}
.dash-story-av img{width:100%;height:100%;object-fit:cover}
.dash-story.is-team .dash-story-av{background:color-mix(in srgb,var(--brand) 14%,transparent);color:var(--brand)}
.dash-story-badge{position:absolute;top:-2px;right:-2px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:700;font-style:normal;display:grid;place-items:center;border:2px solid var(--bg2)}
.dash-story-name{font-size:11px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.dash-story.has-unread .dash-story-name{font-weight:700;color:var(--text)}

/* customer editor */
.ce-form{display:grid;grid-template-columns:190px minmax(0,1fr);gap:22px;align-items:start}
.ce-side{display:flex;flex-direction:column;align-items:center;gap:10px;position:sticky;top:0}
.ce-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-weight:700;overflow:hidden;flex:none;box-shadow:0 0 0 4px var(--bg2),0 0 0 5px var(--border)}
.ce-avatar img{width:100%;height:100%;object-fit:cover}
.ce-photo-remove{border:none;background:transparent;color:var(--text3);font:inherit;font-size:11px;cursor:pointer;text-decoration:underline}
.ce-photo-remove:hover{color:#b91c1c}
.ce-main{display:flex;flex-direction:column;min-width:0}
.ce-tags{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px;min-height:26px}
.ce-tag{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 6px 0 10px;border-radius:999px;background:var(--bg3);border:1px solid var(--border);font-size:11.5px;color:var(--text)}
.ce-tag b{cursor:pointer;color:var(--text3);font-weight:400;padding:0 3px}
.ce-tag b:hover{color:#b91c1c}
.ce-tag-add{display:flex;gap:6px}
.ce-tag-add input{flex:1;height:34px;border:1px solid var(--border);border-radius:9px;background:var(--bg);color:var(--text);padding:0 10px;font:inherit;font-size:12.5px;outline:none}
@media (max-width:760px){.ce-form{grid-template-columns:1fr}.ce-side{position:static}}

/* email timeline paging */
.mail-more{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:6px;padding:9px;border:1px dashed var(--border2);border-radius:10px;background:transparent;color:var(--text2);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:.12s}
.mail-more:hover{border-color:var(--brand);color:var(--brand);border-style:solid}
.mail-more small{font-weight:500;color:var(--text3)}
.mail-more.is-less{margin-top:4px}

/* ══ Report Centre ═══════════════════════════════════════════════════ */
.rc{display:grid;grid-template-columns:268px minmax(0,1fr);gap:14px;align-items:start}
.rc-rail{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--bg2);position:sticky;top:12px;max-height:calc(100vh - 100px);overflow:auto}
.rc-search{display:flex;align-items:center;gap:7px;height:34px;padding:0 12px;border:1px solid var(--border);border-radius:999px;background:var(--bg)}
.rc-search .mdi{color:var(--text3)}
.rc-search input{flex:1;min-width:0;border:none;background:transparent;font:inherit;font-size:12.5px;color:var(--text);outline:none}
.rc-group{display:flex;flex-direction:column;gap:2px}
.rc-group-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text3);padding:4px 6px}
.rc-item{display:flex;align-items:flex-start;gap:9px;padding:8px 9px;border:none;border-radius:9px;background:transparent;text-align:left;font:inherit;cursor:pointer;transition:.12s}
.rc-item:hover{background:var(--bg3)}
.rc-item.is-active{background:color-mix(in srgb,var(--brand) 11%,transparent)}
.rc-item>.mdi{font-size:17px;color:var(--text3);margin-top:1px}
.rc-item.is-active>.mdi{color:var(--brand)}
.rc-item-text{min-width:0}
.rc-item-text strong{display:block;font-size:12.5px;font-weight:650;color:var(--text)}
.rc-item-text small{display:block;font-size:10.5px;color:var(--text3);margin-top:1px;line-height:1.35}
.rc-item.is-active .rc-item-text strong{color:var(--brand)}

.rc-main{display:flex;flex-direction:column;gap:12px;min-width:0}
.rc-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:9px 11px;border:1px solid var(--border);border-radius:12px;background:var(--bg2)}
.rc-periods{display:flex;gap:2px;flex-wrap:wrap}
.rc-periods button{height:30px;padding:0 11px;border:none;border-radius:8px;background:transparent;color:var(--text3);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.rc-periods button:hover{background:var(--bg3);color:var(--text)}
.rc-periods button.is-active{background:var(--brand);color:#fff}
.rc-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.rc-filters label{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text3);font-weight:600}
.rc-filters select{height:32px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font:inherit;font-size:12px;padding:0 8px;max-width:150px}
.rc-filters .btn{height:32px;display:inline-flex;align-items:center;gap:5px;font-size:12px}

.rc-doc-wrap{border-radius:14px;background:var(--bg3);padding:18px;overflow:auto}
.rc-doc{max-width:900px;margin:0 auto;background:#fff;color:#0f172a;border-radius:10px;box-shadow:0 8px 30px rgba(15,23,42,.12);padding:0 0 18px;font-size:13px}
.rc-doc-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 24px;border-bottom:3px solid var(--brand)}
.rc-doc-brand{display:flex;align-items:center;gap:12px}
.rc-logo{height:42px;max-width:150px;object-fit:contain}
.rc-logo-fallback{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;color:#fff;font-size:20px;font-weight:700}
.rc-doc-brand strong{display:block;font-size:15px;color:#0f172a}
.rc-doc-brand span{display:block;font-size:11px;color:#64748b}
.rc-doc-meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:10.5px;color:#64748b}
.rc-confidential{margin-top:3px;padding:2px 8px;border-radius:999px;background:#fee2e2;color:#b91c1c;font-weight:700;font-size:9.5px;letter-spacing:.05em}
.rc-doc-title{padding:20px 24px 12px}
.rc-doc-title h1{margin:0;font-size:22px;font-weight:750;letter-spacing:-.01em;color:#0f172a}
.rc-doc-title p{margin:4px 0 0;font-size:12.5px;color:#64748b}
.rc-doc-filters{display:inline-block;margin-top:9px;padding:4px 10px;border-radius:999px;background:#f1f5f9;font-size:11px;color:#475569}
.rc-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:9px;padding:0 24px 16px}
.rc-kpi{padding:12px 14px;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0}
.rc-kpi span{display:block;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#64748b}
.rc-kpi strong{display:block;font-size:20px;font-weight:750;color:#0f172a;margin-top:4px;letter-spacing:-.02em}
.rc-kpi em{display:block;font-style:normal;font-size:10.5px;color:#94a3b8;margin-top:2px}
.rc-kpi.tone-red strong{color:#b91c1c}.rc-kpi.tone-green strong{color:#15803d}.rc-kpi.tone-amber strong{color:#b45309}
.rc-chart-block,.rc-table-block{padding:0 24px 18px}
.rc-chart-block h3,.rc-table-block h3{display:flex;align-items:baseline;gap:8px;margin:0 0 10px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#64748b}
.rc-table-block h3 span{font-size:11px;font-weight:500;text-transform:none;letter-spacing:0;color:#94a3b8}
.rc-chart{height:250px;position:relative}
.rc-table{width:100%;border-collapse:collapse;font-size:11.5px}
.rc-table th{text-align:left;padding:8px 10px;background:var(--brand);color:#fff;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.rc-table th:first-child{border-radius:6px 0 0 0}.rc-table th:last-child{border-radius:0 6px 0 0}
.rc-table td{padding:7px 10px;border-bottom:1px solid #e2e8f0;color:#334155}
.rc-table tbody tr:nth-child(even){background:#f8fafc}
.rc-table td.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.rc-empty{text-align:center;padding:26px;color:#94a3b8}
.rc-more{margin-top:8px;font-size:11px;color:#94a3b8;font-style:italic}
.rc-doc-foot{display:flex;justify-content:space-between;padding:12px 24px 0;margin:0 24px;border-top:1px solid #e2e8f0;font-size:10.5px;color:#94a3b8}
.rc-state{display:flex;flex-direction:column;align-items:center;gap:8px;padding:70px 20px;text-align:center;color:#64748b;font-size:13px}
.rc-state .mdi{font-size:34px;opacity:.5}
.rc-state strong{font-size:15px;color:#0f172a}
@media (max-width:980px){.rc{grid-template-columns:1fr}.rc-rail{position:static;max-height:none;flex-direction:row;overflow-x:auto}.rc-group{min-width:210px}}

/* employee form: username availability + optional markers */
.emp-hint{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:5px;font-size:11px;color:var(--text3)}
.emp-hint .mdi{font-size:14px}
.emp-hint.is-good{color:#15803d}
.emp-hint.is-bad{color:#b45309}
.emp-username-pick{border:1px solid currentColor;background:transparent;color:inherit;font:inherit;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;cursor:pointer;margin-left:2px}
.emp-username-pick:hover{background:currentColor;color:#fff}
.emp-optional{font-size:10px;font-weight:600;color:var(--text3);background:var(--bg3);padding:1px 6px;border-radius:999px;margin-left:5px;text-transform:none;letter-spacing:0}
/* Conversation workspace */
.tf-chat-workspace .tf-chat-body{grid-template-columns:54px 286px minmax(0,1fr) 264px;background:var(--bg)}
.tf-chat-brand{display:flex;align-items:center;gap:10px}.tf-chat-brand-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--accent-light);color:var(--accent-text);font-size:18px}.tf-chat-brand .modal-title{font-size:15px}.tf-chat-brand span:not(.tf-chat-brand-icon){display:block}
.tf-chat-app-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 8px;background:var(--bg3);border-right:1px solid var(--border)}.tf-chat-app-rail span{flex:1}.tf-chat-app-rail button,.tf-chat-conversation-actions button,.tf-chat-context-head button{width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:var(--text3);cursor:pointer;font-size:18px}.tf-chat-app-rail button:hover,.tf-chat-conversation-actions button:hover,.tf-chat-context-head button:hover{background:var(--bg4);color:var(--accent-text)}.tf-chat-app-rail button.active{background:var(--brand);color:#fff;box-shadow:0 4px 10px color-mix(in srgb,var(--brand),transparent 70%)}
.tf-chat-workspace .tf-chat-sidebar{padding:14px 10px;display:flex;flex-direction:column;min-width:0;overflow:hidden}.tf-chat-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 11px}.tf-chat-sidebar-head>div{display:grid;gap:2px}.tf-chat-sidebar-head strong{font-size:15px;color:var(--text)}.tf-chat-sidebar-head small{font-size:10px;color:var(--text3)}.tf-chat-sidebar-head .icon-btn{width:30px;height:30px;border-radius:8px;color:var(--accent-text);background:var(--accent-light)}
.tf-chat-search{display:flex;align-items:center;gap:7px;padding:0 9px;height:36px;border:1px solid var(--border);background:var(--bg);border-radius:9px;color:var(--text3)}.tf-chat-search:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand),transparent 88%)}.tf-chat-search .mdi{font-size:16px}.tf-chat-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:11.5px}
.tf-chat-room-tabs{display:flex;gap:3px;padding:10px 2px}.tf-chat-room-tabs button{border:0;background:transparent;color:var(--text3);border-radius:7px;padding:5px 7px;font:700 10px/1 inherit;cursor:pointer}.tf-chat-room-tabs button:hover{color:var(--text);background:var(--bg3)}.tf-chat-room-tabs button.active{background:var(--accent-light);color:var(--accent-text)}
#tf-chat-people-results{display:grid;gap:3px}.tf-chat-search-heading{padding:4px 8px 2px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text3)}.tf-chat-person-result{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:8px;background:transparent;color:var(--text);text-align:left;padding:6px 8px;cursor:pointer}.tf-chat-person-result:hover{background:var(--bg3)}.tf-chat-person-result>span:last-child{display:grid;min-width:0;gap:2px}.tf-chat-person-result strong,.tf-chat-person-result small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-chat-person-result strong{font-size:11px}.tf-chat-person-result small{font-size:9.5px;color:var(--text3)}
.tf-chat-room-list{display:grid;gap:3px;overflow:auto;padding-top:4px}.tf-chat-room{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;margin:0!important;padding:8px!important;border-radius:9px!important}.tf-chat-room:hover{background:var(--bg3)!important}.tf-chat-room.active{background:var(--accent-light)!important}.tf-chat-room>span:nth-child(2){display:grid;min-width:0;gap:2px}.tf-chat-room strong,.tf-chat-room small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-chat-room strong{font-size:11.5px!important}.tf-chat-room small{font-size:9.5px!important}.tf-chat-room time{font-size:8.5px;color:var(--text3);align-self:start}.tf-room-avatar{width:30px;height:30px;display:grid!important;place-items:center;border-radius:50%;background:var(--bg4);color:var(--accent-text);overflow:hidden;font-size:13px!important}.tf-room-avatar.channel{background:var(--accent-light);font-weight:800}.tf-room-avatar img{width:100%;height:100%;object-fit:cover}.tf-chat-room-empty{padding:28px 10px;text-align:center;font-size:11px;color:var(--text3)}
.tf-group-create{display:grid;gap:8px;margin:4px 0 8px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--bg3)}.tf-group-create>div:first-child{display:flex;align-items:center;justify-content:space-between}.tf-group-create>div:first-child strong{font-size:11px}.tf-group-create>div:first-child button{border:0;background:transparent;color:var(--text3);cursor:pointer}.tf-group-create input{width:100%;height:32px;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:var(--text);padding:0 8px;font:inherit;font-size:11px}.tf-group-members{display:grid;gap:2px;max-height:150px;overflow:auto}.tf-group-members label{display:flex;align-items:center;gap:7px;padding:4px;font-size:10px}.tf-group-create .btn{justify-self:start;font-size:10px;padding:7px 9px}
.tf-chat-workspace .tf-chat-main{border-right:1px solid var(--border)}.tf-chat-workspace .tf-chat-conversation-head{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;border-bottom:1px solid var(--border);background:var(--bg2)}.tf-chat-conversation-title{display:flex;align-items:center;gap:9px;min-width:0}.tf-chat-conversation-title>div{display:grid;gap:2px;min-width:0}.tf-chat-conversation-title strong{font-size:13px}.tf-chat-conversation-title small{font-size:10px;color:var(--text3)}.tf-chat-conversation-icon{width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:var(--accent-light);color:var(--accent-text);overflow:hidden;font-size:15px;font-weight:800}.tf-chat-conversation-icon img{width:100%;height:100%;object-fit:cover}.tf-chat-conversation-actions{display:flex;gap:3px}.tf-chat-conversation-actions button{width:30px;height:30px;font-size:17px}
.tf-chat-workspace .tf-chat-box{padding:18px clamp(18px,4vw,72px);background:var(--bg);gap:14px}.tf-chat-workspace .tf-chat-row{max-width:720px}.tf-chat-workspace .tf-chat-message-wrap{position:relative}.tf-chat-message-actions{display:none;position:absolute;right:5px;top:-14px;z-index:1;gap:2px;padding:3px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);box-shadow:var(--shadow)}.tf-chat-row.mine .tf-chat-message-actions{left:5px;right:auto}.tf-chat-row:hover .tf-chat-message-actions{display:flex}.tf-chat-message-actions button{width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--text3);cursor:pointer;font-size:14px}.tf-chat-message-actions button:hover{background:var(--accent-light);color:var(--accent-text)}.tf-chat-message-actions button.danger:hover{background:var(--red-bg);color:var(--red-text)}.tf-chat-reactions{display:flex;flex-wrap:wrap;gap:4px;margin:5px 2px}.tf-chat-row.mine .tf-chat-reactions{justify-content:flex-end}.tf-chat-reaction{border:1px solid var(--border);background:var(--bg2);color:var(--text2);padding:3px 6px;border-radius:999px;font:600 10px/1 inherit;cursor:pointer}.tf-chat-reaction:hover,.tf-chat-reaction.mine{border-color:var(--brand);background:var(--accent-light);color:var(--accent-text)}.tf-chat-reaction span{font-size:9px}.tf-chat-reply-context{display:grid;gap:2px;width:100%;margin:0 0 8px;padding:6px 8px;text-align:left;border:0;border-left:2px solid var(--brand);background:color-mix(in srgb,var(--bg3),transparent 20%);border-radius:4px;color:var(--text2);cursor:pointer}.tf-chat-reply-context span{font-size:9.5px;font-weight:750}.tf-chat-reply-context small{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tf-chat-message-highlight .tf-chat-msg{outline:2px solid var(--brand);outline-offset:2px}
.tf-chat-reply-draft{display:flex;align-items:center;gap:8px;padding:8px max(20px,calc((100vw - 1080px)/2));border-top:1px solid var(--border);background:var(--bg3);color:var(--accent-text)}.tf-chat-reply-draft>div{display:grid;gap:1px;min-width:0}.tf-chat-reply-draft strong,.tf-chat-reply-draft small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-chat-reply-draft strong{font-size:10px}.tf-chat-reply-draft small{font-size:9.5px;color:var(--text3)}.tf-chat-reply-draft>button{margin-left:auto;width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:var(--text3);cursor:pointer}.tf-chat-reply-draft>button:hover{background:var(--bg4)}.tf-chat-workspace .tf-chat-composer{padding:9px clamp(14px,2vw,34px) 14px}.tf-chat-workspace .tf-chat-compose-row .btn{display:flex;align-items:center;gap:6px}
.tf-chat-context{display:flex;flex-direction:column;gap:0;background:var(--bg2);overflow:auto}.tf-chat-context-head{display:flex;align-items:center;justify-content:space-between;padding:18px 14px 12px;border-bottom:1px solid var(--border)}.tf-chat-context-head>div{display:grid;gap:3px}.tf-chat-context-head strong{font-size:12px}.tf-chat-context-head small{font-size:9.5px;color:var(--text3)}.tf-chat-context>section{display:grid;gap:9px;padding:14px;border-bottom:1px solid var(--border)}.tf-chat-context-label{font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text3)}.tf-chat-member-stack{display:flex;align-items:center;padding:2px 7px}.tf-chat-member-stack button{width:31px;height:31px;margin-left:-7px;border:2px solid var(--bg2);border-radius:50%;overflow:hidden;background:var(--brand);color:#fff;font-size:9px;cursor:pointer}.tf-chat-member-stack img,.tf-chat-member-list img{width:100%;height:100%;object-fit:cover}.tf-chat-context-link{justify-self:start;border:0;background:transparent;padding:0;color:var(--accent-text);font:700 10px inherit;cursor:pointer}.tf-chat-context-action{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:8px;background:transparent;color:var(--text2);padding:7px 6px;text-align:left;font:600 11px inherit;cursor:pointer}.tf-chat-context-action:hover{background:var(--bg3);color:var(--accent-text)}.tf-chat-context-action .mdi{font-size:17px}.tf-chat-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.tf-chat-media-grid button{aspect-ratio:1;border:0;border-radius:7px;overflow:hidden;background:var(--bg3);cursor:pointer}.tf-chat-media-grid img{width:100%;height:100%;object-fit:cover}.tf-chat-member-list{display:grid;gap:3px;padding:10px}.tf-chat-member-list button{display:flex;align-items:center;gap:8px;border:0;border-radius:8px;background:transparent;padding:7px;color:var(--text);text-align:left;cursor:pointer}.tf-chat-member-list button:hover{background:var(--bg3)}.tf-chat-member-list>button>span:last-child{display:grid;gap:2px}.tf-chat-member-list strong{font-size:11px}.tf-chat-member-list small{font-size:9.5px;color:var(--text3)}
@media(max-width:1060px){.tf-chat-workspace .tf-chat-body{grid-template-columns:48px 250px minmax(0,1fr)}.tf-chat-context{display:none;position:absolute;right:0;top:64px;bottom:0;width:270px;border-left:1px solid var(--border);box-shadow:-12px 0 28px rgba(15,23,42,.12);z-index:8}.tf-chat-context.open{display:flex}}
@media(max-width:760px){.tf-chat-workspace .tf-chat-body{grid-template-columns:44px minmax(0,1fr)}.tf-chat-workspace .tf-chat-sidebar{display:none}.tf-chat-app-rail{padding:8px 5px}.tf-chat-conversation-actions button:nth-child(1),.tf-chat-conversation-actions button:nth-child(2),.tf-chat-conversation-actions button:nth-child(3){display:none}.tf-chat-workspace .tf-chat-box{padding:14px}.tf-chat-workspace .tf-chat-message-wrap{max-width:calc(100vw - 98px)}.tf-chat-workspace .tf-chat-composer{padding:8px 10px 12px}.tf-chat-compose-row .btn span{display:none}.tf-chat-compose-row .btn{width:42px;justify-content:center}.tf-chat-reply-draft{padding:8px 12px}}

/* pipeline lead filters */
.pipe-filter-wrap{position:relative;display:inline-flex}
.pipe-filter-btn{display:inline-flex;align-items:center;gap:5px;height:34px;white-space:nowrap}
.pipe-filter-btn em{font-style:normal;font-size:10px;font-weight:700;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--brand);color:#fff;display:grid;place-items:center}
.pipe-filter-btn.has-filters{border-color:var(--brand);color:var(--brand)}
/* anchored to the button so it can't disturb the toolbar row */
.pipe-filters{position:absolute;top:calc(100% + 8px);right:0;z-index:70;width:min(560px,calc(100vw - 32px));padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--bg2);box-shadow:0 18px 44px rgba(15,23,42,.18);animation:dashCardIn .16s ease}
.pf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(158px,1fr));gap:10px}
.pf-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.pf-field>span{font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--text3)}
.pf-field select{height:33px;border:1px solid var(--border);border-radius:9px;background:var(--bg);color:var(--text);font:inherit;font-size:12.5px;padding:0 8px;cursor:pointer;width:100%}
.pf-field select:focus{border-color:var(--brand);outline:none}
.pf-check{display:flex;align-items:center;gap:7px;align-self:end;height:33px;padding:0 11px;border:1px solid var(--border);border-radius:9px;background:var(--bg);font-size:12.5px;color:var(--text2);cursor:pointer;white-space:nowrap}
.pf-check input{width:15px;height:15px;accent-color:var(--brand);cursor:pointer}
.pf-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding-top:11px;border-top:1px solid var(--border);font-size:12px;color:var(--text3)}
.pf-foot .btn{height:30px;font-size:12px}
.pf-foot>div{display:flex;gap:6px}
@media (max-width:640px){.pipe-filters{position:fixed;left:12px;right:12px;width:auto;top:auto;bottom:12px;max-height:70vh;overflow:auto}}

/* documents: customer vs lead */
.doc-scope{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--bg3);border:1px solid var(--border);font-size:9.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text3);vertical-align:middle}
.doc-list{display:flex;flex-direction:column;gap:4px}
.doc-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--bg2);transition:.12s}
.doc-row:hover{border-color:var(--border2)}
.doc-icon{font-size:20px;color:var(--text3);flex:none}
.doc-main{flex:1;min-width:0}
.doc-name{display:block;width:100%;text-align:left;border:none;background:transparent;padding:0;font:inherit;font-size:12.5px;font-weight:650;color:var(--text);cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc-name:hover{color:var(--brand);text-decoration:underline}
.doc-main small{display:block;font-size:10.5px;color:var(--text3);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc-cat{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--brand) 12%,transparent);color:var(--brand);font-weight:700;font-size:9.5px;text-transform:uppercase;letter-spacing:.03em}
.doc-actions{display:flex;gap:2px;flex:none;opacity:.6;transition:opacity .12s}
.doc-row:hover .doc-actions{opacity:1}
.doc-total{margin-top:7px;font-size:11px;color:var(--text3)}
.doc-empty{display:flex;flex-direction:column;align-items:center;gap:5px;padding:26px 16px;text-align:center;border:1px dashed var(--border2);border-radius:11px;color:var(--text3);font-size:11.5px}
.doc-empty .mdi{font-size:26px;opacity:.5}
.doc-empty strong{font-size:13px;color:var(--text)}
.doc-drop{display:flex;flex-direction:column;align-items:center;gap:4px;padding:22px;border:1.5px dashed var(--border2);border-radius:12px;background:var(--bg3);cursor:pointer;text-align:center;transition:.14s}
.doc-drop:hover{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 5%,transparent)}
.doc-drop .mdi{font-size:28px;color:var(--text3)}
.doc-drop strong{font-size:12.5px;color:var(--text)}
.doc-drop small{font-size:11px;color:var(--text3)}
.is-drop{border-color:var(--brand)!important;background:color-mix(in srgb,var(--brand) 8%,transparent)!important}

/* employees: accounts that cannot sign in */
.staff-stuck{display:flex;align-items:center;gap:11px;padding:12px 14px;margin-bottom:12px;border:1px solid #fcd34d;border-radius:12px;background:#fffbeb;color:#92400e;font-size:12.5px;line-height:1.5}
.staff-stuck>.mdi{font-size:20px;flex:none}
.staff-stuck>span{flex:1;min-width:0}
.staff-stuck strong{color:#78350f}
.staff-stuck .btn{flex:none;height:32px}
.dir-chip.is-warn{background:#fef3c7;border-color:#fcd34d;color:#92400e}

/* employee editor: locked-out notice */
.emp-locked{display:flex;align-items:center;gap:11px;padding:12px 14px;margin-bottom:13px;border:1px solid #fcd34d;border-radius:12px;background:#fffbeb;color:#92400e}
.emp-locked>.mdi{font-size:21px;flex:none}
.emp-locked>span{flex:1;min-width:0;display:flex;flex-direction:column}
.emp-locked strong{font-size:13px;color:#78350f}
.emp-locked small{font-size:11.5px;line-height:1.45;margin-top:2px}
.emp-locked .btn{flex:none;height:32px}
.emp-unlocked{display:flex;align-items:center;gap:8px;padding:11px 14px;margin-bottom:13px;border:1px solid #86efac;border-radius:12px;background:#f0fdf4;color:#15803d;font-size:12.5px;font-weight:600}
.emp-side-facts strong.is-warn{color:#b45309}
