:root {
  --bg: #030303;
  --mainframe: #030303;
  --panel: rgba(24, 24, 27, 0.72);
  --panel-strong: rgba(9, 9, 11, 0.86);
  --panel-soft: rgba(226, 232, 240, 0.055);
  --text: #ffffff;
  --text-soft: #d8e2df;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.08);
  --line-cyan: rgba(52, 211, 153, 0.28);
  --cyan: #34d399;
  --cyan-soft: rgba(52, 211, 153, 0.12);
  --surface: #f8fafc;
  --good: #6ee7b7;
  --danger: #fca5a5;
  --black: #030303;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgba(52, 211, 153, 0.45) rgba(255, 255, 255, 0.05);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: "Geist", Arial, Helvetica, sans-serif;
  font-size: 17px;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.36);
  border: 2px solid rgba(3, 3, 3, 0.72);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(52, 211, 153, 0.56);
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.nexus-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(52, 211, 153, 0.08), transparent 28%),
    #030303;
}

.nexus-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
  mix-blend-mode: screen;
}

.nexus-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 22%, rgba(3, 3, 3, 0.36) 56%, rgba(3, 3, 3, 0.92) 100%),
    linear-gradient(180deg, rgba(3, 3, 3, 0.12), rgba(3, 3, 3, 0.7));
}

.nexus-grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
}

.login-view {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-view::before {
  display: none;
}

.login-panel {
  position: relative;
  width: min(460px, 100%);
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.22), rgba(255, 255, 255, 0.06)) border-box,
    rgba(9, 9, 11, 0.7) padding-box;
  border: 1px solid transparent;
  border-radius: 20px;
  backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 34px 90px rgba(0, 0, 0, 0.42);
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #052e22;
  background: linear-gradient(135deg, #d1fae5, #34d399);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700;
  flex: 0 0 auto;
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.08;
}

h2 {
  margin: 0;
  max-width: 900px;
  color: var(--text);
  font-size: clamp(40px, 3.6vw, 62px);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.muted {
  color: var(--text-soft);
  line-height: 1.7;
}

.assumption-line {
  width: fit-content;
  margin: 18px 0 0;
  padding: 10px 13px;
  color: var(--text-soft);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.35;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-form label,
.month-label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-cyan);
  background: rgba(2, 6, 23, 0.74);
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

select {
  min-width: 168px;
}

input::placeholder {
  color: rgba(203, 213, 225, 0.52);
}

input:focus,
select:focus {
  border-color: rgba(0, 240, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

input:disabled,
select:disabled {
  color: rgba(213, 222, 232, 0.58);
  border-color: rgba(0, 240, 255, 0.16);
  background: rgba(2, 6, 23, 0.42);
}

.login-form button,
.solid-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: #f8fafc;
  color: var(--black);
  padding: 11px 14px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.login-form button:hover,
.solid-button:hover {
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line-cyan);
  background: rgba(2, 6, 23, 0.46);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.ghost-button:hover {
  border-color: rgba(0, 240, 255, 0.82);
  background: rgba(0, 240, 255, 0.1);
  color: var(--text);
}

.error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.dashboard-view {
  position: relative;
  z-index: 1;
  width: min(100% - 28px, 1760px);
  max-width: none;
  min-height: calc(100dvh - 24px);
  margin: 12px auto;
  padding: clamp(20px, 2vw, 36px);
  overflow: hidden;
  background: rgba(3, 3, 3, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
}

.dashboard-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(52, 211, 153, 0.15), transparent 18rem),
    linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.04), transparent);
  transition: opacity 220ms ease;
}

.dashboard-view:hover::after {
  opacity: 1;
}

.topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 14px 14px 42px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand .mark {
  color: #052e22;
  background: linear-gradient(135deg, #d1fae5, #34d399);
  border: 1px solid var(--line-cyan);
}

.top-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 2.4vw, 46px);
  align-items: start;
}

.site-rail,
.state-panel,
.proof-card,
.plain-card,
.notice-card,
.call-table,
.metric,
.signal-strip,
.breakdown-card,
.raw-dialog {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(255, 255, 255, 0.055)) border-box,
    linear-gradient(180deg, rgba(24, 24, 27, 0.72), rgba(9, 9, 11, 0.68)) padding-box;
  border: 1px solid transparent;
  border-radius: 16px;
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-rail {
  padding: 20px;
  max-height: calc(100dvh - 168px);
  overflow: auto;
}

.rail-head {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(2, 6, 23, 0.48);
  color: var(--text-soft);
  padding: 8px 11px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: rgba(0, 240, 255, 0.82);
  background: rgba(0, 240, 255, 0.12);
  color: var(--text);
}

.search {
  width: 100%;
}

.site-list {
  display: grid;
  gap: 10px;
}

