:root {
  --bg: #071017;
  --bg-deep: #050b10;
  --surface: rgba(15, 28, 38, 0.84);
  --surface-solid: #0e1b25;
  --surface-soft: #122330;
  --line: rgba(151, 177, 194, 0.14);
  --line-strong: rgba(151, 177, 194, 0.24);
  --text: #eef5f7;
  --muted: #8fa5b1;
  --muted-light: #b7c7ce;
  --cyan: #38d9c4;
  --blue: #57a8ff;
  --green: #48d597;
  --violet: #b18cff;
  --amber: #f4be5b;
  --red: #ff7385;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  --radius-lg: 22px;
  --radius-md: 16px;
}

.access-shell { min-height: calc(100vh - 210px); display: grid; place-items: center; }
.access-panel { width: 100%; max-width: 560px; padding: 38px; }
.access-panel h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 16px; }
.access-admin { text-align: center; margin-top: 24px; font-size: .88rem; }
.access-admin a { color: #90a2b5; }
.filter-strip { padding: 22px; }
.admin-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 28px; }
.admin-heading h1 { margin: 0; }
.admin-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.admin-action { color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.admin-action:hover { color: inherit; transform: translateY(-3px); border-color: rgba(87,168,255,.4); }
.admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.validation-summary-valid { display: none; }
.import-progress { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
.import-progress .progress { height: 10px; background: rgba(255,255,255,.07); }
.import-progress .progress-bar { background: #57a8ff; transition: width .3s ease; }
.pagination-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pagination-list .btn-page { min-width: 34px; }
.pagination-list .btn-page.active { color: #07131d; background: #57a8ff; border-color: #57a8ff; }
.pagination-ellipsis { color: #90a2b5; padding: 0 3px; }
#recent-events { scroll-margin-top: 92px; }
@media (max-width: 767px) { .admin-action-grid, .admin-metrics { grid-template-columns: 1fr; } .access-panel { padding: 24px; } }

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(41, 151, 171, 0.14), transparent 35%),
    radial-gradient(circle at 90% 22%, rgba(107, 71, 184, 0.11), transparent 30%),
    linear-gradient(180deg, #08121a 0%, #070f16 55%, #050b10 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* Premium page entrance */
.dashboard-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 217, 196, 0.13), transparent 25%),
    radial-gradient(circle at 50% 50%, #0b1921 0%, var(--bg-deep) 58%);
  transition: visibility 0s linear 1.05s, opacity 0.65s ease 0.4s;
}

.dashboard-loader::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle, #000, transparent 68%);
  mask-image: radial-gradient(circle, #000, transparent 68%);
  animation: loader-grid 7s linear infinite;
}

.loader-orbit {
  position: relative;
  width: 104px;
  height: 104px;
}

.loader-core,
.loader-ring {
  position: absolute;
  border-radius: 50%;
}

.loader-core {
  inset: 39px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(56, 217, 196, 0.8), 0 0 54px rgba(56, 217, 196, 0.35);
  animation: loader-core 1.15s ease-in-out infinite;
}

.loader-ring {
  border: 1px solid rgba(56, 217, 196, 0.34);
}

.loader-ring-one {
  inset: 18px;
  border-top-color: var(--cyan);
  animation: loader-spin 1.4s linear infinite;
}

.loader-ring-two {
  inset: 0;
  border-color: rgba(87, 168, 255, 0.12);
  border-right-color: var(--blue);
  animation: loader-spin 2.2s linear infinite reverse;
}

.loader-copy {
  display: grid;
  justify-items: center;
  margin-top: 22px;
}

.loader-copy strong {
  font-size: 26px;
  letter-spacing: -0.045em;
}

.loader-copy span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.loader-progress {
  width: 220px;
  height: 2px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
}

.loader-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  transform-origin: left;
  animation: loader-progress 1.25s cubic-bezier(.22,.8,.25,1) both;
}

body.dashboard-ready .dashboard-loader {
  visibility: hidden;
  opacity: 0;
}

body.dashboard-booting .app-header,
body.dashboard-booting main > section,
body.dashboard-booting .app-footer {
  opacity: 0;
  transform: translateY(18px);
}

body.dashboard-ready .app-header,
body.dashboard-ready main > section,
body.dashboard-ready .app-footer {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.2,.8,.2,1);
}

body.dashboard-ready .app-header { transition-delay: 0.35s; }
body.dashboard-ready main > section:nth-child(1) { transition-delay: 0.45s; }
body.dashboard-ready main > section:nth-child(2) { transition-delay: 0.55s; }
body.dashboard-ready main > section:nth-child(3) { transition-delay: 0.65s; }
body.dashboard-ready main > section:nth-child(4) { transition-delay: 0.75s; }
body.dashboard-ready main > section:nth-child(5) { transition-delay: 0.84s; }
body.dashboard-ready main > section:nth-child(6) { transition-delay: 0.92s; }
body.dashboard-ready .app-footer { transition-delay: 1s; }

body.dashboard-ready .metric-card {
  animation: card-arrive 0.7s cubic-bezier(.2,.8,.2,1) both;
}

body.dashboard-ready .metric-card:nth-child(1) { animation-delay: 0.67s; }
body.dashboard-ready .metric-card:nth-child(2) { animation-delay: 0.74s; }
body.dashboard-ready .metric-card:nth-child(3) { animation-delay: 0.81s; }
body.dashboard-ready .metric-card:nth-child(4) { animation-delay: 0.88s; }
body.dashboard-ready .metric-card:nth-child(5) { animation-delay: 0.95s; }

body.dashboard-ready .brand-mark span {
  animation: signal-bars 1.15s ease-in-out 0.55s 2;
}

body.dashboard-ready .brand-mark span:nth-child(2) { animation-delay: 0.67s; }
body.dashboard-ready .brand-mark span:nth-child(3) { animation-delay: 0.79s; }

.ambient-one {
  animation: ambient-drift-one 13s ease-in-out infinite alternate;
}

.ambient-two {
  animation: ambient-drift-two 16s ease-in-out infinite alternate;
}

.metric-card,
.panel {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover,
.panel:hover {
  border-color: rgba(56, 217, 196, 0.22);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22), 0 0 0 1px rgba(56,217,196,0.035);
  transform: translateY(-3px);
}

.delivery-ring {
  transition: background 0.8s cubic-bezier(.2,.8,.2,1), transform 0.25s ease;
}

.delivery-ring:hover {
  transform: scale(1.035);
}

.trend-chart-reveal {
  transform-origin: left center;
  animation: chart-sweep 2.5s cubic-bezier(.18,.82,.22,1) both;
}

.domain-fill {
  transform-origin: left;
  animation: bar-grow 0.85s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-core {
  50% { transform: scale(0.72); opacity: 0.65; }
}

@keyframes loader-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes loader-grid {
  to { transform: translateY(52px); }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes signal-bars {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.38); filter: brightness(1.35); }
}

@keyframes ambient-drift-one {
  to { transform: translate(90px, 55px) scale(1.18); opacity: 0.2; }
}

@keyframes ambient-drift-two {
  to { transform: translate(-75px, -45px) scale(1.12); opacity: 0.19; }
}

@keyframes bar-grow {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes chart-sweep {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.2;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255,255,255,0.013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 80%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 80%);
}

button,
input,
select {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.14;
}

.ambient-one {
  top: 18%;
  left: -180px;
  width: 360px;
  height: 360px;
  background: var(--cyan);
}

.ambient-two {
  top: 42%;
  right: -160px;
  width: 330px;
  height: 330px;
  background: var(--violet);
}

.app-container {
  max-width: 1500px;
  padding-inline: clamp(18px, 3vw, 44px);
  margin-inline: auto;
}

.app-header {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 17, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.navbar {
  min-height: 78px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-lockup:hover {
  color: var(--text);
}

.brand-lockup > span:last-child {
  display: grid;
  line-height: 1;
}

.brand-lockup strong {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-lockup small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-mark {
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid rgba(56, 217, 196, 0.25);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(56, 217, 196, 0.16), rgba(87, 168, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 28px rgba(56, 217, 196, 0.08);
}

.brand-mark span {
  width: 4px;
  border-radius: 4px 4px 1px 1px;
  background: var(--cyan);
}

.brand-mark span:nth-child(1) { height: 7px; opacity: 0.55; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 10px; opacity: 0.75; }

.header-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.source-picker label:first-child {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-picker .form-select {
  width: min(34vw, 320px);
  min-width: 210px;
  height: 36px;
  padding-left: 13px;
  border-color: var(--line-strong);
  border-radius: 10px;
  color: var(--muted-light);
  background-color: rgba(18, 35, 48, 0.8);
  box-shadow: none;
}

.form-select,
.form-control {
  border-color: var(--line-strong);
  color: var(--text);
  background-color: rgba(14, 27, 37, 0.94);
  box-shadow: none !important;
}

.form-select:focus,
.form-control:focus {
  border-color: rgba(56, 217, 196, 0.55);
  background-color: rgba(14, 27, 37, 1);
}

.form-select option {
  color: var(--text);
  background: #0e1b25;
}

.btn-soft,
.btn-filter,
.btn-page {
  border: 1px solid var(--line-strong);
  color: var(--muted-light);
  background: rgba(18, 35, 48, 0.75);
}

.btn-soft:hover,
.btn-filter:hover,
.btn-page:hover:not(:disabled) {
  border-color: rgba(56, 217, 196, 0.45);
  color: var(--text);
  background: rgba(26, 49, 63, 0.9);
}

.btn-soft,
.btn-filter {
  height: 36px;
  padding-inline: 13px;
  border-radius: 10px;
  white-space: nowrap;
}

.btn-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 12px;
  background:
    linear-gradient(var(--muted-light), var(--muted-light)) 0 1px / 14px 1px no-repeat,
    linear-gradient(var(--muted-light), var(--muted-light)) 2px 6px / 10px 1px no-repeat,
    linear-gradient(var(--muted-light), var(--muted-light)) 5px 11px / 4px 1px no-repeat;
}

.active-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: 20px;
  color: #06110f;
  background: var(--cyan);
  font-size: 10px;
  font-weight: 800;
}

.report-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.panel-kicker,
.insight-label {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(56, 217, 196, 0.08), 0 0 16px rgba(56, 217, 196, 0.55);
}

.report-intro h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.intro-copy {
  margin-top: 9px;
  color: var(--muted);
  font-size: 16px;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(56, 217, 196, 0.18);
  border-radius: 999px;
  color: #b8eee7;
  background: rgba(56, 217, 196, 0.07);
  font-size: 11px;
  font-weight: 650;
}

.status-chip-muted {
  border-color: var(--line);
  color: var(--muted-light);
  background: rgba(255,255,255,0.025);
}

.status-chip-private {
  border-color: rgba(177, 140, 255, 0.16);
  color: #d2c1fa;
  background: rgba(177, 140, 255, 0.06);
}

.shield-dot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #080c10;
  background: var(--violet);
  font-size: 9px;
  font-weight: 900;
}

.insight-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 124px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(56, 217, 196, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, rgba(56, 217, 196, 0.11), rgba(87, 168, 255, 0.055) 50%, rgba(177, 140, 255, 0.04)),
    rgba(15, 28, 38, 0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow);
}

.insight-symbol {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(56, 217, 196, 0.25);
  border-radius: 16px;
  color: var(--cyan);
  background: rgba(56, 217, 196, 0.09);
  font-size: 24px;
}

.insight-banner h2 {
  margin: 0 0 5px;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.insight-banner p:not(.insight-label) {
  max-width: 860px;
  color: var(--muted-light);
}

.insight-score {
  display: grid;
  flex: 0 0 auto;
  min-width: 110px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.insight-score strong {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.insight-score span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025), 0 18px 55px rgba(0,0,0,0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.metric-card {
  min-height: 168px;
  padding: 19px 20px;
  border-radius: var(--radius-md);
  transition: transform 180ms ease, border-color 180ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.metric-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid currentColor;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0.9;
}

.metric-icon-blue { color: var(--blue); background: rgba(87, 168, 255, 0.08); }
.metric-icon-green { color: var(--green); background: rgba(72, 213, 151, 0.08); }
.metric-icon-violet { color: var(--violet); background: rgba(177, 140, 255, 0.08); }
.metric-icon-amber { color: var(--amber); background: rgba(244, 190, 91, 0.08); }
.metric-icon-red { color: var(--red); background: rgba(255, 115, 133, 0.08); }

.metric-help {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  cursor: help;
}

.metric-label {
  margin: 16px 0 4px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 620;
}

.metric-value {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.metric-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.metric-rate {
  color: var(--green);
  font-weight: 700;
}

.metric-rate-violet {
  color: var(--violet);
}

.panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.panel-kicker {
  margin: 0 0 5px;
}

.panel-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.panel-header p:not(.panel-kicker) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 14px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 600;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  display: inline-block;
  width: 13px;
  height: 2px;
  border-radius: 3px;
}

.legend-blue { background: var(--blue); }
.legend-green { background: var(--green); }
.legend-violet { background: var(--violet); }

.chart-wrap {
  position: relative;
  height: 286px;
}

#trendChart {
  width: 100%;
  height: 100%;
}

.empty-chart {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.delivery-visual {
  display: grid;
  grid-template-columns: 142px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 190px;
}

.delivery-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0deg, rgba(255,255,255,0.055) 0);
  box-shadow: 0 0 38px rgba(72, 213, 151, 0.08);
}

.delivery-ring::before {
  position: absolute;
  width: 108px;
  height: 108px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0e1c26;
  content: "";
}

.delivery-ring > div {
  z-index: 1;
  display: grid;
  text-align: center;
}

.delivery-ring strong {
  font-size: 27px;
  letter-spacing: -0.04em;
}

.delivery-ring span {
  color: var(--muted);
  font-size: 10px;
}

.delivery-breakdown {
  display: grid;
  gap: 13px;
}

.delivery-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.delivery-breakdown > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.delivery-breakdown span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-light);
  font-size: 11px;
}

.delivery-breakdown strong {
  font-size: 14px;
}

.breakdown-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-green { background: var(--green); box-shadow: 0 0 8px rgba(72, 213, 151, 0.5); }
.dot-red { background: var(--red); box-shadow: 0 0 8px rgba(255, 115, 133, 0.5); }
.dot-amber { background: var(--amber); box-shadow: 0 0 8px rgba(244, 190, 91, 0.5); }

.plain-note {
  padding: 12px 14px;
  border: 1px solid rgba(72, 213, 151, 0.12);
  border-radius: 11px;
  color: #b7d7cc;
  background: rgba(72, 213, 151, 0.05);
  font-size: 11px;
  line-height: 1.55;
}

.domain-list,
.subject-list {
  display: grid;
  gap: 15px;
}

.domain-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 2fr 44px;
  align-items: center;
  gap: 12px;
}

