/*!
 * Customer dashboard (dashboard.html) styles. Builds on styles.css tokens and app.css (.panel, .tabs,
 * .stat-grid, .badge, .timeline); the report cards come from styles.css (.report …) via audit.js.
 */

.db-tab:focus { outline: none; }
.db-loading { padding: 28px 4px; color: var(--muted); }
.db-note { margin: 6px 0 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.db-stack { display: grid; gap: 14px; align-content: start; }
.db-stack > .panel + .panel { margin-top: 0; }

/* pickers */
.db-pickers { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.db-pick { display: grid; gap: 4px; flex: 1 1 160px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.db-pick select { height: 42px; min-width: 0; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.db-pick select:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(225, 48, 108, .12); }
@media (min-width: 720px) { .db-pickers { width: auto; } .db-pick { flex: 0 1 auto; } .db-pick select { min-width: 200px; } }

/* welcome banner */
.db-banner { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 14px 14px 14px 16px; border-radius: var(--r); background: linear-gradient(120deg, #ECFDF5, #EFF6FF); border: 1px solid #D1FAE5; }
.db-banner > div { flex: 1; min-width: 0; }
.db-banner b { display: block; color: #065F46; }
.db-banner span { display: block; margin-top: 2px; font-size: .92rem; color: var(--ink-2); }
.db-banner-x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); color: var(--ink-2); cursor: pointer; }
.db-banner-x:hover { background: #fff; }

/* empty state */
.db-empty .empty { padding-bottom: 14px; }
.db-empty-actions { justify-content: center; padding-bottom: 10px; }

/* overview */
.db-head .panel-head { margin-bottom: 14px; }
.db-head-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.db-head-title h2 { overflow-wrap: anywhere; }
.db-head .stat-card b { font-size: 1.3rem; }
@media (min-width: 560px) { .db-head .stat-card b { font-size: 1.5rem; } }

.db-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 8px; }
.db-chart-y { display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0; font-size: .74rem; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; }
.db-chart-svg { width: 100%; height: 170px; display: block; }
.db-chart-x { grid-column: 2; display: flex; justify-content: space-between; font-size: .76rem; color: var(--faint); }
.db-chart-grid { stroke: #F3EEEC; stroke-width: 1; }
.db-chart-area { fill: url(#g-fill); }
.db-chart-line { fill: none; stroke: url(#g-stroke); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.db-progress + .db-progress { margin-top: 14px; }
.db-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.db-progress-top span { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-bar { height: 10px; margin-top: 8px; border-radius: 999px; background: #F5EEEC; overflow: hidden; }
.db-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad-cta); transition: width .6s var(--ease-out); }
.panel .db-progress ~ .db-note { margin-top: 12px; }

/* posts */
.db-posts { list-style: none; margin: 4px 0 0; padding: 0; }
.db-post { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #F3EEEC; }
.db-post:first-child { border-top: 0; }
.db-post-kind { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #F5F3F2; color: var(--muted); }
.db-post.is-covered .db-post-kind { background: #FFF1F2; color: var(--pink); }
.db-post-kind .ic { width: 18px; height: 18px; }
.db-post-main { min-width: 0; }
.db-post-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.db-post-top time { font-size: .85rem; color: var(--muted); }
.db-post-top .badge { height: 22px; }
.db-post-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: .86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.db-metric { display: inline-flex; align-items: center; gap: 5px; }
.db-metric .ic { width: 15px; height: 15px; color: var(--faint); }
.db-post-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px; font-size: .88rem; font-weight: 600; color: var(--blue-dark); }
.db-post-link .ic { width: 15px; height: 15px; }

/* delivery (monitoringx campaign) */
.db-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; font-size: .88rem; line-height: 1.5; color: #92400E; background: #FFFBEB; }
.db-post-metrics > span:only-child:not(.db-metric) { color: var(--muted); }

/* audits */
.db-pending { display: grid; justify-items: center; gap: 6px; padding: 28px 18px; text-align: center; }
.db-pending b { font-size: 1.05rem; color: var(--ink); }
.db-pending .db-note { max-width: 52ch; }
.db-spinner { width: 28px; height: 28px; margin-bottom: 6px; border-radius: 50%; border: 3px solid #FBE4E8; border-top-color: var(--pink); animation: db-spin 1s linear infinite; }
@keyframes db-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .db-spinner { animation: none; } }
.db-reports { padding-block: 12px; }
.db-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.db-chips::-webkit-scrollbar { display: none; }
.db-chip { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.db-chip[aria-pressed="true"] { border-color: transparent; color: #fff; background: var(--ink); }
.db-report { margin-top: 14px; }
.db-report .report { box-shadow: var(--sh-sm); }
.db-report .rep-head { flex-wrap: wrap; }
.db-report .rep-id { flex: 1 1 160px; }

/* package */
.db-pkg-title { margin-bottom: 14px; font-size: 1.15rem; letter-spacing: -.02em; }
.db-renew .db-note:first-child { margin-top: 0; }
.db-methods { margin-top: 14px; align-items: center; }
.db-auto { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; font-size: .86rem; color: #1E3A8A; background: #EFF6FF; }
.panel .btn-ghost.btn-sm { margin-top: 12px; }
.db-methods .btn-ghost.btn-sm { margin-top: 0; }

/* billing */
.db-invoices { list-style: none; margin: 0; padding: 0; }
.db-invoices li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid #F3EEEC; }
.db-invoices li:first-child { border-top: 0; padding-top: 2px; }
.db-inv-main { min-width: 0; }
.db-inv-main b { display: block; }
.db-inv-main span { display: block; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.db-inv-side { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }

/* settings */
.db-form-actions { margin-top: 16px; }
[data-password-form] .db-note { margin-top: -4px; }

/* audience quality (deep audits) */
.db-aq-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .db-aq-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.db-aq-col { display: grid; align-content: start; gap: 8px; min-width: 0; }
.db-aq-col small { font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); }
.db-aq-big { font-size: 1.4rem; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.db-aq-split .split i { width: var(--w); transition: none; }
.db-aq-split .split-legend { margin-top: 8px; gap: 4px 14px; }
.db-aq .db-aq-grid + .db-note { margin-top: 16px; }
