:root{
  --bg:#f4f7fb;--surface:#ffffff;--surface-2:#f8fafc;--text:#0f172a;--muted:#64748b;--line:#e2e8f0;
  --brand:#2563eb;--brand-2:#7c3aed;--accent:#0ea5e9;--success:#16a34a;--warning:#d97706;--danger:#dc2626;
  --shadow:0 18px 50px rgba(15,23,42,.08);--soft-shadow:0 8px 24px rgba(15,23,42,.06);--radius:18px;
}
*{box-sizing:border-box}html{min-height:100%}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:radial-gradient(circle at top left,rgba(37,99,235,.09),transparent 32%),linear-gradient(180deg,#f8fbff 0%,var(--bg) 45%,#f6f8fb 100%);color:var(--text);font-size:14px;line-height:1.55}a{color:var(--brand);text-decoration:none}a:hover{color:#1d4ed8}code{background:#eef2ff;color:#3730a3;border-radius:8px;padding:2px 6px}.icon{width:18px;height:18px;display:inline-block;flex:0 0 auto}.app-shell{min-height:100vh;display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:286px;background:rgba(15,23,42,.96);color:#fff;padding:20px 16px;display:flex;flex-direction:column;z-index:40;box-shadow:20px 0 60px rgba(15,23,42,.18);backdrop-filter:blur(18px)}.brand{display:flex;align-items:center;gap:12px;padding:8px 8px 18px;border-bottom:1px solid rgba(255,255,255,.09)}.brand-mark{width:42px;height:42px;border-radius:14px;box-shadow:0 12px 28px rgba(37,99,235,.32)}.brand-copy{display:flex;flex-direction:column;min-width:0}.brand-copy strong{font-size:16px;letter-spacing:.01em}.brand-copy span{font-size:12px;color:#94a3b8}.sidebar-close{display:none;margin-left:auto;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);color:#fff;border-radius:12px;width:38px;height:38px;align-items:center;justify-content:center}.side-nav{display:flex;flex-direction:column;gap:6px;padding:18px 0;overflow:auto}.side-link{display:flex;align-items:center;gap:12px;color:#cbd5e1;padding:11px 12px;border-radius:14px;font-weight:650;letter-spacing:.01em;transition:background .18s ease,color .18s ease,transform .18s ease}.side-link:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}.side-link.active{background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#fff;box-shadow:0 12px 28px rgba(37,99,235,.28)}.side-link.logout{margin-top:10px;color:#fee2e2}.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.09);padding-top:14px}.user-pill{display:flex;align-items:center;gap:10px;padding:10px;border-radius:16px;background:rgba(255,255,255,.06)}.avatar{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#22c55e,#0ea5e9);font-weight:800}.user-meta{display:flex;flex-direction:column;min-width:0}.user-meta strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-meta small{font-size:11px;color:#94a3b8}.app-main{flex:1;margin-left:286px;min-width:0}.app-topbar{position:sticky;top:0;z-index:30;height:72px;display:flex;align-items:center;gap:14px;padding:16px 28px;background:rgba(248,251,255,.78);backdrop-filter:blur(18px);border-bottom:1px solid rgba(226,232,240,.75)}.menu-toggle{display:none;width:42px;height:42px;border:1px solid var(--line);background:var(--surface);border-radius:14px;color:var(--text);align-items:center;justify-content:center;box-shadow:var(--soft-shadow)}.topbar-title{display:flex;flex-direction:column}.topbar-title strong{font-size:18px}.eyebrow{text-transform:uppercase;font-size:11px;color:var(--muted);letter-spacing:.12em;font-weight:800}.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:999px}.status-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.12)}.wrap{max-width:1240px;margin:28px auto;padding:0 28px}.content-card{background:transparent;box-shadow:none}.content-card>h1:first-child{font-size:30px;line-height:1.15;margin:0 0 18px;letter-spacing:-.03em}.content-card h2{letter-spacing:-.02em}.card,.chart-card,.employee-card,.user-card,.form-card,.progress-item{background:rgba(255,255,255,.92);border:1px solid rgba(226,232,240,.88);border-radius:var(--radius);box-shadow:var(--soft-shadow)}.card,.employee-card,.user-card{padding:20px}.card h2,.employee-card h2,.user-card h2{margin-top:0}.num{font-size:28px;font-weight:850;letter-spacing:-.04em}.muted{color:var(--muted)}.ok{color:#047857}.err{color:#b91c1c}.flash{padding:12px 14px;border-radius:14px;background:#eef2ff;color:#3730a3;margin:12px 0;border:1px solid #c7d2fe}.flash.err{background:#fef2f2;color:#991b1b;border-color:#fecaca}.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;background:#e2e8f0;color:#334155;font-weight:700;font-size:12px}.status-error{background:#fee2e2;color:#991b1b}.status-done{background:#dcfce7;color:#166534}.status-analyzing,.status-processing{background:#fef3c7;color:#92400e}input,select,textarea{font:inherit;padding:10px 12px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:var(--text);outline:none;transition:border .15s ease,box-shadow .15s ease}input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(37,99,235,.12)}input[type=file]{background:#f8fafc}.btn,button.btn,a.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,var(--brand),#4f46e5);color:#fff;padding:10px 14px;border-radius:13px;text-decoration:none;border:0;cursor:pointer;font-weight:750;box-shadow:0 10px 20px rgba(37,99,235,.18);transition:transform .14s ease,box-shadow .14s ease,filter .14s ease;white-space:nowrap}.btn:hover{color:#fff;transform:translateY(-1px);box-shadow:0 14px 26px rgba(37,99,235,.24);filter:saturate(1.05)}.btn.secondary{background:#fff;color:#334155;border:1px solid #cbd5e1;box-shadow:0 8px 18px rgba(15,23,42,.06)}.btn.secondary:hover{color:#0f172a}.btn.danger{background:linear-gradient(135deg,#dc2626,#ef4444)}.btn-lg{width:100%;padding:13px 16px;border-radius:15px;font-size:15px}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid,.settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.form-grid input,.settings-grid input{width:100%;margin-top:5px}.perm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}.filter-panel,.filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;background:rgba(255,255,255,.75);border:1px solid var(--line);border-radius:18px;padding:14px;margin:14px 0 20px;box-shadow:var(--soft-shadow)}.filter-panel select{min-width:280px}.filters label{min-width:170px}.upload-panel{margin-bottom:20px}table{width:100%;border-collapse:separate;border-spacing:0;margin:16px 0;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--soft-shadow)}th,td{border-bottom:1px solid #e5e7eb;padding:12px 14px;text-align:left;vertical-align:top}th{background:#f8fafc;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.06em}tr:last-child td{border-bottom:0}tbody tr:hover{background:#f8fbff}.count-link{font-weight:800;color:var(--brand);text-decoration:none;border-bottom:1px dashed var(--brand)}.count-link:hover{color:#1d4ed8;border-bottom-style:solid}.pagination{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 6px;align-items:center}details{margin:14px 0}details summary{cursor:pointer;font-weight:750}
/* Charts */.kpi-grid{margin:18px 0}.charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:22px 0}.chart-card{padding:18px}.chart-card.wide{grid-column:1/-1}.chart-card h2{margin:0 0 12px;font-size:18px}.chart-box{min-height:260px}.chart-svg,.donut-svg{width:100%;height:auto;display:block}.chart-label{font-size:13px;fill:#334155}.chart-value{font-size:13px;font-weight:800;fill:#0f172a}.chart-bar-bg{fill:#eef2f7}.chart-bar{fill:var(--bar-color);filter:drop-shadow(0 4px 8px rgba(37,99,235,.15))}.chart-empty{min-height:160px;display:flex;align-items:center;justify-content:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:16px;color:#64748b}.donut-wrap{display:grid;grid-template-columns:290px 1fr;gap:12px;align-items:center}.donut-total{font-size:26px;font-weight:850;fill:#0f172a}.donut-caption{font-size:12px;fill:#64748b}.donut-seg{stroke-linecap:round}.legend{display:flex;flex-direction:column;gap:8px}.legend-row{display:grid;grid-template-columns:14px 1fr auto;gap:8px;align-items:center;font-size:13px}.legend-dot{width:10px;height:10px;border-radius:999px;display:inline-block}.grid-line{stroke:#e5e7eb;stroke-width:1}.axis-label,.x-label{font-size:11px;fill:#64748b}.line-path{fill:none;stroke:#2563eb;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.line-point{fill:#fff;stroke:#2563eb;stroke-width:3}.chart-tooltip{position:fixed;z-index:9999;pointer-events:none;background:#0f172a;color:#fff;padding:8px 10px;border-radius:10px;font-size:12px;box-shadow:0 14px 30px rgba(15,23,42,.28);opacity:0;transform:translateY(4px);transition:opacity .12s ease,transform .12s ease}.chart-tooltip.show{opacity:1;transform:translateY(0)}.chart-hover{transition:opacity .15s ease,filter .15s ease,background .15s ease}.chart-hover:hover{opacity:.90;filter:drop-shadow(0 6px 10px rgba(15,23,42,.14))}.donut-seg.chart-hover{transition:opacity .14s ease,filter .14s ease;transform-box:fill-box;transform-origin:center;cursor:pointer}.donut-seg.chart-hover:hover,.donut-seg.chart-hover.is-active{opacity:1;filter:drop-shadow(0 0 8px rgba(20,184,166,.55)) drop-shadow(0 4px 10px rgba(15,23,42,.18));transform:none}.donut-seg.chart-hover.is-dim{opacity:.28;filter:none}.legend-row.chart-hover{padding:5px 7px;margin:-5px -7px;border-radius:10px}.legend-row.chart-hover:hover,.legend-row.chart-hover.is-active{transform:none;background:#ecfeff;color:#0f766e}.line-point:hover{r:6}
/* Process progress */.progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0 8px}.progress-stack{display:flex;flex-direction:column;gap:8px;min-width:260px}.progress-cell{min-width:300px}.progress-item{padding:13px}.progress-item.progress-done{border-color:#bbf7d0;background:#f0fdf4}.progress-item.progress-processing{border-color:#fde68a;background:#fffbeb}.progress-item.progress-error{border-color:#fecaca;background:#fef2f2}.progress-item.progress-waiting{background:#f8fafc}.progress-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px;font-size:14px}.progress-head span{color:#64748b;white-space:nowrap}.progress-head.compact{font-size:12px;margin-bottom:4px}.progress-track{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}.progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--brand),var(--accent));transition:width .25s ease}.progress-done .progress-fill{background:#16a34a}.progress-processing .progress-fill{background:#d97706}.progress-error .progress-fill{background:#dc2626}.progress-waiting .progress-fill{background:#94a3b8}.progress-meta{margin-top:7px;font-size:12px;color:#64748b}.compact-stack .progress-item{padding:7px 9px;border-radius:12px}.compact-stack .progress-track{height:7px}.uploads-table th:nth-child(7),.uploads-table td:nth-child(7){width:34%}.live-updated{animation:livePulse .55s ease}@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(37,99,235,.22)}100%{box-shadow:0 0 0 10px rgba(37,99,235,0)}}
/* Login */.login-body{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 15%,rgba(37,99,235,.22),transparent 30%),radial-gradient(circle at 80% 80%,rgba(124,58,237,.20),transparent 32%),#0f172a;color:#fff}.login-shell{width:min(1050px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:22px;align-items:stretch}.login-hero{padding:42px;border:1px solid rgba(255,255,255,.12);border-radius:28px;background:linear-gradient(160deg,rgba(255,255,255,.13),rgba(255,255,255,.05));box-shadow:0 32px 80px rgba(0,0,0,.28);backdrop-filter:blur(18px)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:54px}.login-logo{width:48px;height:48px;border-radius:16px}.login-brand div{display:flex;flex-direction:column}.login-brand span{color:#cbd5e1;font-size:13px}.login-hero h1{font-size:42px;line-height:1.06;letter-spacing:-.05em;margin:0 0 18px}.login-hero p{font-size:16px;color:#cbd5e1;max-width:620px}.login-metrics{display:flex;gap:10px;flex-wrap:wrap;margin-top:34px}.login-metrics span{padding:8px 12px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.08);font-weight:800}.login-card{align-self:center;background:#fff;color:var(--text);border-radius:28px;padding:30px;box-shadow:0 34px 90px rgba(0,0,0,.35)}.login-card-head{display:flex;gap:14px;align-items:center;margin-bottom:24px}.login-card-logo{width:48px;height:48px;border-radius:16px}.login-card h2{margin:0;font-size:24px}.login-card p{margin:4px 0 0;color:var(--muted)}.login-form{display:flex;flex-direction:column;gap:16px}.login-form label{font-weight:750;color:#334155}.login-form input{width:100%;margin-top:7px;padding:13px 14px;border-radius:15px}
@media (max-width:1100px){.grid{grid-template-columns:repeat(2,1fr)}.progress-grid{grid-template-columns:1fr}.progress-cell{min-width:220px}.uploads-table{font-size:13px}.progress-head{font-size:13px}.wrap{padding:0 18px}.charts-grid{grid-template-columns:1fr}.donut-wrap{grid-template-columns:1fr}.donut-svg{max-width:320px;margin:auto}.form-grid,.settings-grid,.perm-grid{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}.filter-panel select{min-width:100%;width:100%}}
@media (max-width:860px){.sidebar{transform:translateX(-105%);transition:transform .22s ease;width:min(315px,88vw)}.sidebar.open{transform:translateX(0)}.sidebar-close{display:inline-flex}.mobile-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:35}.mobile-backdrop.show{opacity:1;pointer-events:auto}.app-main{margin-left:0}.menu-toggle{display:inline-flex}.app-topbar{height:66px;padding:12px 16px}.topbar-actions{display:none}.wrap{margin:18px auto;padding:0 14px}.content-card>h1:first-child{font-size:25px}table{display:block;overflow-x:auto;white-space:nowrap}.login-shell{grid-template-columns:1fr}.login-hero{display:none}.login-card{border-radius:24px}.login-body{padding:18px}}


