/* iTrackSuite shared design system: tokens + app switcher + launcher. Loaded on every page. */
:root{
  --s-bg:#0b0d12;--s-panel:#12151c;--s-panel2:#181c25;--s-line:#232836;--s-line2:#2f3647;--s-ink:#eef1f7;--s-ink2:#c5cbd8;--s-muted:#8a93a6;
  --s-accent:#4f7cff;--s-accent2:#8b5cf6;--s-ring:0 0 0 3px rgba(79,124,255,.28);--s-r:12px;
  --app-payroll:#4f7cff;--app-expenses:#f59e0b;--app-sales-pipeline:#10b981;--app-job-tracker:#a855f7;--app-client-hunting:#10b981;--app-betting-ai:#ec4899;--app-client-profiles:#06b6d4;--app-affiliates-profile:#8b5cf6;--app-todo:#14b8a6;--app-nuc:#0ea5e9;--app-account-profiles:#7c3aed;
}
html[data-app=payroll]{--s-app:var(--app-payroll)}html[data-app=expenses]{--s-app:var(--app-expenses)}
html[data-app=sales-pipeline]{--s-app:var(--app-sales-pipeline)}html[data-app=job-tracker]{--s-app:var(--app-job-tracker)}
.suite-switch{position:relative;display:inline-flex;margin-right:12px;flex:0 0 auto}
.suite-switch-btn{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px 0 8px;border-radius:10px;border:1px solid var(--s-line);background:var(--s-panel2);color:var(--s-ink);font:600 13px/1 Inter,system-ui,sans-serif;cursor:pointer;transition:border-color .15s,background .15s}
.suite-switch-btn:hover{border-color:var(--s-line2);background:#1d2230}
.suite-switch-btn:focus-visible{outline:none;box-shadow:var(--s-ring)}
.suite-switch .suite-ic{width:22px;height:22px;border-radius:6px;display:grid;place-items:center;color:#fff;background:var(--s-app,var(--s-accent))}
.suite-switch .suite-ic svg{width:14px;height:14px}
.suite-caret{color:var(--s-muted);font-size:11px}
.suite-menu{position:absolute;top:calc(100% + 8px);left:0;min-width:280px;padding:8px;border-radius:14px;background:#141823;border:1px solid var(--s-line);box-shadow:0 18px 48px rgba(0,0,0,.5);display:none;z-index:1000}
.suite-switch.open .suite-menu{display:block}
.suite-item{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:10px;color:var(--s-ink)!important;text-decoration:none!important;font-family:Inter,system-ui,sans-serif}
.suite-item:hover{background:rgba(255,255,255,.05)}
.suite-item.current{background:rgba(79,124,255,.12);box-shadow:inset 0 0 0 1px rgba(79,124,255,.25)}
.suite-item b{display:block;font-size:13px;font-weight:600}.suite-item small{display:block;font-size:11.5px;color:var(--s-muted);margin-top:2px}
.suite-tile{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;color:#fff;flex:0 0 auto;background:#2a3040}
.suite-tile svg{width:18px;height:18px}
.suite-item[data-app=payroll] .suite-tile{background:var(--app-payroll)}.suite-item[data-app=expenses] .suite-tile{background:var(--app-expenses)}
.suite-item[data-app=sales-pipeline] .suite-tile{background:var(--app-sales-pipeline)}.suite-item[data-app=job-tracker] .suite-tile{background:var(--app-job-tracker)}
.suite-home{border-bottom:1px solid var(--s-line);border-radius:10px 10px 4px 4px;margin-bottom:6px}
@media (max-width:768px){.suite-cur{display:none}.suite-switch-btn{padding:0 8px}.suite-switch{margin-right:6px}.suite-menu{position:fixed;left:12px;right:12px;top:64px;min-width:0}}
.top-bar > .suite-switch + *{margin-right:auto}

/* ===== Notifications dropdown (themed) ===== */
html .notif-panel{background:var(--s-panel)!important;border:1px solid var(--s-line)!important;border-radius:14px!important;box-shadow:0 18px 48px rgba(0,0,0,.45)!important;z-index:2000!important;overflow:hidden;color:var(--s-ink)}
html .notif-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:12px 14px!important;background:var(--s-panel2)!important;border-bottom:1px solid var(--s-line)!important}
html .notif-head strong{color:var(--s-ink)!important;font-size:14px;font-weight:700;letter-spacing:-.01em}
html .notif-readall{color:var(--s-accent)!important;background:none;border:0;font-weight:600;font-size:12px;cursor:pointer;padding:4px 8px;border-radius:6px}
html .notif-readall:hover{background:rgba(79,124,255,.12)}
html .notif-list{max-height:min(420px,70vh)!important;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--s-line2) transparent}
html .notif-list::-webkit-scrollbar{width:8px}html .notif-list::-webkit-scrollbar-thumb{background:var(--s-line2);border-radius:8px;border:2px solid var(--s-panel)}
html .notif-list::-webkit-scrollbar-track{background:transparent}
html .notif-item{border-bottom:1px solid var(--s-line)!important;background:transparent!important}
html .notif-item:last-child{border-bottom:0!important}
html .notif-item:hover{background:rgba(127,140,170,.06)!important}
html .notif-item.unread{background:rgba(79,124,255,.10)!important;box-shadow:inset 3px 0 0 var(--s-accent)}
html .notif-title{color:var(--s-ink)!important}
html .notif-msg{color:var(--s-ink2)!important}
html .notif-time,html .notif-empty{color:var(--s-muted)!important}
html .notif-bell:hover{background:var(--s-panel2)!important}
html .notif-ping{box-shadow:0 0 0 2px var(--s-panel)!important}

/* ===== Theme toggle ===== */
.suite-theme-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:10px;border:1px solid var(--s-line);background:var(--s-panel2);color:var(--s-ink);cursor:pointer;flex:0 0 auto;margin-left:8px;transition:border-color .15s,background .15s}
.suite-theme-btn:hover{border-color:var(--s-line2)}
.suite-theme-btn:focus-visible{outline:none;box-shadow:var(--s-ring)}
.suite-theme-btn svg{width:18px;height:18px}
.suite-theme-btn .i-sun{display:none}html[data-theme=light] .suite-theme-btn .i-sun{display:block}html[data-theme=light] .suite-theme-btn .i-moon{display:none}
.suite-theme-btn.floating{position:fixed;top:14px;right:14px;z-index:3000;margin:0}

/* ===== Light theme ===== */
html[data-theme=light]{color-scheme:light;
  --s-bg:#f5f7fb;--s-panel:#ffffff;--s-panel2:#f1f4f9;--s-line:#e3e8f0;--s-line2:#cfd6e3;--s-ink:#0f172a;--s-ink2:#334155;--s-muted:#64748b;
  --bg-primary:#f5f7fb;--bg-card:#ffffff;--bg-card-hover:#f4f6fb;--bg-input:#ffffff;--border-color:#e3e8f0;--text-primary:#0f172a;--text-secondary:#334155;--text-muted:#64748b;
  --shadow:0 1px 2px rgba(15,23,42,.06),0 8px 24px rgba(15,23,42,.06)}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=light] body{background:radial-gradient(1200px 600px at 100% -10%,rgba(79,124,255,.06),transparent 60%),var(--bg-primary)!important;color:var(--text-primary)}
