@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #eef5f5;
  --bg-2: #e4eeee;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(245, 250, 250, 0.84);

  --border: rgba(18, 59, 66, 0.12);
  --border-strong: rgba(18, 59, 66, 0.18);

  --text: #0b1b21;
  --muted: #4a6066;
  --soft: #6b8085;
  --deep: #0f2f38;

  --accent: #2c979d;
  --accent-2: #5fc1bf;
  --accent-3: #17636a;

  --success: #1f8b5c;
  --warn: #b07a16;

  --shadow-soft: 0 18px 44px rgba(11, 34, 39, 0.08);
  --shadow: 0 24px 72px rgba(11, 34, 39, 0.12);

  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;

  --font-display: "Manrope", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #06090b;
  --bg-2: #0b1013;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --surface-soft: rgba(255, 255, 255, 0.04);

  --border: rgba(232, 244, 246, 0.11);
  --border-strong: rgba(232, 244, 246, 0.18);

  --text: #eaf4f5;
  --muted: rgba(234, 244, 245, 0.74);
  --soft: rgba(234, 244, 245, 0.52);
  --deep: #f3fbfc;

  --accent: #dff4f6;
  --accent-2: #f3fbfc;
  --accent-3: #7ed9dd;

  --success: #79ddb0;
  --warn: #f0c46b;

  --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.4);
  --shadow: 0 30px 84px rgba(0, 0, 0, 0.56);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 18%, rgba(108, 212, 206, 0.14), transparent 0 28%),
    radial-gradient(circle at 88% 12%, rgba(133, 225, 220, 0.12), transparent 0 24%),
    linear-gradient(135deg, #f7fbfb 0%, #eef7f7 34%, #fdfefe 68%, #eef8f7 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% 10%, rgba(87, 196, 201, 0.06), transparent 0 16%),
    radial-gradient(circle at 84% 16%, rgba(87, 196, 201, 0.04), transparent 0 14%),
    radial-gradient(circle at 72% 78%, rgba(87, 196, 201, 0.03), transparent 0 12%),
    linear-gradient(180deg, #020405 0%, #06090b 42%, #020405 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 32px auto 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 22px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="dark"] .hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(87, 196, 201, 0.08), transparent 0 34%),
    linear-gradient(180deg, rgba(18, 22, 26, 0.9), rgba(9, 12, 15, 0.86));
  box-shadow:
    0 30px 84px rgba(0, 0, 0, 0.56),
    0 10px 24px rgba(87, 196, 201, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

html[data-theme="dark"] .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 22%, transparent 52%);
  opacity: 0.72;
}

.backBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

html[data-theme="dark"] .backBtn {
  background: rgba(255,255,255,0.05);
  border-color: rgba(232, 244, 246, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.backBtn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .backBtn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(232, 244, 246, 0.18);
}

h1 {
  margin: 0 0 10px;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

html[data-theme="dark"] h1 {
  text-shadow: 0 1px 0 rgba(255,255,255,0.02);
}

.sub {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.topRight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  min-width: 260px;
}

.pill,
.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.52);
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .tag {
  border-color: rgba(232, 244, 246, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.pill-ok {
  border-color: rgba(31, 139, 92, 0.18);
}

html[data-theme="dark"] .pill-ok {
  border-color: rgba(121, 221, 176, 0.18);
}

.pill-warn {
  border-color: rgba(176, 122, 22, 0.18);
}

html[data-theme="dark"] .pill-warn {
  border-color: rgba(240, 196, 107, 0.18);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-ok {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(31, 139, 92, 0.08);
}

html[data-theme="dark"] .dot-ok {
  box-shadow: 0 0 0 6px rgba(121, 221, 176, 0.08);
}

.dot-warn {
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(176, 122, 22, 0.08);
}

html[data-theme="dark"] .dot-warn {
  box-shadow: 0 0 0 6px rgba(240, 196, 107, 0.08);
}

.card {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="dark"] .card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(87, 196, 201, 0.08), transparent 0 34%),
    linear-gradient(180deg, rgba(18, 22, 26, 0.9), rgba(9, 12, 15, 0.86));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.48),
    0 10px 24px rgba(87, 196, 201, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

html[data-theme="dark"] .card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.025) 22%, transparent 52%);
  opacity: 0.68;
}

.pad {
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  gap: 22px;
  margin-top: 22px;
}

.stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stage {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.42);
}

