:root {
  color-scheme: light;
  --bg: #f1f4f9;
  --surface: #ffffff;
  --border: rgba(15, 27, 60, 0.1);
  --text: #0f1b2e;
  --muted: #64748b;
  --brand: #2b5ce6;
  --brand-strong: #1f4dd4;
  --focus: rgba(43, 92, 230, 0.14);
  --shadow: 0 10px 30px rgba(15, 27, 60, 0.08), 0 2px 6px rgba(15, 27, 60, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

.auth-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 30px;
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.brand-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--brand);
  line-height: 1;
}

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

.step-title {
  margin: 0 0 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.24rem;
  font-weight: 700;
}

.step-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
}

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

input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid rgba(15, 27, 60, 0.14);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder {
  color: #94a3b8;
}

input:focus {
  outline: none;
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--focus);
}

input:disabled {
  opacity: 0.75;
}

.code-input {
  text-align: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  font-weight: 700;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 6px 18px rgba(43, 92, 230, 0.22);
}

.btn-primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  background: #94a3b8;
  box-shadow: none;
  transform: none;
}

.btn-link {
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
}

.btn-link:hover {
  color: var(--text);
}

.btn-link:disabled {
  color: #94a3b8;
}

.btn-link.compact {
  width: auto;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
}

.stack-actions {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.page-footer {
  padding: 0 24px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.76rem;
}

.swal2-popup.pp-swal-popup {
  border-radius: 18px;
  border: 1px solid rgba(15, 27, 60, 0.1);
}

.swal2-confirm.pp-swal-confirm {
  background: var(--brand) !important;
  border-radius: 10px !important;
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 22px 24px;
  }
}
