:root {
  --ink: #e6eef8;
  --muted: #8da2bc;
  --panel: rgba(8, 17, 32, 0.84);
  --panel-strong: rgba(5, 12, 24, 0.92);
  --line: rgba(120, 168, 255, 0.18);
  --brand: #46e0c4;
  --brand-2: #1b8fff;
  --brand-3: #7ef2ff;
  --accent: #ffd166;
  --bg-1: #07111f;
  --bg-2: #0a1630;
  --danger-bg: rgba(127, 29, 29, 0.18);
  --danger-text: #ffb4c1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(70, 224, 196, 0.22) 0, transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(27, 143, 255, 0.22) 0, transparent 24%),
    radial-gradient(circle at 85% 82%, rgba(126, 242, 255, 0.12) 0, transparent 26%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 55%, #050a16 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(126, 242, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 242, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
  pointer-events: none;
  opacity: 0.35;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 8% 6% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(70, 224, 196, 0.18), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
}

.page {
  width: min(1180px, 92vw);
  margin: 2.2rem auto 2.6rem;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1rem, 2vw, 2rem);
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 242, 255, 0.55), transparent);
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(27, 143, 255, 0.18), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-head {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(120, 168, 255, 0.12);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.38rem 0.82rem;
  background: rgba(70, 224, 196, 0.12);
  color: var(--brand-3);
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-family: "Space Grotesk", sans-serif;
  border: 1px solid rgba(126, 242, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.build-meta {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: #90a3be;
  text-align: right;
}

.console-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(120, 168, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(70, 224, 196, 0.08), rgba(27, 143, 255, 0.06));
  color: #b8cbe0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.console-ribbon span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.signal-live {
  color: #d9fff7;
  font-weight: 700;
}

.signal-live i {
  width: 0.55rem;
  height: 0.55rem;
  display: inline-block;
  border-radius: 999px;
  background: #46e0c4;
  box-shadow: 0 0 0 0 rgba(70, 224, 196, 0.6);
  animation: pulse-signal 1.9s infinite;
}

h1 {
  margin: 0.75rem 0 0.35rem;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
  text-shadow: 0 0 24px rgba(126, 242, 255, 0.08);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 760px;
  line-height: 1.6;
}

.hero-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.brand-stamp,
.footer-brand {
  margin: 0;
  color: #c5d2e3;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.hero-meta-grid article {
  border: 1px solid rgba(120, 168, 255, 0.16);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(9, 18, 34, 0.68);
  position: relative;
  overflow: hidden;
}

.hero-meta-grid article::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(70, 224, 196, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-meta-grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: #7f93ae;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-meta-grid strong {
  color: #f4f8ff;
  font-size: 0.98rem;
}

.result-brandline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.9rem;
  color: #b3c4d9;
  font-size: 0.92rem;
}

.result-brandline span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.result-brandline span:first-child {
  color: var(--brand-3);
  font-weight: 700;
}

.hero-footnote {
  margin: 0.7rem 0 0;
  color: #8da2bc;
  font-size: 0.84rem;
}

.alert {
  margin: 0.95rem 0 1rem;
  padding: 0.72rem 0.88rem;
  border: 1px solid rgba(251, 113, 133, 0.32);
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger-text);
}

.form-grid {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-picker {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin: 0;
  padding: 0.9rem;
  background: rgba(7, 14, 28, 0.65);
}

.platform-picker legend {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #eaf6ff;
  letter-spacing: 0.04em;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid rgba(120, 168, 255, 0.14);
  border-radius: 16px;
  padding: 0.8rem 0.82rem;
  margin: 0.5rem 0 0;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 242, 255, 0.32);
  background: rgba(70, 224, 196, 0.04);
}