html[data-theme=light] *{scrollbar-color:#cbd3e1 transparent}
html[data-theme=light] .sidebar{background:#ffffff!important;border-right:1px solid var(--border-color)!important}
html[data-theme=light] .logo-text,html[data-theme=light] .logo{color:#0f172a!important}
html[data-theme=light] .nav-item,html[data-theme=light] a.nav-item{color:#475569!important}
html[data-theme=light] .nav-item:hover,html[data-theme=light] a.nav-item:hover{background:#f1f4f9!important;color:#0f172a!important}
html[data-theme=light] .nav-item.active,html[data-theme=light] a.nav-item.active{color:#1e3a8a!important;background:linear-gradient(90deg,rgba(79,124,255,.14),rgba(79,124,255,.04))!important}
html[data-theme=light] .top-bar{background:rgba(255,255,255,.85)!important}
html[data-theme=light] .top-bar h1,html[data-theme=light] h1,html[data-theme=light] h2,html[data-theme=light] h3,html[data-theme=light] h4,html[data-theme=light] .page-title,html[data-theme=light] .section-title,html[data-theme=light] .stat-value,html[data-theme=light] strong{color:#0f172a}
html[data-theme=light] .data-table thead th,html[data-theme=light] table thead th{background:#f3f6fb!important;color:#64748b!important}
html[data-theme=light] .data-table td,html[data-theme=light] table td{border-bottom:1px solid #edf1f6!important;color:#1e293b}
html[data-theme=light] .data-table tbody tr:nth-child(even){background:#fafbfd}
html[data-theme=light] .btn-secondary{background:#ffffff!important;color:#0f172a!important;border:1px solid var(--border-color)!important}
html[data-theme=light] input:not([type=checkbox]):not([type=radio]):not([type=range]),html[data-theme=light] select,html[data-theme=light] textarea{background:#ffffff!important;color:#0f172a!important;border-color:#d5dce8!important}
html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#94a3b8!important}
html[data-theme=light] .modal:has(.modal-content){background:rgba(15,23,42,.35)!important}
html[data-theme=light] .modal-content,html[data-theme=light] .modal-header,html[data-theme=light] .modal-body,html[data-theme=light] .modal-footer{background:#ffffff!important;color:#0f172a}
html[data-theme=light] .suite-menu{background:#ffffff;box-shadow:0 18px 48px rgba(15,23,42,.14)}
html[data-theme=light] .suite-item:hover{background:#f1f4f9}
html[data-theme=light] .suite-switch-btn:hover{background:#e9edf4}
html[data-theme=light] .notif-panel{box-shadow:0 18px 48px rgba(15,23,42,.16)!important}
html[data-theme=light] .sidebar-user,html[data-theme=light] .user-name{color:#0f172a}
html[data-theme=light] canvas{filter:none}
/* light: login + launcher */
html[data-theme=light] body:has(.login-container){color:#0f172a;background:radial-gradient(900px 500px at 85% -10%,rgba(79,124,255,.12),transparent 60%),radial-gradient(700px 500px at -10% 110%,rgba(139,92,246,.08),transparent 60%),#f5f7fb!important}
html[data-theme=light] .login-container{background:rgba(255,255,255,.96)!important;border-color:#e3e8f0!important;box-shadow:0 1px 2px rgba(15,23,42,.05),0 24px 64px rgba(15,23,42,.10)!important}
html[data-theme=light] h1.wordmark{color:#0f172a!important}
html[data-theme=light] .login-container label{color:#334155!important}
html[data-theme=light] .subtitle{color:#64748b!important}
html[data-theme=light] .bar{background:rgba(255,255,255,.85)!important}
html[data-theme=light] .brand{color:#0f172a!important}
html[data-theme=light] .tile{box-shadow:0 1px 2px rgba(15,23,42,.05),0 10px 28px rgba(15,23,42,.07)!important}
.bar .suite-theme-btn{margin-left:4px}

html[data-app=client-hunting]{--s-app:var(--app-client-hunting)}
.suite-item[data-app=client-hunting] .suite-tile{background:var(--app-client-hunting)}
.tile.t-client-hunting{--c:var(--app-client-hunting)}

/* ===== Shared app sidebar (Client Hunting component + Payroll/Expenses sidebar use the same metrics) ===== */
aside.ch-side{position:fixed;inset:0 auto 0 0;width:248px;display:flex;flex-direction:column;padding:20px 12px;z-index:6;overflow-y:auto;
  background:var(--s-panel);border-right:1px solid var(--s-line);font-family:Inter,system-ui,sans-serif}
html[data-theme=dark] aside.ch-side,html:not([data-theme]) aside.ch-side{background:linear-gradient(180deg,#10131a,#0c0f15)}
aside.ch-side .logo{display:block;font-size:22px;font-weight:700;letter-spacing:-.02em;padding:4px 10px 6px;color:var(--s-ink);cursor:pointer}
aside.ch-side .logo .wm>span{color:#5b86ff}
aside.ch-side .appname{display:flex;align-items:center;gap:8px;margin:6px 10px 10px;padding:8px 10px;border-radius:10px;background:var(--s-panel2);border:1px solid var(--s-line);font-weight:600;font-size:13px;color:var(--s-ink)}
aside.ch-side .appname .suite-tile{width:24px;height:24px;border-radius:7px;background:var(--app-client-hunting);display:grid;place-items:center;color:#fff}
aside.ch-side .appname .suite-tile svg{width:14px;height:14px}
aside.ch-side .ch-nav{display:flex;flex-direction:column;gap:2px}
aside.ch-side .navlbl{font-size:12px;font-weight:600;text-transform:none;letter-spacing:.2px;color:var(--s-muted);padding:14px 12px 6px;margin:0}
aside.ch-side .tab,.sidebar .nav-item,.sidebar a.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;font-size:14px;font-weight:500;line-height:1.3;text-decoration:none;cursor:pointer;user-select:none;border:0;box-shadow:none}
aside.ch-side .tab{color:var(--s-ink2);background:transparent}
aside.ch-side .tab .ic,.sidebar .nav-icon{width:18px;text-align:center;flex:none;opacity:.9}
aside.ch-side .tab .lb{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
aside.ch-side .tab.sub{padding-left:24px}
aside.ch-side .tab .ct{margin-left:auto;font-size:11.5px;color:var(--s-muted);font-weight:500;font-variant-numeric:tabular-nums}
aside.ch-side .tab:hover{background:var(--s-panel2);color:var(--s-ink)}
aside.ch-side .tab.active,.sidebar .nav-item.active,.sidebar a.nav-item.active{background:linear-gradient(90deg,rgba(79,124,255,.18),rgba(79,124,255,.05))!important;box-shadow:inset 0 0 0 1px rgba(79,124,255,.25)!important}
html[data-theme=dark] aside.ch-side .tab.active{color:#fff}
html[data-theme=light] aside.ch-side .tab.active{color:#1e3a8a;background:linear-gradient(90deg,rgba(79,124,255,.14),rgba(79,124,255,.04))!important}
aside.ch-side .tab.active .ct{color:inherit;opacity:.8}
aside.ch-side .grow{flex:1}
aside.ch-side .sfoot{display:flex;flex-direction:column;gap:2px;border-top:1px solid var(--s-line);padding-top:10px}
aside.ch-side .sbtn{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;color:var(--s-ink2);background:0;border:0;font:500 13.5px Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer;width:100%;text-align:left}
aside.ch-side .sbtn .ic{width:18px;text-align:center}
aside.ch-side .sbtn:hover{background:var(--s-panel2);color:var(--s-ink)}

@media (max-width:860px){
  aside.ch-side{display:flex;position:sticky;top:0;inset:auto;width:auto;flex-direction:row;align-items:center;gap:6px;padding:8px 10px;flex-wrap:wrap;overflow:visible;border-right:0;border-bottom:1px solid var(--s-line)}
  aside.ch-side .ch-nav{flex-direction:row;flex-wrap:wrap}aside.ch-side .tab{white-space:nowrap;padding:7px 10px}aside.ch-side .tab.sub{padding-left:10px}
  aside.ch-side .navlbl,aside.ch-side .grow,aside.ch-side .sfoot,aside.ch-side .appname{display:none}aside.ch-side .logo{font-size:17px;padding:0 6px 0 0}
}

/* ===== Shared in-page sub-tabs (Social, Outreach, Freelancing) + account/source cards ===== */
.ch-subtabs{display:inline-flex;flex-wrap:wrap;max-width:100%;gap:0;border:1px solid var(--s-line);border-radius:10px;overflow:hidden;margin:0 0 16px;background:var(--s-panel)}
.ch-subtabs button{background:transparent;color:var(--s-ink2);border:0;border-right:1px solid var(--s-line);padding:8px 14px;font:600 13px Inter,system-ui,sans-serif;cursor:pointer}
.ch-subtabs button:last-child{border-right:0}
.ch-subtabs button:hover{background:var(--s-panel2);color:var(--s-ink)}
.ch-subtabs button.on{background:rgba(79,124,255,.16);color:var(--s-ink);box-shadow:inset 0 -2px 0 #4f7cff}
.ch-acards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));gap:12px;align-items:start}.ch-acards>*{min-width:0;overflow-wrap:anywhere}
.ch-acard{background:var(--s-panel);border:1px solid var(--s-line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;cursor:pointer;color:var(--s-ink);text-align:left;font:inherit;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.ch-acard:hover{border-color:var(--s-line2)}
.ch-acard small{color:var(--s-ink2);font-size:12px;line-height:1.4}
.ch-acard .muted{color:var(--s-muted)}
.ch-acard-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11.5px}
.ch-big{font-size:26px;font-weight:700;letter-spacing:-.02em}.ch-big small{font-size:13px;font-weight:500;color:var(--s-muted)}
.ch-stats{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12.5px;color:var(--s-ink2)}.ch-stats b{color:var(--s-ink)}
.ch-link{font-size:12.5px;color:#4f7cff;text-decoration:none;font-weight:600}
.ch-add{align-items:center;justify-content:center;min-height:110px;border-style:dashed;color:var(--s-muted);font-weight:600}
.bd.fa-active{color:#10b981}.bd.fa-setup{color:#f59e0b}.bd.fa-inactive{color:#94a3b8}
.bd.due-badge{color:#f59e0b;border-color:rgba(245,158,11,.45)}.bd.over-badge{color:#ef4444;border-color:rgba(239,68,68,.45)}

/* Betting AI app */
html[data-app=betting-ai]{--s-app:var(--app-betting-ai)}
.suite-item[data-app=betting-ai] .suite-tile{background:var(--app-betting-ai)}
.tile.t-betting-ai{--c:var(--app-betting-ai)}

/* Clients Profile app */
html[data-app=client-profiles]{--s-app:var(--app-client-profiles)}
.suite-item[data-app=client-profiles] .suite-tile{background:var(--app-client-profiles)}
.tile.t-client-profiles{--c:var(--app-client-profiles)}
/* Affiliates Profile app */
html[data-app=affiliates-profile]{--s-app:var(--app-affiliates-profile)}
.suite-item[data-app=affiliates-profile] .suite-tile{background:var(--app-affiliates-profile)}
.tile.t-affiliates-profile{--c:var(--app-affiliates-profile)}
/* To Do List app */
html[data-app=todo]{--s-app:var(--app-todo)}
.suite-item[data-app=todo] .suite-tile{background:var(--app-todo)}
.tile.t-todo{--c:var(--app-todo)}
/* NUC app */
html[data-app=nuc]{--s-app:var(--app-nuc)}
.suite-item[data-app=nuc] .suite-tile{background:var(--app-nuc)}
.tile.t-nuc{--c:var(--app-nuc)}
/* Account Profiles app (formerly Payroll > Employees) */
html[data-app=account-profiles]{--s-app:var(--app-account-profiles)}
.suite-item[data-app=account-profiles] .suite-tile{background:var(--app-account-profiles)}
.tile.t-account-profiles{--c:var(--app-account-profiles)}
