:root {
  color-scheme: light;
  --bg: #f4faf9;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(34, 72, 92, 0.12);
  --text: #163047;
  --muted: #6f8492;
  --accent: #7bd8e4;
  --accent-strong: #2e95a7;
  --good: #2fa772;
  --warn: #a47a12;
  --error: #b94a48;
  --shadow: 0 18px 50px rgba(34, 72, 92, 0.12);
  --wizard-complete: #238b57;
  --wizard-progress: #b37b08;
  --wizard-idle: #a6b2b8;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(123, 216, 228, 0.28), transparent 30%),
    radial-gradient(circle at 82% 4%, rgba(218, 230, 218, 0.32), transparent 22%),
    linear-gradient(135deg, #f6fbfa 0%, #eef8f7 52%, #fbfaf7 100%);
}

.auth-required .tabs,
.auth-required main {
  display: none;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.heading-version {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 10px;
  border: 1px solid rgba(46, 149, 167, 0.22);
  border-radius: 999px;
  background: rgba(123, 216, 228, 0.18);
  color: var(--accent-strong);
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.lede {
  max-width: 56rem;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.auth-card,
.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.auth-card {
  min-width: 260px;
  padding: 18px;
  border-radius: 20px;
}

.auth-state {
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.panel {
  border-radius: 24px;
  padding: 20px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-button {
  appearance: none;
  border: 1px solid rgba(34, 72, 92, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tab-button:hover {
  border-color: rgba(46, 149, 167, 0.32);
  color: var(--text);
}

.tab-button.active {
  color: #123044;
  border-color: transparent;
  background: #bdeff4;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.prep-step-nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

.prep-step-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid rgba(34, 72, 92, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.prep-step-button span {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(46, 149, 167, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
}

.prep-step-button.active {
  background: #bdeff4;
  color: #123044;
}

.prep-step-button.active span {
  background: rgba(255, 255, 255, 0.82);
}

.prep-step-title {
  grid-column: 1 / -1;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
}

.prep-step-hidden {
  display: none !important;
}

.prep-step-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.prep-step-footer .button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

.naming-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(235, 248, 248, 0.7);
  border-radius: 8px;
}

.naming-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.naming-examples code {
  color: var(--accent);
}

.provider-configuration {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(248, 252, 252, 0.74);
}

.company-profile {
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(34, 72, 92, 0.16);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #bdeff4;
  color: #123044;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(46, 149, 167, 0.18);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border: 1px solid rgba(34, 72, 92, 0.14);
}

.button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(34, 72, 92, 0.12);
}

.button.small {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.subtle {
  color: var(--muted);
  font-size: 0.88rem;
}

.subtle.error {
  color: var(--error);
}

.subtle.success {
  color: var(--good);
}

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

a { text-decoration: none; color: #464feb; }
tr th, tr td { border: 1px solid #e6e6e6; }
tr th { background-color: #f5f5f5; }

.wizard-overview { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; margin: 0 0 22px; }
.wizard-overview-main, .wizard-summary { border: 1px solid var(--panel-border); border-radius: 18px; background: rgba(255,255,255,.72); padding: 18px; }
.wizard-progress-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.wizard-progress-heading div { display: grid; gap: 3px; }
.wizard-progress-heading strong { font-size: 1.35rem; }
.wizard-progress-track { height: 9px; margin: 14px 0 18px; overflow: hidden; border-radius: 99px; background: #e4ecec; }
.wizard-progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--good)); transition: width .25s ease; }
.wizard-phase-list { display: grid; gap: 9px; }
.wizard-phase-card { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #e3e9e9; border-radius: 12px; background: #fff; }
.wizard-phase-card[data-status="complete"] { border-color: rgba(47,167,114,.35); background: #f3fbf6; }
.wizard-phase-card[data-status="progress"] { border-color: rgba(164,122,18,.38); background: #fffaf0; }
.wizard-phase-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #edf1f2; color: var(--muted); font-weight: 800; }
.wizard-phase-card[data-status="complete"] .wizard-phase-icon { background: #d9f2e4; color: var(--wizard-complete); }
.wizard-phase-card[data-status="progress"] .wizard-phase-icon { background: #fff0bd; color: var(--wizard-progress); }
.wizard-phase-card h4 { margin: 0; font-size: .95rem; }
.wizard-phase-card p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.wizard-phase-card .button { white-space: nowrap; }
.wizard-summary h3 { margin-bottom: 14px; }
.wizard-summary dl { display: grid; gap: 12px; margin: 0; }
.wizard-summary dl div { display: grid; gap: 3px; }
.wizard-summary dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.wizard-summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.wizard-dialog { width: min(680px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 0; color: var(--text); box-shadow: 0 24px 80px rgba(22,48,71,.28); }
.wizard-dialog::backdrop { background: rgba(22,48,71,.38); backdrop-filter: blur(3px); }
.wizard-dialog-inner { padding: 24px; }
.wizard-dialog-inner h3 { margin-top: 4px; font-size: 1.35rem; }
.wizard-dialog-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e6eeee; }
.wizard-dialog-requirements { margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--accent-strong); border-radius: 8px; background: #f3f8f8; color: var(--muted); }
.wizard-dialog-requirements strong { color: var(--text); }
.wizard-dialog-requirements ul { margin: 8px 0 0; padding-left: 20px; }
.wizard-category-dialog { width: min(760px, calc(100% - 28px)); }
.wizard-subcategory-list { display: grid; gap: 10px; margin-top: 18px; }
.wizard-subcategory-card { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e2e9e9; border-radius: 12px; background: #fff; }
.wizard-subcategory-card h4 { margin: 0; font-size: .96rem; }
.wizard-subcategory-card p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.wizard-subcategory-state { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #edf1f2; color: var(--muted); font-weight: 800; }
.wizard-subcategory-card[data-status="complete"] .wizard-subcategory-state { background: #d9f2e4; color: var(--wizard-complete); }
.wizard-subcategory-card[data-status="progress"] .wizard-subcategory-state { background: #fff0bd; color: var(--wizard-progress); }
.wizard-step-fields-note { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #f7faf9; color: var(--muted); }
.wizard-task-form { display: grid; gap: 12px; margin-top: 16px; }
.wizard-task-summary { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px 14px; margin: 0; padding: 12px 14px; border: 1px solid #e2e9e9; border-radius: 8px; background: #fff; }
.wizard-task-summary dt { color: var(--muted); font-weight: 700; }
.wizard-task-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.wizard-task-form textarea { min-height: 180px; font-family: Consolas, monospace; font-size: .78rem; }
.resource-name-list { display: grid; gap: 10px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.resource-name-list label { margin: 0; padding: 10px 12px; border: 1px solid #e2e9e9; border-radius: 8px; background: #fff; }
.provider-settings-group { margin: 0 0 14px; padding: 14px; border: 1px solid #e3e9e9; border-radius: 12px; background: #fff; }
.provider-settings-group h4 { margin: 0 0 10px; text-transform: capitalize; }

@media (max-width: 760px) {
  .wizard-overview { grid-template-columns: 1fr; }
  .wizard-phase-card { grid-template-columns: 30px minmax(0,1fr); }
  .wizard-phase-card .button { grid-column: 2; justify-self: start; }
}

th, td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(34, 72, 92, 0.1);
}

th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty {
  color: var(--muted);
  padding: 10px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.3;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  white-space: nowrap;
}

.chip-good {
  border-color: rgba(47, 167, 114, 0.28);
  background: rgba(47, 167, 114, 0.12);
  color: var(--good);
}

.chip-warn {
  border-color: rgba(164, 122, 18, 0.28);
  background: rgba(240, 191, 64, 0.14);
  color: var(--warn);
}

.chip-error {
  border-color: rgba(185, 74, 72, 0.28);
  background: rgba(185, 74, 72, 0.1);
  color: var(--error);
}

.license-reveal {
  border: 1px dashed var(--accent);
  border-radius: 14px;
  padding: 14px;
  background: rgba(123, 216, 228, 0.14);
}

.license-reveal code {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 4px 0;
  word-break: break-all;
}

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

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    align-items: start;
  }

  .grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }
}
