/* Cricket Analytics — self-contained, dependency-free charts and dashboards. */
:root{--an-ink:#14213d;--an-muted:#6b7b94;--an-blue:#2563eb;--an-border:#e2e9f3;--an-surface:#fff;--an-bg:#f5f8fc}
body{margin:0;background:var(--an-bg);color:var(--an-ink);font-family:'DM Sans',system-ui,sans-serif}
*{box-sizing:border-box}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}
[hidden]{display:none!important}
.an-topbar{height:76px;border-bottom:1px solid var(--an-border);background:#fff;display:flex;align-items:center;gap:16px;padding:0 max(26px,calc((100vw - 1540px)/2))}
.an-breadcrumb{color:#94a3b8;font-size:12px;font-weight:800}
.an-top-spacer{flex:1}
.an-account{color:#64748b;font-size:11px;font-weight:700;white-space:nowrap;max-width:190px;text-overflow:ellipsis;overflow:hidden}
.an-shell{max-width:1510px;padding:45px 28px 75px;margin:0 auto}
.an-hero{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:28px}
.an-hero h1{font:700 clamp(32px,4vw,51px)/1.12 'Space Grotesk',system-ui,sans-serif;letter-spacing:-2.2px;margin:16px 0 11px}
.an-hero p{font-size:13px;line-height:1.8;color:var(--an-muted);max-width:705px;margin:0}
.an-hero .button{flex-shrink:0}
.an-tabs{border-bottom:1px solid #d7e1ed;display:flex;align-items:stretch;gap:11px;margin-bottom:22px;min-height:72px}
.an-tab{appearance:none;background:transparent;display:flex;align-items:center;gap:13px;padding:13px 22px 16px;border:0;border-bottom:3px solid transparent;color:#64748b;transition:color .2s,border-color .2s}
.an-tab:hover{color:#2563eb}
.an-tab.active{color:#1d4ed8;border-bottom-color:#2563eb}
.an-tab-symbol{font-size:23px;width:27px}
.an-tab>span:last-child{font-weight:800;font-size:13px;display:grid;gap:5px;text-align:left;white-space:nowrap}
.an-tab small{font-size:10px;font-weight:600;color:#94a3b8}
.an-tab-spacer{flex:1}
.an-live-status{font-size:11px;color:#64748b;display:flex;align-items:center;gap:9px;align-self:center}
.an-online-dot{display:inline-block;border-radius:50%;background:#22c55e;width:8px;height:8px;box-shadow:0 0 0 4px #dcfce7}
.an-filter-panel{background:white;border:1px solid var(--an-border);border-radius:16px;padding:21px 23px 24px;box-shadow:0 9px 29px #1a3c7808}
.an-filter-head{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:17px}
.an-filter-head>div{display:grid;gap:6px}
.an-filter-head strong{font-size:13px}
.an-filter-head span{font-size:11px;color:#94a3b8}
.an-text-button{border:0;background:transparent;color:#2563eb;font-size:11px;font-weight:800;padding:5px;white-space:nowrap}
.an-text-button:hover{text-decoration:underline}
.an-date-presets{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.an-date-preset{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0;border-radius:9px;padding:10px 14px;font-size:11px;font-weight:800;transition:.18s}
.an-date-preset:hover{border-color:#93c5fd;color:#2563eb}
.an-date-preset.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd;box-shadow:inset 0 0 0 1px #bfdbfe}
.an-filters{display:flex;align-items:end;flex-wrap:wrap;gap:13px}
.an-filter-field,.an-custom-dates label{display:grid;gap:8px;min-width:150px;flex:1;font-size:10px;color:#64748b;font-weight:800}
.an-filters select,.an-custom-dates input,.an-search-label input{height:42px;width:100%;border-radius:9px;border:1px solid #d7e0ec;background:#fff;color:#1e293b;padding:0 12px;font-weight:600;font-size:11px}
.an-custom-dates{display:flex;gap:12px;flex-basis:100%}
.an-custom-dates label{max-width:230px}
.an-apply-filter{height:42px;padding:0 18px;white-space:nowrap}
.an-filter-feedback{margin:10px 0 0;color:#b91c1c;font-size:11px;line-height:1.6;min-height:0}
.an-filter-feedback:empty{display:none}
.an-section-heading{margin:33px 0 22px}
.an-section-heading h2{font:700 28px 'Space Grotesk',system-ui;letter-spacing:-1px;margin:8px 0}
.an-section-heading p{font-size:12px;line-height:1.8;color:#64748b;margin:0}
.an-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px;margin:0 0 19px}
.an-stat-card{min-width:0;background:white;border:1px solid var(--an-border);border-radius:14px;padding:19px 19px 17px;box-shadow:0 5px 16px #183e7306;animation:an-card-in .5s both}
.an-stat-card:nth-child(2){animation-delay:.05s}.an-stat-card:nth-child(3){animation-delay:.09s}.an-stat-card:nth-child(4){animation-delay:.13s}.an-stat-card:nth-child(5){animation-delay:.17s}
.an-stat-head{display:flex;align-items:center;justify-content:space-between;gap:6px}
.an-stat-title{font-size:10px;color:#64748b;font-weight:800;line-height:1.5}
.an-stat-icon{display:grid;place-items:center;border-radius:9px;background:#eff6ff;color:#2563eb;height:31px;width:31px;font-size:15px}
.an-stat-value{font:700 clamp(22px,2.7vw,33px)/1.2 'Space Grotesk',system-ui;letter-spacing:-1px;margin:12px 0 4px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.an-stat-helper{font-size:10px;color:#94a3b8;line-height:1.6}
.an-graphs{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(315px,.86fr);gap:17px;align-items:stretch}
.an-card{background:white;border:1px solid var(--an-border);border-radius:16px;box-shadow:0 7px 26px #183e7308;padding:23px;min-width:0}
.an-card-header{display:flex;justify-content:space-between;gap:14px;align-items:start;flex-wrap:wrap}
.an-card-header h3{font:700 20px 'Space Grotesk',system-ui;letter-spacing:-.65px;margin:8px 0 6px}
.an-card-header p{margin:0;color:#94a3b8;font-size:11px;line-height:1.5}
.an-view-switch{display:flex;gap:4px;border:1px solid #e5eaf2;border-radius:9px;background:#f8fafc;padding:4px}
.an-view-switch button{background:none;border:0;border-radius:6px;padding:8px 13px;font-size:10px;font-weight:800;color:#64748b}
.an-view-switch button.active{color:#2563eb;background:white;box-shadow:0 2px 6px #0f172a0a}
.an-metric-switch{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 6px}
.an-metric-button{font-size:10px;font-weight:800;border:1px solid #e2e8f0;background:white;color:#94a3b8;border-radius:30px;padding:8px 12px;transition:.18s}
.an-metric-button.active{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.an-chart-canvas{width:100%;position:relative;min-height:270px;margin-top:12px}
.an-chart-canvas svg{display:block;width:100%;height:auto;overflow:visible}
.an-chart-grid{stroke:#e9eef6;stroke-width:1}
.an-chart-label{font-family:'DM Sans',system-ui;font-size:11px;fill:#94a3b8}
.an-chart-tick{stroke:#dbe3ed;stroke-width:1}
.an-chart-line{fill:none;stroke:#2563eb;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 4px 8px rgba(37,99,235,.2))}
.an-chart-area{fill:url(#anLineFill)}
.an-chart-dot{fill:#fff;stroke:#2563eb;stroke-width:2.5;cursor:pointer}
.an-chart-dot:hover,.an-chart-dot:focus{stroke-width:5}
.an-chart-bar{fill:#2563eb;cursor:pointer;transform-box:fill-box;transform-origin:bottom;animation:an-bar-in .75s cubic-bezier(.21,.75,.22,1) both}
.an-chart-bar:hover,.an-chart-bar:focus{fill:#1d4ed8;opacity:.9}
.an-chart-hit{fill:transparent;cursor:pointer}
.an-chart-crosshair{stroke:#93c5fd;stroke-width:1;stroke-dasharray:4 4}
.an-svg-tooltip{pointer-events:none;position:absolute;z-index:3;background:#17243a;color:white;border-radius:10px;padding:10px 13px;font-size:11px;line-height:1.6;white-space:nowrap;box-shadow:0 8px 22px #0f172a2a}
.an-svg-tooltip strong{display:block;font-size:12px}
.an-day-detail{font-size:11px;background:#f8fbff;color:#64748b;border:1px solid #e8eef7;border-radius:10px;padding:11px 14px;min-height:37px;line-height:1.6;margin-top:2px}
.an-donut-layout{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:21px;padding:18px 0 8px}
.an-donut-layout svg{display:block;max-width:245px;width:100%;height:auto}
.an-donut-center-number{font:700 34px 'Space Grotesk',system-ui;fill:#0f172a;text-anchor:middle}
.an-donut-center-label{font:700 11px 'DM Sans',system-ui;fill:#94a3b8;text-anchor:middle}
.an-donut-ring{transform:rotate(-90deg);transform-origin:120px 120px}
.an-donut-segment{fill:none;stroke-width:25;stroke-linecap:butt;transition:stroke-dasharray .7s ease,stroke-dashoffset .7s ease}
.an-legend{display:grid;gap:10px;width:100%;max-width:280px}
.an-legend-row{display:flex;align-items:center;gap:10px}
.an-legend-bullet{flex:0 0 10px;width:10px;height:10px;border-radius:3px}
.an-legend-name{color:#64748b;font-size:11px;font-weight:700;flex:1}
.an-legend-number{font-size:11px;font-weight:800;color:#17243a}
.an-breakdown-note{font-size:11px;color:#94a3b8;line-height:1.7;margin:10px 0 0}
.an-leaderboard{margin-top:19px}
.an-leaderboard-header{margin-bottom:17px}
.an-search-label{font-size:10px;font-weight:800;color:#64748b;display:grid;gap:8px;min-width:230px}
.an-team-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}
.an-table-scroll{width:100%;overflow:auto;max-height:570px}
.an-team-table th{position:sticky;top:0;background:#f8fbff;color:#64748b;font-size:10px;font-weight:800;padding:14px 15px;letter-spacing:.15px;white-space:nowrap;border-bottom:1px solid #e2e8f0}
.an-team-table td{border-bottom:1px solid #eef2f7;padding:16px 15px;font-size:12px;color:#334155;vertical-align:middle;white-space:nowrap;font-variant-numeric:tabular-nums}
.an-team-table tbody tr:hover td{background:#fafcff}
.an-team-table th button{background:transparent;border:0;color:inherit;font:inherit;font-weight:inherit;cursor:pointer;padding:0;white-space:nowrap}
.an-team-table th button:hover{color:#2563eb}
.an-table-employee{display:flex;align-items:center;gap:10px}
.an-table-avatar{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:#eff6ff;color:#1d4ed8;font-weight:800}
.an-table-employee strong{font-size:11px;font-weight:800;color:#1e293b;white-space:normal;min-width:120px}
.an-table-num{font-weight:800;color:#1d4ed8!important}
.an-mini-track{width:98px;height:6px;border-radius:8px;background:#e9eef8;overflow:hidden}
.an-mini-fill{height:100%;border-radius:8px;background:#2563eb;transform-origin:left;animation:an-progress-in .85s cubic-bezier(.15,.8,.3,1) both}
.an-table-empty{padding:28px!important;text-align:center;color:#64748b!important;white-space:normal!important}
.an-report-footer{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-top:18px;color:#94a3b8;font-size:10px}
.an-disclaimer{font-size:11px;line-height:1.8;color:#94a3b8;margin:28px 0 0}
@keyframes an-card-in{from{transform:translateY(9px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes an-bar-in{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes an-progress-in{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes an-line-reveal{from{stroke-dashoffset:var(--an-line-length,2300)}to{stroke-dashoffset:0}}
.an-chart-line.animated{stroke-dasharray:var(--an-line-length,2300);animation:an-line-reveal 1.2s cubic-bezier(.22,.77,.3,1) both}
@media(max-width:1150px){.an-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.an-graphs{grid-template-columns:1fr}.an-donut-layout{flex-direction:row}.an-legend{max-width:350px}}
@media(max-width:760px){.an-shell{padding:26px 15px 60px}.an-topbar{padding:0 14px;gap:10px}.an-breadcrumb,.an-account{display:none}.an-hero{align-items:start;flex-direction:column}.an-hero h1{letter-spacing:-1.2px}.an-tabs{gap:0}.an-tab{padding:12px 8px}.an-tab-symbol{display:none}.an-tab>span:last-child{font-size:11px}.an-live-status{font-size:0}.an-live-status .an-online-dot{display:block}.an-filter-panel{padding:17px}.an-filters{display:grid;grid-template-columns:1fr 1fr}.an-filters .an-apply-filter{grid-column:1/-1}.an-custom-dates{grid-column:1/-1;flex-wrap:wrap}.an-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.an-card{padding:17px}.an-donut-layout{flex-direction:column}.an-chart-canvas{min-height:200px}.an-card-header h3{font-size:18px}}
@media(max-width:440px){.an-filter-field{min-width:0}.an-custom-dates label{min-width:0}.an-date-preset{flex:1;padding:10px 6px}.an-graph-toolbar{width:100%}.an-stats{grid-template-columns:1fr 1fr;gap:8px}.an-stat-card{padding:14px}.an-stat-value{font-size:25px}.an-tab small{display:none}}
@media(prefers-reduced-motion:reduce){.an-stat-card,.an-chart-bar,.an-mini-fill,.an-chart-line.animated{animation:none!important}.an-donut-segment{transition:none!important}}

/* The breakdown legend is an interactive, keyboard-accessible filter. */
button.an-legend-row{appearance:none;border:1px solid transparent;border-radius:8px;background:transparent;width:100%;text-align:left;cursor:pointer;padding:8px 9px;transition:background .16s,border-color .16s}
button.an-legend-row:hover{background:#eff6ff;border-color:#dbeafe}
button.an-legend-row:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}

/* Agent-only reporting header and compact colored statistic cubes. */
.an-agent-context{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;margin:0 0 24px;border:1px solid #dfe8f5;border-radius:13px;background:white}
.an-agent-context>div{display:flex;align-items:center;gap:12px}
.an-agent-context-icon{display:grid;place-items:center;width:37px;height:37px;border-radius:10px;background:var(--cricket-accent-soft,#eff6ff);color:var(--cricket-accent,#2563eb);font-size:20px}
.an-agent-context strong{display:block;font-size:13px;color:#17243b;font-weight:900}
.an-agent-context small{display:block;font-size:10px;color:#94a3b8;margin-top:4px}
.an-agent-board{margin-top:18px;padding:19px 20px}
.an-agent-board .an-card-header{align-items:center}
.an-agent-cube-list{display:grid;gap:8px;margin-top:12px}
.an-agent-cube-row{display:flex;gap:16px;align-items:center;justify-content:space-between;border:1px solid #edf1f7;background:#fcfdff;border-radius:12px;padding:12px 15px;min-width:0;animation:an-card-in .45s both}
.an-agent-cube-row:hover{border-color:#d4e5fa;box-shadow:0 3px 13px #172a4908}
.an-agent-cube-name{display:flex;gap:10px;align-items:center;min-width:165px;max-width:220px;flex:1}
.an-agent-cube-avatar{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;background:var(--cube-employee-accent,#2563eb);color:#fff;border-radius:9px;font-weight:900;font-size:14px}
.an-agent-cube-identity{min-width:0}
.an-agent-cube-identity strong{display:block;font-size:12px;color:#17233b;overflow-wrap:anywhere}
.an-agent-cube-identity span{display:block;font-size:10px;color:#94a3b8;margin-top:4px}
.an-agent-cubes{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:7px;flex:3}
.an-agent-stat-cube{width:80px;min-width:68px;height:61px;border-radius:10px;background:var(--cube-bg,#eff6ff);border:1px solid color-mix(in srgb,var(--cube-ink) 18%,white);color:var(--cube-ink,#2563eb);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;transition:transform .2s,box-shadow .2s}
.an-agent-stat-cube:hover{transform:translateY(-2px);box-shadow:0 6px 12px #172a4912}
.an-agent-stat-cube strong{font:800 19px/1.1 'Space Grotesk',system-ui;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.an-agent-stat-cube small{font-size:9px;letter-spacing:.1px;font-weight:900}
.an-cube-board-legend{display:none}
.an-agent-cube-empty{color:#718096;font-size:12px;text-align:center;padding:25px 12px}
:root[data-cricket-density="compact"] .an-agent-cube-row{padding:7px 9px;gap:9px}
:root[data-cricket-density="compact"] .an-agent-stat-cube{height:51px;min-width:61px;width:68px}
@media(min-width:1200px){.an-agent-cubes{gap:10px}.an-agent-stat-cube{width:90px}}
@media(max-width:780px){
.an-agent-cube-row{align-items:flex-start;flex-direction:column}
.an-agent-cube-name{max-width:100%;width:100%}
.an-agent-cubes{width:100%;justify-content:flex-start}
.an-agent-stat-cube{flex:1;max-width:92px}
}
@media(max-width:420px){
.an-agent-context{flex-wrap:wrap;padding:12px}
.an-agent-cube-row{padding:12px}
.an-agent-cubes{gap:5px}
.an-agent-stat-cube{height:53px;min-width:56px;width:auto;max-width:68px;padding:5px}
.an-agent-stat-cube strong{font-size:16px}
.an-agent-stat-cube small{font-size:8px}
}

/* v2 Agent analytics: one color-coded line per agent, with a compact legend. */
.an-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.an-series-legend{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 2px;max-height:90px;overflow:auto;padding:1px 0}
.an-series-item{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1px solid #e2e8f0;color:#334155;border-radius:18px;padding:7px 10px;font-size:10px;font-weight:800;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .18s,border-color .18s,background .18s}
.an-series-item:hover{background:#f8fafc;border-color:#bfdbfe}
.an-series-item.muted{opacity:.43;text-decoration:line-through}
.an-series-swatch{display:inline-block;flex:0 0 18px;height:5px;border-radius:10px;background:#2563eb}
.an-series-swatch.striped{background-image:none;border:1px dashed #6a8dad}
.an-series-empty{font-size:11px;color:#94a3b8;padding:4px 0}
.an-agent-chart-line{fill:none;pointer-events:none}
.an-agent-chart-dot{pointer-events:none}
.an-agent-line-group{animation:an-agent-line-draw .85s cubic-bezier(.2,.72,.27,1) both}
@keyframes an-agent-line-draw{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
.an-svg-tooltip{white-space:normal;max-width:215px;max-height:230px;overflow:auto;min-width:130px}
.an-series-tooltip-row{display:flex;align-items:center;gap:7px;padding:3px 0}
.an-series-tooltip-row span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.an-series-tooltip-row b{margin-left:auto;font-variant-numeric:tabular-nums}
.an-series-tooltip-dot{display:inline-block;flex:0 0 8px;width:8px;height:8px;border-radius:50%}
.an-day-detail{line-height:1.7}
.an-day-detail>strong{font-size:11px}
.an-day-agent-values{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:7px}
.an-day-agent{display:inline-flex;align-items:center;gap:5px;font-size:10px;white-space:nowrap}
.an-day-agent i{display:inline-block;width:8px;height:8px;border-radius:50%}
/* Agent name immediately beside just three small, consistently colored cubes. */
.an-agent-cube-list{gap:5px}
.an-agent-cube-row{
  display:flex!important;flex-direction:row!important;align-items:center!important;
  justify-content:flex-start!important;gap:12px!important;
  padding:8px 11px!important;min-height:59px;border-radius:9px
}
.an-agent-cube-name{
  display:flex;align-items:center;gap:8px;min-width:115px;
  width:160px;max-width:175px;flex:0 0 160px
}
.an-agent-cube-name strong{
  font-size:12px;line-height:1.4;font-weight:850;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0
}
.an-agent-name-dot{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#2563eb}
.an-agent-cubes{
  display:flex!important;flex-direction:row!important;align-items:center;
  flex:0 1 auto!important;justify-content:flex-start!important;
  width:auto!important;flex-wrap:nowrap!important;gap:6px!important;min-width:0
}
.an-agent-stat-cube{
  width:59px!important;min-width:59px!important;max-width:59px!important;
  height:46px!important;min-height:46px;flex:0 0 59px!important;
  padding:4px 3px!important;border-radius:8px;gap:2px;
  transform:none!important
}
.an-agent-stat-cube strong{font-size:16px!important;font-weight:850}
.an-agent-stat-cube small{font-size:8px!important;font-weight:850}
.an-agent-board{padding:18px 20px}
.an-agent-board .an-card-header{margin-bottom:11px}
@media(max-width:760px){
  .an-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .an-series-legend{max-height:115px}
  .an-agent-cube-row{gap:8px!important;padding:7px!important}
  .an-agent-cube-name{width:128px;flex:0 1 128px;min-width:84px}
  .an-agent-cubes{gap:5px!important}
}
@media(max-width:440px){
  .an-agent-board{padding:12px!important}
  .an-agent-cube-row{gap:5px!important;padding:6px!important}
  .an-agent-cube-name{width:auto;flex:1 1 75px;min-width:70px}
  .an-agent-cube-name strong{font-size:10px}
  .an-agent-stat-cube{width:48px!important;min-width:48px!important;max-width:48px!important;flex:0 0 48px!important;height:43px!important;min-height:43px!important}
  .an-agent-stat-cube strong{font-size:14px!important}
  .an-agent-stat-cube small{font-size:7px!important}
}
@media(prefers-reduced-motion:reduce){.an-agent-line-group{animation:none!important}}
