:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(72, 116, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(41, 198, 149, 0.16), transparent 28%),
    linear-gradient(180deg, #0b1020 0%, #0c1226 45%, #090d18 100%);
  color: #e8edff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  padding: 32px 18px 48px;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  max-width: 1560px;
  margin: 0 auto;
}

.hero-card {
  border: 1px solid rgba(157, 177, 255, 0.18);
  background: rgba(11, 18, 38, 0.72);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.eyebrow,
.panel-kicker,
.metric-label {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8ea4ff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc {
  margin-top: 16px;
  max-width: 860px;
  color: #b8c3e8;
  font-size: 16px;
  line-height: 1.7;
}

.rule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.rule-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(90, 107, 160, 0.14);
  border: 1px solid rgba(160, 180, 255, 0.14);
  color: #d9e2ff;
  font-size: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(480px, 1.05fr);
  gap: 22px;
  margin-top: 22px;
}

.panel {
  border: 1px solid rgba(157, 177, 255, 0.18);
  background: rgba(11, 18, 38, 0.8);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.panel-header h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.primary-btn {
  border: none;
  border-radius: 18px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #6d8cff 0%, #8a5dff 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.field-group {
  display: grid;
  gap: 18px;
}

.field-group + .field-group {
  margin-top: 18px;
}

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

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

.field {
  display: block;
}

.label-text {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #c7d3f6;
}

input,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(153, 171, 230, 0.14);
  background: rgba(10, 15, 30, 0.68);
  color: #f6f8ff;
  padding: 16px 18px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: rgba(108, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.1);
}

.tip-box {
  margin-top: 22px;
  border-radius: 20px;
  border: 1px dashed rgba(120, 145, 226, 0.3);
  background: rgba(95, 113, 182, 0.1);
  padding: 16px 18px;
  color: #c2ccef;
  line-height: 1.7;
  font-size: 14px;
}

.status-badge {
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-badge.idle {
  color: #d7def5;
  background: rgba(101, 117, 163, 0.16);
  border-color: rgba(148, 168, 226, 0.15);
}

.status-badge.running {
  color: #fff4cd;
  background: rgba(235, 175, 0, 0.12);
  border-color: rgba(245, 197, 56, 0.22);
}

.status-badge.success {
  color: #cbffe5;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.status-badge.fail {
  color: #ffd5d5;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.22);
}

.hidden {
  display: none !important;
}

.error-box {
  margin-bottom: 20px;
  border-radius: 20px;
  border: 1px solid rgba(244, 63, 94, 0.22);
  background: rgba(244, 63, 94, 0.1);
  color: #ffd9d9;
  padding: 16px 18px;
  line-height: 1.7;
}

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

.metric-card {
  border-radius: 24px;
  border: 1px solid rgba(153, 171, 230, 0.14);
  background: rgba(8, 13, 27, 0.58);
  padding: 20px;
  min-height: 142px;
}

.metric-value {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-value.pass {
  color: #41e198;
}

.metric-value.reject {
  color: #ff6b7d;
}

.metric-desc {
  margin-top: 14px;
  color: #96a4c8;
  font-size: 13px;
  line-height: 1.6;
}

.result-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.empty-state,
.run-card {
  border-radius: 24px;
  border: 1px solid rgba(153, 171, 230, 0.14);
  background: rgba(8, 13, 27, 0.58);
  padding: 22px;
}

.empty-state h3 {
  font-size: 20px;
  line-height: 1.3;
}

.empty-state p {
  margin-top: 10px;
  color: #9fabcc;
  line-height: 1.7;
}

.run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.run-title {
  font-size: 18px;
  font-weight: 700;
}

.run-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(95, 113, 182, 0.1);
  border: 1px solid rgba(148, 168, 226, 0.14);
  font-size: 13px;
  color: #d6ddf4;
}

.tag.pass {
  color: #cbffe5;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

.tag.reject,
.tag.error {
  color: #ffd5d5;
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.2);
}

.answer-box {
  margin-top: 16px;
  border-radius: 20px;
  background: rgba(6, 10, 22, 0.72);
  padding: 18px;
  color: #e6ebff;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.answer-box mark {
  background: rgba(66, 225, 152, 0.24);
  color: #eafff4;
  border-radius: 6px;
  padding: 0 4px;
}

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

@media (max-width: 720px) {
  body {
    padding-inline: 12px;
  }

  .hero-card,
  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .panel-header {
    display: grid;
  }

  .primary-btn {
    width: 100%;
  }

  .two-col,
  .summary-grid,
  .inline-fields {
    grid-template-columns: 1fr;
  }
}