.domain-label {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 610;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

.domain-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 14px rgba(56, 217, 196, 0.16);
}

.domain-count {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.subject-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,0.018);
}

.subject-copy {
  min-width: 0;
}

.subject-title {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
}

.subject-stats strong {
  color: var(--text);
  font-weight: 700;
}

.subject-rate {
  display: grid;
  place-items: center;
  align-content: center;
  border-left: 1px solid var(--line);
  color: var(--violet);
  font-size: 17px;
  font-weight: 730;
  letter-spacing: -0.03em;
}

.subject-rate small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  font-size: 12px;
}

.activity-panel {
  padding: 0;
  overflow: hidden;
}

.activity-header {
  align-items: end;
  padding: 24px;
  margin: 0;
}

.activity-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(8, 18, 25, 0.65);
}

.search-box:focus-within {
  border-color: rgba(56, 217, 196, 0.45);
}

.search-box input {
  width: 180px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
}

.search-box input::placeholder {
  color: #6f8590;
}

.activity-table {
  --bs-table-color: var(--muted-light);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line);
  font-size: 11px;
}

.activity-table th {
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  border-bottom-width: 1px;
  color: #748c98;
  background: rgba(255,255,255,0.015);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-table td {
  padding: 14px 24px;
  vertical-align: middle;
}

.activity-table tbody tr {
  transition: background-color 150ms ease;
}

.activity-table tbody tr:hover {
  background: rgba(255,255,255,0.018);
}

.time-cell {
  color: var(--muted);
  white-space: nowrap;
}

.recipient-cell {
  max-width: 245px;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-cell {
  max-width: 310px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 82px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
}

.event-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 7px currentColor;
}

.event-processed { color: var(--blue); background: rgba(87, 168, 255, 0.06); }
.event-delivered { color: var(--green); background: rgba(72, 213, 151, 0.06); }
.event-open { color: var(--violet); background: rgba(177, 140, 255, 0.06); }
.event-deferred { color: var(--amber); background: rgba(244, 190, 91, 0.06); }
.event-bounce,
.event-drop { color: var(--red); background: rgba(255, 115, 133, 0.06); }
.event-other { color: var(--muted); background: rgba(143, 165, 177, 0.06); }

.detail-cell {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-table {
  padding: 56px !important;
  color: var(--muted) !important;
  text-align: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.btn-page {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
}

.app-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: #667c87;
  font-size: 10px;
}

.app-footer .app-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
}

.filter-canvas {
  --bs-offcanvas-width: min(430px, 94vw);
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 0 0, rgba(56, 217, 196, 0.08), transparent 35%),
    #0a151d;
}