html[data-theme="dark"] .stage {
  border-color: rgba(232, 244, 246, 0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 18px rgba(42, 145, 148, 0.18);
}

html[data-theme="dark"] .num {
  background: linear-gradient(135deg, #f3fbfc, #7ed9dd);
  color: #0a0f12;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.32);
}

.stTitle {
  margin-bottom: 4px;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.stDesc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hr {
  height: 1px;
  margin: 18px 0 14px;
  background: var(--border);
}

.h {
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.tiny {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.66);
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

html[data-theme="dark"] .btn {
  border-color: rgba(232, 244, 246, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border-color: rgba(232, 244, 246, 0.18);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #318f95, #17636a);
  color: #fff;
  box-shadow: 0 16px 28px rgba(23, 99, 106, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 20px 34px rgba(23, 99, 106, 0.3);
}

html[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #f3fbfc 0%, #d8f1f3 54%, #bfe6e9 100%);
  color: #0a0f12;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

html[data-theme="dark"] .btn-primary:hover {
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255,255,255,0.46);
}

.bigAction,
.actionCard {
  display: block;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.46);
  padding: 18px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

html[data-theme="dark"] .bigAction,
html[data-theme="dark"] .actionCard {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border-color: rgba(232, 244, 246, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.bigAction:hover,
.actionCard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--border-strong);
}

html[data-theme="dark"] .bigAction:hover,
html[data-theme="dark"] .actionCard:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.actionHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.actionTitle {
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.actionDesc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.locked {
  opacity: 0.7;
}

.lockLine {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 122, 22, 0.14);
  background: rgba(255, 248, 231, 0.7);
  color: #8d6515;
  font-size: 14px;
  font-weight: 600;
}

html[data-theme="dark"] .lockLine {
  border-color: rgba(240, 196, 107, 0.16);
  background: linear-gradient(180deg, rgba(240, 196, 107, 0.08), rgba(240, 196, 107, 0.04));
  color: #f0c46b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.lockIcon {
  flex: 0 0 auto;
}

.toast {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 139, 92, 0.16);
  background: rgba(233, 250, 243, 0.84);
  color: #1f7a52;
  font-size: 14px;
  font-weight: 600;
}

.toast.err {
  border-color: rgba(176, 122, 22, 0.16);
  background: rgba(255, 248, 231, 0.84);
  color: #8d6515;
}

html[data-theme="dark"] .toast {
  border-color: rgba(121, 221, 176, 0.16);
  background: linear-gradient(180deg, rgba(121, 221, 176, 0.08), rgba(121, 221, 176, 0.04));
  color: #84e0b6;
}

html[data-theme="dark"] .toast.err {
  border-color: rgba(240, 196, 107, 0.16);
  background: linear-gradient(180deg, rgba(240, 196, 107, 0.08), rgba(240, 196, 107, 0.04));
  color: #f0c46b;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 19, 22, 0.38);
  z-index: 9999;
}

html[data-theme="dark"] .modalBackdrop {
  background: rgba(3, 7, 9, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal {
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .modal {
  position: relative;
  overflow: hidden;
  border-color: rgba(232, 244, 246, 0.12);
  background:
    radial-gradient(circle at top right, rgba(87, 196, 201, 0.08), transparent 0 34%),
    linear-gradient(180deg, rgba(18,18,18,0.96), rgba(8,8,8,0.92));
  box-shadow:
    0 30px 84px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

html[data-theme="dark"] .modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 22%, transparent 52%);
}

.modalTitle {
  margin-bottom: 10px;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.modalText {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.modalActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.theme-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  width: 60px;
  height: 34px;
  cursor: pointer;
}

.theme-toggle input {
  display: none;
}

.theme-toggle-slider {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="dark"] .theme-toggle-slider {
  border-color: rgba(232, 244, 246, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.theme-toggle-slider::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease;
}

html[data-theme="dark"] .theme-toggle-slider::before {
  background: linear-gradient(135deg, #f3fbfc, #7ed9dd);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.34);
}

.theme-toggle input:checked + .theme-toggle-slider::before {
  transform: translateX(26px);
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .stages {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .topRight {
    align-items: flex-start;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 16px);
    margin-top: 16px;
    margin-bottom: 24px;
  }

  .hero,
  .pad,
  .modal {
    padding: 18px;
    border-radius: 18px;
  }

  .btn {
    width: 100%;
  }

  .actionHead {
    flex-direction: column;
    align-items: flex-start;
  }
}