:root {
  --bg: #050b16;
  --navy: #1c1e2b;
  --navy-2: #101827;
  --yellow: #fab117;
  --gold: #ba933f;
  --blue: #4667a5;
  --cyan: #1499df;
  --purple: #8d4ccf;
  --green: #18d66b;
  --muted: #8b8fa3;
  --soft: #f3f4f7;
  --white: #ffffff;
  --danger: #ff6b8a;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(70, 103, 165, 0.32), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(250, 177, 23, 0.12), transparent 32rem),
    linear-gradient(135deg, #030812 0%, #081425 48%, #050b16 100%);
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.site-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 24px;
}

.hero {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  max-width: 900px;
}

.brand {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.brand span {
  color: var(--yellow);
}

.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy,
.muted {
  color: rgba(255, 255, 255, 0.74);
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.card,
.form-card,
.inactive-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(28, 30, 43, 0.86), rgba(7, 14, 26, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-card {
  min-height: 0;
  overflow: hidden;
}

.loading-state,
.inactive-card {
  padding: 24px;
}

.step-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.58fr) minmax(0, 1.42fr);
  min-height: 420px;
}

.step-aside {
  padding: 22px;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at top, rgba(250, 177, 23, 0.14), transparent 24rem),
    rgba(255, 255, 255, 0.02);
}

.step-aside h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.progress-track {
  height: 7px;
  margin: 16px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #ffd76b);
  transition: width 0.25s ease;
}

.step-content {
  padding: 22px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  outline: none;
  padding: 10px 12px;
}

select option {
  color: #111827;
}

input:focus,
select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(250, 177, 23, 0.14);
}

input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.question-title {
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.options-list {
  display: grid;
  gap: 8px;
}

.option-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  min-height: 43px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  padding: 11px 12px;
  font-size: 0.9rem;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.option-button::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.option-button:hover,
.option-button.selected {
  border-color: var(--yellow);
  background: rgba(250, 177, 23, 0.12);
  transform: translateY(-1px);
}

.option-button.selected::after {
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(250, 177, 23, 0.16);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--yellow);
  color: #141414;
  box-shadow: 0 10px 30px rgba(250, 177, 23, 0.24);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.secondary-button {
  border: 1px solid rgba(250, 177, 23, 0.42);
  background: rgba(250, 177, 23, 0.09);
  color: var(--yellow);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--white);
}

