/* ==================================================
   Pivlu Analytics — Analytics-specific visual widgets
   Used in feature page mockup previews (.feat-row-visual)
   and analytics-specific landing pages.

   All SHARED landing page layout classes (feat-hero, feat-row,
   section, pricing-*, faq-item, fp-*, etc.) are in pivlu.css.
   ================================================== */

/* ─── Mini stat rows (page overview mockup) ─── */
.mini-stat-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0; border-bottom: 1px solid var(--pv-border); }
.mini-stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.mini-stat-row .ms-bar { flex: 1; height: 6px; background: var(--pv-border); border-radius: 1rem; overflow: hidden; }
.mini-stat-row .ms-fill { height: 100%; border-radius: 1rem; background: var(--pv-primary); }
.mini-stat-row .ms-label { font-size: 0.8125rem; color: var(--pv-text-muted); min-width: 90px; }
.mini-stat-row .ms-val { font-size: 0.8125rem; font-weight: 600; color: var(--pv-text); min-width: 40px; text-align: right; }

/* ─── Live analytics mockup ─── */
.live-dot { width: 0.45rem; height: 0.45rem; background: #22c55e; border-radius: 50%; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.4} }
.live-items { display: flex; flex-direction: column; gap: 0.5rem; }
.live-item-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; background: var(--pv-primary-soft); border-radius: 0.375rem; font-size: 0.8125rem; }
.live-item-row .path { color: var(--pv-text-muted); font-family: 'Courier New', monospace; }
.live-item-row .count { font-weight: 700; color: var(--pv-text); }