.offcanvas-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.offcanvas-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.offcanvas-body {
  padding: 24px 28px;
}

.offcanvas-footer {
  display: flex;
  gap: 10px;
  padding: 18px 28px 26px;
  border-top: 1px solid var(--line);
}

.offcanvas-footer .btn {
  height: 44px;
  border-radius: 11px;
}

.btn-primary {
  border-color: var(--cyan);
  color: #05110f;
  background: var(--cyan);
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: #5ce9d5;
  color: #05110f;
  background: #5ce9d5;
}

.filter-explainer {
  padding: 14px 15px;
  border: 1px solid rgba(177, 140, 255, 0.15);
  border-radius: 12px;
  color: #bcb0d7;
  background: rgba(177, 140, 255, 0.055);
  font-size: 12px;
  line-height: 1.6;
}

.filter-group {
  margin-bottom: 26px;
}

.filter-group .form-label {
  margin-bottom: 8px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 650;
}

.filter-group .form-control,
.filter-group .form-select {
  min-height: 44px;
  border-radius: 11px;
  font-size: 12px;
}

.filter-hint {
  margin: 8px 0 0;
  color: #6e8590;
  font-size: 10px;
  line-height: 1.5;
}

.app-toast {
  border: 1px solid var(--line-strong);
  color: var(--muted-light);
  background: rgba(13, 27, 37, 0.96);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.toast-symbol {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #07110f;
  background: var(--cyan);
  font-weight: 900;
}

.toast-body strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 12px;
}