.site-button {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 7px;
  padding: 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid rgba(0, 240, 255, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-button:hover {
  transform: translateX(4px);
  border-color: rgba(0, 240, 255, 0.54);
  background: rgba(0, 240, 255, 0.07);
}

.site-button.active {
  border-color: rgba(0, 240, 255, 0.82);
  background: rgba(0, 240, 255, 0.12);
}

.site-button strong {
  font-size: 16px;
  font-weight: 700;
}

.site-button span {
  color: var(--muted);
  font-size: 13px;
}

.site-button .mini-metrics {
  display: flex;
  gap: 8px;
  color: var(--text-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
}

.site-button b {
  color: var(--cyan);
}

.empty-list {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(2, 6, 23, 0.48);
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
}

.report-shell {
  min-width: 0;
  padding-top: clamp(4px, 1.4vw, 24px);
}

.state-panel {
  padding: 22px;
}

.error-panel {
  color: var(--danger);
}

.report-hero {
  max-width: 920px;
  margin-bottom: 20px;
}

.report-hero h2 {
  margin-bottom: 12px;
}

.report-hero .muted {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.65;
}

.proof-card,
.plain-card,
.notice-card {
  padding: 22px;
}

.notice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(252, 165, 165, 0.12)) border-box,
    rgba(2, 6, 23, 0.78) padding-box;
}

.notice-card span {
  color: var(--text-soft);
  line-height: 1.45;
}

.proof-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.16);
  margin-bottom: 10px;
}

.proof-top span {
  color: var(--cyan);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 16px;
}

.proof-row,
.value-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  font-size: 16px;
}

.proof-row:first-of-type {
  border-top: 0;
}

.proof-row span,
.value-list span {
  color: var(--muted);
}

.proof-row strong,
.value-list strong {
  text-align: right;
  color: var(--text);
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  min-height: 162px;
  padding: 18px 16px;
  overflow: hidden;
}

.money-metric {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.28), rgba(255, 255, 255, 0.08)) border-box,
    linear-gradient(180deg, rgba(18, 44, 35, 0.82), rgba(9, 9, 11, 0.74)) padding-box;
}

.warning-metric {
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(255, 255, 255, 0.05)) border-box,
    linear-gradient(180deg, rgba(44, 34, 18, 0.82), rgba(9, 9, 11, 0.74)) padding-box;
}

.metric strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: clamp(34px, 3vw, 50px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.money-metric strong {
  font-size: clamp(30px, 2vw, 38px);
}

.metric span {
  display: block;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}

.metric small {
  display: block;
  margin-top: 12px;
  color: var(--cyan);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.warning-metric small {
  color: #fbbf24;
}

.performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 12px;
  align-items: start;
}

.performance-main,
.performance-side {
  min-width: 0;
}

.performance-side {
  display: grid;
  gap: 12px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

.signal-strip div {
  padding: 14px 16px;
  border-left: 1px solid rgba(52, 211, 153, 0.12);
}

.signal-strip div:first-child {
  border-left: 0;
}

.signal-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.signal-strip strong {
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
}

.breakdown-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.breakdown-card h3 {
  margin-bottom: 8px;
}

.breakdown-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.breakdown-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 12px;
}

.breakdown-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgba(52, 211, 153, 0.12);
}

.breakdown-list div:first-child {
  border-top: 0;
}

.breakdown-list span,
.breakdown-formula span {
  color: var(--muted);
  font-size: 14px;
}

.calls-panel {
  margin-top: 0;
}

.breakdown-list strong {
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.breakdown-list .breakdown-total {
  background: rgba(52, 211, 153, 0.09);
}

.breakdown-total strong {
  color: var(--cyan);
}

.breakdown-formula {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 12px;
}

.breakdown-formula strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: clamp(22px, 2vw, 34px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 16px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.call-table {
  overflow: hidden;
}

.call-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  font-size: 15px;
}

.call-row:last-child {
  border-bottom: 0;
}

.call-date,
.duration {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.call-main {
  color: var(--text);
  font-weight: 700;
}

.call-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.status {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(2, 6, 23, 0.48);
  color: var(--text-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.status.answered {
  border-color: rgba(110, 231, 216, 0.34);
  color: var(--good);
  background: rgba(110, 231, 216, 0.08);
}

.status.missed {
  border-color: rgba(252, 165, 165, 0.32);
  color: var(--danger);
  background: rgba(252, 165, 165, 0.08);
}

.call-action {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.call-action.answered {
  color: var(--good);
}

.call-action.missed {
  color: #fbbf24;
}

aside {
  display: grid;
  gap: 12px;
  align-content: start;
}

.plain-card h3 {
  margin-bottom: 10px;
}

.plain-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 16px;
}

.raw-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: 84dvh;
  color: var(--text);
  padding: 0;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.6);
}

.raw-dialog::backdrop {
  background: rgba(2, 6, 23, 0.76);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.14);
}

.dialog-head h2 {
  font-size: 24px;
}

.raw-table {
  overflow: auto;
  padding: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .layout,
  .performance-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .site-rail {
    max-height: none;
  }

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

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

@media (max-width: 680px) {
  .dashboard-view {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 14px;
  }

  .login-view::before {
    display: none;
  }

  .topbar,
  .top-controls,
  .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 8px 0 22px;
  }

  .site-rail {
    max-height: 560px;
    overflow: auto;
  }

  h2 {
    font-size: 34px;
  }

  .metric-grid,
  .signal-strip,
  .breakdown-card,
  .performance-side {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-left: 0;
    border-top: 1px solid rgba(52, 211, 153, 0.12);
  }

  .signal-strip div:first-child {
    border-top: 0;
  }

  .assumption-line {
    width: 100%;
    border-radius: 14px;
  }

  .call-row,
  .notice-card {
    grid-template-columns: 1fr;
  }

  .proof-row,
  .value-list div {
    grid-template-columns: 1fr;
  }

  .proof-row strong,
  .value-list strong {
    text-align: left;
  }

}
