/* ===== Analytics activation banner (Call Logs) ===== */
.an-banner{display:flex;align-items:center;gap:14px;padding:0 24px;margin:0;border-radius:0;background:#EFF6FF;border:0;border-bottom:0 solid #DBEAFE;max-height:0;opacity:0;overflow:hidden;transition:max-height 0.42s cubic-bezier(0.22,0.61,0.36,1),padding 0.42s cubic-bezier(0.22,0.61,0.36,1),opacity 0.32s ease 0.05s,border-bottom-width 0.42s cubic-bezier(0.22,0.61,0.36,1);will-change:max-height,opacity;}
.an-banner.is-revealed{max-height:120px;padding:14px 24px;opacity:1;border-bottom-width:1px;}
.an-banner.is-hidden{display:none;}
.an-banner-icon{flex:0 0 44px;width:44px;height:44px;border-radius:10px;background:#fff;border:1px solid #DBEAFE;display:flex;align-items:center;justify-content:center;}
.an-banner-text{flex:1 1 auto;min-width:0;}
.an-banner-title{margin:0;font-size:14px;font-weight:600;color:#101828;line-height:1.35;}
.an-banner-sub{margin:2px 0 0;font-size:13px;color:#475467;line-height:1.4;}
.an-banner-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;}
.an-banner-cta{height:34px;padding:0 14px;border-radius:8px;background:var(--brand-blue);color:#fff;border:0;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;}
.an-banner-cta:hover{background:#003BB3;}
.an-banner-dismiss{height:34px;padding:0 12px;border-radius:8px;background:transparent;border:0;color:#475467;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;}
.an-banner-dismiss:hover{color:#101828;background:rgba(0,0,0,0.04);}

/* ===== Setup Analytics modal ===== */
.an-setup-backdrop{position:fixed;inset:0;background:rgba(16,24,40,0.45);z-index:1000;display:none;align-items:center;justify-content:center;animation:anFade 160ms ease;}
.an-setup-backdrop.is-open{display:flex;}
@keyframes anFade{from{opacity:0;}to{opacity:1;}}
@keyframes anPop{from{opacity:0;transform:translateY(8px) scale(0.98);}to{opacity:1;transform:none;}}
.an-setup{width:760px;max-width:calc(100vw - 32px);max-height:calc(100vh - 64px);background:#fff;border-radius:16px;box-shadow:0 24px 56px rgba(16,24,40,0.24);display:flex;flex-direction:column;overflow:hidden;animation:anPop 200ms cubic-bezier(0.4,0,0.2,1);font-family:inherit;}
.an-setup-head{padding:28px 32px 20px;display:flex;align-items:flex-start;gap:16px;position:relative;}
.an-setup-head.center{text-align:center;flex-direction:column;align-items:center;padding-bottom:24px;}
.an-setup-head-text{flex:1 1 auto;min-width:0;}
.an-setup-head.center .an-setup-head-text{width:100%;max-width:560px;}
.an-setup-eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--brand-blue);background:var(--brand-blue-soft);padding:5px 12px;border-radius:999px;margin-bottom:8px;text-transform:uppercase;letter-spacing:0.04em;}
.an-setup-title{margin:0;font-size:18px;font-weight:600;color:#101828;letter-spacing:-0.01em;}
.an-setup-head.center .an-setup-title{font-size:26px;font-weight:700;letter-spacing:-0.02em;}
.an-setup-sub{margin:4px 0 0;font-size:13px;color:#667085;line-height:1.45;}
.an-setup-head.center .an-setup-sub{margin-top:10px;font-size:14px;line-height:1.55;color:#667085;}
.an-setup-eyebrow .dot{width:6px;height:6px;border-radius:999px;background:var(--brand-blue);}
.an-setup-close{position:absolute;top:20px;right:20px;flex:0 0 auto;width:32px;height:32px;border-radius:8px;border:0;background:transparent;color:#98A2B3;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.an-setup-close:hover{background:#F2F4F7;color:#101828;}
.an-setup-body{flex:1 1 auto;overflow-y:auto;padding:4px 32px 28px;}
.an-setup-foot{padding:18px 32px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;}
.an-step-dots{display:inline-flex;gap:6px;align-items:center;}
.an-step-dots .dot{width:22px;height:5px;border-radius:999px;background:#E4E7EC;transition:background 160ms,width 160ms;}
.an-step-dots .dot.active{background:var(--brand-blue);}
.an-setup-foot-skip{background:transparent;border:0;color:#101828;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;padding:8px 12px;}
.an-setup-foot-skip:hover{color:var(--brand-blue);}
.an-setup-foot-left{font-size:12px;color:#667085;}
.an-setup-foot-right{display:flex;gap:8px;align-items:center;}
.an-btn-primary{height:36px;padding:0 16px;border-radius:8px;background:var(--brand-blue);color:#fff;border:0;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:6px;}
.an-btn-primary:hover{background:#003BB3;}
.an-btn-primary:disabled{background:#D0D5DD;cursor:not-allowed;}
.an-btn-ghost{height:36px;padding:0 14px;border-radius:8px;background:transparent;border:1px solid var(--border);color:#344054;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;}
.an-btn-ghost:hover{background:#F9FAFB;}

/* Step 1: templates with previews */
.an-setup{width:980px;}
.an-tpl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.an-tpl-card{padding:0;border:1.5px solid var(--border);border-radius:14px;background:#fff;cursor:pointer;text-align:left;transition:border-color 120ms,box-shadow 120ms,transform 120ms;display:flex;flex-direction:column;overflow:hidden;font-family:inherit;}
.an-tpl-card:hover{border-color:#B5C9F4;transform:translateY(-2px);box-shadow:0 8px 20px -8px rgba(16,24,40,0.12);}
.an-tpl-card.selected{border-color:var(--brand-blue);box-shadow:0 0 0 3px rgba(0,76,230,0.10);}
.an-tpl-preview{aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;border-radius:12px 12px 0 0;}
.an-tpl-preview svg{width:100%;height:100%;display:block;}
.an-tpl-preview.sales{background:linear-gradient(180deg,#F4F1FF 0%,#E5DEFF 100%);}
.an-tpl-preview.support{background:linear-gradient(180deg,#EFF8FF 0%,#CFE3FF 100%);}
.an-tpl-preview.custom{background:linear-gradient(180deg,#FFF6E6 0%,#FFE0B0 100%);}
.an-tpl-pill{position:absolute;background:#fff;color:#4030B0;font-size:11px;font-weight:600;padding:4px 9px;border-radius:999px;box-shadow:0 2px 6px rgba(16,24,40,0.08);}
.an-tpl-pill.support{color:#0E5FD5;}
.an-tpl-custom-grid{display:flex;gap:10px;align-items:center;}
.an-tpl-custom-tile{width:42px;height:42px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#fff;box-shadow:0 2px 6px rgba(16,24,40,0.06);}
.an-tpl-custom-tile.dashed{background:rgba(255,255,255,0.45);box-shadow:none;border:1.5px dashed #E89F4D;color:#E89F4D;}
.an-tpl-custom-tile.dashed svg{width:18px;height:18px;}
.an-tpl-body{padding:18px 18px 16px;border-top:1px solid var(--border);background:#fff;border-radius:0 0 12px 12px;}
.an-tpl-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.an-tpl-icon{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:0 0 30px;}
.an-tpl-icon.sales{background:#E0EAFF;color:#004CE6;}
.an-tpl-icon.support{background:#E0EAFF;color:#004CE6;}
.an-tpl-icon.custom{background:#FFEFD9;color:#E89F4D;}
.an-tpl-name{margin:0;font-size:15px;font-weight:600;color:#101828;letter-spacing:-0.01em;}
.an-tpl-desc{margin:0;font-size:13px;color:#667085;line-height:1.5;min-height:60px;}
.an-tpl-meta{margin-top:14px;padding-top:12px;border-top:1px solid #F2F4F7;font-size:12px;color:#98A2B3;display:flex;align-items:center;gap:6px;}
.an-tpl-meta .sep{color:#D0D5DD;}

/* Step 2: metrics with viz */
.an-step-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.an-step-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#475467;background:#F2F4F7;padding:4px 10px;border-radius:999px;}
.an-step-count{font-size:12px;color:#667085;}
.an-step-count strong{color:#101828;font-weight:600;}
.an-grp{margin-bottom:18px;}
.an-grp-head{padding:0 0 8px;font-size:11px;font-weight:600;color:#667085;text-transform:uppercase;letter-spacing:0.04em;display:flex;align-items:center;gap:8px;}
.an-grp-count{margin-left:auto;font-size:11px;color:#98A2B3;text-transform:none;letter-spacing:0;}
.an-grp-body{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.an-met{position:relative;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer;transition:border-color 120ms,box-shadow 120ms;overflow:hidden;display:flex;flex-direction:column;min-height:120px;padding:12px 14px;}
.an-met:hover{border-color:#B5C9F4;}
.an-met.selected{border-color:var(--brand-blue);box-shadow:0 0 0 1px var(--brand-blue);}
.an-met-top{display:flex;align-items:flex-start;gap:8px;margin-bottom:6px;}
.an-met-name{flex:1;font-size:13px;font-weight:600;color:#101828;line-height:1.3;}
.an-met-cb{flex:0 0 16px;width:16px;height:16px;border-radius:4px;border:1.5px solid #D0D5DD;background:#fff;display:flex;align-items:center;justify-content:center;}
.an-met.selected .an-met-cb{background:var(--brand-blue);border-color:var(--brand-blue);color:#fff;}
.an-met-viz{flex:1;display:flex;flex-direction:column;justify-content:flex-end;min-height:50px;}
.an-met-kpi{display:flex;align-items:baseline;gap:6px;}
.an-met-kpi .v{font-size:20px;font-weight:600;color:#101828;letter-spacing:-0.01em;line-height:1;}
.an-met-kpi .d{font-size:11px;font-weight:500;color:#F04438;}
.an-met-kpi .d.up{color:#12B76A;}
.an-met-spark{height:30px;margin-top:6px;}
.an-met-bars{display:flex;gap:3px;align-items:flex-end;height:36px;margin-top:6px;}
.an-met-bars .b{flex:1;background:#CCDEFF;border-radius:2px 2px 0 0;}
.an-met span{font-size:11px;}

/* Activated analytics page (replaces #anWrap content) */
#anWrap.an-activated{padding:12px 18px 24px;display:flex;flex-direction:column;gap:10px;}
.ana-built-strip{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--brand-blue-soft);border:1px solid #DBEAFE;border-radius:8px;font-size:12px;color:#1E3A8A;}
.ana-built-strip .check{width:18px;height:18px;border-radius:999px;background:#12B76A;color:#fff;display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;}
.ana-built-strip .ana-tpl-name{font-weight:600;color:#101828;}
.ana-section{border:1px solid var(--border);border-radius:10px;background:#fff;overflow:hidden;}
.ana-section-head{padding:14px 18px 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #F2F4F7;}
.ana-section-title{font-size:14px;font-weight:600;color:#101828;}
.ana-section-meta{font-size:12px;color:#98A2B3;}
.ana-kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border-top:1px solid transparent;}
.ana-kpi{padding:16px 20px;border-right:1px solid #F2F4F7;display:flex;flex-direction:column;gap:6px;}
.ana-kpi:last-child{border-right:0;}
.ana-kpi-label{font-size:13px;color:#667085;display:flex;align-items:center;gap:4px;}
.ana-kpi-row{display:flex;align-items:baseline;gap:8px;}
.ana-kpi-val{font-size:24px;font-weight:700;color:#101828;letter-spacing:-0.01em;}
.ana-kpi-delta{font-size:12px;font-weight:500;color:#F04438;}
.ana-kpi-delta.up{color:#12B76A;}
.ana-kpi-link{font-size:12px;color:var(--brand-blue);text-decoration:none;font-weight:500;}
.ana-kpi-spark{margin-top:4px;height:32px;}
.ana-chart-body{padding:14px 18px 18px;}
.ana-empty{padding:48px 24px;text-align:center;color:#667085;font-size:13px;}