.toast-body div {
  font-size: 11px;
}

@media (max-width: 1199.98px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-card:nth-child(4),
  .metric-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 899.98px) {
  .navbar {
    align-items: start;
    padding-block: 14px;
  }

  .navbar > .app-container {
    align-items: start;
  }

  .header-actions {
    align-items: end;
  }

  .source-picker .form-select {
    width: 210px;
  }

  .report-intro {
    align-items: start;
    flex-direction: column;
  }

  .report-meta {
    justify-content: start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 699.98px) {
  .navbar > .app-container {
    display: block;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 13px;
  }

  .source-picker .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .source-picker .form-select {
    width: 100%;
    min-width: 0;
  }

  .btn-filter {
    justify-content: center;
    width: 100%;
  }

  .insight-banner {
    align-items: start;
    flex-wrap: wrap;
    padding: 21px;
  }

  .insight-symbol {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }

  .insight-score {
    width: 100%;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-card:last-child {
    grid-column: auto;
  }

  .panel {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
    gap: 12px;
  }

  .chart-legend {
    justify-content: start;
  }

  .chart-wrap {
    height: 240px;
  }

  .delivery-visual {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .delivery-breakdown {
    width: 100%;
  }

  .activity-header {
    align-items: stretch;
    padding: 20px;
  }

  .activity-tools {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .activity-table th,
  .activity-table td {
    padding-inline: 16px;
  }

  .table-footer {
    padding-inline: 16px;
  }

  .app-footer .app-container {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .dashboard-loader {
    display: none;
  }

  body.dashboard-booting .app-header,
  body.dashboard-booting main > section,
  body.dashboard-booting .app-footer {
    opacity: 1;
    transform: none;
  }
}