/* ─── Date range tabs mockup ─── */
.date-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.date-tab { padding: 0.3rem 0.625rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 500; border: 1px solid var(--pv-border); color: var(--pv-text-muted); background: transparent; }
.date-tab.active { background: var(--pv-primary); color: #fff; border-color: var(--pv-primary); }

/* ─── Funnel visual mockup ─── */
.funnel-steps { display: flex; flex-direction: column; gap: 0.375rem; }
.funnel-bar-wrap { flex: 1; height: 2rem; background: var(--pv-border); border-radius: 0.375rem; overflow: hidden; position: relative; }
.funnel-bar-fill { height: 100%; border-radius: 0.375rem; background: linear-gradient(90deg, var(--pv-primary), var(--pv-accent)); display: flex; align-items: center; padding: 0 0.625rem; }
.funnel-bar-fill span { font-size: 0.75rem; font-weight: 600; color: #fff; white-space: nowrap; }
.funnel-step-label { font-size: 0.75rem; color: var(--pv-text-muted); min-width: 80px; text-align: right; }
.funnel-step-pct { font-size: 0.75rem; font-weight: 700; color: var(--pv-text); min-width: 36px; text-align: right; }

/* ─── UTM table mockup ─── */
.utm-table { width: 100%; font-size: 0.8rem; }
.utm-table thead th { color: var(--pv-text-muted); font-weight: 600; text-align: left; padding-bottom: 0.5rem; border-bottom: 1px solid var(--pv-border); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.utm-table tbody td { padding: 0.4rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); color: var(--pv-text); }
[data-theme="dark"] .utm-table tbody td { border-bottom-color: rgba(255,255,255,0.04); }
.utm-table tbody tr:last-child td { border-bottom: none; }
.utm-source-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.375rem; }

/* ─── Goals mockup ─── */
.goal-items { display: flex; flex-direction: column; gap: 0.5rem; }
.goal-item { display: flex; align-items: center; gap: 0.625rem; }
.goal-item .goal-name { font-size: 0.8125rem; color: var(--pv-text); flex: 1; }
.goal-item .goal-conv { font-size: 0.8125rem; font-weight: 700; color: var(--pv-primary); min-width: 40px; text-align: right; }
.goal-item .goal-bar { width: 80px; height: 6px; background: var(--pv-border); border-radius: 1rem; overflow: hidden; }
.goal-item .goal-bar-fill { height: 100%; border-radius: 1rem; background: var(--pv-primary); }

/* ─── Team visual mockup ─── */
.team-members { display: flex; flex-direction: column; gap: 0.625rem; }
.team-member { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem; background: var(--pv-primary-soft); border-radius: 0.25rem; }
.team-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.team-member .tm-name { font-size: 0.875rem; font-weight: 600; color: var(--pv-text); flex: 1; }
.team-member .tm-email { font-size: 0.75rem; color: var(--pv-text-muted); }
.role-badge { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 1rem; }
.role-admin { background: var(--pv-primary-soft); color: var(--pv-primary); }
.role-guest { background: rgba(0,0,0,0.05); color: var(--pv-text-muted); }
[data-theme="dark"] .role-guest { background: rgba(255,255,255,0.07); }

/* ─── Overview stats mockup ─── */
.overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.overview-stat { background: var(--pv-primary-soft); border: 1px solid var(--pv-primary-soft); border-radius: 0.625rem; padding: 1rem 1.125rem; }
.overview-stat .ov-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--pv-text-muted); margin-bottom: 0.375rem; }
.overview-stat .ov-val { font-family: 'Nunito', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--pv-text); line-height: 1; }
.overview-stat .ov-trend { font-size: 0.75rem; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; }
.ov-trend.up { color: #22c55e; }
.ov-trend.down { color: #ef4444; }
.ov-chart { display: flex; align-items: flex-end; gap: 3px; height: 40px; padding-top: 0.25rem; }
.ov-bar { flex: 1; background: var(--pv-primary-soft); border-radius: 2px 2px 0 0; }
.ov-bar.peak { background: var(--pv-primary); }

/* ─── Source table mockup ─── */
.source-table { width: 100%; font-size: 0.8125rem; border-collapse: collapse; }
.source-table thead th { color: var(--pv-text-muted); font-weight: 600; text-align: left; padding: 0 0 0.5rem; border-bottom: 1px solid var(--pv-border); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.source-table thead th:not(:first-child) { text-align: right; }
.source-table tbody td { padding: 0.45rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); color: var(--pv-text); vertical-align: middle; }
[data-theme="dark"] .source-table tbody td { border-bottom-color: rgba(255,255,255,0.04); }
.source-table tbody tr:last-child td { border-bottom: none; }
.source-table tbody td:not(:first-child) { text-align: right; color: var(--pv-text-muted); }
.source-table tbody td strong { color: var(--pv-text); }
.src-dot { display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; margin-right: 0.375rem; flex-shrink: 0; }

/* ─── Visitor detail visual mockup ─── */
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail-col h5 { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--pv-text-muted); margin-bottom: 0.625rem; }
.detail-bar-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.detail-bar-row:last-child { margin-bottom: 0; }
.detail-bar-label { font-size: 0.78rem; color: var(--pv-text); min-width: 90px; display: flex; align-items: center; gap: 0.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-bar-label .bi { font-size: 0.85rem; color: var(--pv-primary); flex-shrink: 0; }
.detail-bar-track { flex: 1; height: 5px; background: var(--pv-border); border-radius: 1rem; overflow: hidden; }
.detail-bar-fill { height: 100%; border-radius: 1rem; background: var(--pv-primary); }
.detail-bar-pct { font-size: 0.75rem; font-weight: 600; color: var(--pv-text-muted); min-width: 32px; text-align: right; }

/* ─── GA comparison table (open-source / alternatives pages) ─── */
.comparison-section { padding: 3.5rem 0; }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.75rem; overflow: hidden; }
.comparison-table th { padding: 1rem 1.25rem; text-align: left; font-size: 0.875rem; font-weight: 600; color: var(--pv-text-muted); background: var(--pv-primary-soft); border-bottom: 1px solid var(--pv-border); }
.comparison-table th:first-child { width: 40%; }
.comparison-table th.col-pa { color: var(--pv-primary); }
.comparison-table td { padding: 0.875rem 1.25rem; font-size: 0.9rem; color: var(--pv-text); border-bottom: 1px solid var(--pv-border); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: rgba(0,0,0,0.015); }
[data-theme="dark"] .comparison-table tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
.comparison-table .check { color: #22c55e; font-size: 1.1rem; }
.comparison-table .cross { color: #ef4444; font-size: 1.1rem; }
.comparison-table .neutral { color: var(--pv-text-muted); }
.comparison-table .feature-label { font-weight: 500; }

/* ─── Article layout (open-source page) ─── */
.article-section { max-width: 780px; margin: 0 auto; padding: 3rem 0; }
.article-card { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.75rem; padding: 2.5rem; }
.article-card h2 { font-family: 'Nunito', sans-serif; font-size: 1.625rem; font-weight: 700; color: var(--pv-text); margin-bottom: 1rem; }
.article-card p { color: var(--pv-text-muted); font-size: 0.9375rem; line-height: 1.75; margin-bottom: 1rem; }
.article-card p:last-child { margin-bottom: 0; }
.article-card .highlight-box { background: var(--pv-primary-soft); border-left: 3px solid var(--pv-primary); border-radius: 0 0.375rem 0.375rem 0; padding: 1rem 1.25rem; margin: 1.25rem 0; color: var(--pv-text); font-size: 0.9375rem; line-height: 1.7; }

/* ─── Open-source hero stats ─── */
.hero-stats { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.25rem; }
.hero-stat { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.625rem; padding: 0.875rem 1.25rem; text-align: center; min-width: 130px; }
.hero-stat .stat-value { font-family: 'Nunito', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--pv-primary); line-height: 1; }
.hero-stat .stat-label { font-size: 0.8rem; color: var(--pv-text-muted); margin-top: 0.25rem; }

/* ─── Script size comparison (open-source page) ─── */
.size-comparison { display: flex; flex-direction: column; gap: 0.875rem; max-width: 700px; margin: 0 auto; }
.size-bar-row { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.625rem; padding: 1rem 1.25rem; }
.size-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.size-bar-label { font-size: 0.9rem; font-weight: 600; color: var(--pv-text); display: flex; align-items: center; gap: 0.5rem; }
.size-bar-label .badge { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 1rem; }
.badge-us { background: var(--pv-primary-soft); color: var(--pv-primary); }
.badge-them { background: rgba(239,68,68,0.08); color: #ef4444; }
.size-bar-value { font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700; color: var(--pv-text); }
.size-bar-track { background: var(--pv-border); border-radius: 1rem; height: 8px; overflow: hidden; }
.size-bar-fill { height: 100%; border-radius: 1rem; transition: width 1s ease; }
.fill-pivlu { background: var(--pv-primary); }
.fill-plausible { background: #8b5cf6; }
.fill-fathom { background: #06b6d4; }
.fill-matomo { background: #f59e0b; }
.fill-ga { background: #ef4444; }

/* ─── Impact cards (2-col) ─── */
.impact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.impact-card { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.75rem; padding: 1.75rem; display: flex; gap: 1rem; align-items: flex-start; }
.impact-icon { width: 2.75rem; height: 2.75rem; background: var(--pv-primary-soft); border-radius: 0.25rem; display: flex; align-items: center; justify-content: center; color: var(--pv-primary); font-size: 1.25rem; flex-shrink: 0; }
.impact-card h3 { font-size: 1rem; font-weight: 600; color: var(--pv-text); margin-bottom: 0.375rem; }
.impact-card p { color: var(--pv-text-muted); font-size: 0.875rem; line-height: 1.6; }

/* ─── Step-by-step install guide ─── */
.steps { display: flex; flex-direction: column; gap: 0; max-width: 760px; margin: 0 auto; }
.step { display: flex; gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--pv-border); }
.step:last-child { border-bottom: none; }
.step-number { width: 2.5rem; height: 2.5rem; background: var(--pv-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700; flex-shrink: 0; margin-top: 0.125rem; }
.step-body h3 { font-size: 1.0625rem; font-weight: 600; color: var(--pv-text); margin-bottom: 0.5rem; }
.step-body p { color: var(--pv-text-muted); font-size: 0.9rem; line-height: 1.65; margin-bottom: 0.75rem; }
.step-body p:last-child { margin-bottom: 0; }
.code-block { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.25rem; padding: 1rem 1.25rem; font-family: 'Courier New', Courier, monospace; font-size: 0.8125rem; color: var(--pv-text); line-height: 1.6; overflow-x: auto; white-space: pre; }
.code-block .token-tag { color: var(--pv-primary); }
.code-block .token-attr { color: #06b6d4; }
.code-block .token-str { color: #22c55e; }

/* ─── Live stats highlight section ─── */
.live-section { padding: 3.5rem 0; }
.live-card { background: var(--pv-primary-soft); border: 1px solid var(--pv-primary-soft); border-radius: 1rem; padding: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.live-card-text h2 { font-family: 'Nunito', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--pv-text); margin-bottom: 0.75rem; }
.live-card-text p { color: var(--pv-text-muted); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 0.75rem; }
.live-card-text p:last-child { margin-bottom: 0; }
.live-card-visual { display: flex; flex-direction: column; gap: 0.75rem; }
.live-item { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.625rem; padding: 0.875rem 1.125rem; display: flex; align-items: center; gap: 0.75rem; }
.live-item-label { font-size: 0.875rem; color: var(--pv-text-muted); flex: 1; }
.live-item-value { font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700; color: var(--pv-text); }

/* ─── GDPR / compliance page ─── */
.compliance-strip { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.25rem; }
.compliance-badge { display: flex; align-items: center; gap: 0.5rem; background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.25rem; padding: 0.625rem 1.125rem; font-size: 0.875rem; font-weight: 600; color: var(--pv-text); }
.compliance-badge .bi { color: #22c55e; font-size: 1rem; }
.pillars-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.pillar-card { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.75rem; padding: 2rem; }
.pillar-card .pillar-num { font-family: 'Nunito', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--pv-primary-soft); line-height: 1; margin-bottom: 0.5rem; }
.pillar-card h3 { font-size: 1.125rem; font-weight: 700; color: var(--pv-text); margin-bottom: 0.625rem; }
.pillar-card p { color: var(--pv-text-muted); font-size: 0.9rem; line-height: 1.7; }
.pillar-card .check-list { list-style: none; padding: 0; margin-top: 0.875rem; display: flex; flex-direction: column; gap: 0.375rem; }
.pillar-card .check-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--pv-text-muted); }
.pillar-card .check-list li .bi { color: #22c55e; flex-shrink: 0; margin-top: 0.1rem; }
.why-not-ga { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 1rem; padding: 2.5rem; max-width: 860px; margin: 0 auto; }
.why-not-ga h2 { font-family: 'Nunito', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--pv-text); margin-bottom: 1rem; }
.why-not-ga .intro { color: var(--pv-text-muted); font-size: 0.9375rem; line-height: 1.75; margin-bottom: 1.5rem; }
.ga-problems { display: flex; flex-direction: column; gap: 0.875rem; }
.ga-problem { display: flex; gap: 1rem; align-items: flex-start; padding: 1.125rem; background: rgba(239,68,68,0.04); border: 1px solid rgba(239,68,68,0.12); border-radius: 0.625rem; }
.ga-problem-icon { width: 2.25rem; height: 2.25rem; background: rgba(239,68,68,0.08); border-radius: 0.375rem; display: flex; align-items: center; justify-content: center; color: #ef4444; font-size: 1rem; flex-shrink: 0; }
.ga-problem h4 { font-size: 0.9375rem; font-weight: 600; color: var(--pv-text); margin-bottom: 0.3rem; }
.ga-problem p { color: var(--pv-text-muted); font-size: 0.875rem; line-height: 1.6; margin: 0; }
.why-not-ga .highlight-box { background: var(--pv-primary-soft); border-left: 3px solid var(--pv-primary); border-radius: 0 0.375rem 0.375rem 0; padding: 1rem 1.25rem; margin-top: 1.5rem; color: var(--pv-text); font-size: 0.9375rem; line-height: 1.7; }
.reg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.reg-card { background: var(--pv-card-bg); border: 1px solid var(--pv-border); border-radius: 0.75rem; padding: 1.75rem; }
.reg-card .reg-label { display: inline-block; background: var(--pv-primary-soft); color: var(--pv-primary); font-size: 0.8125rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 1rem; margin-bottom: 0.875rem; letter-spacing: 0.03em; }
.reg-card h3 { font-size: 1rem; font-weight: 700; color: var(--pv-text); margin-bottom: 0.5rem; }
.reg-card p { color: var(--pv-text-muted); font-size: 0.875rem; line-height: 1.65; }

/* ─── Dashboard: Products switcher & account dropdowns ─── */
.pa-products-btn { background: none; border: none; color: var(--pa-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color 0.15s ease; font-size: 1.35rem; padding: 0; }
.pa-products-btn:hover { color: var(--pa-primary); }
.pa-products-dropdown { min-width: 280px; border: 1px solid var(--pa-border); border-radius: 12px; background: var(--pa-card-bg); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.pa-product-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; transition: background 0.15s; }
.pa-product-item:hover { background: var(--pa-hover-bg); }
.pa-product-item.active { background: var(--pa-hover-bg); }
.pa-product-item.active .pa-product-name { color: var(--pa-primary); font-weight: 600; }
.pa-product-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex-shrink: 0; }
.pa-product-name { display: block; font-size: 0.9rem; font-weight: 500; color: var(--pa-text); line-height: 1.3; }
.pa-product-desc { display: block; font-size: 0.75rem; color: var(--pa-text-muted); line-height: 1.3; margin-top: 1px; }
[data-theme="dark"] .pa-products-dropdown { box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.pa-avatar-btn { line-height: 1; }
.pa-avatar-btn img, .pa-avatar-btn span { transition: opacity 0.15s; }
.pa-avatar-btn:hover img, .pa-avatar-btn:hover span { opacity: 0.85; }
.pa-account-dropdown { min-width: 280px; padding: 0; border: 1px solid var(--pa-border); border-radius: 0.75rem; background: var(--pa-card-bg); box-shadow: 0 8px 24px rgba(0,0,0,0.12); overflow: hidden; }
.pa-account-header { display: flex; align-items: center; gap: 0.875rem; padding: 1.125rem 1rem; background: var(--pa-card-bg); }
.pa-account-dropdown .dropdown-divider { margin: 0; border-color: var(--pa-border); }
.pa-account-dropdown .dropdown-item { padding: 0.625rem 1rem; font-size: 1rem; color: var(--pa-text); display: flex; align-items: center; }
.pa-account-dropdown .dropdown-item:hover { background: var(--pa-hover-bg); color: var(--pa-primary); }
.pa-account-dropdown .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.06); color: var(--pa-danger); }
.pa-account-dropdown form .dropdown-item { width: 100%; text-align: left; border: none; background: none; cursor: pointer; }
[data-theme="dark"] .pa-account-dropdown { box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .live-card { grid-template-columns: 1fr; }
    .reg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .impact-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 0.75rem; }
    .pillars-grid { grid-template-columns: 1fr; }
    .reg-grid { grid-template-columns: 1fr; }
    .why-not-ga { padding: 1.5rem; }
}
