/* A distinct asset name avoids activeadmin_assets' own active_admin.css. */
.usage-dashboard {
  --usage-bg: #f6f8fb;
  --usage-surface: #fff;
  --usage-text: #172033;
  --usage-muted: #566579;
  --usage-border: #e1e7ef;
  --usage-hover: #f1f5f9;
  --usage-audience: #0284c7;
  --usage-planning: #6366f1;
  --usage-stint: #0f766e;
  color: var(--usage-text);
  background: var(--usage-bg);
  border: 1px solid var(--usage-border);
  border-radius: 16px;
  padding: clamp(18px, 2.5vw, 36px);
  max-width: 1560px;
  width: 100%;
  min-width: 0;
  margin: 0 auto 32px;
  font-size: 14px;
  line-height: 1.5;
}
.dark .usage-dashboard {
  --usage-bg: #10151d;
  --usage-surface: #19212d;
  --usage-text: #edf2f9;
  --usage-muted: #b0bdce;
  --usage-border: #303c4d;
  --usage-hover: #222d3c;
  --usage-audience: #38bdf8;
  --usage-planning: #818cf8;
  --usage-stint: #2dd4bf;
}
.usage-dashboard *, .usage-dashboard *::before, .usage-dashboard *::after { box-sizing: border-box; }
.usage-dashboard h2, .usage-dashboard h3, .usage-dashboard h4, .usage-dashboard p { margin: 0; }
.usage-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.usage-header h2 { font-size: clamp(23px, 2vw, 30px); line-height: 1.25; font-weight: 750; letter-spacing: -.6px; margin: 7px 0 10px; }
.usage-header p:not(.usage-eyebrow) { color: var(--usage-muted); font-size: 14px; }
.usage-dashboard .usage-eyebrow { color: var(--usage-muted); font-size: 11px; letter-spacing: 1.5px; font-weight: 750; }
.usage-filter { flex: 0 0 auto; }
.usage-filter label { display: block; margin-bottom: 7px; color: var(--usage-muted); font-size: 12px; font-weight: 600; }
.usage-filter > div { display: flex; gap: 8px; }
.usage-filter select, .usage-filter input[type=submit] { min-height: 42px; border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 600; }
.usage-filter select { min-width: 135px; padding-right: 32px; border: 1px solid var(--usage-border); background-color: var(--usage-surface); color: var(--usage-text); }
.usage-filter select option { background: var(--usage-surface); color: var(--usage-text); }
.usage-filter input[type=submit] { cursor: pointer; border: 1px solid #4f46e5; background: #4f46e5; color: #fff; }
.usage-filter input[type=submit]:hover { background: #4338ca; }
.usage-dashboard :focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.usage-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 20px 0; margin: 12px 0 24px; border-bottom: 1px solid var(--usage-border); }
.usage-nav a { border-radius: 6px; padding: 7px 12px; color: var(--usage-text); font-size: 13px; font-weight: 600; text-decoration: none; background: var(--usage-surface); border: 1px solid var(--usage-border); }
.usage-nav a:hover { background: var(--usage-hover); }
.usage-nav > span { margin-left: auto; font-size: 12px; color: var(--usage-muted); }
.usage-section { scroll-margin-top: 90px; margin-top: 34px; }
.usage-section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.usage-section-title h3 { font-weight: 700; font-size: 18px; letter-spacing: -.25px; margin-bottom: 5px; }
.usage-section-title p { color: var(--usage-muted); font-size: 13px; }
.usage-period-badge { flex-shrink: 0; padding: 5px 10px; font-size: 12px; border: 1px solid var(--usage-border); border-radius: 6px; color: var(--usage-muted); }
.usage-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.usage-kpi { background: var(--usage-surface); border: 1px solid var(--usage-border); border-radius: 12px; padding: 22px; min-width: 0; }
.usage-kpi h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--usage-muted); }
.usage-kpi-number { margin: 18px 0; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.usage-kpi-comparison { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 28px; margin-bottom: 12px; color: var(--usage-muted); font-size: 12px; }
.usage-kpi > p { color: var(--usage-muted); font-size: 12px; line-height: 1.6; }
.usage-badge { display: inline-flex; align-items: center; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 5px 8px; border-radius: 5px; }
.usage-badge--up { background: #dcfce7; color: #166534; }
.usage-badge--down { background: #ffe4e6; color: #9f1239; }
.usage-badge--neutral { background: #e8edf3; color: #475569; }
.dark .usage-badge--up { background: #153b32; color: #86efac; }
.dark .usage-badge--down { background: #442631; color: #fda4af; }
.dark .usage-badge--neutral { background: #2e3a4b; color: #d2dcea; }
.usage-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.usage-panel { min-width: 0; border: 1px solid var(--usage-border); background: var(--usage-surface); padding: 22px; border-radius: 12px; }
.usage-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.usage-panel-heading h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.usage-panel-heading p { color: var(--usage-muted); font-size: 12px; line-height: 1.6; }
.usage-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; font-size: 12px; color: var(--usage-muted); }
.usage-legend > span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.usage-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.usage-dot--audience { background: var(--usage-audience); }
.usage-dot--planning { background: var(--usage-planning); }
.usage-dot--stint { background: var(--usage-stint); }
.usage-panel--retention { margin-top: 18px; }
.usage-panel--retention .usage-legend { margin: 0; }
.usage-history { background: var(--usage-surface); border: 1px solid var(--usage-border); border-radius: 10px; margin-top: 10px; overflow: hidden; }
.usage-history summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 20px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 650; }
.usage-history summary::-webkit-details-marker { display: none; }
.usage-history summary:hover { background: var(--usage-hover); }
.usage-history summary > span:first-child { display: flex; align-items: center; gap: 10px; }
.usage-history-hint { display: flex; align-items: center; gap: 18px; color: var(--usage-muted); font-size: 12px; font-weight: 400; }
.usage-history[open] .usage-history-hint > span { transform: rotate(180deg); }
.usage-table-wrap { overflow-x: auto; }
.usage-dashboard table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.usage-dashboard th, .usage-dashboard td { padding: 13px 20px; text-align: right; white-space: nowrap; border-top: 1px solid var(--usage-border); }
.usage-dashboard th:first-child { text-align: left; }
.usage-dashboard thead th { background: var(--usage-bg); color: var(--usage-muted); font-weight: 600; font-size: 12px; }
.usage-dashboard tbody th { font-weight: 500; }
.usage-dashboard tbody tr:hover { background: var(--usage-hover); }
.usage-current { display: inline-block; margin-left: 10px; padding: 2px 6px; border-radius: 4px; background: var(--usage-hover); color: var(--usage-muted); font-size: 10px; }
.usage-methodology { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--usage-border); color: var(--usage-muted); font-size: 12px; line-height: 1.75; }
.usage-methodology strong { display: block; margin-bottom: 6px; color: var(--usage-text); font-size: 13px; }
@media (max-width: 1250px) { .usage-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 950px) { .usage-chart-grid { grid-template-columns: 1fr; } .usage-header { align-items: flex-start; flex-direction: column; } .usage-nav > span { width: 100%; margin: 8px 0 0; } }
@media (max-width: 550px) { .usage-kpis { grid-template-columns: 1fr; } .usage-dashboard { padding: 16px; border-radius: 10px; } .usage-panel, .usage-kpi { padding: 16px; } .usage-panel-heading { flex-direction: column; } .usage-section-title { align-items: flex-start; } .usage-dashboard th, .usage-dashboard td { padding: 12px; } }