/* UI refinement patch */
.sidebar{width:92px;padding:14px 10px}.app-main{margin-left:92px}.brand{justify-content:center;padding:6px 0 12px}.brand-mark{width:44px;height:44px;border-radius:14px}.brand-copy,.user-meta{display:none}.side-nav{gap:8px}.side-link{flex-direction:column;justify-content:center;gap:5px;min-height:64px;padding:9px 6px;text-align:center;border-radius:18px;font-size:11px;line-height:1.1}.side-link .icon{width:22px;height:22px}.side-link span{white-space:normal}.sidebar-footer{padding:8px 0}.logout{min-height:58px}.content-card{border-radius:26px}.compact-upload{display:flex;align-items:center;justify-content:space-between;gap:18px}.compact-upload h2{margin:0}.inline-upload{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.files-only th:nth-child(7),.files-only td:nth-child(7){width:auto}.home-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:14px}.home-tile{display:flex;flex-direction:column;gap:9px;min-height:170px;padding:22px;border-radius:24px;background:linear-gradient(145deg,#fff,#f8fbff);border:1px solid rgba(226,232,240,.9);box-shadow:var(--soft-shadow);color:var(--text);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.home-tile:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#bfdbfe;color:var(--text)}.home-tile-icon{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,rgba(37,99,235,.12),rgba(124,58,237,.12));display:grid;place-items:center;color:var(--brand)}.home-tile-icon .icon{width:26px;height:26px}.home-tile strong{font-size:19px}.home-tile small{color:var(--muted);font-size:13px}.management-settings{display:grid;gap:18px}.settings-section{padding:22px}.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:14px}.settings-section-head h2{margin:0}.settings-section-head p{margin:3px 0 0;max-width:520px}.danger-soft{background:#fffafafa}.sticky-actions{position:sticky;bottom:14px;z-index:10;background:rgba(255,255,255,.78);backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:var(--soft-shadow);display:flex;justify-content:flex-end}.report-subnav{position:sticky;top:82px;z-index:20;display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:16px 0 20px;padding:10px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.88);backdrop-filter:blur(12px);box-shadow:var(--soft-shadow)}.report-subnav a{padding:8px 11px;border-radius:999px;background:#f8fafc;color:#334155;font-weight:750;font-size:12px}.report-subnav a:hover{background:#eef2ff;color:#3730a3}.user-create-card details{display:none}.filters{position:relative}.employee-card{scroll-margin-top:110px}.chart-card,.card,.employee-card{scroll-margin-top:118px}
@media (max-width:1100px){.home-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-section-head{display:block}.compact-upload{align-items:flex-start;flex-direction:column}}
@media (max-width:860px){.sidebar{width:min(315px,88vw);padding:18px}.app-main{margin-left:0}.brand{justify-content:space-between}.brand-copy{display:block}.side-link{flex-direction:row;justify-content:flex-start;min-height:48px;text-align:left;font-size:14px}.side-link span{white-space:nowrap}.sidebar-footer{padding:12px 0}.logout{min-height:48px}.report-subnav{top:72px;overflow-x:auto;flex-wrap:nowrap}.home-tiles{grid-template-columns:1fr}.compact-upload input[type=file]{width:100%}}

/* 2026-07 visual polish: HDE turquoise palette, compact sidebar, no top bar */
:root{
  --bg:#f2fbfa;
  --surface:#ffffff;
  --surface-2:#f6fbfb;
  --text:#0b1720;
  --muted:#64777b;
  --line:#d9eeeb;
  --brand:#199aa6;
  --brand-2:#29ad78;
  --accent:#22a6a7;
  --success:#24a46c;
  --warning:#d99022;
  --danger:#dc4a4a;
  --shadow:0 18px 48px rgba(10,78,82,.11);
  --soft-shadow:0 8px 22px rgba(10,78,82,.075);
}
body{
  font-size:13px;
  line-height:1.48;
  background:
    radial-gradient(circle at 6% 0%,rgba(34,166,167,.16),transparent 30%),
    radial-gradient(circle at 100% 20%,rgba(41,173,120,.14),transparent 32%),
    linear-gradient(180deg,#f7fffe 0%,var(--bg) 55%,#f7fbfa 100%);
}
a{color:var(--brand)}a:hover{color:#117d87}.icon{width:16px;height:16px}.sidebar{width:82px;padding:12px 8px;background:linear-gradient(180deg,#071315 0%,#08272a 52%,#09382f 100%);box-shadow:16px 0 42px rgba(4,35,38,.18)}.app-main{margin-left:82px}.brand{justify-content:center;padding:4px 0 12px}.brand-mark{width:42px;height:42px;border-radius:14px;object-fit:contain;box-shadow:0 12px 28px rgba(34,166,167,.28)}.side-nav{gap:7px;padding:14px 0}.side-link{flex-direction:column;justify-content:center;gap:4px;min-height:58px;padding:7px 5px;border-radius:16px;text-align:center;font-size:9.5px;line-height:1.05;font-weight:750;letter-spacing:-.01em;color:#b7d6d3}.side-link span{display:block;max-width:66px;white-space:normal;overflow:hidden;text-overflow:ellipsis}.side-link .icon{width:22px;height:22px;stroke-width:2.15}.side-link:hover{background:rgba(35,183,171,.12);color:#fff;transform:translateY(-1px)}.side-link.active{background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#fff;box-shadow:0 10px 24px rgba(34,166,167,.30)}.side-link.logout{color:#f6c8c8}.sidebar-footer{padding-top:8px}.brand-copy,.user-meta{display:none}.app-topbar,.topbar-title,.topbar-actions{display:none!important}.mobile-menu-fab{display:none;position:fixed;left:14px;top:14px;z-index:34}.wrap{max-width:1320px;margin:22px auto;padding:0 22px}.content-card>h1:first-child{font-size:24px;margin-bottom:14px;letter-spacing:-.035em}.content-card h2{font-size:18px}.card,.employee-card,.user-card{padding:17px;border-radius:20px}.chart-card,.form-card,.progress-item{border-radius:18px}.num{font-size:24px}.badge{font-size:11px;padding:3px 8px}.badge-admin{background:rgba(34,166,167,.12);color:#08777f}.btn,button.btn,a.btn{padding:8px 11px;border-radius:12px;background:linear-gradient(135deg,var(--brand),var(--brand-2));box-shadow:0 8px 18px rgba(34,166,167,.16);font-size:12px}.btn:hover{box-shadow:0 12px 24px rgba(34,166,167,.22)}.btn.secondary{background:#fff;color:#31595b;border-color:#c8e5e1}.btn-sm{padding:6px 9px;font-size:11px;border-radius:10px}.flash{background:#e8fbf8;color:#08777f;border-color:#b9ece4}.status-done{background:#dcf8ec;color:#0d704b}.status-error{background:#fee8e8;color:#9f2727}.status-analyzing,.status-processing{background:#fff4d7;color:#89590d}input,select,textarea{padding:8px 10px;border-color:#bddad6;border-radius:11px;font-size:12px}input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(34,166,167,.13)}.filter-panel,.filters{padding:11px;gap:9px;border-radius:16px}.filters label{min-width:138px;font-size:12px}.form-grid,.settings-grid{gap:10px}.perm-grid{gap:8px}.grid{gap:12px}.two-col{gap:14px}table{font-size:12px;border-radius:16px}th,td{padding:10px 11px}th{font-size:10px;letter-spacing:.05em}.report-subnav{top:10px;border-radius:16px}.report-subnav a{font-size:11px;padding:7px 10px}.home-tile{min-height:150px;padding:18px}.home-tile strong{font-size:16px}.home-tile small{font-size:12px}.home-tile-icon{width:46px;height:46px;border-radius:16px;background:linear-gradient(135deg,rgba(34,166,167,.13),rgba(41,173,120,.14));color:var(--brand)}

/* Login page recolored to uploaded logo palette */
.login-body{background:radial-gradient(circle at 22% 16%,rgba(34,166,167,.28),transparent 31%),radial-gradient(circle at 82% 78%,rgba(41,173,120,.22),transparent 34%),linear-gradient(135deg,#061416,#09292b 56%,#083929);}.login-hero{background:linear-gradient(155deg,rgba(34,166,167,.18),rgba(255,255,255,.055));border-color:rgba(182,244,237,.16)}.login-logo,.login-card-logo{object-fit:contain;border-radius:16px}.login-card{box-shadow:0 34px 90px rgba(3,40,38,.38)}.login-hero h1{font-size:38px}.login-brand span,.login-hero p{color:#c3dbd8}.login-metrics span{border-color:rgba(185,236,228,.18);background:rgba(34,166,167,.12)}

/* Users section: compact, readable with many users */
.users-table-wrap,.table-scroll{width:100%;overflow:auto;border-radius:16px}.users-table{min-width:760px;margin-top:10px}.users-table th,.users-table td{vertical-align:middle}.td-id{width:64px;color:#6d8589;font-weight:800}.td-actions{text-align:right;width:120px}.user-line{display:flex;flex-direction:column;gap:2px;min-width:150px}.user-line strong{font-size:13px}.user-line span{font-size:11px;color:var(--muted)}.user-dates{display:flex;flex-direction:column;gap:4px;min-width:145px}.user-dates small{font-size:10.5px;color:var(--muted);white-space:nowrap}.user-create-card .form-card{box-shadow:none;background:#f8fdfc}.user-create-card .form-grid{grid-template-columns:minmax(140px,1.2fr) minmax(140px,1.2fr) minmax(140px,1fr) auto auto;align-items:end}.user-create-card label{font-size:12px}.pagination .btn{min-width:34px}.card>p.muted{font-size:12px}.content-card>p.muted{font-size:12px;margin-top:-6px}

@media (max-width:1100px){.user-create-card .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.users-table{min-width:720px}}
@media (max-width:860px){.sidebar{width:min(300px,86vw);padding:16px;transform:translateX(-105%)}.sidebar.open{transform:translateX(0)}.sidebar-close{display:inline-flex}.mobile-backdrop{position:fixed;inset:0;background:rgba(7,19,21,.52);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:35}.mobile-backdrop.show{opacity:1;pointer-events:auto}.app-main{margin-left:0}.mobile-menu-fab{display:inline-flex}.brand{justify-content:space-between}.side-link{flex-direction:row;justify-content:flex-start;min-height:44px;text-align:left;font-size:13px;gap:10px;padding:9px 10px}.side-link span{max-width:none;white-space:nowrap}.side-link .icon{width:20px;height:20px}.sidebar-footer{padding:10px 0}.wrap{margin:16px auto;padding:48px 12px 0}.content-card>h1:first-child{font-size:22px}.user-create-card .form-grid{grid-template-columns:1fr}.filters label{min-width:100%;width:100%}.filters input,.filters select{width:100%}.login-hero{display:none}.login-card{border-radius:22px}.login-body{padding:16px}.login-shell{grid-template-columns:1fr}.login-card-head{align-items:flex-start}.report-subnav{top:10px;overflow-x:auto;flex-wrap:nowrap}.home-tiles{grid-template-columns:1fr}}

/* Inline worker controls */
.process-control-card{margin:18px 0;padding:16px;border-color:rgba(34,166,167,.25);background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(232,251,248,.80))}
.process-control-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.process-control-head h2{margin:0 0 5px}.process-control-head p{margin:0;max-width:760px}
.process-actions{display:flex;flex-wrap:wrap;gap:8px}.process-actions .btn{min-width:112px}.worker-run-status{margin-top:12px;font-size:12px}.worker-run-status.ok{color:#08777f;font-weight:800}.worker-run-status.err{color:#b91c1c;font-weight:800}.worker-run-log{margin:12px 0 0;padding:12px;border-radius:14px;background:#071315;color:#d8fff9;white-space:pre-wrap;max-height:220px;overflow:auto;font-size:11px;line-height:1.45}.btn.is-loading{opacity:.62;pointer-events:none;filter:grayscale(.1)}.btn.is-loading::after{content:"";width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .65s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media (max-width:760px){.process-control-head{align-items:stretch;flex-direction:column}.process-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.process-actions .btn{min-width:0}}

/* HelpDeskEddy data-source UI */
.source-panel { display: grid; gap: 14px; }
.source-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.source-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:4px; background:rgba(15,23,42,.04); border:1px solid rgba(15,23,42,.07); border-radius:18px; width:max-content; max-width:100%; }
.source-tab { border:0; background:transparent; color:var(--muted, #64748b); padding:9px 12px; border-radius:14px; font-weight:700; font-size:12px; display:inline-flex; align-items:center; gap:7px; cursor:pointer; }
.source-tab.active { color:var(--primary, #1496a7); background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.08); }
.source-form { display:none; }
.source-form.source-form-active { display:block; }
.form-row-inline { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.form-row-inline label { min-width:260px; flex:1; font-size:12px; color:var(--muted, #64748b); font-weight:700; }
.form-row-inline input[type="text"], .form-row-inline input:not([type]) { width:100%; }
.badge.source-outgoing { background:rgba(20,150,167,.12); color:#0f7f89; border:1px solid rgba(20,150,167,.22); }
.badge.source-file { background:rgba(34,197,94,.10); color:#118047; border:1px solid rgba(34,197,94,.18); }
.endpoint-card { display:grid; gap:12px; border:1px solid rgba(20,150,167,.18); background:linear-gradient(135deg, rgba(20,150,167,.08), rgba(41,185,126,.08)), #fff; }
.endpoint-box { display:flex; gap:8px; align-items:center; }
.endpoint-box input { flex:1; min-width:0; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; }
.endpoint-meta code { font-size:11px; word-break:break-all; }
@media (max-width: 760px) { .source-tabs { width:100%; } .source-tab { flex:1; justify-content:center; } .endpoint-box { flex-direction:column; align-items:stretch; } }
.status-waiting_data { background:rgba(14,165,233,.12); color:#0369a1; border:1px solid rgba(14,165,233,.2); }
.status-receiving { background:rgba(20,184,166,.12); color:#0f766e; border:1px solid rgba(20,184,166,.2); }

/* HelpDeskEddy endpoint log */
.endpoint-log-card { margin-top: 14px; }
.endpoint-log-table-wrap { max-height: 520px; overflow: auto; border-radius: 16px; border: 1px solid var(--border, #e5e7eb); }
.endpoint-log-table { min-width: 980px; margin: 0; }
.endpoint-log-table th,
.endpoint-log-table td { font-size: 12px; vertical-align: top; }
.endpoint-log-table .nowrap { white-space: nowrap; }
.endpoint-log-message { max-width: 360px; white-space: normal; overflow-wrap: anywhere; color: var(--text-muted, #64748b); }
.endpoint-status-processed { background: rgba(16,185,129,.12); color: #047857; }
.endpoint-status-received { background: rgba(14,165,233,.12); color: #0369a1; }
.endpoint-status-rate_limited { background: rgba(245,158,11,.14); color: #92400e; }
.endpoint-status-error { background: rgba(239,68,68,.12); color: #b91c1c; }
.section-head.compact { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head.compact h2 { margin: 0 0 4px; }
.section-head.compact p { margin: 0; }

.endpoint-api-details {
    margin-top: 8px;
    border-top: 1px solid var(--border, #e5e7eb);
    padding-top: 8px;
}
.endpoint-api-details summary {
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent, #0ea5a5);
}
.endpoint-api-pre {
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #0f172a;
    color: #d1fae5;
    border-radius: 10px;
    padding: 10px;
    font-size: 11px;
    line-height: 1.45;
    margin: 6px 0 10px;
}

/* Collapsed HelpDeskEddy endpoint log */
.endpoint-log-collapsed {
    padding: 0;
    overflow: hidden;
}
.endpoint-log-collapsed:not([open]) {
    margin-top: 10px;
}
.endpoint-log-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    user-select: none;
}
.endpoint-log-summary::-webkit-details-marker { display: none; }
.endpoint-log-summary-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.endpoint-log-summary-title {
    font-weight: 800;
    color: var(--text, #0f172a);
    font-size: 13px;
}
.endpoint-log-summary .muted {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.endpoint-log-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.endpoint-log-chevron {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(20,150,167,.10);
    color: var(--accent, #0ea5a5);
    font-size: 16px;
    line-height: 1;
    transition: transform .18s ease, background .18s ease;
}
.endpoint-log-collapsed[open] .endpoint-log-chevron {
    transform: rotate(180deg);
    background: rgba(20,150,167,.18);
}
.endpoint-log-body {
    padding: 0 14px 14px;
}
@media (max-width: 760px) {
    .endpoint-log-summary {
        align-items: flex-start;
    }
    .endpoint-log-summary .muted {
        white-space: normal;
    }
}

/* Source conversations and user action log */
.page-head-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.chips-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.chip{display:inline-flex;align-items:center;border:1px solid var(--border,#d9e4e3);background:rgba(255,255,255,.72);border-radius:999px;padding:5px 9px;font-size:11px;text-decoration:none;color:var(--text,#172725)}.small-cell{font-size:11px;max-width:260px}.meta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.meta-grid>div{border:1px solid var(--border,#d9e4e3);border-radius:14px;padding:10px;background:rgba(255,255,255,.62)}.meta-grid span{display:block;font-size:11px}.meta-grid b{display:block;margin-top:3px;font-size:13px}.meta-grid small{display:block;margin-top:3px;color:var(--muted,#6c7f7b);font-size:11px}.conversation-thread{display:flex;flex-direction:column;gap:10px}.message-bubble{border:1px solid var(--border,#d9e4e3);border-radius:16px;padding:10px 12px;background:#fff;max-width:920px}.message-manager{margin-left:auto;background:linear-gradient(135deg,rgba(61,221,191,.12),rgba(45,173,125,.1));border-color:rgba(45,173,125,.28)}.message-client{background:rgba(248,250,250,.9)}.message-system,.message-unknown{background:rgba(245,246,248,.8)}.message-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:6px}.message-head b{font-size:12px}.message-text{font-size:13px;line-height:1.48;white-space:normal}.action-log-table td{vertical-align:top}.nowrap{white-space:nowrap}

/* Conversation external identifiers */
.conversation-unique{display:inline-block;margin-top:2px;font-size:10.5px;line-height:1.25;max-width:180px;overflow:hidden;text-overflow:ellipsis;vertical-align:top;color:#64748b}
.ticket-link{color:#0f766e;text-decoration:none;border-bottom:1px dashed rgba(15,118,110,.45)}
.ticket-link:hover{color:#0d9488;border-bottom-color:#0d9488}

/* Analysis periods */
.analysis-period-card { margin-top: 16px; }
.period-form { margin: 12px 0 18px; }
.compact-form-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.compact-form-grid label { display: grid; gap: 5px; font-size: 12px; color: var(--muted, #667085); }
.compact-form-grid input,
.compact-form-grid select { min-width: 0; }
.inline-form { display: inline-block; margin: 2px 2px 2px 0; }
.actions-cell { min-width: 260px; }
.btn.small { padding: 6px 9px; font-size: 11px; border-radius: 9px; }
.btn.danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn.danger:hover { background: #fecaca; }
.notice { border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.notice.success { background: #ecfdf3; color: #027a48; border: 1px solid #abefc6; }
.notice.error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.report-filter-panel { align-items: end; }
.report-filter-panel label { display: grid; gap: 5px; font-size: 12px; color: var(--muted, #667085); }
@media (max-width: 1100px) {
  .compact-form-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 640px) {
  .compact-form-grid { grid-template-columns: 1fr; }
  .actions-cell { min-width: 180px; }
}
.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.page-title-row h1{margin:0}.comparison-card .table-wrap{margin-top:16px}.accent-card{background:linear-gradient(135deg,rgba(20,184,166,.10),rgba(16,185,129,.08));border-color:rgba(20,184,166,.22)}.insight-list{margin:0;padding-left:20px}.insight-list li{margin:7px 0}.badge.success{background:#dcfce7;color:#166534}.badge.danger{background:#fee2e2;color:#991b1b}.badge.muted-badge{background:#f1f5f9;color:#64748b}.compact-table-wrap{overflow:auto}
@media(max-width:760px){.page-title-row{align-items:stretch;flex-direction:column}.page-title-row .btn{width:100%}}
.badge.good{background:#dcfce7;color:#166534}.kb-tree{display:grid;gap:7px;max-height:520px;overflow:auto}.kb-tree-item{padding:7px 8px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0}.small{font-size:12px}.checkline{display:inline-flex!important;align-items:center;gap:8px;min-width:auto!important}.checkline input{width:auto}.compact-form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.compact-filters label{min-width:150px}.source-card code{white-space:nowrap}

/* Knowledge base live sync */
.kb-sync-progress{margin-top:14px;padding:12px;border:1px solid var(--line,#e5e7eb);border-radius:14px;background:rgba(255,255,255,.72)}
.kb-sync-progress .progress-track{height:9px}
.kb-sync-progress .progress-meta{min-height:18px}
.kb-sync-running .progress-fill{background:linear-gradient(90deg,#12b3a8,#78e08f);background-size:180% 100%;animation:kbSyncFlow 1.2s linear infinite}
@keyframes kbSyncFlow{0%{background-position:0 0}100%{background-position:180% 0}}
[data-kb-sync-result].flash{margin-top:10px}

/* Knowledge base portal, inspired by support.helpdeskeddy.com layout */
.kb-sync-card{margin-bottom:18px}
.kb-sync-stats{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.kb-sync-stats span{min-width:86px;border:1px solid rgba(34,166,167,.18);border-radius:16px;background:linear-gradient(135deg,rgba(34,166,167,.08),rgba(41,173,120,.08));padding:8px 10px;text-align:center}
.kb-sync-stats b{display:block;font-size:18px;line-height:1;color:#0f766e}.kb-sync-stats small{display:block;margin-top:4px;color:var(--muted);font-size:10.5px}.kb-sync-history{margin-top:14px}.kb-sync-history summary{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 11px;font-size:12px;color:#31595b}.kb-portal{display:grid;gap:18px}.kb-hero-card{position:relative;overflow:hidden;border-radius:28px;background:radial-gradient(circle at 14% 20%,rgba(255,255,255,.28),transparent 24%),linear-gradient(135deg,#12a7a7 0%,#23b185 58%,#7de58f 100%);box-shadow:0 26px 65px rgba(18,167,167,.18);padding:36px 34px;color:#fff}.kb-hero-card:after{content:"";position:absolute;right:-80px;top:-80px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.16)}.kb-hero-content{position:relative;z-index:1;max-width:820px}.kb-eyebrow{display:inline-flex;align-items:center;gap:6px;text-transform:uppercase;letter-spacing:.16em;font-size:10.5px;font-weight:900;opacity:.82}.kb-hero-card h2{font-size:34px;margin:8px 0 8px;letter-spacing:-.04em}.kb-hero-card p{max-width:620px;margin:0 0 18px;color:rgba(255,255,255,.86)}.kb-search-form{display:flex;gap:10px;max-width:760px;background:rgba(255,255,255,.18);padding:8px;border:1px solid rgba(255,255,255,.28);border-radius:20px;backdrop-filter:blur(12px)}.kb-search-form input{flex:1;border:0;border-radius:15px;padding:13px 15px;font-size:14px;box-shadow:0 12px 28px rgba(5,57,56,.10)}.kb-search-form .btn{box-shadow:0 12px 28px rgba(5,57,56,.20);background:linear-gradient(135deg,#071315,#143f3b)}.kb-filter-strip{border:1px solid rgba(34,166,167,.14);background:rgba(255,255,255,.82);border-radius:22px;padding:12px;box-shadow:var(--soft-shadow)}.kb-filter-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.kb-filter-form label{display:grid;gap:5px;min-width:190px;font-size:11px;font-weight:800;color:var(--muted)}.kb-filter-form select{min-width:0}.kb-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.kb-category-card{position:relative;min-height:235px;border:1px solid rgba(190,218,214,.78);border-radius:24px;background:rgba(255,255,255,.96);box-shadow:0 14px 36px rgba(9,41,43,.06);padding:18px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.kb-category-card:hover{transform:translateY(-2px);box-shadow:0 20px 46px rgba(9,41,43,.10);border-color:rgba(34,166,167,.32)}.kb-category-title{display:flex;align-items:center;gap:11px;color:#172725;font-weight:850;font-size:16px;letter-spacing:-.02em;margin-bottom:10px}.kb-category-title:hover{color:#0f766e}.kb-category-icon{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(135deg,rgba(34,166,167,.12),rgba(41,173,120,.14));color:#0f766e}.kb-article-link-list{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}.kb-article-link-list li{font-size:12.5px;line-height:1.35}.kb-article-link-list a{color:#31595b}.kb-article-link-list a:hover{color:#0f766e;text-decoration:underline}.kb-more-link{display:inline-flex;margin-top:13px;font-size:12px;font-weight:800;color:#0f766e}.kb-recent-card h2,.kb-results-card h2{margin-bottom:10px}.kb-recent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.kb-recent-item{display:grid;gap:5px;border:1px solid rgba(190,218,214,.78);border-radius:16px;padding:12px;background:#fff;color:#172725}.kb-recent-item:hover{border-color:rgba(34,166,167,.32);background:#f8fffd;color:#0f766e}.kb-recent-item strong{font-size:12.5px;line-height:1.35}.kb-recent-item span{font-size:10.5px;color:var(--muted)}.kb-results-list{display:grid;gap:12px}.kb-result-item{border:1px solid rgba(190,218,214,.78);border-radius:18px;background:#fff;padding:14px}.kb-result-title{font-weight:850;color:#172725}.kb-result-title:hover{color:#0f766e}.kb-result-item p{margin:8px 0;color:#5e716f;font-size:12.5px}.kb-result-meta{display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:11px;color:var(--muted)}.kb-article-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}.kb-article-side{position:sticky;top:18px;display:grid;gap:10px}.kb-article-meta-box{border:1px solid rgba(190,218,214,.78);border-radius:16px;background:#fff;padding:10px}.kb-article-meta-box b{display:block;margin-top:3px;color:#172725}.kb-article-page{padding:28px}.kb-article-page h1{font-size:28px;line-height:1.18;margin:8px 0 18px;letter-spacing:-.04em}.kb-article-body{font-size:14px;line-height:1.75;color:#263b39;white-space:normal}.kb-article-body p{margin:0 0 12px}@media(max-width:1180px){.kb-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kb-recent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:780px){.kb-hero-card{padding:26px 20px;border-radius:22px}.kb-hero-card h2{font-size:26px}.kb-search-form{flex-direction:column}.kb-category-grid,.kb-recent-grid,.kb-article-layout{grid-template-columns:1fr}.kb-article-side{position:static}.kb-filter-form label{min-width:100%;width:100%}.kb-filter-form .btn{width:100%}.kb-sync-stats{justify-content:flex-start}.kb-sync-stats span{min-width:0;flex:1}.kb-category-card{min-height:0}}

/* Knowledge base recommendations */
.kb-rec-start .inline-form label select { min-width: 280px; }
.kb-rec-list { display: grid; gap: 14px; }
.kb-rec-card { border-left: 4px solid var(--accent, #19c6a3); }
.kb-rec-card.priority-high { border-left-color: #ef4444; }
.kb-rec-card.priority-medium { border-left-color: #f59e0b; }
.kb-rec-card.priority-low { border-left-color: #22c55e; }
.kb-rec-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.kb-rec-head h2 { margin: 8px 0 4px; font-size: 18px; }
.kb-rec-badges { display:flex; flex-wrap:wrap; gap:6px; }
.kb-rec-draft { background: rgba(15, 23, 42, .04); border: 1px solid rgba(15, 23, 42, .08); border-radius: 12px; padding: 12px; max-height: 300px; overflow:auto; white-space: normal; }
.ticket-chip-row { display:flex; flex-wrap:wrap; gap:8px; padding-top:10px; }
.ticket-chip { display:inline-flex; align-items:center; gap:4px; border:1px solid rgba(15,23,42,.12); background:#fff; border-radius:999px; padding:6px 10px; font-size:12px; text-decoration:none; }
@media (max-width: 780px) { .kb-rec-head { flex-direction:column; } .kb-rec-start .inline-form label select { min-width: 100%; } }

.source-top-actions{display:flex;gap:8px;align-items:center;margin:10px 0 18px;flex-wrap:wrap}
.danger-zone-card{border:1px solid rgba(239,68,68,.25);background:linear-gradient(180deg,#fff,#fff7f7)}
.danger-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.danger-badge{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.danger-text{color:#991b1b;background:#fee2e2;border:1px solid #fecaca;border-radius:14px;padding:12px 14px;font-size:13px;line-height:1.45}
.delete-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:16px 0}
.delete-summary-item{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:var(--shadow-sm)}
.delete-summary-item span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.delete-summary-item b{font-size:20px;color:var(--text)}
.delete-confirm-form{display:grid;gap:12px;margin-top:16px;max-width:720px}
.delete-confirm-form input[type="text"],.delete-confirm-form input:not([type]){max-width:360px}
.checkline{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--text)}
.delete-files-details{margin:14px 0;color:var(--muted);font-size:12px}
.delete-files-details ul{margin:8px 0 0;padding-left:18px;max-height:220px;overflow:auto}
.btn.danger{background:#dc2626;color:#fff;border-color:#dc2626}
.btn.danger:hover{background:#b91c1c;border-color:#b91c1c;color:#fff}
.btn.small.danger{padding:6px 9px;font-size:11px}

.source-cycle-progress {
  margin: 14px 0 10px;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 18px;
  background: rgba(20, 184, 166, .06);
}
.source-cycle-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.source-cycle-progress-head span {
  color: var(--muted, #64748b);
  font-size: 13px;
}
.source-cycle-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.source-cycle-step {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .04);
  font-size: 13px;
}
.source-cycle-step b {
  white-space: nowrap;
}
.source-cycle-step.progress-done {
  background: rgba(16, 185, 129, .12);
}
.source-cycle-step.progress-processing {
  background: rgba(59, 130, 246, .12);
}
.source-cycle-step.progress-error,
.source-cycle-progress.source-cycle-error {
  background: rgba(239, 68, 68, .10);
  border-color: rgba(239, 68, 68, .24);
}
.source-cycle-progress.source-cycle-done {
  background: rgba(16, 185, 129, .10);
  border-color: rgba(16, 185, 129, .24);
}
.worker-run-log {
  max-height: 260px;
  overflow: auto;
}

.period-cycle-row td {
    background: rgba(241, 245, 249, .55);
    border-top: 0;
}
.period-cycle-panel {
    display: grid;
    gap: 8px;
}
.period-cycle-panel .source-cycle-progress {
    margin-top: 0;
}

.employee-load-card {
  margin: 16px 0;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.metric-grid > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 250, 252, .78);
}
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .035em;
  margin-bottom: 4px;
}
.metric-grid strong {
  font-size: 20px;
  color: var(--text);
}
.table-responsive {
  overflow-x: auto;
  margin: 8px 0 14px;
}
.table.compact th,
.table.compact td {
  padding: 7px 9px;
  font-size: 13px;
}
.hour-load-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.hour-load-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(248, 250, 252, .72);
}
.hour-load-grid span,
.hour-load-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.hour-load-grid strong {
  display: block;
  font-size: 18px;
  color: var(--text);
  margin: 2px 0;
}

/* Unified module navigation and noise reduction */
.section-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 18px;padding:8px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.84);box-shadow:var(--soft-shadow)}
.section-tab{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#f8fafc;color:#31595b;font-size:12px;font-weight:800;border:1px solid transparent;text-decoration:none}
.section-tab:hover{background:#eefdf9;color:var(--brand)}
.section-tab.active{background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#fff;box-shadow:0 8px 18px rgba(34,166,167,.18)}
.compact-details{margin:14px 0;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--soft-shadow);overflow:hidden}
.compact-details>summary{cursor:pointer;padding:13px 16px;font-weight:800;color:#31595b;list-style:none;background:linear-gradient(180deg,#fff,#f8fafc)}
.report-table-sort{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;text-align:left;cursor:pointer}.report-table-sort:after{content:'↕';color:#94a3b8;font-size:11px}.report-table-sort[data-direction="asc"]:after{content:'↑';color:var(--brand,#0f766e)}.report-table-sort[data-direction="desc"]:after{content:'↓';color:var(--brand,#0f766e)}.report-table-sort:hover{color:var(--brand,#0f766e)}
.audit-events-count{display:block;margin-top:3px;padding:0;border:0;background:transparent;color:var(--brand,#0f766e);font:inherit;font-size:16px!important;font-weight:850;cursor:pointer}.audit-events-count:hover{text-decoration:underline}.audit-events-count:disabled{color:inherit;cursor:default;text-decoration:none}
.compact-details>summary::-webkit-details-marker{display:none}
.compact-details>summary:after{content:'+';float:right;color:var(--brand);font-weight:900}
.compact-details[open]>summary:after{content:'−'}
.compact-details-body{padding:14px 16px;border-top:1px solid var(--line)}
.kpi-mini-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.kpi-mini{padding:12px;border-radius:16px;border:1px solid var(--line);background:#fff}.kpi-mini b{display:block;font-size:20px}.kpi-mini span{display:block;color:var(--muted);font-size:12px}
@media (max-width:860px){.section-tabs{overflow-x:auto;flex-wrap:nowrap}.section-tab{white-space:nowrap}.kpi-mini-grid{grid-template-columns:1fr 1fr}}
.process-head-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end;max-width:420px}
.process-actions-main{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.btn.danger-outline{border-color:#fecaca;color:#991b1b;background:#fff7f7}
.btn.danger-outline:hover{background:#fee2e2;color:#7f1d1d}
@media (max-width:760px){.process-head-actions{align-items:stretch;max-width:none}.process-actions-main{justify-content:stretch}.process-actions-main .btn{flex:1 1 auto}}

.chart-clickable { cursor: pointer; }
.chart-clickable:hover { filter: brightness(0.96); }
.kb-rec-card.status-rejected, .kb-rec-card.is-rejected { opacity: .55; filter: grayscale(.25); }
.kb-health-card{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(240,253,250,.78));border-color:rgba(20,184,166,.2)}
.stats-grid.compact-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.stats-grid.compact-stats .stat-card{display:grid;gap:5px;min-height:88px;padding:14px;border:1px solid #dcebea;border-radius:16px;background:rgba(255,255,255,.88)}.stats-grid.compact-stats .stat-card span{font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.stats-grid.compact-stats .stat-card strong{font-size:25px;color:#0f766e}
.kb-rec-kpis{margin:14px 0}.kb-rec-editor{margin-top:14px}.kb-rec-editor-form{display:grid;gap:12px}.kb-rec-editor-form label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#475569}.kb-rec-editor-form textarea{font-family:inherit;line-height:1.5;resize:vertical}.kb-rec-card blockquote{margin:10px 0;padding:10px 12px;border-left:3px solid #14b8a6;background:#f0fdfa;border-radius:0 12px 12px 0}.kb-rec-card blockquote small{display:block;margin-top:5px;color:#64748b}.kb-rec-card .warning-soft ul{margin:8px 0 0;padding-left:18px}.kb-rec-badges .badge{white-space:nowrap}
.kb-rec-start [data-kb-rec-cancel][hidden]{display:none!important}
.employee-kpi-summary { margin: 18px 0; }
.employee-kpi-summary .muted strong { color: var(--text, #111827); }

/* Visual polish: periods, source topics, reports, bot and employee charts */
.analysis-period-card{overflow:hidden}
.analysis-period-card .process-control-head{align-items:flex-start;flex-wrap:wrap}
.analysis-period-card .process-control-head .btn{flex:0 0 auto}
.analysis-period-card .period-form{display:grid;gap:12px;padding:14px;border:1px solid rgba(190,218,214,.65);border-radius:18px;background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,253,252,.92));box-shadow:0 10px 24px rgba(9,41,43,.04)}
.analysis-period-card .compact-form-grid{grid-template-columns:repeat(auto-fit,minmax(158px,1fr));align-items:end;gap:10px}
.analysis-period-card .compact-form-grid label{min-width:0;font-size:11.5px;font-weight:800;color:var(--muted)}
.analysis-period-card .compact-table{min-width:920px;font-size:11.5px;margin-top:10px}
.analysis-period-card .compact-table th,.analysis-period-card .compact-table td{padding:9px 10px}
.analysis-period-card .actions-cell{display:flex;flex-wrap:wrap;gap:6px;min-width:285px}.analysis-period-card .inline-form{display:inline-flex;margin:0}.analysis-period-card .period-cycle-panel{border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0;padding:10px}.analysis-period-card .worker-run-log{max-height:140px}

.chart-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.chart-card-head h2{margin:0 0 3px}.chart-card-head p{margin:0}.source-topics-card{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(237,253,248,.86));border-color:rgba(34,166,167,.20);position:relative;overflow:hidden}.source-topics-card:before{content:"";position:absolute;inset:0 auto auto 0;width:5px;height:100%;background:linear-gradient(180deg,var(--brand),var(--brand-2));opacity:.95}.source-topics-card .chart-box{padding-left:4px}.compact-chart-box{min-height:220px}

.report-charts-grid{gap:14px}.report-charts-grid .chart-card{padding:14px;border-radius:18px}.report-charts-grid .chart-card h2,.report-charts-grid .chart-card h3{font-size:14px;line-height:1.2;margin:0 0 8px;letter-spacing:-.01em}.report-charts-grid .chart-box{min-height:220px}.chart-svg-bars .chart-label{font-size:11px;font-weight:650;fill:#475569}.chart-svg-bars .chart-value{font-size:11px}.chart-card .muted.small{font-size:11px;line-height:1.35}

.bot-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(165px,1fr))}.bot-analysis-layout{grid-template-columns:minmax(0,1fr);margin-top:14px}.bot-result-chart{max-width:760px}.bot-insight-card,.bot-kb-card{margin-top:16px}.bot-insight-card .kpi-grid,.bot-kb-card .kpi-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin:12px 0}.bot-kb-card .charts-grid{grid-template-columns:minmax(0,520px);margin:14px 0}.bot-kb-card table{font-size:11.5px}.internal-ticket-link b{font-weight:850}.report-ticket-list table{min-width:980px}.report-ticket-list td:first-child{min-width:150px}

.employee-kpi-polished{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(239,246,255,.82));border-color:rgba(37,99,235,.16)}.employee-summary-charts{grid-template-columns:minmax(0,1fr);margin:14px 0}.employee-kpi-chart-card{padding:14px}.employee-kpi-chart-card h3{margin:0 0 4px;font-size:15px}.employee-charts-polished{gap:12px}.employee-charts-polished .chart-card{padding:13px;border-radius:18px}.employee-charts-polished .chart-card h3{font-size:14px;margin:0 0 4px}.employee-charts-polished .chart-box{min-height:210px}.employee-kpi-summary table{font-size:11.5px}.employee-kpi-summary th,.employee-kpi-summary td{padding:9px 10px}

@media(max-width:980px){.charts-grid,.report-charts-grid,.employee-charts-polished{grid-template-columns:1fr}.donut-wrap{grid-template-columns:1fr}.analysis-period-card .process-control-head{flex-direction:column}.analysis-period-card .process-control-head .btn{width:100%}.bot-result-chart{max-width:none}}
@media(max-width:640px){.analysis-period-card .compact-form-grid{grid-template-columns:1fr}.analysis-period-card .actions-cell{min-width:240px}.chart-card{padding:13px}.chart-label,.chart-value{font-size:10.5px}.chart-box{min-height:210px}.num{font-size:22px}}

/* === Product UI design system refresh === */
.ds-page-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px;padding:20px 22px;border:1px solid rgba(226,232,240,.9);border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(248,250,252,.86));box-shadow:var(--soft-shadow)}
.ds-page-hero h1{margin:0 0 6px;font-size:28px;line-height:1.15;letter-spacing:-.035em}.ds-page-hero p{margin:0;color:var(--muted)}.ds-page-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.ds-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.ds-card-head h2,.ds-card-head h3{margin:0}.ds-kpi-card{position:relative;overflow:hidden}.ds-kpi-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,var(--brand),var(--brand-2));opacity:.72}.ds-kpi-card .muted{font-size:12px;text-transform:uppercase;letter-spacing:.07em;font-weight:800}.ds-insight-card{background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(14,165,233,.06));border-color:rgba(124,58,237,.16)}.ds-action-card{background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(20,184,166,.07));border-color:rgba(37,99,235,.18)}.ds-tech-card{background:rgba(248,250,252,.88);border-style:dashed}.section-tabs{position:sticky;top:84px;z-index:20;display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px;padding:8px;background:rgba(255,255,255,.78);border:1px solid var(--line);border-radius:18px;box-shadow:var(--soft-shadow);backdrop-filter:blur(12px)}.section-tab{display:inline-flex;align-items:center;gap:6px;padding:9px 12px;border-radius:12px;color:#475569;font-weight:800;font-size:13px}.section-tab:hover,.section-tab.active{background:#eff6ff;color:#1d4ed8}.section-tab.is-anchor{background:#fff;border:1px solid #e2e8f0}.anchor-offset{scroll-margin-top:150px}.empty-state{padding:28px;text-align:center;border:1px dashed #cbd5e1;background:#f8fafc;border-radius:20px;color:#64748b}.empty-state b{display:block;color:#0f172a;font-size:16px;margin-bottom:4px}.table-scroll{max-width:100%;overflow:auto}.table-scroll table{min-width:760px}.table-compact th,.table-compact td,.compact-table th,.compact-table td{padding:9px 10px;font-size:12.5px}.compact-details{border:1px solid var(--line);border-radius:14px;background:#fff;padding:0}.compact-details>summary{padding:11px 13px}.compact-details>*:not(summary){margin:12px}.charts-grid.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.chart-card{overflow:hidden}.chart-card h2,.chart-card h3{font-size:16px;line-height:1.25}.chart-card .muted.small{font-size:11.5px}.compact-chart-box{min-height:220px}.source-dashboard-nav{margin-top:14px}.source-top-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 8px}.source-topics-card{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(240,253,250,.86));border-color:rgba(20,184,166,.20)}.process-control-card.ds-action-card .process-control-head{align-items:center}.process-head-actions{min-width:min(420px,100%)}.cycle-options{margin-bottom:10px}.period-cycle-row td{background:#f8fafc}.period-cycle-panel{border:1px dashed #cbd5e1;border-radius:14px;background:#fff;padding:12px}.period-form .btn{margin-top:10px}.analysis-period-card .compact-form-grid{grid-template-columns:1fr 1fr 150px 150px 220px}.analysis-period-card .actions-cell{min-width:300px}.kb-rec-list{display:grid;gap:14px}.kb-rec-card{transition:opacity .15s ease,transform .15s ease,box-shadow .15s ease}.kb-rec-card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.kb-rec-card.is-rejected{opacity:.52;filter:grayscale(.25)}.kb-rec-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.kb-rec-badges{display:flex;gap:6px;flex-wrap:wrap}.soft-card{background:#f8fafc;border:1px solid #e2e8f0;box-shadow:none}.kb-rec-draft{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:12px;max-height:300px;overflow:auto}.conversation-meta-card{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(239,246,255,.68))}.conversation-thread{display:flex;flex-direction:column;gap:12px}.message-bubble{border-radius:20px;padding:12px 14px;border:1px solid #e2e8f0;box-shadow:0 8px 18px rgba(15,23,42,.04);max-width:82%;position:relative}.message-client{align-self:flex-start;border-bottom-left-radius:7px;background:#fff}.message-manager,.message-operator{align-self:flex-end;border-bottom-right-radius:7px;background:linear-gradient(135deg,rgba(20,184,166,.12),rgba(37,99,235,.07));border-color:rgba(20,184,166,.22)}.message-bot{align-self:flex-end;border-bottom-right-radius:7px;background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(14,165,233,.07));border-color:rgba(124,58,237,.22)}.message-system,.message-unknown{align-self:center;max-width:72%;background:#f8fafc}.message-head{font-size:12px}.message-head .badge{font-size:10.5px;padding:3px 7px}.message-text{font-size:13.5px;line-height:1.56}.conversation-tabs{margin-bottom:14px}.report-dashboard .kpi-grid .card{min-height:118px}.report-dashboard .num{font-size:24px}.report-dashboard .charts-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.report-dashboard .chart-box{min-height:230px}.report-dashboard .chart-card.wide{grid-column:1/-1}.bot-layout-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.bot-layout-grid .wide{grid-column:1/-1}.employee-kpi-summary{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(238,242,255,.72));border-color:rgba(99,102,241,.16)}.employee-summary-charts .chart-box{min-height:240px}.employee-card{margin-bottom:16px}.employee-card summary{list-style:none}.employee-card summary::-webkit-details-marker{display:none}.employee-analysis-charts{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.employee-analysis-charts .chart-box{min-height:210px}.employee-analysis-charts .chart-card{padding:14px}.employee-score-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.employee-score-strip>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px}.employee-score-strip b{display:block;font-size:18px}.breadcrumb{display:flex;gap:6px;align-items:center;flex-wrap:wrap;color:#64748b;font-size:12px;margin-bottom:10px}.breadcrumb a{color:#475569}.breadcrumb span:before{content:'›';margin-right:6px;color:#94a3b8}
@media(max-width:1100px){.analysis-period-card .compact-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-analysis-charts{grid-template-columns:1fr}.bot-layout-grid,.report-dashboard .charts-grid,.charts-grid.dashboard-grid{grid-template-columns:1fr}.section-tabs{position:relative;top:auto}.ds-page-hero{flex-direction:column}.ds-page-actions{justify-content:flex-start}.message-bubble{max-width:94%}}
@media(max-width:640px){.analysis-period-card .compact-form-grid,.employee-score-strip{grid-template-columns:1fr}.ds-page-hero{padding:16px}.ds-page-hero h1{font-size:23px}.source-top-actions .btn,.process-actions-main .btn{width:100%}.message-bubble{max-width:100%}}

/* Source overview: keep the five compact counters on one row where space permits. */
#overview.source-overview-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#overview.source-overview-kpis .ds-kpi-card{padding:14px;min-width:0}#overview.source-overview-kpis .num{font-size:24px;white-space:nowrap}@media(max-width:700px){#overview.source-overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){#overview.source-overview-kpis{grid-template-columns:1fr}}


/* Next visual layer: action center, drawer, timeline, decision summaries */
.action-center-card{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(239,246,255,.72));border-color:rgba(37,99,235,.14)}
.action-center-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.action-item{display:flex;flex-direction:column;gap:7px;min-height:118px;padding:16px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;color:#0f172a;box-shadow:0 12px 30px rgba(15,23,42,.05);transition:.18s ease}.action-item:hover{transform:translateY(-2px);box-shadow:0 18px 42px rgba(15,23,42,.09)}.action-item strong{font-size:30px;letter-spacing:-.04em}.action-label{font-weight:900}.action-item small{color:#64748b;font-weight:800}.action-danger{border-color:rgba(239,68,68,.20);background:linear-gradient(135deg,#fff,rgba(254,226,226,.55))}.action-warn{border-color:rgba(245,158,11,.24);background:linear-gradient(135deg,#fff,rgba(254,243,199,.65))}.action-ai{border-color:rgba(124,58,237,.22);background:linear-gradient(135deg,#fff,rgba(237,233,254,.65))}.action-center-card.is-calm{background:linear-gradient(135deg,#fff,rgba(240,253,244,.65))}
.executive-summary-card{border-color:rgba(20,184,166,.18);background:linear-gradient(135deg,#fff,rgba(240,253,250,.72))}.insight-list{display:grid;gap:10px}.insight-row{display:grid;grid-template-columns:160px 1fr;gap:12px;align-items:center;padding:12px 14px;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.insight-row b{font-weight:900}.insight-row:before{content:"";width:10px;height:10px;border-radius:999px;background:#94a3b8;grid-column:1;grid-row:1;align-self:center}.insight-row>b{padding-left:18px;grid-column:1;grid-row:1}.insight-row>span{grid-column:2}.insight-row.is-ok:before{background:#10b981}.insight-row.is-warn:before{background:#f59e0b}.insight-row.is-danger:before{background:#ef4444}.insight-row.is-ai:before{background:#8b5cf6}
.app-drawer{position:fixed;inset:0;z-index:2000;pointer-events:none}.app-drawer.open{pointer-events:auto}.app-drawer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.28);opacity:0;transition:.18s ease}.app-drawer.open .app-drawer-backdrop{opacity:1}.app-drawer-panel{position:absolute;right:0;top:0;height:100%;width:min(860px,94vw);background:#fff;box-shadow:-28px 0 70px rgba(15,23,42,.22);transform:translateX(104%);transition:.22s ease;display:flex;flex-direction:column}.app-drawer.open .app-drawer-panel{transform:translateX(0)}.app-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#fff,#f8fafc)}.app-drawer-head b{display:block;font-size:18px}.app-drawer-head small{display:block;color:#64748b;margin-top:2px}.drawer-close{border:0;background:#f1f5f9;border-radius:12px;width:38px;height:38px;font-size:24px;color:#334155;cursor:pointer}.drawer-close:hover{background:#e2e8f0}.app-drawer-body{padding:18px;overflow:auto;min-height:0;flex:1}.drawer-loading{padding:28px;border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc;color:#64748b;text-align:center}.drawer-report-list h2{margin-top:0}.drawer-table table{min-width:720px}.drawer-table th,.drawer-table td{font-size:12px;padding:9px}.drawer-open{overflow:hidden}.chart-clickable{cursor:pointer}.chart-clickable:hover{filter:brightness(.96)}
.conversation-timeline-card{background:linear-gradient(135deg,#fff,rgba(239,246,255,.74));border-color:rgba(37,99,235,.13)}.conversation-timeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;position:relative}.timeline-step{position:relative;padding:14px 12px 12px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;min-height:88px}.timeline-step:after{content:"";position:absolute;top:28px;right:-9px;width:10px;height:2px;background:#cbd5e1}.timeline-step:last-child:after{display:none}.timeline-dot{display:inline-block;width:11px;height:11px;border-radius:999px;background:#94a3b8;margin-right:6px}.timeline-step b{display:block;margin-top:7px;font-size:13px}.timeline-step small{display:block;margin-top:4px;color:#64748b;font-size:11.5px;line-height:1.35}.timeline-ok .timeline-dot{background:#10b981}.timeline-warn .timeline-dot{background:#f59e0b}.timeline-missing .timeline-dot{background:#ef4444}.timeline-muted .timeline-dot{background:#cbd5e1}.timeline-ok{border-color:rgba(16,185,129,.24)}.timeline-warn{border-color:rgba(245,158,11,.28)}.timeline-missing{border-color:rgba(239,68,68,.28)}
.sticky-filter-panel{position:sticky;top:82px;z-index:25;backdrop-filter:blur(12px)}.filter-panel.sticky-filter-panel{background:rgba(255,255,255,.82);border-color:rgba(226,232,240,.9)}.report-subnav.sticky-filter-panel{top:154px;background:rgba(255,255,255,.82);border-radius:16px;border:1px solid #e2e8f0;padding:8px;box-shadow:0 12px 30px rgba(15,23,42,.05)}
.badge-reason{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:11px;font-weight:800;margin:2px}.confidence-dots{display:inline-flex;gap:3px}.confidence-dots i{width:7px;height:7px;border-radius:999px;background:#cbd5e1}.confidence-dots i.on{background:#8b5cf6}
@media(max-width:1100px){.action-center-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.conversation-timeline{grid-template-columns:1fr 1fr}.timeline-step:after{display:none}.insight-row{grid-template-columns:1fr}.insight-row>span{grid-column:1}.action-item strong{font-size:25px}}
@media(max-width:640px){.action-center-grid{grid-template-columns:1fr}.app-drawer-panel{width:100vw}.conversation-timeline{grid-template-columns:1fr}.sticky-filter-panel{position:relative;top:auto}.report-subnav.sticky-filter-panel{top:auto}.insight-row>b{padding-left:16px}}

/* Dynamic AI reports */
.ai-report-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#fff,rgba(237,233,254,.55));border-color:rgba(124,58,237,.18)}
.ai-report-hero h2{margin-top:0}.compact-kpis{min-width:320px}.ai-report-form{display:grid;gap:14px}.ai-report-form label{display:grid;gap:7px;font-weight:850;color:#334155}.ai-report-form textarea{resize:vertical;min-height:128px}.ai-report-examples{display:flex;flex-wrap:wrap;gap:8px}.ai-report-examples button,.link-btn{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:7px 10px;color:#2563eb;font-weight:800;cursor:pointer}.ai-report-examples button:hover,.link-btn:hover{background:#eff6ff}.dynamic-progress{padding:12px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc}.report-result-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.report-result-head h2{margin:0 0 5px}.ai-summary{font-size:15px;line-height:1.6;padding:12px 14px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0}.dynamic-chart{min-height:300px;margin:14px 0 18px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:12px;overflow:auto}.dynamic-multi-line .dynamic-line-path{fill:none;stroke:var(--line-color,#2563eb);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.dynamic-multi-line .line-point{fill:var(--point-color,#2563eb);stroke:#fff;stroke-width:1.5}.dynamic-chart-legend{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:10px}.dynamic-chart-legend span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:#475569}.dynamic-chart-legend i{width:10px;height:10px;border-radius:999px;display:inline-block}.report-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.nice-list{margin:0;padding-left:20px}.nice-list li{margin:6px 0;line-height:1.45}.badge.done{background:#dcfce7;color:#166534}.badge.error{background:#fee2e2;color:#991b1b}.badge.new,.badge.planning,.badge.querying,.badge.generating{background:#eff6ff;color:#1d4ed8}
@media(max-width:860px){.ai-report-hero{flex-direction:column}.compact-kpis{min-width:0;width:100%}.report-grid-2{grid-template-columns:1fr}}

/* AI prompts management */
.ai-prompts-layout { align-items: flex-start; }
.ai-prompt-form textarea {
    width: 100%;
    min-height: 140px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
    white-space: pre-wrap;
}
.ai-prompt-form .form-hint {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--soft, #f8fafc);
}
.ai-prompt-form .form-hint code {
    display: inline-block;
    margin: 3px 4px 3px 0;
    padding: 3px 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .06);
}
.compact-table tr.row-active td {
    background: rgba(37, 99, 235, .06);
}
.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* AI prompt relations and pipeline notes */
.ai-prompt-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}
.ai-prompt-meta .meta-card {
    padding: 11px 12px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f8fafc);
    color: var(--text, #0f172a);
    font-size: 13px;
    line-height: 1.45;
}
.ai-prompt-meta .meta-card-wide { grid-column: 1 / -1; }
.ai-prompt-meta .meta-label {
    margin-bottom: 5px;
    color: var(--muted, #64748b);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ai-prompt-meta .badge { margin: 2px 4px 2px 0; }
.badge.neutral { background: #f1f5f9; color: #334155; }
.badge.info { background: #dbeafe; color: #1d4ed8; }
@media (max-width: 860px) {
    .ai-prompt-meta { grid-template-columns: 1fr; }
}


/* Static section submenu fix: submenus should stay in normal document flow, not follow scrolling. */
.section-tabs,
.report-subnav,
.report-subnav.sticky-filter-panel {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    backdrop-filter: none !important;
}

.section-tabs {
    margin: 0 0 18px !important;
}

.source-dashboard-nav {
    margin-top: 0 !important;
}

.report-subnav {
    margin: 0 0 18px !important;
}

.anchor-offset,
.employee-card,
.chart-card,
.card {
    scroll-margin-top: 24px !important;
}

/* Source UI polish */
.sources-quick-stats span{display:inline-flex;align-items:baseline;gap:5px;min-width:0}.sources-quick-stats b{font-size:16px}
.hde-api-form.source-form-active{display:grid!important;gap:14px}.hde-create-grid{display:grid!important;grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr);gap:14px;align-items:end}.hde-create-grid>div:first-child{grid-column:1/-1}.hde-create-grid h3{margin:0 0 4px}.hde-create-grid p{margin:0;max-width:760px}.hde-create-grid label{display:grid;gap:6px;font-weight:750;font-size:13px;min-width:0}.hde-create-grid input,.hde-create-grid select{width:100%;min-width:0}.hde-departments-box{display:grid!important;gap:12px;padding:16px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc}.hde-departments-head{display:flex!important;align-items:flex-start;justify-content:space-between;gap:14px}.hde-departments-head p{margin:4px 0 0}.hde-departments-actions{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:8px}.hde-selected-counter{margin:0!important}.source-form-actions.bottom{width:auto!important;justify-self:start}.source-form-actions.bottom .btn{width:auto!important}.source-audit-default{margin-top:0}.source-delete-link{display:inline-flex;align-items:center;padding:8px 4px;margin-left:8px;color:#b91c1c;font-size:12px;font-weight:750;white-space:nowrap}
.source-create-disclosure{display:block;padding:0;overflow:hidden}.source-create-summary{display:flex;align-items:center;gap:12px;padding:18px 20px;cursor:pointer;list-style:none}.source-create-summary::-webkit-details-marker{display:none}.source-create-summary-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:#e8f7f3;color:#0f766e}.source-create-summary>span:nth-child(2){display:grid;gap:2px}.source-create-summary b{font-size:16px;color:#172725}.source-create-summary small{font-size:12px;color:var(--muted)}.source-create-summary-action{margin-left:auto;display:inline-flex;align-items:center;gap:7px;color:#0f766e;font-size:13px;font-weight:850}.source-create-disclosure[open] .source-create-summary{border-bottom:1px solid #dbe7e5;background:rgba(240,253,250,.55)}.source-create-disclosure[open] .source-create-summary-action span{transform:rotate(180deg)}.source-create-content{display:grid;gap:14px;padding:16px}.source-advanced-options{margin-top:12px}.source-advanced-options>summary{cursor:pointer;color:#475569;font-size:12px;font-weight:850}.source-advanced-options[open]>summary{margin-bottom:8px}.sources-table-simple{min-width:760px}.sources-table-simple th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b}.source-main-cell{display:flex;align-items:center;gap:10px;min-width:260px}.source-main-cell>div{display:grid;gap:3px}.source-main-cell b{font-size:13px;color:#1f2937}.source-main-cell small{font-size:11px;color:#64748b}.source-data-inline{display:flex;gap:18px;white-space:nowrap}.source-data-inline span{display:grid;gap:2px}.source-data-inline b{font-variant-numeric:tabular-nums;color:#1f2937}.source-data-inline small{font-size:10.5px;color:#64748b}.source-status-simple{display:grid;gap:5px;min-width:130px}.source-status-simple .err{font-size:11px;line-height:1.3}.source-row-more{position:relative;display:inline-block;margin-left:6px}.source-row-more>summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;padding:8px 10px;border:1px solid #dbe3ef;border-radius:10px;background:#fff;color:#64748b;font-weight:750;font-size:12px}.source-row-more>summary::-webkit-details-marker{display:none}.source-row-more>div{position:absolute;right:0;z-index:5;display:grid;gap:9px;min-width:190px;padding:12px;margin-top:6px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 18px 35px rgba(15,23,42,.14);font-size:11px;color:#64748b}.source-row-more .btn{justify-content:center}.sources-table-simple .actions-cell{min-width:185px}
.source-row-more>div{position:static;min-width:0;margin:8px 0 0;padding:10px;box-shadow:none;background:#f8fafc}.source-technical-details{padding:0;overflow:hidden}.source-technical-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;list-style:none;font-weight:850}.source-technical-summary::-webkit-details-marker{display:none}.source-technical-details[open] .source-technical-summary{border-bottom:1px solid #e2e8f0;background:#f8fafc}.source-technical-content{padding:14px 16px 16px}.source-technical-content .source-settings-head{margin-bottom:12px}
@media(max-width:1100px){.source-form-grid,.hde-create-grid{grid-template-columns:1fr 1fr}.source-meta-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.source-header-main,.sources-page-head{flex-direction:column}.sources-quick-stats{width:100%}}
@media(max-width:760px){.source-tabs-wide{grid-template-columns:1fr}.source-form-grid,.hde-create-grid{grid-template-columns:1fr}.hde-departments-head{flex-direction:column}.hde-departments-actions{justify-content:flex-start}.source-meta-strip{grid-template-columns:1fr}.source-header-main h1{font-size:22px}}

/* HelpDeskEddy API diagnostic cards */
.hde-api-debug-card{margin-top:14px;border:1px solid #dbeafe;border-radius:16px;background:#f8fafc;overflow:hidden;}
.hde-api-debug-card>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer;font-weight:900;list-style:none;}
.hde-api-debug-card>summary::-webkit-details-marker{display:none;}
.hde-api-debug-card>summary small{font-weight:700;}
.hde-api-debug-list{display:grid;gap:10px;padding:0 14px 14px;}
.hde-api-debug-empty{padding:12px;border:1px dashed #cbd5e1;border-radius:12px;background:#fff;color:#64748b;font-size:13px;}
.hde-api-debug-item{display:grid;gap:6px;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;font-size:13px;}
.hde-api-debug-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.hde-api-debug-top span{color:#64748b;font-size:12px;white-space:nowrap;}
.hde-api-debug-item details{margin-top:4px;}
.hde-api-debug-item details summary{cursor:pointer;color:#2563eb;font-weight:800;}
.hde-api-debug-item pre{max-height:260px;overflow:auto;margin:8px 0 0;padding:10px;border-radius:12px;background:#0f172a;color:#e2e8f0;font-size:12px;line-height:1.45;white-space:pre-wrap;word-break:break-word;}

/* HelpDeskEddy import full diagnostics */
.hde-import-diagnostics-card{margin-top:14px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;overflow:hidden;}
.hde-import-diagnostics-card>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer;font-weight:900;list-style:none;background:#f8fafc;}
.hde-import-diagnostics-card>summary::-webkit-details-marker{display:none;}
.hde-import-diagnostics-card>summary small{font-weight:700;}
.hde-import-diagnostics-list{display:grid;gap:10px;padding:14px;max-height:620px;overflow:auto;}
.hde-diag-item{display:grid;gap:7px;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;font-size:13px;}
.hde-diag-debug{border-color:#e2e8f0;background:#fff;}
.hde-diag-info{border-color:#bfdbfe;background:#eff6ff;}
.hde-diag-warning{border-color:#fde68a;background:#fffbeb;}
.hde-diag-error{border-color:#fecaca;background:#fef2f2;}
.hde-diag-item details summary{cursor:pointer;color:#2563eb;font-weight:800;}
.hde-diag-item pre{max-height:320px;overflow:auto;margin:8px 0 0;padding:10px;border-radius:12px;background:#0f172a;color:#e2e8f0;font-size:12px;line-height:1.45;white-space:pre-wrap;word-break:break-word;}

/* UI polish pass: stable forms, cards, tables and checkboxes across the admin UI. */
:root{--focus-ring:0 0 0 4px rgba(37,99,235,.12)}
.card,.chart-card,.employee-card,.user-card,.form-card,.progress-item{transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.card:hover,.chart-card:hover,.employee-card:hover,.user-card:hover{border-color:rgba(191,219,254,.95)}

/* Make all admin checkboxes custom-sized and stable in every state. */
input[type="checkbox"]{
    appearance:none;-webkit-appearance:none;
    display:inline-grid;place-content:center;
    width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;
    padding:0!important;margin:0!important;flex:0 0 18px!important;
    border:1.5px solid #94a3b8;border-radius:5px;background:#fff;
    box-shadow:none!important;vertical-align:middle;line-height:1;cursor:pointer;
    transition:background .12s ease,border-color .12s ease,box-shadow .12s ease;
}
input[type="checkbox"]:checked{background:#2563eb;border-color:#2563eb;}
input[type="checkbox"]:checked::before{content:"";width:10px;height:10px;background:#fff;clip-path:polygon(14% 52%,0 66%,39% 100%,100% 18%,84% 4%,36% 68%);}
input[type="checkbox"]:focus-visible{outline:none;box-shadow:var(--focus-ring)!important;}
input[type="checkbox"]:disabled{opacity:.55;cursor:not-allowed;background:#f1f5f9;}

.check-row,.checkline,.form-check-row,.audit-source-option,
.perm-grid label,.access-grid label,.check-card{
    position:relative;display:flex!important;align-items:center;gap:9px;
    min-height:36px;line-height:1.3;transform:none!important;overflow-anchor:none;
}
.form-check-row{align-self:end;margin:0 0 2px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;color:#334155;font-weight:800;}
.perm-grid{align-items:stretch;}
.perm-grid label,.access-grid label,.perm-check-card{
    min-height:42px;padding:9px 11px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;
    user-select:none;cursor:pointer;box-sizing:border-box;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.perm-grid label:hover,.access-grid label:hover,.perm-check-card:hover{border-color:#bfdbfe;background:#f8fbff;box-shadow:0 8px 18px rgba(15,23,42,.04);}
.perm-grid label span,.access-grid label span,.perm-check-card span{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.checkbox-cell{width:72px;text-align:center;vertical-align:middle!important;}
.checkbox-cell input[type="checkbox"]{margin:auto!important;}

/* Department checkboxes: fixed grid rows and no visual jump on click. */
.hde-departments-list{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-auto-rows:46px!important;align-items:stretch!important;contain:layout paint;overflow-anchor:none;}
.hde-departments-list .check-card{height:46px!important;min-height:46px!important;max-height:46px!important;padding:10px 12px!important;background:#fff;}
.hde-departments-list .check-card:has(input:checked){border-color:#93c5fd;background:#eff6ff;box-shadow:inset 0 0 0 1px rgba(37,99,235,.08);}
.hde-departments-list .check-card span{white-space:nowrap;}

/* More consistent controls and sections. */
input:not([type="checkbox"]),select,textarea{max-width:100%;}
.filters,.filter-panel{align-items:end;background:rgba(255,255,255,.9);}
.filters label,.filter-panel label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);font-weight:800;}
.filters .btn,.filter-panel .btn{min-height:42px;}
.table-scroll,.table-wrap{border-radius:18px;overflow:auto;max-width:100%;}
.table-scroll table,.table-wrap table{margin:0;}
.empty-state,.compact-empty{min-height:92px;display:grid;align-content:center;}

/* Bottom action panels should not float over content during review/editing. */
.sticky-actions{position:static!important;bottom:auto!important;z-index:auto!important;margin-top:14px;background:#fff;backdrop-filter:none;}

@media(max-width:900px){
    .perm-grid,.access-grid{grid-template-columns:1fr 1fr;}
    .form-grid,.settings-grid{grid-template-columns:1fr 1fr;}
}
@media(max-width:640px){
    .perm-grid,.access-grid,.form-grid,.settings-grid{grid-template-columns:1fr;}
    .filters label,.filter-panel label{min-width:100%;width:100%;}
    .filters .btn,.filter-panel .btn{width:100%;}
    .hde-departments-list{grid-template-columns:1fr;}
}

/* Full UI polish: calmer summaries, stable controls, source health, empty states */
.btn.small,.btn.secondary.small,a.btn.small,button.btn.small{padding:7px 10px;border-radius:10px;font-size:12px;min-height:34px;box-shadow:none}.status-ready{background:#e0f2fe;color:#075985}.status-waiting{background:#f1f5f9;color:#475569}.neutral{background:#f1f5f9;color:#475569}.badge.info{background:#dbeafe;color:#1d4ed8}.badge.warn{background:#fef3c7;color:#92400e}.badge.ok{background:#dcfce7;color:#166534}.badge.source-file{background:#f1f5f9;color:#334155}.badge.source-outgoing{background:#e0f2fe;color:#075985}.badge.source-helpdeskeddy{background:#ede9fe;color:#5b21b6}
.card-head-row.source-list-head{align-items:flex-start;gap:16px}.source-list-filters{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.source-filter-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid #dbe3ef;background:#fff;color:#475569;border-radius:999px;padding:8px 11px;font-weight:800;cursor:pointer;transition:background .15s ease,border .15s ease,transform .15s ease}.source-filter-chip:hover{background:#f8fbff;border-color:#bfdbfe}.source-filter-chip.active{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}.source-filter-chip b{font-size:11px;background:#e2e8f0;color:#334155;border-radius:999px;padding:2px 6px}.source-filter-chip.active b{background:#dbeafe;color:#1d4ed8}.source-status-stack{display:grid;gap:4px;min-width:180px}.source-health{font-size:12px;font-weight:850}.source-health-success{color:#047857}.source-health-warning{color:#92400e}.source-health-danger{color:#b91c1c}.source-health-info{color:#1d4ed8}.source-health-muted{color:#64748b}.source-empty-state{margin:12px 0 0}.sources-table td,.sources-table th{vertical-align:middle}.sources-table .actions-cell{white-space:nowrap}.source-type-cell small{display:block;margin-top:4px;color:#64748b}.source-readiness{margin-top:16px;padding:14px 16px;border-radius:18px;border:1px solid #e2e8f0;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:14px}.source-readiness>div:first-child{display:grid;gap:2px}.source-readiness strong{font-size:15px}.source-readiness span{color:#64748b}.source-readiness-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.source-readiness-success{background:#f0fdf4;border-color:#bbf7d0}.source-readiness-warning{background:#fffbeb;border-color:#fde68a}.source-readiness-danger{background:#fef2f2;border-color:#fecaca}.source-readiness-info{background:#eff6ff;border-color:#bfdbfe}.source-readiness-muted{background:#f8fafc;border-color:#e2e8f0}.source-work-empty,.charts-empty-state{margin:16px 0}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;padding:22px;border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc;color:#64748b}.empty-state b{color:#334155}.compact-empty{padding:16px;font-size:13px}.table-card{margin-top:18px}.compact-table{margin:10px 0}.compact-table td,.compact-table th{padding:10px 12px}.compact-table td:nth-child(n+2):not(:last-child),.sources-table td:nth-child(5),.sources-table td:nth-child(6),.sources-table td:nth-child(7){text-align:right;font-variant-numeric:tabular-nums}.hde-api-debug-card,.hde-import-diagnostics-card,.endpoint-log-card{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:0;margin:14px 0;overflow:hidden}.hde-api-debug-card>summary,.hde-import-diagnostics-card>summary,.endpoint-log-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.hde-api-debug-card[open]>summary,.hde-import-diagnostics-card[open]>summary{border-bottom-color:#e2e8f0}.hde-api-debug-list,.hde-import-diagnostics-list{padding:14px}.hde-api-debug-item,.hde-diag-item{border:1px solid #e2e8f0;border-radius:14px;padding:12px;background:#fff;margin:10px 0}.hde-diag-error{border-color:#fecaca;background:#fff7f7}.hde-diag-warning{border-color:#fde68a;background:#fffbeb}.hde-diag-info{border-color:#bfdbfe;background:#eff6ff}.hde-api-debug-empty{padding:16px;border-radius:14px;background:#f8fafc;color:#64748b;text-align:center}.hde-departments-list{align-items:stretch}.check-card,.check-row,.perm-card,.module-toggle,label.check-row{min-height:42px;line-height:1.35;transform:none!important}.check-card{display:grid!important;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:10px;min-width:0}.check-card input,.check-row input,.perm-card input,.module-toggle input,input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;flex:0 0 18px;accent-color:#2563eb;margin:1px 0 0!important}.check-card span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal}.source-form-card,.source-option-card,.hde-departments-box{transition:border .15s ease,box-shadow .15s ease}.source-form-card:hover,.hde-departments-box:hover{border-color:#bfdbfe}.process-control-head,.source-settings-head,.report-result-head,.card-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.process-head-actions{display:grid;gap:10px;justify-items:end}.cycle-options{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:10px 12px}.worker-run-log{max-height:260px;overflow:auto;border-radius:14px;background:#0f172a;color:#dbeafe;padding:12px}.system-health-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.system-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.system-check-item{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:14px;display:grid;gap:8px}.system-check-item span:last-child{color:#64748b}.system-check-item.is-ok{border-color:#bbf7d0;background:#f8fff9}.system-check-item.is-bad{border-color:#fecaca;background:#fffafa}.ai-prompts-layout .compact-table tr.row-active{background:#eff6ff}.ai-prompt-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.meta-card{border:1px solid #e2e8f0;background:#f8fafc;border-radius:16px;padding:12px}.meta-card-wide{grid-column:1/-1}.meta-label{text-transform:uppercase;font-size:11px;letter-spacing:.08em;color:#64748b;font-weight:850;margin-bottom:5px}.ai-report-hero,.system-health-hero{background:linear-gradient(135deg,#fff,#f8fbff);border-color:#dbeafe}.ai-report-examples button{transition:background .15s ease,transform .15s ease}.ai-report-examples button:hover{transform:translateY(-1px)}.charts-grid.dashboard-grid .chart-card{min-height:330px}.chart-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.filter-panel,.filters{position:static!important;top:auto!important}.section-tabs{position:static!important;top:auto!important;margin-top:0;margin-bottom:16px}.table-scroll,.table-wrap{overflow:auto}.table-scroll table,.table-wrap table{min-width:760px}
@media (max-width:980px){.system-check-grid{grid-template-columns:1fr}.system-health-hero,.source-readiness,.process-control-head,.source-settings-head,.card-head-row.source-list-head{flex-direction:column}.source-list-filters,.source-readiness-actions,.process-head-actions{justify-content:flex-start;justify-items:start}.ai-prompt-meta{grid-template-columns:1fr}.compact-kpis{min-width:0;width:100%}.sources-table .actions-cell{white-space:normal}.donut-wrap{grid-template-columns:1fr}.charts-grid{grid-template-columns:1fr}}

/* Usage dashboard */
.usage-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}
.usage-hero-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
.usage-hero-main h2,
.usage-card h2 { margin-top: 0; }
.usage-total-number {
    min-width: 220px;
    padding: 16px 18px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    background: rgba(255,255,255,.75);
    text-align: right;
}
.usage-total-number span,
.usage-total-number small {
    display: block;
    color: var(--muted, #64748b);
    font-size: 13px;
}
.usage-total-number b {
    display: block;
    margin: 4px 0;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.04em;
}
.usage-meter {
    position: relative;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}
.usage-meter-fill {
    position: absolute;
    inset: 0 auto 0 0;
    min-width: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #84cc16);
}
.usage-zone-warn .usage-meter-fill { background: linear-gradient(90deg, #f59e0b, #eab308); }
.usage-zone-danger .usage-meter-fill { background: linear-gradient(90deg, #ef4444, #dc2626); }
.usage-red-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(220, 38, 38, .9);
    z-index: 2;
}
.usage-meter-meta,
.usage-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: var(--muted, #64748b);
    font-size: 13px;
}
.usage-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.usage-kpi-card {
    padding: 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    background: var(--card, #fff);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,23,42,.04));
}
.usage-kpi-card span,
.usage-kpi-card small {
    display: block;
    color: var(--muted, #64748b);
    font-size: 13px;
}
.usage-kpi-card b {
    display: block;
    margin: 6px 0 4px;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.035em;
}
.usage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin: 18px 0;
}
.usage-card { min-width: 0; }
.usage-split-bar {
    display: flex;
    height: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
    border: 1px solid rgba(15,23,42,.06);
    margin: 16px 0 12px;
}
.usage-data-part { background: #2563eb; min-width: 2px; }
.usage-index-part { background: #8b5cf6; min-width: 2px; }
.usage-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}
.usage-dot.data { background: #2563eb; }
.usage-dot.index { background: #8b5cf6; }
.usage-queue-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.usage-queue-grid > div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .06);
}
.usage-queue-grid span,
.usage-queue-grid small {
    display: block;
    color: var(--muted, #64748b);
    font-size: 12px;
}
.usage-queue-grid b {
    display: block;
    margin: 5px 0 3px;
    font-size: 22px;
}
.usage-table-bars { display: flex; flex-direction: column; gap: 12px; }
.usage-table-row {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(160px, 1fr) 96px;
    align-items: center;
    gap: 14px;
}
.usage-table-name b,
.usage-table-name span { display: block; }
.usage-table-name span { color: var(--muted, #64748b); font-size: 12px; }
.usage-table-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef2f7;
}
.usage-table-bar span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: #0ea5e9;
}
.usage-table-size { text-align: right; color: var(--muted, #64748b); font-size: 13px; }
.usage-source-list { display: flex; flex-direction: column; gap: 12px; }
.usage-source-row div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.usage-source-row div span { color: var(--muted, #64748b); }
.usage-source-row em {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.usage-source-row em i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: #10b981;
}
.muted-card { background: #f8fafc; }
@media (max-width: 1100px) {
    .usage-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .usage-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .usage-hero-main { flex-direction: column; }
    .usage-total-number { width: 100%; text-align: left; }
    .usage-kpi-grid { grid-template-columns: 1fr; }
    .usage-table-row { grid-template-columns: 1fr; gap: 6px; }
    .usage-table-size { text-align: left; }
    .usage-queue-grid { grid-template-columns: 1fr; }
}


/* Icon and navigation polish: one visual language for sidebar, section tabs and dashboard tiles. */
.icon{width:18px;height:18px;display:inline-block;flex:0 0 auto;stroke-width:2;vector-effect:non-scaling-stroke}
.side-link .icon{width:20px;height:20px;padding:2px;border-radius:10px;background:rgba(255,255,255,.055);transition:background .16s ease,transform .16s ease}
.side-link:hover .icon{background:rgba(255,255,255,.10);transform:translateX(1px)}
.side-link.active .icon{background:rgba(255,255,255,.18)}
.side-link.logout button{display:flex;align-items:center;justify-content:inherit;flex:1;gap:inherit;padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.side-link.logout button:hover{color:#fff}
.section-tabs{align-items:center}
.section-tab{min-height:40px}
.section-tab .section-tab-icon{width:17px;height:17px;opacity:.82}
.section-tab.active .section-tab-icon,.section-tab:hover .section-tab-icon{opacity:1}
.home-tile-icon .icon{width:22px;height:22px}
.source-tab .icon{width:20px;height:20px}

/* CSS refactor cleanup: stable checkbox layout is defined here once and overrides older fragments. */
input[type="checkbox"]{
    appearance:none;-webkit-appearance:none;display:inline-grid;place-content:center;
    width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;
    padding:0!important;margin:1px 0 0!important;flex:0 0 18px!important;
    border:1.5px solid #94a3b8;border-radius:5px;background:#fff;box-shadow:none!important;
    vertical-align:middle;line-height:1;cursor:pointer;transform:none!important;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease;
}
input[type="checkbox"]:checked{background:#2563eb;border-color:#2563eb}
input[type="checkbox"]:checked::before{content:"";width:10px;height:10px;background:#fff;clip-path:polygon(14% 52%,0 66%,39% 100%,100% 18%,84% 4%,36% 68%)}
input[type="checkbox"]:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(37,99,235,.12)!important}
input[type="checkbox"]:disabled{opacity:.55;cursor:not-allowed;background:#f1f5f9}
.check-row,.checkline,.form-check-row,.audit-source-option,.perm-grid label,.access-grid label,.check-card{transform:none!important;overflow-anchor:none}
.hde-departments-list{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-auto-rows:46px!important;align-items:stretch!important;contain:layout paint;overflow-anchor:none}
.hde-departments-list .check-card{height:46px!important;min-height:46px!important;max-height:46px!important;display:grid!important;grid-template-columns:22px minmax(0,1fr);align-items:center;padding:10px 12px!important;background:#fff}
.hde-departments-list .check-card span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hde-departments-list .check-card:has(input:checked){border-color:#93c5fd;background:#eff6ff;box-shadow:inset 0 0 0 1px rgba(37,99,235,.08)}

/* Active source context */
.top-context-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:0 auto 14px;max-width:1280px;padding:0 4px;}
.top-context-spacer{flex:1;}
.active-source-picker{display:flex;align-items:center;gap:8px;min-width:280px;max-width:min(560px,100%);padding:8px 10px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.86);box-shadow:0 10px 26px rgba(15,23,42,.06);backdrop-filter:blur(10px);}
.active-source-picker label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;}
.active-source-picker select{height:36px;min-width:0;flex:1;border:0;background:transparent;padding:0 26px 0 4px;font-weight:700;color:var(--text);outline:none;}
.active-source-picker select:disabled{opacity:.68;cursor:progress;}
.active-source-status,.active-source-empty{display:inline-flex;align-items:center;min-height:26px;padding:4px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap;}
.active-source-context-card{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 16px;padding:12px 14px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,rgba(79,70,229,.08),rgba(14,165,233,.07));}
.active-source-context-card span{color:var(--muted);font-size:13px;font-weight:700;}
.active-source-context-card b{color:var(--text);}
.active-source-context-card small{margin-left:auto;color:var(--muted);font-size:12px;}
@media (max-width:760px){.top-context-bar{margin-top:52px;justify-content:stretch;}.active-source-picker{width:100%;min-width:0;}.active-source-status{display:none;}.active-source-context-card small{margin-left:0;width:100%;}}

/* AI report confidence indicator */
.ai-confidence-card{display:flex;align-items:center;gap:18px;margin:16px 0;padding:16px;border:1px solid #e2e8f0;border-radius:20px;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:0 10px 26px rgba(15,23,42,.05)}
.ai-confidence-ring{--confidence:0;width:112px;height:112px;border-radius:999px;display:grid;place-items:center;flex:0 0 112px;background:conic-gradient(var(--confidence-color,#64748b) calc(var(--confidence)*1%),#e2e8f0 0);position:relative;animation:confidence-pulse 1.8s ease-in-out infinite}
.ai-confidence-ring::before{content:"";position:absolute;inset:9px;border-radius:inherit;background:#fff;box-shadow:inset 0 0 0 1px #e2e8f0}
.ai-confidence-ring>div{position:relative;display:grid;text-align:center;line-height:1.05}
.ai-confidence-ring b{font-size:26px;color:#0f172a;font-variant-numeric:tabular-nums}
.ai-confidence-ring span{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:#64748b}
.ai-confidence-copy{display:grid;gap:6px;min-width:0}.ai-confidence-copy strong{font-size:15px;color:#0f172a}.ai-confidence-copy p{margin:0;color:#64748b;line-height:1.5}
.ai-confidence-bars{display:grid;gap:7px;margin-top:4px;max-width:520px}.ai-confidence-bars span{display:grid;grid-template-columns:minmax(140px,1fr) 42px minmax(120px,1fr);align-items:center;gap:8px;font-size:12px;font-weight:800;color:#475569}.ai-confidence-bars b{text-align:right;font-variant-numeric:tabular-nums;color:#334155}.ai-confidence-bars i{height:7px;border-radius:999px;background:#e2e8f0;overflow:hidden}.ai-confidence-bars em{display:block;height:100%;border-radius:inherit;background:var(--confidence-color,#64748b)}
.ai-confidence-high{--confidence-color:#16a34a}.ai-confidence-good{--confidence-color:#2563eb}.ai-confidence-medium{--confidence-color:#f59e0b}.ai-confidence-low{--confidence-color:#ef4444}

.ai-confidence-used-info{margin-top:10px;border:1px solid #e2e8f0;border-radius:14px;background:rgba(248,250,252,.82);overflow:hidden}
.ai-confidence-used-info summary{cursor:pointer;list-style:none;padding:10px 12px;font-size:12px;font-weight:900;color:#334155;display:flex;align-items:center;justify-content:space-between;gap:10px}
.ai-confidence-used-info summary::-webkit-details-marker{display:none}
.ai-confidence-used-info summary::after{content:'⌄';font-size:14px;color:#64748b;transition:transform .18s ease}
.ai-confidence-used-info[open] summary::after{transform:rotate(180deg)}
.ai-confidence-used-info dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;border-top:1px solid #e2e8f0}
.ai-confidence-used-info div{padding:10px 12px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;min-width:0}
.ai-confidence-used-info div:nth-child(2n){border-right:0}
.ai-confidence-used-info div:nth-last-child(-n+2){border-bottom:0}
.ai-confidence-used-info dt{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;margin:0 0 4px}
.ai-confidence-used-info dd{margin:0;font-size:12px;font-weight:800;color:#334155;line-height:1.35;overflow-wrap:anywhere}
.mini-confidence{display:inline-flex;align-items:center;justify-content:center;min-width:52px;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:900;font-variant-numeric:tabular-nums;border:1px solid transparent}.mini-confidence-high{background:#dcfce7;color:#166534;border-color:#bbf7d0}.mini-confidence-good{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}.mini-confidence-medium{background:#fef3c7;color:#92400e;border-color:#fde68a}.mini-confidence-low{background:#fee2e2;color:#991b1b;border-color:#fecaca}
@keyframes confidence-pulse{0%,100%{transform:scale(1);filter:saturate(1)}50%{transform:scale(1.015);filter:saturate(1.15)}}
@media(max-width:720px){.ai-confidence-card{align-items:flex-start;flex-direction:column}.ai-confidence-bars span{grid-template-columns:1fr 42px}.ai-confidence-bars i{grid-column:1/-1}.ai-confidence-used-info dl{grid-template-columns:1fr}.ai-confidence-used-info div,.ai-confidence-used-info div:nth-child(2n){border-right:0}.ai-confidence-used-info div:nth-last-child(-n+2){border-bottom:1px solid #e2e8f0}.ai-confidence-used-info div:last-child{border-bottom:0}}

/* AI reports: all data mode */
.ai-all-data-toggle {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(59, 130, 246, .06), rgba(255, 255, 255, .75));
}
.ai-all-data-toggle b {
    display: block;
    font-size: 14px;
    color: var(--text, #0f172a);
    margin-bottom: 3px;
}
.ai-all-data-toggle small {
    display: block;
    color: var(--muted, #64748b);
    font-size: 12px;
    line-height: 1.45;
}
.ai-report-form label.is-soft-disabled {
    opacity: .58;
}
.ai-report-form label.is-soft-disabled select {
    background: #f8fafc;
}

/* HelpDeskEddy API anonymization is mandatory; show it as an immutable setting, not a checkbox. */
.source-fixed-note{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff;color:#1e40af;font-size:12.5px;font-weight:750;line-height:1.4}.source-fixed-note:before{content:'✓';display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:12px;font-weight:900;margin-top:0}

/* Smart AI reports + compact source context polish */
.content-card{position:relative;}
.top-context-bar{position:absolute;right:24px;top:20px;margin:0;padding:0;background:transparent;border:0;z-index:3;}
.active-source-picker-compact{display:flex;align-items:center;gap:8px;min-height:34px;}
.active-source-picker-compact label{font-size:12px;color:var(--muted,#64748b);margin:0;white-space:nowrap;}
.active-source-picker-compact select{height:34px;min-width:190px;max-width:280px;padding:0 34px 0 12px;font-size:13px;border-radius:10px;background-position:right 10px center;}
.wrap.content-card>h1:first-of-type{padding-right:330px;min-height:38px;display:flex;align-items:center;margin-top:0;}
.source-header-created{font-size:12px;color:var(--muted,#64748b);align-self:center;}
.source-meta-line{margin-top:8px;}
.ai-report-metric-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:14px 0 18px;}
.ai-report-metric-cards .mini-kpi small{display:block;margin-top:6px;color:var(--muted,#64748b);font-weight:500;line-height:1.35;}
.ai-report-warnings{margin:12px 0;display:grid;gap:6px;}
.empty-state.compact-empty{padding:12px 14px;margin:0 0 12px;border-radius:12px;font-size:13px;}
.analytics-pending-notice{display:flex;gap:10px;align-items:baseline;border-color:#cbd5e1;background:#f8fafc;color:#64748b}.analytics-pending-notice b{color:#475569}.analytics-ai-pending{position:relative;opacity:.48;filter:grayscale(.45);pointer-events:none}.analytics-ai-pending:after{content:'AI-анализ не выполнен';position:absolute;z-index:2;top:12px;right:12px;padding:6px 9px;border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;color:#64748b;font-size:11px;font-weight:850;letter-spacing:.02em;filter:none}
.analysis-readiness-details{margin-top:10px;border-top:1px solid rgba(148,163,184,.28);padding-top:10px}.analysis-readiness-details>summary{cursor:pointer;color:#475569;font-size:12px;font-weight:850}.analysis-readiness-details .management-queue-list{margin-top:9px}.audit-first-card{margin-top:14px}.process-control-card.is-cycle-complete,.process-control-card.is-module-complete{padding:10px 14px;opacity:.58;background:#f8fafc;border-color:#dbe3ef}.process-control-card.is-cycle-complete .process-control-head,.process-control-card.is-module-complete .process-control-head{margin:0}.process-control-card.is-cycle-complete .process-control-head p,.process-control-card.is-module-complete .process-control-head p,.process-control-card.is-cycle-complete [data-source-cycle-progress],.process-control-card.is-module-complete .source-cycle-progress,.process-control-card.is-cycle-complete [data-worker-status],.process-control-card.is-module-complete [data-employee-status],.process-control-card.is-module-complete [data-audit-report-status],.process-control-card.is-cycle-complete [data-worker-log],.process-control-card.is-cycle-complete .analysis-readiness-details{display:none!important}.process-control-card.is-cycle-complete h2:after,.process-control-card.is-module-complete h2:after{content:' · выполнено';font-size:12px;color:#64748b;font-weight:700}
.process-control-card[data-audit-report-control].is-module-complete,.process-control-card[data-employee-analysis-control].is-module-complete,[data-bot-analysis-control].is-module-complete{opacity:1;padding:20px;background:linear-gradient(135deg,rgba(240,253,250,.92),#fff);border-color:#bbf7d0}.process-control-card[data-audit-report-control].is-module-complete .process-control-head,.process-control-card[data-employee-analysis-control].is-module-complete .process-control-head,[data-bot-analysis-control].is-module-complete .section-head{margin:0}.process-control-card[data-audit-report-control].is-module-complete .process-control-head p,.process-control-card[data-audit-report-control].is-module-complete .source-cycle-progress,.process-control-card[data-audit-report-control].is-module-complete [data-audit-report-status],.process-control-card[data-employee-analysis-control].is-module-complete .process-control-head p,.process-control-card[data-employee-analysis-control].is-module-complete .source-cycle-progress,.process-control-card[data-employee-analysis-control].is-module-complete [data-employee-status],[data-bot-analysis-control].is-module-complete .section-head p,[data-bot-analysis-control].is-module-complete .progress-track,[data-bot-analysis-control].is-module-complete [data-bot-progress]{display:block!important}.process-control-card[data-audit-report-control].is-module-complete .source-cycle-progress,.process-control-card[data-employee-analysis-control].is-module-complete .source-cycle-progress{margin-top:12px}
.ai-all-data-toggle small{display:block;margin-top:4px;line-height:1.35;}
@media (max-width: 900px){
  .top-context-bar{position:static;margin:0 0 12px;display:flex;justify-content:flex-start;}
  .wrap.content-card>h1:first-of-type{padding-right:0;display:block;min-height:0;}
  .active-source-picker-compact{width:100%;align-items:flex-start;}
  .active-source-picker-compact select{max-width:none;width:100%;}
}

/* AI reports observations polish */
.ai-analysis-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:2px}
.ai-analysis-mode .check-row{border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;padding:10px 12px;align-items:flex-start}
.ai-analysis-mode .check-row:has(input:checked){border-color:#93c5fd;background:#eff6ff}
.ai-report-methodology,.ai-report-examples-result{border:1px solid #e2e8f0;border-radius:18px;background:#fff;margin:14px 0;overflow:hidden}
.ai-report-methodology summary,.ai-report-examples-result summary{cursor:pointer;padding:13px 15px;background:#f8fafc;font-weight:900;color:#334155;border-bottom:1px solid #e2e8f0}
.ai-report-methodology dl{display:grid;gap:0;margin:0;padding:12px 15px}
.ai-report-methodology dl div{display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px;padding:9px 0;border-bottom:1px solid #eef2f7}
.ai-report-methodology dl div:last-child{border-bottom:0}
.ai-report-methodology dt{font-weight:900;color:#475569}.ai-report-methodology dd{margin:0;color:#334155;line-height:1.45}
.ai-data-quality{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;border:1px solid #bfdbfe;background:#eff6ff;border-radius:18px;padding:14px 16px;margin:14px 0}
.ai-data-quality strong{display:block;margin-bottom:4px}.ai-data-quality p{margin:0;color:#475569;line-height:1.45}.ai-data-quality-score{width:82px;height:82px;border-radius:999px;background:conic-gradient(#2563eb calc(var(--score, 0)*1%),#dbeafe 0);display:grid;place-items:center;text-align:center;position:relative}.ai-data-quality-score:before{content:"";position:absolute;inset:8px;background:#fff;border-radius:999px}.ai-data-quality-score b,.ai-data-quality-score span{position:relative}.ai-data-quality-score b{font-size:20px}.ai-data-quality-score span{display:block;font-size:11px;color:#64748b;font-weight:800}.ai-data-quality-meta{display:grid;gap:6px;color:#475569;font-size:12px}.ai-data-quality-meta b{color:#0f172a}
.ai-example-list{display:grid;gap:10px;padding:12px}.ai-example-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;border:1px solid #e2e8f0;border-radius:16px;padding:12px;background:#fff}.ai-example-item.is-match{border-color:#bbf7d0;background:#f7fff9}.ai-example-item.is-miss{border-color:#fed7aa;background:#fffaf5}.ai-example-item a{font-weight:900;color:#2563eb;text-decoration:none}.ai-example-item a:hover{text-decoration:underline}.ai-example-item span{display:block;color:#64748b;font-size:12px;margin-top:2px}.ai-example-item>b{align-self:start;border-radius:999px;background:#f1f5f9;color:#334155;padding:4px 8px;font-size:12px}.ai-example-item p{grid-column:1/-1;margin:0;color:#475569;line-height:1.45;font-size:13px}
@media(max-width:760px){.ai-analysis-mode{grid-template-columns:1fr}.ai-data-quality{grid-template-columns:1fr}.ai-report-methodology dl div{grid-template-columns:1fr}.ai-data-quality-score{width:72px;height:72px}}

/* AI reports universal queue */
.ai-report-queue-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:12px 0 16px;
}
.ai-report-queue-strip>div{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:12px 14px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}
.ai-report-queue-strip span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ai-report-queue-strip b{
  color:#0f172a;
  font-size:22px;
  line-height:1;
}
.ai-report-queue-strip small{
  color:#94a3b8;
  font-size:12px;
  white-space:nowrap;
}
@media (max-width: 860px){
  .ai-report-queue-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 560px){
  .ai-report-queue-strip{grid-template-columns:1fr;}
}

/* AI report exact text count clarification */
.ai-text-search-clarification{
  margin:16px 0;
  padding:16px;
  border:1px solid rgba(59,130,246,.22);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(124,58,237,.06));
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}
.ai-text-search-clarification h3{margin:0 0 6px;font-size:17px}
.ai-text-search-clarification p{margin:0;color:var(--muted,#64748b);font-size:13px;line-height:1.45}
.ai-text-search-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}
.ai-text-search-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted,#64748b);font-weight:700}
.ai-text-search-grid select{width:100%;min-height:38px;border-radius:12px;border:1px solid rgba(148,163,184,.35);background:#fff;padding:0 34px 0 12px;font-weight:700;color:#0f172a;appearance:auto}
.ai-text-search-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:12px}
.ai-example-item mark{background:rgba(250,204,21,.45);color:inherit;border-radius:5px;padding:0 2px}
@media (max-width: 900px){.ai-text-search-grid{grid-template-columns:1fr}.ai-text-search-actions{justify-content:flex-start;flex-wrap:wrap}}

/* Active source selector placement fix: show only on analytical pages and keep it inline with page title. */
.content-card{position:relative;}
.top-context-bar{
    float:right;
    position:relative!important;
    right:auto!important;
    top:auto!important;
    z-index:1!important;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    max-width:min(360px,42vw);
    margin:0 0 8px 16px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
}
.active-source-picker-compact{
    width:auto;
    min-width:0;
    max-width:100%;
    min-height:30px;
    padding:4px 8px;
    border-radius:12px;
    box-shadow:none;
    background:#fff;
}
.active-source-picker-compact label{font-size:11px;letter-spacing:.03em;}
.active-source-picker-compact .active-source-select-wrap{min-width:0;max-width:230px;position:relative;}
.active-source-picker-compact .active-source-select-wrap::after{
    content:'⌄';
    position:absolute;
    right:9px;
    top:50%;
    transform:translateY(-52%);
    color:#64748b;
    font-size:13px;
    font-weight:900;
    pointer-events:none;
}
.active-source-picker-compact select{
    height:30px;
    min-width:150px;
    max-width:230px;
    width:100%;
    padding:0 26px 0 8px;
    border-radius:8px;
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
    appearance:none;
    -webkit-appearance:none;
    background:transparent;
}
.wrap.content-card>h1:first-of-type,
.wrap.content-card>.page-title-row:first-of-type{
    padding-right:0!important;
    min-height:0!important;
    margin-top:0!important;
}
.top-context-bar + h1,
.top-context-bar + .page-title-row{min-height:34px;align-items:center;}
@media (max-width: 900px){
    .top-context-bar{
        float:none;
        max-width:none;
        width:100%;
        margin:0 0 10px!important;
        justify-content:flex-start;
    }
    .active-source-picker-compact{width:100%;}
    .active-source-picker-compact .active-source-select-wrap{max-width:none;flex:1;}
    .active-source-picker-compact select{max-width:none;min-width:0;}
}

/* AI unhandled requests and usage maintenance */
.ai-unhandled-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap}
.inline-strip{margin:0;min-width:min(520px,100%)}
.ai-unhandled-list{display:grid;gap:14px}
.ai-unhandled-item{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;padding:16px;border:1px solid var(--border,#e5e7eb);border-radius:18px;background:var(--surface,#fff)}
.ai-unhandled-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.ai-unhandled-main p{margin:8px 0}.small-meta{font-size:12px;line-height:1.45}.ai-unhandled-actions{display:grid;gap:10px;align-content:start}.ai-unhandled-actions label{display:grid;gap:5px;font-size:12px;color:var(--muted,#64748b)}.ai-unhandled-actions input,.ai-unhandled-actions select,.ai-unhandled-actions textarea{width:100%}
.ai-report-feedback{margin:18px 0;border:1px solid var(--border,#e5e7eb);border-radius:16px;padding:10px 14px;background:rgba(248,250,252,.9)}
.ai-report-feedback summary{cursor:pointer;font-weight:700}.ai-feedback-box{display:grid;gap:10px;margin-top:12px}.ai-feedback-box label{display:grid;gap:5px}.ai-feedback-status{font-size:12px;color:var(--muted,#64748b)}
.usage-size-table td,.usage-size-table th{vertical-align:middle}.usage-table-bar.compact{min-width:100px;height:8px;background:#eef2f7;border-radius:999px;overflow:hidden}.usage-cleanup-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.usage-cleanup-card{border:1px solid var(--border,#e5e7eb);border-radius:18px;padding:14px;background:linear-gradient(180deg,#fff,#f8fafc);display:grid;gap:10px}.usage-cleanup-card.danger{border-color:#fecaca;background:linear-gradient(180deg,#fff,#fff7f7)}.usage-cleanup-card h3{margin:0;font-size:16px}.usage-cleanup-card p{margin:0;color:var(--muted,#64748b);font-size:13px;line-height:1.45}.usage-cleanup-card label{display:grid;gap:5px;font-size:12px;color:var(--muted,#64748b)}.usage-cleanup-card input,.usage-cleanup-card select{width:100%}.usage-cleanup-meta{display:flex;align-items:baseline;gap:8px;padding:10px 12px;border-radius:14px;background:#f1f5f9}.usage-cleanup-meta b{font-size:22px}.usage-cleanup-meta span{font-size:12px;color:var(--muted,#64748b)}
.filter-chips{display:flex;gap:8px;flex-wrap:wrap}.chip{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid var(--border,#e5e7eb);border-radius:999px;text-decoration:none;color:inherit;background:#fff;font-size:13px}.chip.active{background:#eef2ff;border-color:#c7d2fe;color:#3730a3}.toolbar-card{padding:12px}
@media (max-width: 860px){.ai-unhandled-item{grid-template-columns:1fr}.ai-unhandled-actions{border-top:1px solid var(--border,#e5e7eb);padding-top:12px}.ai-unhandled-hero{display:block}.inline-strip{margin-top:12px}}

/* AI reports: semantic ticket search */
.ai-semantic-search-clarification > label { display:block; margin-top:12px; }
.ai-semantic-search-clarification input,
.ai-semantic-search-clarification textarea,
.ai-semantic-search-clarification select { width:100%; }
.semantic-search-result { margin:18px 0; border:1px solid var(--border, #e5e7eb); border-radius:18px; background:var(--card-bg, #fff); overflow:hidden; }
.semantic-result-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; padding:18px; border-bottom:1px solid var(--border, #e5e7eb); background:linear-gradient(180deg, rgba(37,99,235,.06), rgba(37,99,235,0)); }
.semantic-result-head h3 { margin:0 0 6px; }
.semantic-token-box { min-width:150px; padding:12px 14px; border:1px solid var(--border, #e5e7eb); border-radius:14px; background:rgba(255,255,255,.72); text-align:right; }
.semantic-token-box span, .semantic-token-box small { display:block; color:var(--muted, #64748b); }
.semantic-token-box b { display:block; font-size:24px; line-height:1.1; }
.semantic-table-wrap { margin:0; border:0; border-radius:0; }
.semantic-table td { vertical-align:top; }
.semantic-evidence { max-width:520px; margin:0 0 4px; line-height:1.45; }
.semantic-confidence { display:inline-flex; align-items:center; justify-content:center; min-width:52px; padding:5px 8px; border-radius:999px; font-weight:700; font-size:12px; background:#eef2ff; color:#3730a3; }
.semantic-confidence-high { background:#dcfce7; color:#166534; }
.semantic-confidence-good { background:#e0f2fe; color:#075985; }
.semantic-confidence-medium { background:#fef3c7; color:#92400e; }
.semantic-confidence-low { background:#fee2e2; color:#991b1b; }
.btn.tiny { padding:5px 9px; font-size:12px; border-radius:9px; white-space:nowrap; }
@media (max-width: 900px) {
  .semantic-result-head { flex-direction:column; }
  .semantic-token-box { width:100%; text-align:left; }
  .semantic-evidence { max-width:none; }
}

/* Decision center / AI templates / topic monitoring */
.decision-center-card .ds-card-head,
.source-diagnostics-card .ds-card-head,
.ai-template-strip .ds-card-head { align-items: flex-start; gap: 16px; }
.decision-grid .action-item { min-height: 158px; }
.action-item em { display:block; margin-top:10px; font-style:normal; font-weight:700; }
.decision-recommendations { margin-top:18px; padding:16px; border:1px solid var(--border); border-radius:18px; background:var(--soft-bg, rgba(15,23,42,.03)); }
.decision-recommendations h3 { margin:0 0 8px; font-size:16px; }
.diagnostics-score { min-width:120px; text-align:center; border:1px solid var(--border); border-radius:18px; padding:12px 16px; background:#fff; }
.diagnostics-score b { display:block; font-size:28px; line-height:1; }
.diagnostics-score span { display:block; color:var(--muted); margin-top:6px; }
.diagnostics-checks { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.diagnostics-check { display:inline-flex; align-items:center; gap:8px; padding:9px 12px; border-radius:999px; border:1px solid var(--border); background:#fff; font-weight:700; }
.diagnostics-check small { color:var(--muted); font-weight:500; }
.diagnostics-check.ok { border-color:rgba(22,163,74,.25); background:rgba(22,163,74,.08); }
.diagnostics-check.bad { border-color:rgba(220,38,38,.25); background:rgba(220,38,38,.08); }
.template-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
.template-card { border:1px solid var(--border); border-radius:18px; padding:16px; background:#fff; display:flex; flex-direction:column; gap:10px; }
.template-card h3 { margin:0; font-size:18px; }
.template-card p { margin:0; color:var(--muted); }
.template-card pre { white-space:pre-wrap; font-family:inherit; color:var(--text); background:rgba(15,23,42,.04); border-radius:14px; padding:12px; max-height:130px; overflow:auto; }
.template-chip-row { display:flex; flex-wrap:wrap; gap:10px; }
.template-chip { border:1px solid var(--border); background:#fff; border-radius:16px; padding:10px 12px; text-align:left; cursor:pointer; min-width:180px; }
.template-chip:hover { transform:translateY(-1px); box-shadow:var(--shadow-sm, 0 8px 20px rgba(15,23,42,.08)); }
.template-chip b { display:block; }
.template-chip small { display:block; color:var(--muted); margin-top:3px; }
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.form-grid .span-2 { grid-column:1 / -1; }
.form-grid label { display:flex; flex-direction:column; gap:7px; }
.form-grid input, .form-grid textarea, .form-grid select { width:100%; }
@media (max-width: 760px) { .form-grid { grid-template-columns:1fr; } .diagnostics-score { width:100%; } }

/* AI report history + evidence drawer */
.hero-actions{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap}.ai-history-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#fff,#f8fbff);border-color:#dbeafe}.ai-history-filters{display:grid;grid-template-columns:1.3fr .8fr 1.4fr auto;gap:12px;align-items:end}.ai-history-filters label{display:grid;gap:7px;font-weight:850;color:#334155}.ai-history-filter-actions{display:flex;gap:8px;align-items:center}.ai-history-table td{vertical-align:top}.history-error-text{display:block;margin-top:5px;color:#b91c1c}.history-actions{white-space:nowrap;display:flex;gap:6px;justify-content:flex-end}.report-result-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.semantic-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}.evidence-link{margin-top:8px;width:max-content}.ai-evidence-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.28);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:75}.ai-evidence-backdrop.open{opacity:1;pointer-events:auto}.ai-evidence-drawer{position:fixed;top:0;right:0;height:100vh;width:min(520px,calc(100vw - 24px));background:#fff;border-left:1px solid #e2e8f0;box-shadow:-24px 0 70px rgba(15,23,42,.22);transform:translateX(105%);transition:transform .22s ease;z-index:76;padding:22px;overflow:auto}.ai-evidence-drawer.open{transform:translateX(0)}.drawer-close{position:absolute;top:12px;right:14px;width:36px;height:36px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:24px;line-height:1;cursor:pointer}.drawer-head{padding-right:42px;margin-bottom:14px}.drawer-head span{text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:900;color:#2563eb}.drawer-head h2{margin:4px 0 3px}.drawer-head p{margin:0;color:#64748b}.drawer-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.drawer-meta div{border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;padding:10px}.drawer-meta dt{text-transform:uppercase;letter-spacing:.06em;font-size:10px;font-weight:900;color:#64748b}.drawer-meta dd{margin:4px 0 0;font-weight:900;color:#0f172a;overflow-wrap:anywhere}.drawer-evidence-text{white-space:pre-wrap;line-height:1.6;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:12px}.drawer-actions{display:flex;gap:8px;margin-top:18px}.btn.secondary{background:#fff;color:#2563eb;border:1px solid #bfdbfe}.btn.secondary:hover{background:#eff6ff}
@media (max-width: 900px){.ai-history-hero{display:grid}.ai-history-filters{grid-template-columns:1fr}.history-actions,.semantic-actions{justify-content:flex-start}.drawer-meta{grid-template-columns:1fr}}

/* QCC settings clarity + processed results filters */
.qcc-settings-guide-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0 18px}.qcc-guide-card{border:1px solid var(--border,#e5e7eb);border-radius:18px;background:#fff;padding:14px;box-shadow:0 10px 28px rgba(15,23,42,.04)}.qcc-guide-card b{display:block;margin-bottom:6px;color:#0f172a}.qcc-guide-card p{margin:0;color:var(--muted,#64748b);font-size:13px;line-height:1.45}.qcc-guide-card.success{border-color:#bbf7d0;background:linear-gradient(180deg,#fff,#f0fdf4)}.qcc-guide-card.warning{border-color:#fde68a;background:linear-gradient(180deg,#fff,#fffbeb)}.qcc-tip-box.soft{background:#f8fafc;border-color:#e2e8f0}.qcc-field-help-row,.qcc-score-preset-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.qcc-score-preset-row.compact{margin:10px 0 8px}.qcc-helper-pill{border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer}.qcc-helper-pill:hover{background:#dbeafe;transform:translateY(-1px)}.qcc-inline-score-form{margin-top:14px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;padding:12px}.qcc-inline-score-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline;flex-wrap:wrap}.qcc-inline-score-head b{font-size:13px}.qcc-inline-score-head span{font-size:12px;color:var(--muted,#64748b)}.qcc-inline-score-grid{display:grid;grid-template-columns:minmax(130px,1fr) 92px minmax(180px,1.5fr) auto;gap:8px;align-items:center}.qcc-inline-score-grid input{width:100%;min-height:34px}.qcc-result-filters.improved{border:1px solid #dbeafe;background:linear-gradient(180deg,#fff,#f8fbff);border-radius:20px;padding:16px;margin:16px 0}.qcc-result-summary-strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:12px 0 14px}.qcc-filter-chip{border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:10px 11px;text-align:left;cursor:pointer;color:#0f172a;min-height:64px}.qcc-filter-chip b{display:block;font-size:20px;line-height:1}.qcc-filter-chip span{display:block;margin-top:5px;font-size:12px;color:#64748b;font-weight:800}.qcc-filter-chip:hover{border-color:#bfdbfe;box-shadow:0 10px 24px rgba(15,23,42,.07);transform:translateY(-1px)}.qcc-filter-chip.active{border-color:#2563eb;background:#eff6ff}.qcc-filter-chip.danger{border-color:#fecaca;background:#fff7f7}.qcc-filter-chip.success{border-color:#bbf7d0;background:#f0fdf4}.qcc-filter-chip.static{cursor:default;background:#f8fafc}.qcc-filter-chip.static:hover{transform:none;box-shadow:none;border-color:#e2e8f0}.qcc-result-filter-grid-advanced{grid-template-columns:1.6fr repeat(4,minmax(140px,.8fr)) 110px 110px auto}.qcc-active-filters{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.qcc-active-filters span{display:inline-flex;align-items:center;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800}.qcc-results-table .qcc-result-row[hidden]{display:none!important}
@media (max-width: 1180px){.qcc-settings-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-result-summary-strip{grid-template-columns:repeat(4,minmax(0,1fr))}.qcc-result-filter-grid-advanced{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-filter-search{grid-column:1/-1}.qcc-inline-score-grid{grid-template-columns:1fr 90px}.qcc-inline-score-grid input[name="measure"],.qcc-inline-score-grid button{grid-column:1/-1}}
@media (max-width: 680px){.qcc-settings-guide-grid,.qcc-result-summary-strip,.qcc-result-filter-grid-advanced{grid-template-columns:1fr}.qcc-inline-score-grid{grid-template-columns:1fr}}

/* QCC review workflow */
.qcc-review-badge{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e8f0;background:#f8fafc;color:#334155;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;white-space:nowrap}.qcc-review-badge::before{content:'';width:7px;height:7px;border-radius:999px;background:#94a3b8}.qcc-review-accepted{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.qcc-review-accepted::before{background:#16a34a}.qcc-review-needs_work{border-color:#fecaca;background:#fff7f7;color:#991b1b}.qcc-review-needs_work::before{background:#dc2626}.qcc-review-disputed{border-color:#fde68a;background:#fffbeb;color:#92400e}.qcc-review-disputed::before{background:#f59e0b}.qcc-review-training{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.qcc-review-training::before{background:#2563eb}.qcc-review-ignored{border-color:#e5e7eb;background:#f8fafc;color:#64748b}.qcc-review-ignored::before{background:#64748b}.qcc-review-comment-preview{display:block;margin-top:5px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qcc-review-form{margin:16px 0;border:1px solid #dbeafe;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fbff);padding:14px}.qcc-review-form-head{display:grid;gap:4px;margin-bottom:12px}.qcc-review-form-head b{font-size:15px}.qcc-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.qcc-review-grid label,.qcc-review-comment{display:grid;gap:7px;color:#334155;font-size:12px;font-weight:900}.qcc-review-grid select,.qcc-review-comment textarea{width:100%}.qcc-review-comment{margin-top:12px}.qcc-results-table td[data-qcc-review-cell]{min-width:132px}.qcc-result-summary-strip{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}.qcc-review-form .form-actions{align-items:center}
@media (max-width: 720px){.qcc-review-grid{grid-template-columns:1fr}.qcc-review-comment-preview{max-width:none}}

/* Platform diagnostics / healthcheck */
.platform-health-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:center;overflow:hidden;position:relative}
.platform-health-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 88% 8%,rgba(79,70,229,.10),transparent 34%),radial-gradient(circle at 14% 12%,rgba(14,165,233,.08),transparent 30%);pointer-events:none}
.platform-health-hero>*{position:relative;z-index:1}.platform-health-hero h2{margin:0 0 8px}.platform-health-meta{margin-top:12px;color:var(--muted);font-size:13px}.platform-health-score{display:flex;align-items:center;gap:16px}.platform-health-ring{width:128px;height:128px;border-radius:999px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:10px solid rgba(34,197,94,.22);background:#fff;box-shadow:var(--shadow-sm)}.platform-health-ring.is-warn{border-color:rgba(245,158,11,.28)}.platform-health-ring.is-bad{border-color:rgba(239,68,68,.28)}.platform-health-ring b{font-size:34px;line-height:1}.platform-health-ring span{font-size:12px;color:var(--muted);margin-top:4px}.platform-health-counts{display:flex;flex-direction:column;gap:8px}.health-pill{display:inline-flex;align-items:center;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700}.health-pill.ok{background:rgba(34,197,94,.10);color:#15803d}.health-pill.warn{background:rgba(245,158,11,.13);color:#92400e}.health-pill.bad{background:rgba(239,68,68,.11);color:#b91c1c}.platform-health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.platform-health-card h2{margin-top:0}.platform-check-list{display:flex;flex-direction:column;gap:10px}.platform-check-row{border:1px solid var(--border);border-radius:16px;padding:12px;background:#fff}.platform-check-row.is-warn{background:rgba(245,158,11,.035);border-color:rgba(245,158,11,.22)}.platform-check-row.is-bad{background:rgba(239,68,68,.035);border-color:rgba(239,68,68,.24)}.platform-check-head{display:flex;align-items:center;gap:8px}.platform-check-head b{flex:1}.health-dot{width:10px;height:10px;border-radius:999px;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.12)}.health-dot.ok{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}.health-dot.warn{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.14)}.health-dot.bad{background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.14)}.health-badge.ok{background:rgba(34,197,94,.10);color:#15803d}.health-badge.warn{background:rgba(245,158,11,.13);color:#92400e}.health-badge.bad{background:rgba(239,68,68,.11);color:#b91c1c}.platform-check-value{margin-top:8px;font-size:13px;font-weight:700;color:var(--text)}.platform-check-hint{margin-top:3px;font-size:12px;color:var(--muted);line-height:1.45}.platform-queue-grid,.platform-step-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.platform-queue-card,.platform-step-grid>div{border:1px solid var(--border);border-radius:16px;padding:14px;background:#fff}.platform-queue-card h3{margin:0 0 10px;font-size:15px}.platform-queue-counts{display:flex;flex-wrap:wrap;gap:8px}.platform-queue-counts span{display:flex;flex-direction:column;min-width:78px;border-radius:12px;background:var(--surface-soft,#f8fafc);padding:9px 10px;font-size:11px;color:var(--muted)}.platform-queue-counts b{font-size:18px;color:var(--text)}.platform-log-box{max-height:360px;overflow:auto;border:1px solid var(--border);border-radius:16px;background:#0f172a;color:#dbeafe;padding:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.55}.platform-log-box div+div{border-top:1px solid rgba(255,255,255,.08);padding-top:7px;margin-top:7px}.platform-step-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.platform-step-grid b{display:block;margin-bottom:6px}.platform-step-grid span{color:var(--muted);font-size:13px;line-height:1.45}@media(max-width:1100px){.platform-health-grid{grid-template-columns:1fr}.platform-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.platform-health-hero{grid-template-columns:1fr}.platform-health-score{align-items:flex-start}.platform-queue-grid,.platform-step-grid{grid-template-columns:1fr}.platform-health-ring{width:108px;height:108px}.platform-health-ring b{font-size:28px}}

/* Management navigation and visual polish */
.management-nav-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 20px}.management-nav-group{border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.86);box-shadow:var(--soft-shadow);padding:12px;display:grid;gap:10px}.management-nav-group.active{border-color:#bfdbfe;background:linear-gradient(180deg,#fff,#f8fbff)}.management-nav-group-head{display:grid;gap:2px;padding:2px 2px 0}.management-nav-group-head b{font-size:13px;color:#0f172a}.management-nav-group-head span{font-size:11.5px;color:var(--muted);line-height:1.35}.management-nav-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.management-nav-item{display:flex;align-items:center;gap:8px;min-height:40px;border-radius:13px;padding:8px 10px;color:#475569;font-size:12.5px;font-weight:850;background:#fff;border:1px solid transparent}.management-nav-item:hover{color:#1d4ed8;background:#eff6ff;border-color:#dbeafe}.management-nav-item.active{color:#1d4ed8;background:#eff6ff;border-color:#93c5fd;box-shadow:0 8px 18px rgba(37,99,235,.08)}.management-nav-icon{width:16px;height:16px}.management-hub-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:center;position:relative;overflow:hidden;background:linear-gradient(135deg,#fff,#f8fbff);border-color:#dbeafe}.management-hub-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 88% 12%,rgba(37,99,235,.11),transparent 34%),radial-gradient(circle at 12% 8%,rgba(20,184,166,.08),transparent 30%);pointer-events:none}.management-hub-hero>*{position:relative;z-index:1}.management-hub-hero h2{margin:4px 0 8px;font-size:26px;line-height:1.18}.management-health-mini{width:150px;min-height:150px;border-radius:26px;border:1px solid #e2e8f0;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:var(--soft-shadow);padding:14px}.management-health-mini b{font-size:38px;line-height:1}.management-health-mini span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;font-weight:900}.management-health-mini small{margin-top:8px;color:#64748b;font-size:12px;line-height:1.35}.management-health-success{border-color:#bbf7d0;background:#f0fdf4}.management-health-warning{border-color:#fde68a;background:#fffbeb}.management-health-danger{border-color:#fecaca;background:#fff7f7}.management-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.management-action-card{display:flex;gap:12px;align-items:flex-start;border:1px solid #e2e8f0;border-radius:20px;background:#fff;padding:16px;box-shadow:var(--soft-shadow);color:#334155;min-height:142px;transition:transform .15s ease,box-shadow .15s ease,border .15s ease}.management-action-card:hover{transform:translateY(-2px);box-shadow:var(--shadow);color:#0f172a;border-color:#bfdbfe}.management-action-card.success{background:linear-gradient(180deg,#fff,#f0fdf4);border-color:#bbf7d0}.management-action-card.warning{background:linear-gradient(180deg,#fff,#fffbeb);border-color:#fde68a}.management-action-card.danger{background:linear-gradient(180deg,#fff,#fff7f7);border-color:#fecaca}.management-action-icon{width:42px;height:42px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;background:#eff6ff;color:#1d4ed8;flex:0 0 auto}.management-action-body{display:grid;gap:8px;min-width:0}.management-action-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.management-action-top b{font-size:15px;color:#0f172a}.management-action-top em{font-style:normal;font-size:11px;border-radius:999px;padding:4px 8px;background:#f1f5f9;color:#475569;white-space:nowrap;font-weight:900}.management-action-card.success .management-action-top em{background:#dcfce7;color:#166534}.management-action-card.warning .management-action-top em{background:#fef3c7;color:#92400e}.management-action-card.danger .management-action-top em{background:#fee2e2;color:#991b1b}.management-action-body>span:last-child{font-size:13px;color:#64748b;line-height:1.45}.management-hub-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:16px;margin-top:16px}.management-panel-card{min-width:0}.management-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.management-mini-card{display:grid;gap:8px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:13px;color:#334155}.management-mini-card:hover{border-color:#bfdbfe;background:#f8fbff;color:#0f172a}.management-mini-card .icon{color:#1d4ed8}.management-mini-card b{font-size:14px}.management-mini-card span{color:#64748b;font-size:12.5px;line-height:1.4}.management-queue-list{display:grid;gap:10px}.management-queue-row{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:12px;display:grid;gap:9px}.management-queue-row>div{display:flex;flex-wrap:wrap;gap:7px}.management-queue-pill{display:inline-flex;align-items:center;gap:7px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;padding:6px 8px}.management-queue-pill small{color:#64748b;font-weight:800}.management-queue-pill b{font-variant-numeric:tabular-nums}.card .section-head.compact{margin-bottom:12px}.content-card>h1:first-child + .management-nav-panel{margin-top:-2px}
@media(max-width:1180px){.management-nav-panel,.management-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.management-hub-layout{grid-template-columns:1fr}.management-nav-group:last-child{grid-column:1/-1}.management-nav-group:last-child .management-nav-items{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.management-nav-panel,.management-card-grid,.management-mini-grid{grid-template-columns:1fr}.management-nav-items,.management-nav-group:last-child .management-nav-items{grid-template-columns:1fr}.management-hub-hero{grid-template-columns:1fr}.management-health-mini{width:100%;min-height:116px}.management-action-card{min-height:0}.management-action-top{flex-direction:column}.management-nav-group-head span{display:none}}

/* Platform cross-module UX improvements */
.platform-drawer-backdrop,
.platform-confirm-backdrop{
    position: fixed; inset: 0; background: rgba(15,23,42,.42); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 80;
}
.platform-drawer-backdrop.open,
.platform-confirm-backdrop.open{ opacity: 1; pointer-events: auto; }
.platform-drawer{
    position: fixed; top: 0; right: 0; height: 100vh; width: min(720px, 96vw); background: var(--card-bg, #fff); box-shadow: -28px 0 70px rgba(15,23,42,.20); transform: translateX(105%); transition: transform .22s ease; z-index: 90; overflow: auto; padding: 26px; border-left: 1px solid rgba(148,163,184,.28);
}
.platform-drawer.open{ transform: translateX(0); }
.drawer-section{ margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(148,163,184,.22); }
.drawer-meta-wide{ grid-template-columns: repeat(2,minmax(0,1fr)); }
.drawer-audit-meta{ border-color:rgba(37,99,235,.38)!important; background:rgba(37,99,235,.06)!important; }
.drawer-audit-toggle{ padding:0; border:0; background:transparent; color:#2563eb; font:inherit; font-weight:800; cursor:pointer; text-decoration:underline; }
.drawer-audit-toggle:disabled{ color:inherit; cursor:default; text-decoration:none; }
.drawer-audit-meta small{ display:block; margin-top:4px; color:#64748b; font-size:12px; }
.platform-conversation-audit{ scroll-margin-top:18px; }
.platform-audit-summary{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.platform-audit-summary span{ padding:6px 9px; border:1px solid rgba(148,163,184,.25); border-radius:10px; background:rgba(248,250,252,.82); font-size:12px; }
.platform-conversation-audit details{ border:1px solid rgba(148,163,184,.25); border-radius:14px; overflow:hidden; }
.platform-conversation-audit summary{ padding:10px 12px; cursor:pointer; font-weight:700; }
.platform-audit-table{ width:100%; border-collapse:collapse; font-size:12px; }
.platform-audit-table th,.platform-audit-table td{ padding:8px 10px; border-top:1px solid rgba(148,163,184,.2); text-align:left; vertical-align:top; }
.platform-insight-box{ border: 1px solid rgba(37,99,235,.18); border-radius: 18px; padding: 14px 16px; background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(255,255,255,.65)); display: grid; gap: 6px; }
.platform-insight-box.warn{ border-color: rgba(245,158,11,.28); background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(255,255,255,.7)); }
.platform-chip-row{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.platform-chip-row em{ font-style:normal; font-size:12px; padding:4px 8px; border-radius:999px; background:rgba(15,23,42,.06); }
.platform-message-list{ display:grid; gap:10px; max-height:50vh; overflow:auto; padding-right:4px; }
.platform-message{ border-radius:16px; border:1px solid rgba(148,163,184,.25); padding:12px 14px; background:rgba(248,250,252,.86); }
.platform-message header{ display:flex; justify-content:space-between; gap:10px; font-size:12px; color:#64748b; margin-bottom:6px; }
.platform-message header b{ color:#0f172a; }
.platform-message p{ white-space:pre-wrap; margin:0; line-height:1.48; }
.platform-message-client{ background:rgba(239,246,255,.92); }
.platform-message-manager{ background:rgba(240,253,244,.9); }
.platform-message-bot{ background:rgba(245,243,255,.9); }
.platform-criteria-list{ display:grid; gap:8px; margin-top:10px; }
.platform-criteria-list>div{ padding:10px 12px; border-radius:14px; border:1px solid rgba(148,163,184,.22); background:#fff; display:grid; gap:4px; }
.platform-criteria-list span,.platform-criteria-list small{ color:#64748b; }
.platform-confirm-modal{ width:min(520px,92vw); margin:12vh auto; background:#fff; border-radius:22px; box-shadow:0 24px 70px rgba(15,23,42,.25); padding:24px; display:grid; gap:14px; }
.platform-confirm-modal input{ margin-top:8px; }
.platform-confirm-actions{ display:flex; justify-content:flex-end; gap:10px; }
.btn.danger{ background:#dc2626; border-color:#dc2626; color:#fff; }
.platform-event-list{ display:grid; gap:10px; }
.platform-event{ display:grid; grid-template-columns:16px 1fr auto; gap:12px; align-items:start; padding:14px; border-radius:18px; border:1px solid rgba(148,163,184,.22); background:rgba(255,255,255,.86); }
.platform-event-dot{ width:10px; height:10px; border-radius:50%; margin-top:5px; background:#64748b; box-shadow:0 0 0 5px rgba(100,116,139,.1); }
.platform-event-success .platform-event-dot{ background:#16a34a; box-shadow:0 0 0 5px rgba(22,163,74,.12); }
.platform-event-warning .platform-event-dot{ background:#f59e0b; box-shadow:0 0 0 5px rgba(245,158,11,.14); }
.platform-event-danger .platform-event-dot{ background:#dc2626; box-shadow:0 0 0 5px rgba(220,38,38,.14); }
.platform-event-info .platform-event-dot{ background:#2563eb; box-shadow:0 0 0 5px rgba(37,99,235,.12); }
.platform-event-body div{ display:flex; justify-content:space-between; gap:12px; }
.platform-event-body p{ margin:4px 0; }
.platform-event-body small,.platform-event-body time{ color:#64748b; }
.platform-event-actions{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.platform-table-toolbar{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.platform-table-toolbar input{ max-width:420px; }
.platform-filter-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{ border:1px solid rgba(148,163,184,.32); background:#fff; border-radius:999px; padding:7px 12px; cursor:pointer; }
.chip.active{ background:#0f172a; color:#fff; border-color:#0f172a; }
.platform-data-table tbody tr[hidden]{ display:none; }
.mini-progress{ width:110px; height:8px; border-radius:999px; background:rgba(148,163,184,.18); overflow:hidden; }
.mini-progress i{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#2563eb,#06b6d4); }
.ai-explain-card{ border:1px solid rgba(37,99,235,.16); background:linear-gradient(135deg, rgba(37,99,235,.07), rgba(14,165,233,.05)); border-radius:20px; padding:14px 16px; margin:14px 0; }
.ai-explain-card summary{ cursor:pointer; font-weight:700; }
.ai-explain-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin:12px 0; }
.ai-explain-grid div{ background:rgba(255,255,255,.72); border:1px solid rgba(148,163,184,.22); border-radius:14px; padding:10px 12px; }
.ai-explain-grid span{ display:block; color:#64748b; font-size:12px; }
.ai-explain-grid b{ display:block; margin-top:2px; }
.analytics-decision-card{background:linear-gradient(135deg,#fff 0%,#f8fbff 100%)}
.analytics-decision-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:14px}
.analytics-decision-item{border:1px solid #e2e8f0;border-radius:16px;padding:14px;background:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.analytics-decision-item strong{display:block;font-size:28px;line-height:1.05;margin-top:3px}.analytics-decision-item small{display:block;color:#64748b;margin-top:4px}.analytics-decision-item p{font-size:13px;line-height:1.45;color:#475569;margin:0;min-height:38px}.analytics-decision-item.tone-danger{border-color:#fecaca;background:#fffafa}.analytics-decision-item.tone-warn{border-color:#fde68a;background:#fffdf5}.analytics-decision-item.tone-info{border-color:#bfdbfe;background:#f8fbff}
.analytics-funnel-card{margin-top:18px}.analytics-funnel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.analytics-funnel-step{border:1px solid #dbeafe;border-radius:15px;background:#f8fbff;padding:13px;position:relative}.analytics-funnel-step span{display:block;color:#475569;font-weight:750;font-size:13px}.analytics-funnel-step b{display:block;font-size:25px;margin-top:5px}.analytics-funnel-step small{display:block;color:#2563eb;margin-top:3px}.analytics-funnel-step p{margin:8px 0 0;color:#64748b;font-size:12px;line-height:1.4}.analytics-team-table small{white-space:nowrap}
@media (max-width:700px){.analytics-decision-grid,.analytics-funnel-grid{grid-template-columns:1fr}.analytics-decision-item p{min-height:0}}
.training-employee-list,.training-mistake-list{ display:grid; gap:10px; }
.training-employee-list article{ display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid rgba(148,163,184,.22); border-radius:16px; background:#fff; }
.training-employee-list span,.training-mistake-list span,.training-example span,.training-example small{ color:#64748b; }
.training-mistake-list article,.training-example{ display:grid; gap:5px; padding:12px 14px; border:1px solid rgba(148,163,184,.22); border-radius:16px; background:#fff; margin-bottom:8px; }
.training-example.warn{ background:rgba(255,247,237,.9); border-color:rgba(245,158,11,.24); }
.nowrap{ white-space:nowrap; }
@media (max-width: 760px){
    .platform-drawer{ width:100vw; padding:20px; }
    .drawer-meta-wide{ grid-template-columns:1fr; }
    .platform-event{ grid-template-columns:12px 1fr; }
    .platform-event-actions{ grid-column:2; justify-content:flex-start; }
}

/* Safe process cancellation */
.badge.cancel_requested,.badge.status-cancel_requested{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.badge.cancelled,.badge.status-cancelled{background:#f1f5f9;color:#475569;border:1px solid #cbd5e1}
.danger-soft-btn{background:#fff;color:#b91c1c;border:1px solid #fecaca;box-shadow:none}
.danger-soft-btn:hover{background:#fef2f2;color:#991b1b;box-shadow:0 8px 18px rgba(239,68,68,.10)}
.platform-data-table .badge.cancel_requested{animation:helpfyPulseWarn 1.4s ease-in-out infinite}
@keyframes helpfyPulseWarn{0%,100%{box-shadow:0 0 0 0 rgba(249,115,22,.18)}50%{box-shadow:0 0 0 5px rgba(249,115,22,0)}}

/* QCC criteria settings — intuitive structured builder */
.qcc-builder-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);gap:18px;align-items:center;margin:16px 0;background:linear-gradient(135deg,#fff,#f8fbff);border-color:#dbeafe}.qcc-builder-hero-main h2{margin:4px 0 8px;font-size:24px}.qcc-builder-hero-main p{margin:0;color:#64748b;line-height:1.55}.qcc-builder-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.qcc-builder-stats div{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:13px 12px;text-align:center;box-shadow:0 10px 28px rgba(15,23,42,.04)}.qcc-builder-stats span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:900}.qcc-builder-stats b{display:block;margin-top:4px;font-size:24px;color:#0f172a}.qcc-readiness-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0 18px}.qcc-readiness-card{display:flex;gap:12px;align-items:center;border:1px solid #fde68a;border-radius:18px;background:linear-gradient(180deg,#fff,#fffbeb);padding:12px 14px}.qcc-readiness-card.ok{border-color:#bbf7d0;background:linear-gradient(180deg,#fff,#f0fdf4)}.qcc-readiness-card>span{width:30px;height:30px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid rgba(148,163,184,.32);font-weight:950;color:#0f172a;flex:0 0 auto}.qcc-readiness-card b{display:block;color:#0f172a}.qcc-readiness-card small{display:block;margin-top:2px;color:#64748b;line-height:1.35}.qcc-builder-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:16px;align-items:start}.qcc-builder-sidebar{position:sticky;top:16px;display:grid;gap:14px}.qcc-template-switcher{display:grid;gap:9px}.qcc-template-switch{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e2e8f0;border-radius:17px;background:#fff;padding:12px;text-decoration:none;color:#0f172a}.qcc-template-switch:hover{border-color:#bfdbfe;background:#f8fbff;transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.06)}.qcc-template-switch.active{border-color:#2563eb;background:#eff6ff;box-shadow:inset 3px 0 0 #2563eb}.qcc-template-switch b{display:block;font-size:14px}.qcc-template-switch small{display:block;margin-top:3px;color:#64748b;font-size:12px}.qcc-ready-dot{width:46px;height:46px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:950;border:1px solid #fde68a;background:#fffbeb;color:#92400e;flex:0 0 auto}.qcc-ready-dot.ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.qcc-side-help{border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc;padding:14px}.qcc-side-help b{display:block;margin-bottom:5px}.qcc-side-help p{margin:0;color:#64748b;line-height:1.5}.qcc-builder-main{display:grid;gap:14px}.qcc-builder-panel{display:grid;grid-template-columns:46px minmax(0,1fr);gap:14px;padding:18px}.qcc-builder-panel.disabled{opacity:.72}.qcc-panel-number{width:42px;height:42px;border-radius:16px;background:#0f172a;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:950;font-size:18px}.qcc-panel-content{min-width:0}.qcc-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.qcc-panel-head h2{margin:0 0 4px;font-size:20px}.qcc-panel-head p{margin:0}.qcc-context-pill{border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900;white-space:nowrap}.qcc-clear-form{display:grid;gap:14px}.qcc-form-section{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:14px}.qcc-form-section-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:12px;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.qcc-form-section-title b{font-size:15px;color:#0f172a}.qcc-form-section-title span{font-size:12px;color:#64748b;text-align:right}.qcc-form-grid{display:grid;gap:12px}.qcc-form-grid.template{grid-template-columns:minmax(0,1.6fr) minmax(140px,.4fr)}.qcc-form-grid.criterion{grid-template-columns:minmax(0,1.45fr) minmax(130px,.35fr)}.qcc-form-grid.score{grid-template-columns:minmax(180px,1fr) 110px 110px}.qcc-form-grid .span-2{grid-column:1/-1}.qcc-form-grid label,.qcc-single-field{display:grid;gap:7px;font-weight:900;color:#334155;font-size:12px}.qcc-form-grid label span,.qcc-single-field span{display:flex;gap:6px;align-items:center}.qcc-form-grid label em{font-style:normal;border-radius:999px;background:#eff6ff;color:#1d4ed8;padding:2px 7px;font-size:10px}.qcc-form-grid input,.qcc-form-grid textarea,.qcc-form-grid select,.qcc-single-field select{width:100%;border-radius:13px}.qcc-check-card{margin-top:12px}.qcc-form-actions{display:flex;justify-content:flex-end}.qcc-current-template{margin-top:18px}.qcc-current-summary{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.qcc-current-summary span{display:inline-flex;border:1px solid #e2e8f0;background:#f8fafc;border-radius:999px;padding:6px 9px;font-size:12px;font-weight:900;color:#334155}.qcc-current-summary span.ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.qcc-current-summary span.warn{border-color:#fde68a;background:#fffbeb;color:#92400e}.qcc-criterion-structure{display:grid;gap:12px}.qcc-criterion-structure-card{border:1px solid #e2e8f0;border-radius:20px;background:#fff;padding:15px}.qcc-criterion-structure-card.needs-attention{border-color:#fde68a;background:linear-gradient(180deg,#fff,#fffbeb)}.qcc-criterion-structure-head{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:flex-start}.qcc-criterion-index{width:34px;height:34px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:#eff6ff;color:#1d4ed8;font-weight:950}.qcc-criterion-structure-head h3{margin:0 0 7px;font-size:17px}.qcc-status-line{display:flex;flex-wrap:wrap;gap:6px}.qcc-status-line span{border-radius:999px;border:1px solid #e2e8f0;background:#f8fafc;padding:4px 8px;font-size:11px;font-weight:900;color:#475569}.qcc-status-line span.ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.qcc-status-line span.warn{border-color:#fde68a;background:#fffbeb;color:#92400e}.qcc-status-line span.danger{border-color:#fecaca;background:#fff7f7;color:#991b1b}.qcc-criterion-description{margin:11px 0 12px;color:#334155;line-height:1.55;background:#f8fafc;border:1px solid #e2e8f0;border-radius:15px;padding:11px 12px}.qcc-score-scale.clear{margin:10px 0 0}.qcc-missing-box{border:1px dashed #f59e0b;background:#fffbeb;color:#92400e;border-radius:15px;padding:10px 12px;font-weight:800;font-size:13px}.qcc-quick-score{margin-top:12px;border:1px dashed #cbd5e1;border-radius:17px;background:#f8fafc;padding:12px}.qcc-quick-score>b{display:block;font-size:13px;margin-bottom:2px}.qcc-quick-score-grid{display:grid;grid-template-columns:minmax(140px,1fr) 92px minmax(180px,1.4fr) auto;gap:8px;align-items:center}.qcc-quick-score-grid input{width:100%;min-height:34px}.qcc-empty-state.inline{padding:14px}.qcc-empty-state h3{margin-top:0}.qcc-builder-panel button[disabled]{opacity:.55;cursor:not-allowed}
@media(max-width:1180px){.qcc-builder-hero,.qcc-builder-layout{grid-template-columns:1fr}.qcc-builder-sidebar{position:static}.qcc-readiness-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-builder-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-quick-score-grid{grid-template-columns:1fr 90px}.qcc-quick-score-grid input[name="measure"],.qcc-quick-score-grid button{grid-column:1/-1}.qcc-form-grid.score{grid-template-columns:1fr 110px 110px}}
@media(max-width:720px){.qcc-builder-panel{grid-template-columns:1fr}.qcc-panel-number{width:36px;height:36px}.qcc-panel-head,.qcc-form-section-title{display:grid}.qcc-form-section-title span{text-align:left}.qcc-readiness-strip,.qcc-builder-stats,.qcc-form-grid.template,.qcc-form-grid.criterion,.qcc-form-grid.score{grid-template-columns:1fr}.qcc-current-summary{justify-content:flex-start}.qcc-quick-score-grid{grid-template-columns:1fr}.qcc-criterion-structure-head{grid-template-columns:1fr}}


/* QCC results page: structured filters redesign */
.qcc-results-control-panel{border:1px solid #dbeafe;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border-radius:24px;padding:18px;margin:18px 0 20px;box-shadow:0 16px 44px rgba(15,23,42,.06)}
.qcc-results-control-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}.qcc-results-control-title h3{margin:3px 0 5px;font-size:20px;color:#0f172a}.qcc-control-eyebrow{display:inline-flex;align-items:center;gap:6px;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.qcc-results-visible-counter{min-width:92px;border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:10px 12px;text-align:center;box-shadow:0 8px 24px rgba(15,23,42,.05)}.qcc-results-visible-counter strong{display:block;font-size:24px;line-height:1;color:#0f172a}.qcc-results-visible-counter span{font-size:12px;font-weight:800;color:#64748b}.qcc-filter-layout{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.4fr);gap:14px;align-items:stretch}.qcc-filter-primary{display:flex;flex-direction:column;gap:12px;border:1px solid #e2e8f0;background:#fff;border-radius:20px;padding:14px}.qcc-filter-search.big{display:block;font-weight:900;color:#334155}.qcc-filter-search.big input{margin-top:7px;min-height:46px;font-size:14px}.qcc-filter-search.big small{display:block;margin-top:7px;color:#64748b;font-size:12px;line-height:1.4;font-weight:600}.qcc-filter-actions-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.qcc-filter-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.qcc-filter-chip,.qcc-filter-metric{border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:11px 12px;text-align:left;color:#0f172a;min-height:74px}.qcc-filter-chip{cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease}.qcc-filter-chip b,.qcc-filter-metric b{display:block;font-size:22px;line-height:1}.qcc-filter-chip span,.qcc-filter-metric span{display:block;margin-top:6px;font-size:12px;color:#64748b;font-weight:900}.qcc-filter-chip:hover{border-color:#bfdbfe;box-shadow:0 12px 28px rgba(15,23,42,.08);transform:translateY(-1px)}.qcc-filter-chip.active,.qcc-filter-pill.active{border-color:#2563eb;background:#eff6ff;box-shadow:inset 0 0 0 1px rgba(37,99,235,.08)}.qcc-filter-chip.danger{border-color:#fecaca;background:#fff7f7}.qcc-filter-chip.success{border-color:#bbf7d0;background:#f0fdf4}.qcc-filter-metric.muted-metric{background:#f8fafc;display:flex;flex-direction:column;justify-content:center}.qcc-filter-review-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;border-top:1px solid #e2e8f0;padding-top:12px}.qcc-filter-review-strip>span{font-size:12px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.04em;margin-right:2px}.qcc-filter-pill{border:1px solid #e2e8f0;background:#fff;color:#334155;border-radius:999px;padding:8px 11px;font-size:12px;font-weight:900;cursor:pointer;transition:.16s ease}.qcc-filter-pill b{color:#0f172a;margin-right:4px}.qcc-filter-pill:hover{border-color:#bfdbfe;box-shadow:0 8px 20px rgba(15,23,42,.07);transform:translateY(-1px)}.qcc-filter-pill.danger{border-color:#fecaca;background:#fff7f7}.qcc-advanced-filter-panel{margin-top:12px;border:1px dashed #cbd5e1;background:#fff;border-radius:20px;padding:14px}.qcc-advanced-filter-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:12px}.qcc-advanced-filter-head strong{color:#0f172a}.qcc-advanced-filter-head span{color:#64748b;font-size:12px;font-weight:700}.qcc-result-filter-grid-clean{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr)) minmax(170px,.9fr);gap:10px;align-items:end}.qcc-result-filter-grid-clean label,.qcc-score-range-filter{font-weight:900;color:#334155}.qcc-result-filter-grid-clean select,.qcc-result-filter-grid-clean input{margin-top:6px;width:100%;min-height:38px}.qcc-score-range-filter>span{display:block}.qcc-score-range-filter>div{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.qcc-active-filters{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.qcc-active-filters span{display:inline-flex;align-items:center;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.qcc-results-control-panel.qcc-filters-active{border-color:#93c5fd}.qcc-results-table .qcc-result-row[hidden]{display:none!important}
@media (max-width: 1180px){.qcc-filter-layout{grid-template-columns:1fr}.qcc-filter-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.qcc-result-filter-grid-clean{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-score-range-filter{grid-column:1/-1}}
@media (max-width: 720px){.qcc-results-control-head{flex-direction:column}.qcc-results-visible-counter{text-align:left;width:100%}.qcc-filter-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.qcc-filter-actions-row .btn{width:100%;justify-content:center}.qcc-result-filter-grid-clean{grid-template-columns:1fr}.qcc-advanced-filter-head{display:block}.qcc-filter-review-strip{align-items:stretch}.qcc-filter-review-strip>span{width:100%}.qcc-filter-pill{flex:1 1 45%;text-align:center}}


/* Reports: dynamic analytics and mass problems */
.report-main-kpi .card { min-height: 112px; }
.report-section-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 18px;
    padding: 18px;
    margin: 18px 0;
    box-shadow: var(--card-shadow, 0 8px 22px rgba(15, 23, 42, .06));
}
.report-section-card > h2 { margin-top: 0; }
.report-charts-grid.nested { margin-top: 12px; }
.report-dynamic-panel { margin: 18px 0; }
.report-chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin: 10px 0 12px;
    padding: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 14px;
    background: rgba(248, 250, 252, .75);
}
.report-chart-controls label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted-color, #64748b);
}
.report-chart-controls select {
    min-width: 170px;
    padding: 9px 10px;
    border: 1px solid var(--border-color, #dbe3ef);
    border-radius: 10px;
    background: #fff;
    color: inherit;
}
.report-mass-problems { margin: 18px 0; }
.mass-problem-row.is-alert td:first-child { border-left: 4px solid #ef4444; }
.mass-problem-row.is-watch td:first-child { border-left: 4px solid #f59e0b; }
.mass-problem-row.is-normal td:first-child { border-left: 4px solid #94a3b8; }
.report-tables-details { margin-top: 18px; }
.report-tables-details > summary {
    cursor: pointer;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(248, 250, 252, .85);
    border: 1px solid var(--border-color, #e5e7eb);
    font-weight: 700;
}
.report-tables-details .two-col { margin-top: 14px; }
@media (max-width: 760px) {
    .report-chart-controls { display: grid; }
    .report-chart-controls select { width: 100%; min-width: 0; }
}

/* Navigation cleanup: scenario-based main menu */
.side-section .side-more-menu{padding-top:4px;padding-bottom:6px}
.side-section .side-more-link span{font-size:13px;line-height:1.2}
.side-section .side-more-link{padding-left:14px}
.side-section .side-more-summary.active{background:#eff6ff;color:#1d4ed8}

/* Reports dynamic timeline AJAX + zoom */
.report-dynamic-panel{position:relative;overflow:hidden}
.report-dynamic-panel.is-loading:after{content:'Обновляем график…';position:absolute;right:16px;top:16px;background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:850;box-shadow:0 10px 24px rgba(37,99,235,.10)}
.report-chart-warning{margin:12px 0 0;padding:10px 12px;border:1px solid #fde68a;background:#fffbeb;color:#92400e;border-radius:14px;font-size:13px;font-weight:750}
.chart-box-zoomable{min-height:360px}
.chart-zoom-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc}
.chart-zoom-controls>div:first-child{display:grid;gap:3px}
.chart-zoom-controls>div:first-child span{font-size:12px;color:#64748b;font-weight:750}
.chart-zoom-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.chart-zoom-actions button{border:1px solid #dbe3ef;background:#fff;color:#334155;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:850;cursor:pointer;transition:background .15s ease,border .15s ease,color .15s ease}
.chart-zoom-actions button:hover{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.chart-zoom-range{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:850;color:#475569;min-width:180px}
.chart-zoom-range input{width:150px;accent-color:#2563eb}
.chart-zoom-canvas{min-height:300px}
@media(max-width:760px){.chart-zoom-controls{align-items:stretch;flex-direction:column}.chart-zoom-actions{justify-content:flex-start}.chart-zoom-range{width:100%}.chart-zoom-range input{width:100%}}

/* Improved dynamic timeline zoom */
.chart-box-zoomable{min-height:380px}.chart-zoom-controls-v2{display:grid;gap:10px;margin:0 0 10px;padding:12px;border:1px solid #e2e8f0;border-radius:18px;background:linear-gradient(135deg,rgba(248,250,252,.96),rgba(239,246,255,.72))}.chart-zoom-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.chart-zoom-title b{font-size:14px}.chart-zoom-title span{font-size:12px;color:#64748b;font-weight:700}.chart-zoom-actions{display:flex;gap:8px;flex-wrap:wrap}.chart-zoom-actions button{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:999px;padding:7px 11px;font-weight:800;font-size:12px;cursor:pointer;box-shadow:0 4px 10px rgba(15,23,42,.04)}.chart-zoom-actions button:hover{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.chart-zoom-stats{display:flex;gap:8px;flex-wrap:wrap}.chart-zoom-stats span{display:inline-flex;align-items:center;gap:4px;padding:6px 9px;border-radius:999px;background:#fff;border:1px solid #e2e8f0;color:#64748b;font-size:12px}.chart-zoom-stats b{color:#0f172a}.chart-overview{border:1px solid #dbeafe;background:#fff;border-radius:14px;padding:4px;cursor:crosshair;overflow:hidden}.chart-overview-svg{width:100%;height:56px;display:block}.line-overview-path{fill:none;stroke:#93c5fd;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.line-overview-window{fill:rgba(37,99,235,.14);stroke:#2563eb;stroke-width:2}.chart-zoom-sliders{display:grid;grid-template-columns:1fr 1fr;gap:10px}.chart-zoom-sliders label{display:grid;gap:4px;font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:850;color:#64748b}.chart-zoom-sliders input[type=range]{width:100%;accent-color:#2563eb}.chart-zoom-help{margin:0;color:#64748b;font-size:12px;line-height:1.35}.chart-zoom-canvas{touch-action:none;cursor:grab;border-radius:16px}.chart-zoom-canvas.is-dragging{cursor:grabbing}.line-point-peak{fill:#fff;stroke:#ef4444;stroke-width:4}.line-peak-label{font-size:11px;font-weight:850;fill:#dc2626;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}.report-dynamic-panel.is-loading .chart-zoom-controls-v2,.report-dynamic-panel.is-loading .chart-zoom-canvas{opacity:.55;pointer-events:none}@media(max-width:720px){.chart-zoom-sliders{grid-template-columns:1fr}.chart-zoom-title{display:grid}.chart-box-zoomable{min-height:420px}}

/* Reports dynamic timeline: cleaner zoom UI */
.chart-zoom-controls-clean{
  display:grid;
  gap:12px;
  margin:0 0 12px;
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:20px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}
.chart-clean-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.chart-clean-head>div:first-child{
  display:grid;
  gap:3px;
  min-width:0;
}
.chart-clean-head b{
  font-size:15px;
  color:#0f172a;
}
.chart-clean-head span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
}
.chart-clean-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.chart-clean-actions button{
  min-height:32px;
  border:1px solid #dbe3ef;
  background:#f8fafc;
  color:#334155;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  box-shadow:none;
}
.chart-clean-actions button:hover{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1d4ed8;
}
.chart-clean-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.chart-clean-stats span{
  display:grid;
  gap:2px;
  min-width:0;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
}
.chart-clean-stats em{
  font-style:normal;
  font-size:11px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:850;
}
.chart-clean-stats b{
  color:#0f172a;
  font-size:16px;
  font-variant-numeric:tabular-nums;
}
.chart-clean-stats small{
  color:#64748b;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chart-overview-clean{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:5px;
  cursor:pointer;
}
.chart-overview-clean .chart-overview-svg{
  height:48px;
}
.chart-overview-clean .line-overview-path{
  stroke:#94a3b8;
  stroke-width:2;
}
.chart-overview-clean .line-overview-window{
  fill:rgba(37,99,235,.12);
  stroke:#2563eb;
  stroke-width:2;
}
.chart-range-details{
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
  overflow:hidden;
}
.chart-range-details summary{
  list-style:none;
  cursor:pointer;
  padding:10px 12px;
  color:#475569;
  font-size:12px;
  font-weight:850;
}
.chart-range-details summary::-webkit-details-marker{display:none}
.chart-range-details summary:after{
  content:'Раскрыть';
  float:right;
  color:#64748b;
  font-weight:750;
}
.chart-range-details[open] summary:after{content:'Скрыть'}
.chart-range-details .chart-zoom-sliders{
  padding:0 12px 12px;
}
.chart-range-details p{
  margin:0;
  padding:0 12px 12px;
  color:#64748b;
  font-size:12px;
}
.chart-zoom-canvas-clean{
  min-height:310px;
  border:1px solid #eef2f7;
  border-radius:18px;
  background:#fff;
  padding:6px;
}
.chart-zoom-canvas-clean .chart-svg{
  display:block;
}
.report-dynamic-panel.is-loading .chart-zoom-controls-clean,
.report-dynamic-panel.is-loading .chart-zoom-canvas-clean{
  opacity:.55;
  pointer-events:none;
}
@media(max-width:760px){
  .chart-clean-head{display:grid}
  .chart-clean-actions{justify-content:flex-start}
  .chart-clean-stats{grid-template-columns:1fr}
  .chart-zoom-canvas-clean{min-height:360px}
}

/* Online dashboard */
.online-head{align-items:flex-start}.online-live-status{display:flex;gap:8px;align-items:center;padding:10px 14px;border:1px solid #dbeafe;background:#eff6ff;border-radius:999px;color:#1d4ed8;font-weight:700}.online-live-status small{font-weight:500;color:#64748b;margin-left:4px}.online-live-status.is-error{background:#fef2f2;border-color:#fecaca;color:#b91c1c}.live-dot{width:9px;height:9px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.12)}.online-dashboard{display:flex;flex-direction:column;gap:18px}.online-toolbar{display:flex;gap:14px;align-items:end;justify-content:space-between;flex-wrap:wrap;padding:14px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:18px}.online-toolbar .form-group{min-width:220px;margin:0}.segmented-control{display:flex;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:4px}.segmented-control button{border:0;background:transparent;padding:8px 12px;border-radius:10px;font-weight:700;color:#64748b;cursor:pointer}.segmented-control button.active{background:#2563eb;color:#fff}.online-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.online-kpi{padding:16px;border:1px solid #e5e7eb;border-radius:18px;background:#fff}.online-kpi span{display:block;color:#64748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.online-kpi b{display:block;font-size:30px;line-height:1.1;margin:8px 0;color:#0f172a}.online-kpi small{color:#94a3b8}.online-grid-main{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:16px}.online-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.online-panel{border:1px solid #e5e7eb;border-radius:20px;background:#fff;padding:16px;min-width:0}.online-panel-wide{min-height:330px}.panel-title-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.panel-title-row h2{font-size:18px;margin:0}.online-summary{font-size:15px;line-height:1.55;color:#334155;background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:14px}.online-list{display:flex;flex-direction:column;gap:10px;max-height:480px;overflow:auto;padding-right:3px}.online-ticket{border:1px solid #e5e7eb;border-radius:16px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:8px}.online-ticket:hover{border-color:#bfdbfe;box-shadow:0 10px 24px rgba(15,23,42,.06)}.online-ticket div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.online-ticket b{color:#0f172a}.online-ticket div span:last-child{color:#64748b}.online-ticket p{margin:0;color:#334155;line-height:1.4}.online-ticket footer{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:13px}.online-risk{font-size:11px;border-radius:999px;padding:3px 7px;background:#f1f5f9;color:#475569;text-transform:uppercase}.online-risk-high,.online-risk-critical{background:#fef2f2;color:#b91c1c}.online-risk-medium{background:#fffbeb;color:#92400e}.online-problems{display:flex;flex-direction:column;gap:10px}.online-problem{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#fff}.online-problem b{display:block;color:#0f172a}.online-problem span{display:block;color:#64748b;font-size:13px;margin-top:3px}.online-problem strong{font-size:15px;color:#475569}.online-problem strong.is-hot{color:#dc2626}.online-table{display:flex;flex-direction:column;border:1px solid #e5e7eb;border-radius:16px;overflow:hidden}.online-table-row{display:grid;grid-template-columns:1.4fr .8fr .8fr .8fr;gap:10px;padding:10px 12px;border-bottom:1px solid #eef2f7;align-items:center}.online-table-row:last-child{border-bottom:0}.online-table-row span{color:#64748b;font-size:13px}.online-empty-small{padding:18px;border:1px dashed #cbd5e1;border-radius:16px;color:#64748b;background:#f8fafc;text-align:center}.online-empty{padding:40px;text-align:center}.btn-small{padding:6px 10px;font-size:12px}
@media (max-width:1200px){.online-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.online-grid-main,.online-grid-two{grid-template-columns:1fr}}@media (max-width:680px){.online-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.online-toolbar{align-items:stretch}.online-toolbar .form-group{width:100%}.segmented-control{overflow:auto}.online-table-row{grid-template-columns:1fr 1fr}.online-live-status{width:100%;justify-content:center}}

/* Online dashboard refinement: full-width activity, clickable KPI, summary links */
.online-kpi-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.online-zone{display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid #e5e7eb;border-radius:24px;background:#fff}.online-zone-attention{border-color:#fde68a;background:linear-gradient(180deg,#fffdf4 0%,#fff 180px)}.online-zone-flow{background:linear-gradient(180deg,#f8fbff 0%,#fff 180px);border-color:#dbeafe}.online-zone-quality{background:linear-gradient(180deg,#f8fafc 0%,#fff 180px)}.online-zone-head{display:flex;justify-content:space-between;align-items:end;gap:16px}.online-zone-head span{display:block;color:#2563eb;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}.online-zone-attention .online-zone-head span{color:#b45309}.online-zone-head h2{margin:0;color:#0f172a;font-size:22px}.online-zone-head p{margin:5px 0 0;color:#64748b}.online-flow-grid{display:grid;grid-template-columns:1fr;gap:16px}.online-flow-details{grid-template-columns:minmax(0,1.4fr) minmax(300px,.6fr)}
@media(max-width:1200px){.online-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.online-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1200px){.online-flow-grid,.online-flow-details{grid-template-columns:1fr}.online-activity-insights{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.online-zone{padding:14px;border-radius:18px}.online-zone-head h2{font-size:19px}.online-zone-head{align-items:flex-start}.online-zone-head p{font-size:13px}.online-activity-panel{min-height:470px}.online-activity-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.online-activity-chart-wrap{min-height:360px}.online-activity-controls .online-activity-reset{margin-left:0}}
.online-activity-panel{min-height:560px;width:100%;background:linear-gradient(145deg,#fff 0%,#f8fbff 100%);border-color:#bfdbfe;}
.online-activity-panel .panel-title-row p{margin:4px 0 0;}
.online-activity-view-switch{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 8px}.online-activity-view-switch>span{color:#64748b;font-size:12px;font-weight:800}.online-activity-view-switch button{border:1px solid #dbe3ef;border-radius:999px;background:#fff;color:#64748b;padding:6px 10px;font-size:12px;font-weight:800;cursor:pointer}.online-activity-view-switch button.active{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.online-activity-heatmap{padding:4px;overflow:hidden}.online-flow-heat-scroll{overflow:auto;padding:6px}.online-flow-heat-grid{width:max-content;min-width:100%}.online-flow-heat-head,.online-flow-heat-row{display:grid;gap:3px;align-items:center}.online-flow-heat-head{margin-bottom:5px;color:#64748b;font-size:9px;font-weight:800}.online-flow-heat-head>span{position:sticky;left:0;z-index:2;background:#fff;padding:4px 6px}.online-flow-heat-head>i{font-style:normal;text-align:center;white-space:nowrap;transform:rotate(-55deg);transform-origin:center;height:42px;padding-top:19px}.online-flow-heat-row{margin:4px 0}.online-flow-heat-row>b{position:sticky;left:0;z-index:1;display:flex;align-items:center;gap:6px;background:#fff;padding:5px 6px;font-size:12px;color:#334155}.online-flow-heat-row>b>i{width:8px;height:8px;border-radius:999px}.online-flow-heat-cell{display:block;width:100%;height:27px;padding:0;border:0;border-radius:4px;background:var(--activity-color,#2563eb);opacity:var(--activity-opacity,.04);transition:opacity .14s ease,transform .14s ease}.online-flow-heat-cell:not(.is-empty){cursor:pointer}.online-flow-heat-cell:not(.is-empty):hover,.online-flow-heat-cell:not(.is-empty):focus-visible{opacity:1!important;transform:scale(1.12);outline:2px solid rgba(15,23,42,.16);outline-offset:1px}.online-flow-heat-note{margin:7px 6px 2px;color:#64748b;font-size:11px;line-height:1.35}
.online-activity-insights{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:4px 0 14px}.online-activity-stat{padding:12px;border:1px solid #dbeafe;border-radius:14px;background:rgba(255,255,255,.86);min-width:0}.online-activity-stat span{display:block;color:#64748b;font-size:10px;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.online-activity-stat b{display:block;color:#0f172a;font-size:22px;line-height:1.1;margin:6px 0 3px;overflow:hidden;text-overflow:ellipsis}.online-activity-stat small{display:block;color:#64748b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-activity-stat.is-good{background:#f0fdf4;border-color:#bbf7d0}.online-activity-stat.is-good b{color:#047857}.online-activity-stat.is-watch{background:#fffbeb;border-color:#fde68a}.online-activity-stat.is-watch b{color:#b45309}.online-activity-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 8px}.online-activity-controls>span{color:#64748b;font-size:12px;font-weight:800;margin-right:2px}.online-activity-controls button{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbe3ef;border-radius:999px;background:#fff;color:#64748b;padding:6px 10px;font-size:12px;font-weight:800;cursor:pointer}.online-activity-controls button.active{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.online-activity-controls i{width:8px;height:8px;border-radius:999px;display:inline-block}.online-activity-controls .online-activity-reset{margin-left:auto}.online-activity-chart-wrap{position:relative;min-height:410px;border:1px solid #e0ebfa;border-radius:16px;background:rgba(255,255,255,.78);padding:8px;overflow:hidden}.online-activity-chart-wrap canvas{width:100%!important;display:block}.online-flow-guide{background:#f8fafc}.online-flow-guide-list{display:grid;gap:9px}.online-flow-guide-list div{border-left:3px solid #bfdbfe;padding:7px 0 7px 10px}.online-flow-guide-list b{display:block;color:#1e3a8a;font-size:13px}.online-flow-guide-list span{display:block;color:#64748b;font-size:12px;line-height:1.35;margin-top:2px}
@media(max-width:1200px){.online-flow-details{grid-template-columns:1fr}.online-activity-insights{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.online-activity-panel{min-height:470px}.online-activity-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.online-activity-chart-wrap{min-height:360px}.online-activity-controls .online-activity-reset{margin-left:0}}
.online-kpi{appearance:none;text-align:left;cursor:pointer;transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;}
.online-kpi:hover{border-color:#bfdbfe;box-shadow:0 12px 28px rgba(37,99,235,.10);transform:translateY(-1px);}
.online-kpi:focus-visible{outline:3px solid rgba(37,99,235,.22);outline-offset:2px;}
.online-summary-links{display:flex;flex-direction:column;gap:8px;margin-top:12px;}
.online-summary-links-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#64748b;}
.online-summary-link{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:9px 10px;background:#fff;}
.online-summary-link button{border:0;background:transparent;color:#2563eb;font-weight:800;cursor:pointer;padding:0;}
.online-summary-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;}
.online-summary-link a,.online-ticket footer a{color:#2563eb;font-weight:700;text-decoration:none;}
.online-summary-link a:hover,.online-ticket footer a:hover{text-decoration:underline;}
.online-kpi-modal{position:fixed;inset:0;z-index:10000;background:rgba(15,23,42,.42);display:flex;align-items:flex-start;justify-content:center;padding:64px 18px 24px;}
.online-kpi-modal-box{width:min(860px,100%);max-height:82vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(15,23,42,.28);border:1px solid rgba(226,232,240,.9);}
.online-kpi-modal-box header{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e5e7eb;position:sticky;top:0;background:#fff;z-index:1;}
.online-kpi-modal-box h3{margin:0;font-size:18px;}
.online-kpi-modal-box header button{border:0;background:#f1f5f9;border-radius:999px;width:32px;height:32px;font-size:22px;line-height:1;cursor:pointer;color:#475569;}
.online-kpi-modal-box .online-list{padding:16px;max-height:none;}
.online-ticket footer{gap:10px;flex-wrap:wrap;}
.online-zone-ai-signals{background:linear-gradient(180deg,#f7faff 0%,#fff 190px);border-color:#dbeafe}.online-ai-signals-grid{display:grid;grid-template-columns:1.15fr .9fr 1fr;gap:16px}.online-ai-signal-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.online-ai-signal{width:100%;appearance:none;text-align:left;border:1px solid #dbe5f1;border-radius:16px;padding:14px;background:#fff;cursor:pointer;font:inherit;color:#0f172a;transition:.18s ease}.online-ai-signal:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(15,23,42,.08);border-color:#93c5fd}.online-ai-signal span{display:block;font-size:12px;font-weight:850;letter-spacing:.03em;text-transform:uppercase;color:#475569}.online-ai-signal b{display:block;font-size:30px;line-height:1;margin:10px 0 7px}.online-ai-signal small{display:block;color:#64748b;line-height:1.35}.online-ai-signal.is-risk{background:#fff7f7;border-color:#fecaca}.online-ai-signal.is-risk b{color:#b91c1c}.online-ai-signal.is-negative{background:#fffaf0;border-color:#fde68a}.online-ai-signal.is-negative b{color:#b45309}.online-ai-signal.is-repeat{background:#f8faff;border-color:#bfdbfe}.online-ai-signal.is-repeat b{color:#1d4ed8}.online-ai-signal.is-quality{background:#faf5ff;border-color:#ddd6fe}.online-ai-signal.is-quality b{color:#6d28d9}@media(max-width:1100px){.online-ai-signals-grid{grid-template-columns:1fr}.online-ai-signal-stack{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.online-ai-signal-stack{grid-template-columns:1fr}}
@media (max-width:680px){.online-summary-link{grid-template-columns:1fr}.online-activity-panel{min-height:360px}.online-kpi-modal{padding-top:32px}}

/* Online dashboard: department filter, side-by-side activity and AI summary, drawer layering fix */
.online-live-row{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(340px,.85fr);gap:16px;align-items:stretch}
.online-live-row .online-activity-panel,.online-live-row .online-summary-panel{min-height:420px}
.online-live-row .online-activity-panel canvas{width:100%!important}
.online-summary-panel .online-summary{min-height:128px}
.online-department-filter{min-width:260px!important}.online-staff-controls{display:flex;align-items:end;justify-content:flex-end;gap:12px;flex-wrap:wrap}.online-staff-controls .form-group{margin:0}@media(max-width:680px){.online-staff-controls{width:100%;align-items:stretch;justify-content:stretch}.online-staff-controls .online-department-filter{width:100%}}
.online-department-picker{position:relative}
.online-department-picker>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:39px;padding:9px 12px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;font-weight:800;color:#334155}
.online-department-picker>summary::-webkit-details-marker{display:none}
.online-department-picker>summary:after{content:'▾';font-size:12px;color:#64748b}
.online-department-picker[open]>summary{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.online-department-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:80;width:min(420px,88vw);max-height:360px;overflow:auto;background:#fff;border:1px solid #dbeafe;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.18);padding:12px}
.online-department-actions{display:flex;gap:8px;margin-bottom:10px}
.online-department-list{display:grid;gap:6px}
.online-department-list label{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;align-items:center;padding:8px 9px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;font-weight:750;color:#334155;cursor:pointer}
.online-department-list label:hover{border-color:#bfdbfe;background:#f8fbff}
.online-department-list input{width:17px;height:17px;accent-color:#2563eb}
.online-department-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.online-ticket footer span{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-drawer{z-index:12050!important}.app-drawer-backdrop{z-index:12051!important}.app-drawer-panel{z-index:12052!important}
@media(max-width:1180px){.online-live-row{grid-template-columns:1fr}.online-live-row .online-activity-panel,.online-live-row .online-summary-panel{min-height:auto}.online-live-row .online-activity-panel{min-height:380px}.online-department-menu{left:0;right:auto}}

/* Online dashboard clickable drill-downs and drawer layering */
.online-problem{width:100%;text-align:left;cursor:pointer;font:inherit;color:inherit;appearance:none;-webkit-appearance:none;}
.online-problem:hover{border-color:#bfdbfe;background:#f8fbff;box-shadow:0 10px 22px rgba(15,23,42,.05);}
.online-click-row{width:100%;border-left:0;border-right:0;border-top:0;background:#fff;text-align:left;font:inherit;color:inherit;cursor:pointer;}
.online-click-row:hover{background:#f8fbff;}
#onlineActivityChart{cursor:crosshair;}
.platform-drawer-backdrop.open{z-index:10010;}
.platform-drawer.open{z-index:10020;}

/* Outgoing channel cleanup + report department filter */
.source-channel-clear-note {
  margin: 12px 0 14px;
  border-left: 4px solid rgba(234, 88, 12, .55);
}

/* HDE directory */
.hde-staff-table textarea{min-width:220px}.hde-staff-table input[type="text"],.hde-staff-table input:not([type]){width:68px}.hde-staff-table tr.is-muted{opacity:.48;background:#f8fafc}.hde-days{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.hde-days label{font-size:11px;white-space:nowrap}.hde-days input{width:auto!important;height:auto!important;margin-right:2px!important}
.hde-sync-progress{margin:12px 0 4px;padding:11px 12px;border:1px solid #bfdbfe;border-radius:14px;background:#f8fbff}.hde-sync-progress>div{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#1e3a8a}.hde-sync-progress i{display:block;height:8px;background:#dbeafe;border-radius:999px;overflow:hidden;margin-top:8px}.hde-sync-progress em{display:block;height:100%;width:0;background:linear-gradient(90deg,#2563eb,#14b8a6,#2563eb);background-size:200% 100%;border-radius:inherit;transition:width .55s ease;animation:hde-sync-shimmer 1.15s linear infinite}.hde-sync-progress.is-error{border-color:#fecaca;background:#fff7f7}.hde-sync-progress.is-error em{background:#dc2626;animation:none}@keyframes hde-sync-shimmer{to{background-position:-200% 0}}
.hde-directory-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.hde-directory-actions form{margin:0}
.hde-staff-save-result{margin-left:10px;font-size:12px}.hde-staff-save-result.is-success{color:#047857}.hde-staff-save-result.is-error{color:#b91c1c}
.online-staff-zone{background:linear-gradient(180deg,#f5f3ff,#fff)}.online-staff-list{display:block}.online-staff-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.online-staff-table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}.online-staff-table th{padding:0;border-bottom:1px solid #e2e8f0;background:#f8fafc;text-align:left}.online-staff-table th button{width:100%;border:0;background:transparent;padding:10px 12px;color:#475569;text-align:left;font:inherit;font-weight:700;cursor:pointer}.online-staff-table th button:hover{color:#4f46e5;background:#f1f5f9}.online-staff-table th i{font-style:normal;color:#6366f1}.online-staff-table td{padding:11px 12px;border-bottom:1px solid #eef2f7;vertical-align:middle;color:#334155}.online-staff-table tbody tr{cursor:pointer}.online-staff-table tbody tr:hover{background:#f5f3ff}.online-staff-table tbody tr.is-warn{background:#fffbeb}.online-staff-table tbody tr.is-late{background:#fff7f7}.online-staff-table td:first-child{min-width:190px}.online-staff-table td small{display:block;margin-top:2px;color:#64748b;font-size:11px}.online-staff-table td:last-child{min-width:105px}.online-staff-table td:last-child i{display:block;height:5px;background:#e2e8f0;border-radius:999px;margin-top:5px;overflow:hidden}.online-staff-table td:last-child em{display:block;height:100%;background:#6366f1}.online-staff-row{width:100%;text-align:left;font:inherit;cursor:pointer}@media(max-width:900px){.online-staff-table{min-width:690px}}
.online-tabs .section-tab{font:inherit;cursor:pointer}.online-tab-panel[hidden]{display:none!important}.online-tab-panel.is-active{display:block}.online-staff-zone{margin-top:0}
.hde-staff-filter{margin:14px 0;background:linear-gradient(135deg,#f8fbff,#fff)}.hde-staff-filter .compact-form-grid{align-items:end;grid-template-columns:minmax(260px,1fr) 180px 150px auto;gap:12px}.hde-staff-table{table-layout:fixed;border-collapse:separate;border-spacing:0 6px}.hde-staff-table th{background:#f1f5f9;white-space:nowrap;padding:11px}.hde-staff-table th a{color:#334155;text-decoration:none}.hde-staff-table th:nth-child(1){width:72px}.hde-staff-table th:nth-child(2),.hde-staff-table th:nth-child(3){width:135px}.hde-staff-table th:nth-child(4){width:190px}.hde-staff-table th:nth-child(5){width:105px}.hde-staff-table th:nth-child(6){width:250px}.hde-staff-table th:nth-child(8){width:105px}.hde-staff-table td{vertical-align:top;background:#fff;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;padding:10px}.hde-staff-table td:first-child{border-left:1px solid #e2e8f0;border-radius:12px 0 0 12px}.hde-staff-table td:last-child{border-right:1px solid #e2e8f0;border-radius:0 12px 12px 0}.hde-staff-table textarea{width:100%;box-sizing:border-box}.hde-staff-table input{box-sizing:border-box}.hde-staff-table tr:hover td{background:#f8fbff;border-color:#bfdbfe}.hde-staff-first{font-weight:650;color:#334155}@media(max-width:900px){.hde-staff-filter .compact-form-grid{grid-template-columns:1fr}}
/* HDE directories: cards keep all fields visible without horizontal scrolling. */
.hde-staff-table,.hde-staff-table tbody{display:block;width:100%;min-width:0!important}.hde-staff-table thead{display:none}.hde-staff-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hde-staff-table tbody tr{display:grid;grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:'id person action' 'id email action' 'status status status' 'schedule schedule schedule' 'duties duties duties';gap:8px 12px;align-content:start;padding:15px;border:1px solid #dbe3ef;border-radius:18px;background:#fff;text-align:left}.hde-staff-table tbody td{display:block!important;border:0!important;border-radius:0!important;background:transparent!important;padding:0!important;text-align:left!important;min-width:0}.hde-staff-table tbody td:nth-child(1){grid-area:id;color:#64748b;font-size:12px}.hde-staff-table tbody td:nth-child(2){grid-area:person;font-size:15px}.hde-staff-table tbody td:nth-child(3){display:none!important}.hde-staff-table tbody td:nth-child(4){grid-area:email;color:#64748b;overflow:hidden;text-overflow:ellipsis}.hde-staff-table tbody td:nth-child(5){grid-area:status;padding-top:8px!important;border-top:1px solid #eef2f7!important}.hde-staff-table tbody td:nth-child(6){grid-area:schedule}.hde-staff-table tbody td:nth-child(7){grid-area:duties}.hde-staff-table tbody td:nth-child(8){grid-area:action;align-self:start}.hde-staff-table tbody td:nth-child(5):before,.hde-staff-table tbody td:nth-child(6):before,.hde-staff-table tbody td:nth-child(7):before{display:block;margin-bottom:5px;color:#64748b;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.hde-staff-table tbody td:nth-child(5):before{content:'Статус'}.hde-staff-table tbody td:nth-child(6):before{content:'Рабочее время'}.hde-staff-table tbody td:nth-child(7):before{content:'Должностные обязанности'}.hde-staff-table tr.is-muted{background:#f8fafc}.hde-staff-table textarea{min-height:58px}.table-card:has(.hde-staff-table) .table-scroll{overflow:visible}.table-card:not(:has(.hde-staff-table)) .compact-table tbody tr{vertical-align:top}.table-card:not(:has(.hde-staff-table)) .compact-table textarea{width:100%;min-height:64px}.table-card:not(:has(.hde-staff-table)) .compact-table td{text-align:left!important}@media(max-width:1000px){.hde-staff-table tbody{grid-template-columns:1fr}}@media(max-width:620px){.hde-staff-table tbody tr{grid-template-columns:54px minmax(0,1fr);grid-template-areas:'id person' 'id email' 'status status' 'schedule schedule' 'duties duties' 'action action'}.hde-staff-table tbody td:nth-child(8){justify-self:start}}
.online-heatmap{overflow:auto}.online-heat-layout{display:grid;grid-template-columns:minmax(660px,1fr) 178px;gap:18px;align-items:start;min-width:856px}.online-heat-grid{min-width:660px}.online-heat-head,.online-heat-row{display:grid;grid-template-columns:150px repeat(24,20px);gap:3px;align-items:center;min-width:660px}.online-heat-head{font-size:10px;color:#64748b;margin-bottom:5px}.online-heat-row{border:0;background:transparent;padding:4px 0;text-align:left;cursor:pointer}.online-heat-row:hover{background:#f5f3ff}.online-heat-row b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-heat-row i{height:20px;border-radius:4px;background:#4f46e5}.online-heat-legend{margin-top:2px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;color:#475569;font-size:12px}.online-heat-legend b{display:block;margin-bottom:8px;color:#1e293b}.online-heat-legend span{display:flex;align-items:center;gap:7px;margin:6px 0}.online-heat-legend span i{width:16px;height:16px;border-radius:4px;background:#4f46e5}.online-heat-legend .heat-empty{opacity:.04}.online-heat-legend .heat-low{opacity:.32}.online-heat-legend .heat-medium{opacity:.62}.online-heat-legend .heat-high{opacity:1}.online-heat-legend small{display:block;margin-top:9px;padding-top:8px;border-top:1px solid #e2e8f0;color:#64748b;line-height:1.35}.online-staff-row{width:100%;text-align:left;font:inherit;cursor:pointer}.staff-detail-chart{height:150px;display:flex;align-items:end;gap:5px;padding:12px;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:12px}.staff-detail-chart div{height:100%;flex:1;display:flex;align-items:end;position:relative}.staff-detail-chart i{display:block;width:100%;min-height:2px;background:#4f46e5;border-radius:4px 4px 0 0}.staff-detail-chart span{position:absolute;bottom:-16px;font-size:9px;color:#64748b}
.hde-staff-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hde-staff-card{border:1px solid #dbe3ef;border-radius:20px;background:#fff;padding:16px}.hde-staff-card header,.hde-staff-card footer{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.hde-staff-card h3{margin:3px 0;font-size:17px}.hde-staff-card a{color:#2563eb;font-size:13px}.hde-id{font-size:11px;color:#64748b}.hde-card-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.hde-card-fields label{display:grid;gap:5px;font-size:12px;font-weight:750;color:#475569}.hde-card-fields fieldset,.hde-card-fields .wide{grid-column:1/-1;border:0;padding:0;margin:0}.hde-card-fields fieldset{display:flex;gap:7px;flex-wrap:wrap}.hde-card-fields legend{font-size:12px;font-weight:750;color:#475569;margin-bottom:5px}.hde-card-fields fieldset label{display:block;font-size:12px}.hde-card-fields textarea{width:100%;box-sizing:border-box}.hde-staff-card footer{align-items:center;border-top:1px solid #eef2f7;padding-top:12px}.hde-staff-card.is-muted{opacity:.55;background:#f8fafc}@media(max-width:900px){.hde-staff-cards{grid-template-columns:1fr}}
/* Override card grid: separate surname/name and reserve a column for save. */
.hde-staff-table tbody tr{grid-template-columns:64px minmax(110px,1fr) minmax(110px,1fr) auto!important;grid-template-areas:'id surname firstname action' 'id email email action' 'status status status status' 'schedule schedule schedule schedule' 'duties duties duties duties'!important}.hde-staff-table tbody td:nth-child(1){grid-area:id!important;overflow-wrap:anywhere}.hde-staff-table tbody td:nth-child(2){grid-area:surname!important}.hde-staff-table tbody td:nth-child(3){display:block!important;grid-area:firstname!important;font-size:15px;font-weight:650;color:#334155}.hde-staff-table tbody td:nth-child(4){grid-area:email!important}.hde-staff-table tbody td:nth-child(5){grid-area:status!important}.hde-staff-table tbody td:nth-child(6){grid-area:schedule!important}.hde-staff-table tbody td:nth-child(7){grid-area:duties!important}.hde-staff-table tbody td:nth-child(8){grid-area:action!important;justify-self:end}@media(max-width:620px){.hde-staff-table tbody tr{grid-template-columns:54px minmax(0,1fr)!important;grid-template-areas:'id surname' 'id firstname' 'email email' 'status status' 'schedule schedule' 'duties duties' 'action action'!important}.hde-staff-table tbody td:nth-child(8){justify-self:start}}
/* Employee competency: factual activity is deliberately visually separate from AI opinion. */
.employee-operational-card{border-color:#c7d2fe;background:linear-gradient(135deg,#fafaff,#fff)}.employee-responsibilities{margin:12px 0;padding:10px 12px;border-radius:10px;background:#f8fafc;color:#334155}.employee-heatmap{overflow:auto;padding:8px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.employee-heat-head,.employee-heat-row{display:grid;grid-template-columns:88px repeat(24,18px);gap:3px;align-items:center;min-width:550px}.employee-heat-head{margin-bottom:4px;color:#64748b;font-size:9px}.employee-heat-head i{text-align:center;font-style:normal}.employee-heat-row{padding:3px 0}.employee-heat-row b{font-size:11px;font-weight:650;color:#475569}.employee-heat-row i{display:block;height:17px;border-radius:3px;background:#4f46e5;opacity:var(--heat-opacity,.04)}.employee-heat-row i:hover{outline:2px solid #c4b5fd;outline-offset:1px}@media(max-width:620px){.employee-heat-head,.employee-heat-row{grid-template-columns:82px repeat(24,16px)}}
.employee-overview-heatmap .employee-heat-head,.employee-overview-heatmap .employee-overview-heat-row{grid-template-columns:150px repeat(24,18px)}.employee-overview-heat-row{color:inherit;text-decoration:none;border-radius:7px;cursor:pointer;transition:background .14s ease}.employee-overview-heat-row:hover{background:#eef2ff;color:inherit}.employee-overview-heat-row b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:620px){.employee-overview-heatmap .employee-heat-head,.employee-overview-heatmap .employee-overview-heat-row{grid-template-columns:128px repeat(24,16px)}}
.employee-schedule-summary{margin:10px 0}.employee-schedule-map{overflow:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.employee-schedule-head,.employee-schedule-row{display:grid;grid-template-columns:94px 104px 115px 115px 90px minmax(150px,1fr);gap:8px;align-items:center;min-width:700px;padding:8px 10px}.employee-schedule-head{font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;background:#f8fafc}.employee-schedule-row{border-top:1px solid #eef2f7;font-size:12px;color:#334155}.employee-schedule-row>span:last-child{font-size:11px;color:#64748b}.employee-schedule-row em{font-style:normal;font-size:10px;font-weight:750;color:#dc2626;white-space:nowrap}.employee-schedule-row.is-deviation{background:#fff7ed}.employee-schedule-row.is-no-activity{background:#f1f5f9;color:#64748b}.employee-schedule-row.has-gap>span:nth-child(5){color:#b45309;font-weight:750}@media(max-width:720px){.employee-schedule-map{font-size:11px}}
.audit-observation-summary{border-color:#cbd5e1;background:linear-gradient(135deg,#f8fafc,#fff)}.audit-observation-summary .metric-grid>div{min-height:88px}.audit-observation-summary .metric-grid small,.employee-card .metric-grid small{display:block;margin-top:4px;color:#64748b;font-size:11px;line-height:1.25}.audit-observation-summary .metric-grid .is-warn,.employee-card .metric-grid .is-warn{border-color:#fed7aa;background:#fff7ed}.audit-observation-summary .metric-grid .is-warn strong,.employee-card .metric-grid .is-warn strong{color:#c2410c}.audit-observation-summary .metric-grid .is-muted,.employee-card .metric-grid .is-muted{border-color:#cbd5e1;background:#f8fafc}.audit-observation-summary .metric-grid .is-muted strong,.employee-card .metric-grid .is-muted strong{color:#475569}
.audit-employee-heatmap{margin-top:6px}.audit-heatmap-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 8px;padding:7px 9px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}.audit-heatmap-toolbar>span{font-size:12px;font-weight:800;color:#475569}.audit-heatmap-toolbar .segmented-control{padding:2px;border-radius:10px}.audit-heatmap-toolbar .segmented-control button{padding:5px 9px;font-size:11px}.audit-heatmap-toolbar small{color:#64748b;font-size:11px}.employee-heatmap-15m{padding:7px}.employee-heat-head-15m,.employee-heat-row-15m{gap:2px;min-width:1160px}.employee-heat-head-15m{height:31px;margin-bottom:5px}.employee-heat-head-15m i{height:30px;font-size:8px;line-height:30px;color:transparent}.employee-heat-head-15m i.is-hour{color:#64748b;font-weight:800}.employee-heat-row-15m{padding:2px 0}.employee-heat-row-15m i{height:18px;border-radius:3px}.employee-heat-row-15m b{position:sticky;left:0;z-index:1;padding:4px 5px;background:#fff}.employee-heatmap-15m[hidden]{display:none!important}@media(max-width:620px){.audit-heatmap-toolbar{align-items:flex-start}.audit-heatmap-toolbar small{width:100%}.employee-heat-head-15m,.employee-heat-row-15m{min-width:1100px}}
.report-filter-card {
  margin: 14px 0 18px;
}
.report-filter-form {
  display: grid;
  gap: 14px;
}
.report-department-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  background: var(--surface, #fff);
  cursor: pointer;
  font-size: 13px;
}
.check-chip input { margin: 0; }
.check-chip span {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: var(--muted, #64748b);
  font-size: 12px;
}
.check-chip:has(input:checked) {
  border-color: rgba(37, 99, 235, .45);
  background: rgba(37, 99, 235, .07);
}

/* Usage/management refresh for live modules */
.usage-live-grid div { min-height: 88px; }
.usage-status-list { display: grid; gap: 12px; }
.usage-status-group { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.72); }
.usage-status-group > b { display: block; margin-bottom: 2px; }
.usage-status-group > span { display: block; margin-bottom: 10px; font-size: 12px; }
.usage-status-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.usage-kpi-card small { line-height: 1.35; }
@media (max-width: 900px) {
  .usage-status-group > div { gap: 6px; }
}


.source-integrity-card { border-left: 4px solid var(--border, #d8dee8); }
.source-simple-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:4px 0 16px}.source-simple-head h1{margin:0 0 7px;font-size:26px}.source-simple-head>div{min-width:0}@media(max-width:680px){.source-simple-head{align-items:flex-start;flex-direction:column}.source-simple-head .btn{width:100%}}
.home-main-kpis{margin-bottom:18px}.home-online-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;background:linear-gradient(135deg,#eff6ff,#ecfdf5);border-color:#bfdbfe}.home-online-card h2{margin:4px 0 6px;font-size:24px}.home-online-card p{margin:0}.home-online-card .eyebrow{color:#1d4ed8}@media(max-width:680px){.home-online-card{align-items:stretch;flex-direction:column}.home-online-card .btn{width:100%}}
.source-integrity-ok { border-left-color: #21a67a; }
.source-integrity-warn { border-left-color: #f59e0b; }
.source-integrity-danger { border-left-color: #dc2626; }
.source-integrity-issues { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; margin-top:12px; }
.source-integrity-issue { padding:10px 12px; border-radius:12px; border:1px solid var(--border,#e5e7eb); background:var(--card-muted,#f8fafc); }
.source-integrity-issue b { display:block; margin-bottom:4px; }
.source-integrity-issue span { color:var(--muted,#667085); font-size:13px; }
.source-integrity-issue.issue-danger { border-color:#fecaca; background:#fff1f2; }
.source-integrity-issue.issue-warning { border-color:#fde68a; background:#fffbeb; }

/* Compact queue of open tickets that have not been assigned to an employee. */
.online-unassigned-panel { margin: 18px 0; }
.online-unassigned-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.online-unassigned-ticket { padding: 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; background: var(--surface, #fff); }
.online-unassigned-ticket > div { display: grid; gap: 4px; }
.online-unassigned-ticket > div span { color: var(--muted, #667085); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-bot-badge { display: inline-flex; width: fit-content; padding: 2px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 800; }
.online-unassigned-ticket footer { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; margin-top: 10px; color: var(--muted, #667085); font-size: 12px; }
.online-unassigned-ticket footer a { color: var(--accent, #2563eb); }
@media (max-width: 1100px) { .online-unassigned-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .online-unassigned-list { grid-template-columns: 1fr; } }

/* Flow heatmap: keep the compact data view dense and usable on one screen. */
.online-activity-chart-wrap>[hidden]{display:none!important}
.online-activity-panel.is-heatmap{min-height:0}
.online-activity-chart-wrap.is-heatmap{min-height:0;padding:5px;overflow:auto}
.online-activity-chart-wrap.is-heatmap .online-activity-heatmap{padding:0}
.online-flow-heat-head,.online-flow-heat-row{gap:var(--online-heat-gap,3px)}
.online-flow-heat-head>i{height:29px;padding-top:12px;transform:none;font-size:9px;line-height:1;text-align:center;color:transparent}
.online-flow-heat-head>i.is-hour{color:#64748b;font-weight:800}
.online-flow-heat-row{margin:2px 0}
.online-flow-heat-cell{height:23px;border-radius:3px}
.online-activity-chart-wrap.is-heatmap .online-flow-heat-note{margin:6px 4px 1px}
@media(max-width:680px){.online-flow-heat-head>span,.online-flow-heat-row>b{position:sticky;left:0}.online-flow-heat-head>span{min-width:112px}.online-flow-heat-row>b{min-width:112px;font-size:11px}.online-activity-chart-wrap.is-heatmap{padding:4px}}

/* Global navigation: compact horizontal header instead of the former sidebar. */
.app-shell{display:block;min-height:100vh}.top-navigation{position:sticky;top:0;z-index:80;width:100%;height:58px;border-bottom:1px solid #dbe7e5;background:rgba(7,31,33,.96);box-shadow:0 5px 18px rgba(4,35,38,.12);backdrop-filter:blur(16px)}.top-navigation-inner{height:100%;max-width:1500px;margin:0 auto;padding:0 18px;display:flex;align-items:center;gap:16px;min-width:0}.top-brand{display:inline-flex;align-items:baseline;flex:0 0 auto;color:#f8fffe!important;font-size:20px;font-weight:950;letter-spacing:-.07em;text-decoration:none}.top-brand span{color:#32c7b7}.top-nav-links{display:flex;align-items:center;gap:3px;min-width:0;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.top-nav-links::-webkit-scrollbar{display:none}.top-nav-link{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:7px 10px;border-radius:10px;color:#b7d6d3;font-size:12px;font-weight:800;line-height:1.1;transition:background .15s ease,color .15s ease}.top-nav-link .icon{width:16px;height:16px}.top-nav-link:hover{background:rgba(35,183,171,.13);color:#fff}.top-nav-link.active{background:linear-gradient(135deg,rgba(34,166,167,.96),rgba(41,173,120,.92));color:#fff;box-shadow:0 5px 14px rgba(16,130,123,.28)}.top-nav-logout{flex:0 0 auto;margin-left:auto}.top-nav-logout button{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid rgba(255,255,255,.13);border-radius:10px;background:transparent;color:#d8eae8;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.top-nav-logout button:hover{background:rgba(255,255,255,.08);color:#fff}.top-nav-logout .icon{width:16px;height:16px}.app-main{margin-left:0!important;min-width:0}.wrap{margin:16px auto;padding:0 22px;max-width:1320px}.report-subnav{top:70px}@media(max-width:900px){.top-navigation{height:54px}.top-navigation-inner{padding:0 11px;gap:10px}.top-brand{font-size:18px}.top-nav-link{padding:7px 8px;font-size:11px}.top-nav-link .icon{display:none}.top-nav-logout span{display:none}.top-nav-logout button{padding:7px}.wrap{margin:12px auto;padding:0 12px}.report-subnav{top:64px}.section-tabs{top:64px}}

/* AI provenance: shown only where an AI model interprets text or clusters cases. */
.ai-mark{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-left:4px;width:1.2em;height:1.2em;border-radius:999px;background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;font-family:ui-sans-serif,system-ui,sans-serif;font-size:.56em;line-height:1;font-weight:900;letter-spacing:0;box-shadow:0 2px 7px rgba(79,70,229,.28);transform:translateY(-.08em);cursor:help}.online-zone-head>div>span .ai-mark{margin-left:3px;font-size:.74em}.online-zone-head h2 .ai-mark,.panel-title-row h2 .ai-mark{font-size:.5em}
.ai-analytics-mode-icon{display:inline-flex;align-items:center;justify-content:center;margin-left:5px;width:18px;height:18px;border-radius:50%;font-size:11px;vertical-align:middle}.ai-analytics-mode-icon.is-enabled{color:#fff;background:linear-gradient(135deg,#7c3aed,#2563eb);box-shadow:0 2px 7px rgba(79,70,229,.28)}.ai-analytics-mode-icon.is-disabled{color:#475569;background:#e2e8f0;filter:grayscale(1)}.ai-analytics-off .ai-mark{background:#94a3b8;filter:grayscale(1);box-shadow:none}.ai-analytics-switch-card{display:flex;align-items:center;justify-content:space-between;gap:24px;border-color:#c7d2fe;background:linear-gradient(135deg,#fafaff,#f8fbff)}.ai-analytics-switch-card.is-disabled{border-color:#cbd5e1;background:#f8fafc}.ai-analytics-switch-card h2{margin:4px 0 7px}.ai-analytics-switch-card p{max-width:760px;margin:0}.ai-analytics-switch-form{flex:0 0 auto}.switch-control{display:inline-flex;align-items:center;gap:10px;font-weight:850;cursor:pointer}.switch-control input{position:absolute;opacity:0}.switch-slider{position:relative;width:46px;height:26px;border-radius:999px;background:#94a3b8;transition:.18s}.switch-slider:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.24);transition:.18s}.switch-control input:checked+.switch-slider{background:#2563eb}.switch-control input:checked+.switch-slider:after{transform:translateX(20px)}.switch-control input:focus-visible+.switch-slider{outline:3px solid rgba(37,99,235,.28);outline-offset:2px}@media(max-width:700px){.ai-analytics-switch-card{align-items:flex-start;flex-direction:column}.ai-analytics-switch-form{width:100%}}
.ai-insight-box>b::after{content:"✦";display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-left:5px;width:1.25em;height:1.25em;border-radius:999px;background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;font-size:.62em;line-height:1;box-shadow:0 2px 7px rgba(79,70,229,.28)}