.form-error {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

.result {
  display: grid;
  gap: 12px;
}

.result-hero {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 12px;
  align-items: start;
}

.result-title {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.result-title h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.result-title p,
.bottleneck-card p,
.cta-card p {
  margin-bottom: 8px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.result-title h2 span {
  color: var(--yellow);
}

.bottleneck-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(250, 177, 23, 0.5);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(250, 177, 23, 0.1), rgba(255, 255, 255, 0.03));
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(250, 177, 23, 0.58);
  border-radius: 16px;
  color: var(--yellow);
  font-size: 1.45rem;
  box-shadow: inset 0 0 26px rgba(250, 177, 23, 0.12);
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(280px, 1fr) minmax(190px, 0.72fr);
  gap: 12px;
  align-items: center;
}

.insight-column {
  display: grid;
  gap: 12px;
}

.mini-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.mini-card h3 {
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-card h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.mini-card p,
.mini-card li {
  font-size: 0.78rem;
  line-height: 1.35;
}

.mini-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.mini-card.green {
  border-color: rgba(24, 214, 107, 0.44);
}

.mini-card.green h3 {
  color: var(--green);
}

.mini-card.purple {
  border-color: rgba(141, 76, 207, 0.5);
}

.mini-card.purple h3 {
  color: #d28cff;
}

.mini-card.blue {
  border-color: rgba(20, 153, 223, 0.48);
}

.mini-card.blue h3 {
  color: #64c7ff;
}

.radar-panel {
  position: relative;
  min-height: 390px;
  padding-top: 32px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.radar-score {
  position: absolute;
  z-index: 2;
  width: 135px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(5, 11, 22, 0.86);
}

.radar-score strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.radar-score span {
  display: block;
  color: var(--muted);
}

.radar-score small {
  display: block;
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 800;
}

.score-capture {
  top: 0;
  left: 50%;
  color: var(--green);
  transform: translateX(-50%);
}

.score-conversion {
  bottom: 10px;
  left: -4px;
  color: #d28cff;
}

.score-positioning {
  right: -4px;
  bottom: 10px;
  color: #64c7ff;
}

.radar-svg {
  width: min(320px, 100%);
  filter: drop-shadow(0 20px 55px rgba(0, 0, 0, 0.32));
  transform: translateY(18px);
}

.cta-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(250, 177, 23, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.cta-copy {
  display: grid;
  gap: 4px;
}

.cta-copy h3,
.cta-copy p {
  margin-bottom: 0;
}

.instagram-link {
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.qr-link {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 10px;
  background: var(--white);
  padding: 6px;
}

.qr-code {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.rank-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(250, 177, 23, 0.14);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.admin-login {
  width: min(480px, 100%);
  margin: 10vh auto 0;
  padding: 30px;
}

.stack {
  display: grid;
  gap: 16px;
}

.admin-dashboard {
  display: grid;
  gap: 24px;
}

.admin-header,
.control-card,
.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-actions {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
}

.control-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: start;
  gap: 28px;
  border: 1px solid rgba(250, 177, 23, 0.35);
  border-radius: 22px;
  padding: 28px 30px;
  background: rgba(255, 255, 255, 0.04);
}

.control-card h2 {
  margin-bottom: 12px;
}

.control-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

.event-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.stats-grid,
.admin-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.admin-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-panels > .card {
  padding: 24px;
}

.admin-panels > .card h2,
.table-card h2 {
  margin-bottom: 16px;
}

.stat-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #ffe08a);
}

.table-card {
  padding: 22px;
}

.table-heading {
  align-items: end;
  margin-bottom: 16px;
}

.table-heading h2 {
  margin-bottom: 0;
}

.table-filters {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(240px, 320px);
  gap: 12px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td strong {
  display: block;
  color: var(--white);
}

@media (max-width: 940px) {
  .step-layout,
  .result-hero,
  .control-card,
  .stats-grid,
  .admin-panels {
    grid-template-columns: 1fr;
  }

  .diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .radar-panel {
    order: -1;
    grid-column: 1 / -1;
    min-height: 360px;
    padding-top: 28px;
  }

  .step-aside {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .score-conversion {
    left: 4px;
  }

  .score-positioning {
    right: 4px;
  }
}

@media (max-width: 640px) {
  .site-shell,
  .admin-shell {
    width: min(100% - 12px, 1180px);
    padding-top: 8px;
  }

  .hero {
    gap: 4px;
    margin-bottom: 8px;
  }

  .hero .brand {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.28rem;
    line-height: 1.08;
  }

  .hero-copy {
    display: none;
  }

  .step-aside,
  .step-content,
  .loading-state,
  .inactive-card {
    padding: 12px;
  }

  .step-layout {
    min-height: 0;
  }

  .step-aside h2 {
    margin-bottom: 0;
    font-size: 1.05rem;
  }

  .step-aside .muted {
    display: none;
  }

  .progress-track {
    margin: 8px 0 0;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  label {
    gap: 4px;
    font-size: 0.68rem;
  }

  input,
  select {
    min-height: 38px;
    padding: 8px 9px;
    font-size: 0.78rem;
  }

  .question-title {
    margin-bottom: 10px;
    font-size: 1.08rem;
  }

  .options-list {
    gap: 6px;
  }

  .option-button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .form-actions {
    flex-direction: row;
    margin-top: 10px;
  }

  .admin-header,
  .control-card,
  .table-heading,
  .cta-card {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions,
  .control-actions {
    flex-direction: column;
  }

  .event-add-row,
  .table-filters {
    grid-template-columns: 1fr;
  }

  .control-card,
  .admin-panels > .card,
  .table-card,
  .stat-card {
    padding: 16px;
  }

  .admin-actions .primary-button,
  .admin-actions .secondary-button,
  .admin-actions .ghost-button,
  .control-actions .primary-button,
  .control-actions .secondary-button,
  .control-actions .ghost-button {
    width: 100%;
  }

  .form-actions .primary-button,
  .form-actions .ghost-button {
    width: auto;
    flex: 1;
  }

  .result-title,
  .bottleneck-card,
  .mini-card,
  .cta-card {
    padding: 10px;
  }

  .result-title h2 {
    font-size: 1.45rem;
  }

  .bottleneck-card,
  .cta-card {
    grid-template-columns: 1fr;
  }

  .icon-badge {
    display: none;
  }

  .diagnostic-grid {
    gap: 8px;
  }

  .radar-panel {
    min-height: 310px;
    padding-top: 24px;
  }

  .radar-svg {
    width: min(250px, 100%);
    transform: translateY(12px);
  }

  .radar-score {
    width: 112px;
  }

  .radar-score strong {
    font-size: 1.12rem;
  }

  .radar-score small {
    font-size: 0.58rem;
  }

  .mini-card h3 {
    font-size: 0.66rem;
  }

  .mini-card p,
  .mini-card li {
    font-size: 0.68rem;
  }

  .qr-link {
    justify-self: start;
    width: 84px;
    height: 84px;
  }
}

@media (max-width: 380px) {
  .field-grid,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }
}
