@import url('/migration-theme.css');

:root {
  --bg: var(--theme-bg);
  --bg-soft: var(--theme-panel-soft);
  --panel: var(--theme-panel);
  --panel-strong: var(--theme-panel);
  --ink: var(--theme-ink);
  --muted: var(--theme-muted);
  --line: var(--theme-line);
  --accent: var(--theme-accent);
  --accent-strong: var(--theme-accent-strong);
  --success: var(--theme-success);
  --danger: var(--theme-danger);
  --radius-card: var(--theme-radius-lg);
  --radius-elem: var(--theme-radius-sm);
  --radius-pill: var(--theme-radius-pill);
  --shadow: var(--theme-shadow);
  --font: var(--theme-font);
}

* { box-sizing: border-box; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-strong);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--theme-bg-start) 0%, var(--theme-bg-end) 100%);
  padding: clamp(20px, 2vw, 30px) 18px 42px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  position: relative;
  isolation: isolate;
}

.shell::before {
  display: none;
}

.shell > * {
  position: relative;
  z-index: 1;
}

.hero,
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero::before,
.card::before {
  display: none;
}

.hero::after,
.card::after {
  display: none;
}

.hero > *,
.card > * {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: end;
}

.kicker,
label {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  margin-bottom: 12px;
}

.kicker::before { display: none; }

h1,
.section-title {
  font-family: var(--font);
  letter-spacing: -0.03em;
  font-weight: 800;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 46px);
  color: var(--ink);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
}

.hero-note {
  padding: 18px;
  border-radius: var(--radius-elem);
  background: var(--theme-panel-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.hero-note strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--accent);
  text-transform: uppercase;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.section-title {
  margin: 0 0 10px;
  font-size: 30px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.sub,
.muted,
.status {
  color: var(--muted);
  line-height: 1.55;
}

.sub {
  margin: -2px 0 16px;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 14px;
}

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

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-elem);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: none;
  font-family: var(--font);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.btn,
.btnGhost,
.slot-btn {
  border-radius: var(--radius-elem);
  box-shadow: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.btn:hover,
.btnGhost:hover,
.slot-btn:hover {
  transform: translateY(-1px);
}

.btn {
  border: 1px solid var(--accent-strong);
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 87, 204, 0.20);
  padding: 14px 18px;
}

.btnGhost {
  border: 1px solid var(--theme-line-strong);
  background: var(--panel);
  color: var(--ink);
  padding: 12px 14px;
  transition: border-color 120ms ease, transform 120ms ease;
}

.btnGhost:hover {
  border-color: var(--accent);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status {
  font-size: 13px;
  min-height: 18px;
}

.status.error { color: #ef4444; }
.status.success { color: #059669; }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.slot-btn {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-elem);
  text-align: left;
  color: var(--ink);
}

.slot-btn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-strong), transparent);
  opacity: 1;
}

.slot-btn strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
  text-transform: uppercase;
}

.slot-btn small {
  color: var(--muted);
  display: block;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.slot-btn.selected {
  border-color: var(--accent);
  background: var(--theme-accent-soft);
  box-shadow: 0 4px 16px rgba(11, 87, 204, 0.10);
}

.summary,
.confirmation {
  border-radius: var(--radius-elem);
  border: 1px solid var(--line);
  background: var(--theme-panel-soft);
  padding: 16px 18px;
}

.summary strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.summary p {
  margin: 0;
  color: var(--accent-strong);
}

.hidden {
  display: none !important;
}

.confirmation {
  margin-top: 14px;
  border-color: rgba(5, 150, 105, 0.30);
  color: #059669;
  font-size: 14px;
  line-height: 1.55;
}

/* ── Responsive ── */
@media (max-width: 920px) {
  .hero-grid,
  .layout,
  .row {
    grid-template-columns: 1fr;
  }

  body {
    padding: 18px 14px 30px;
  }

  .hero,
  .card {
    padding: 18px;
  }

  h1 {
    font-size: 48px;
  }

  .section-title {
    font-size: 30px;
  }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e2126;
    --bg-soft: #282c33;
    --panel: #282c33;
    --panel-strong: #282c33;
    --ink: #edf0f4;
    --muted: #8a96a4;
    --line: rgba(160, 168, 180, 0.14);
    --accent: #3b82f6;
    --accent-strong: #60a5fa;
    --success: #22c48a;
    --danger: #f06060;
  }

  ::-webkit-scrollbar-track { background: #282c33; }
  ::-webkit-scrollbar-thumb { background: var(--accent); }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent-strong); }

  body { background: #1e2126; color: #edf0f4; }

  .hero, .card { background: #282c33; border-color: rgba(160, 168, 180, 0.14); }

  .hero-note {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(160, 168, 180, 0.18);
    color: #8a96a4;
  }

  .hero-note strong { color: #60a5fa; }

  .section-title { color: #edf0f4; }

  label { color: #8a96a4; }

  input, select, textarea {
    background: #1e2126;
    border-color: rgba(160, 168, 180, 0.24);
    color: #edf0f4;
  }

  input::placeholder, textarea::placeholder { color: #8a96a4; opacity: 1; }

  input:focus, select:focus, textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  }

  .btn {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.22);
  }

  .btnGhost {
    background: #282c33;
    border-color: rgba(160, 168, 180, 0.28);
    color: #edf0f4;
  }

  .btnGhost:hover { border-color: #3b82f6; }

  .slot-btn { background: #282c33; border-color: rgba(160, 168, 180, 0.18); color: #edf0f4; }
  .slot-btn strong { color: #60a5fa; }
  .slot-btn small { color: #8a96a4; }
  .slot-btn.selected {
    background: rgba(59, 130, 246, 0.10);
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.14);
  }

  .summary, .confirmation { background: #282c33; border-color: rgba(160, 168, 180, 0.14); }
  .summary strong { color: #8a96a4; }
  .summary p { color: #60a5fa; }
  .confirmation { border-color: rgba(34, 196, 138, 0.28); color: #22c48a; }

  .status.error { color: #f06060; }
  .status.success { color: #22c48a; }
}

html[data-theme="light"] body {
  background: linear-gradient(160deg, var(--theme-bg-start) 0%, var(--theme-bg-end) 100%) !important;
  color: var(--ink) !important;
}

html[data-theme="light"] .hero,
html[data-theme="light"] .card {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] body { background: #1e2126 !important; color: #edf0f4 !important; }

html[data-theme="dark"] .hero,
html[data-theme="dark"] .card { background: #282c33 !important; border-color: rgba(160, 168, 180, 0.14) !important; }

html[data-theme="dark"] .hero-note {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(160, 168, 180, 0.18) !important;
  color: #8a96a4 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #1e2126 !important;
  border-color: rgba(160, 168, 180, 0.24) !important;
  color: #edf0f4 !important;
}