.choice-card:has(input:checked) {
  border-color: rgba(126, 242, 255, 0.42);
  background: linear-gradient(135deg, rgba(70, 224, 196, 0.08), rgba(27, 143, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(126, 242, 255, 0.08), 0 12px 28px rgba(2, 6, 23, 0.18);
}

.choice-card input {
  margin-top: 0.2rem;
}

.choice-card span {
  display: flex;
  flex-direction: column;
}

.choice-card strong {
  font-size: 0.95rem;
}

.choice-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #eaf2fd;
}

input[type="file"],
input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 0.72rem 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input[type="date"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: rgba(126, 242, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(70, 224, 196, 0.12);
}

button {
  grid-column: 1 / -1;
  border: none;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font-size: 1.02rem;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  color: #03111d;
  background: linear-gradient(120deg, var(--brand), var(--brand-3) 55%, #b7fbff);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(70, 224, 196, 0.24);
  filter: brightness(1.02);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.note-grid article {
  border: 1px solid rgba(120, 168, 255, 0.14);
  border-radius: 16px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
}

.note-grid article::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 0.8rem;
  width: 38px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
}

.note-grid h3 {
  margin: 0 0 0.4rem;
  padding-top: 0.45rem;
  font-size: 0.93rem;
}

.note-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0;
}

.btn {
  text-decoration: none;
  border-radius: 14px;
  padding: 0.7rem 0.92rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #03111d;
}

.btn-pdf {
  background: linear-gradient(125deg, #f97316, #fb7185);
  color: #fff;
}

.btn-ghost {
  color: #dbe7f5;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.chart-block {
  margin: 0.2rem 0 1rem;
}

.chart-toolbar {
  display: flex;
  gap: 0.5rem;
  margin: 0.3rem 0 0.75rem;
}

.range-btn {
  border: 1px solid rgba(120, 168, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: #c9d7e6;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.range-btn.active {
  border-color: rgba(70, 224, 196, 0.32);
  background: rgba(70, 224, 196, 0.14);
  color: var(--brand-3);
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
}

.chart-wrap {
  height: 380px;
  border: 1px solid rgba(120, 168, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    rgba(7, 14, 28, 0.82);
  padding: 0.85rem;
}

.chart-wrap-main {
  height: 400px;
}

.chart-wrap-roi {
  height: 400px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.3rem 0 1rem;
}

.kpi {
  border-radius: 16px;
  border: 1px solid rgba(120, 168, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  padding: 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  inset: auto -18% -36% auto;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(126, 242, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.kpi p {
  margin: 0;
  color: #81f5ff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.06rem;
  font-family: "Space Grotesk", sans-serif;
}

.table-block {
  margin-top: 1rem;
  padding-top: 0.15rem;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.meta {
  margin: 0.35rem 0 0.62rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(120, 168, 255, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 20%),
    rgba(7, 14, 28, 0.82);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 0.46rem 0.54rem;
  border-bottom: 1px solid rgba(120, 168, 255, 0.08);
  white-space: nowrap;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(70, 224, 196, 0.1);
  text-align: left;
}

.table tbody tr:nth-child(2n) {
  background: rgba(255, 255, 255, 0.02);
}

.pnl-profit {
  color: #dc2626;
  font-weight: 700;
}

.pnl-loss {
  color: #15803d;
  font-weight: 700;
}

.pnl-flat {
  color: #dbe7f5;
  font-weight: 600;
}

code {
  color: #8cf8ff;
  background: rgba(70, 224, 196, 0.08);
  padding: 0.08rem 0.3rem;
  border-radius: 8px;
}

.footer-brand {
  margin-top: 1.15rem;
  text-align: center;
  opacity: 0.92;
}

@keyframes pulse-signal {
  0% {
    box-shadow: 0 0 0 0 rgba(70, 224, 196, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(70, 224, 196, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(70, 224, 196, 0);
  }
}

@media (max-width: 880px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .console-ribbon {
    padding: 0.65rem 0.7rem;
  }

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

  .chart-wrap {
    height: 300px;
  }

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

  .chart-wrap-main,
  .chart-wrap-roi {
    height: 280px;
  }
}

@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  .panel {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    background: #ffffff !important;
  }

  .actions {
    display: none !important;
  }

  .chart-wrap {
    break-inside: avoid;
    background: #ffffff !important;
    border-color: #e5e7eb !important;
  }

  .table-block {
    break-inside: avoid;
  }

  .table-wrap,
  .platform-picker,
  .choice-card,
  .note-grid article,
  .kpi,
  .hero-meta-grid article {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
  }
}
