.sg-shell {
  min-height: 100vh;
  background: linear-gradient(135deg,#e8f0fb 0%,#f0f5fc 55%,#ffffff 100%);
  color: var(--dh-text);
}

.sg-top {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dh-blue);
  font-size: 18px;
  font-weight: 700;
}

.sg-brand img { width: 36px; height: 36px; }
.sg-back { color: var(--dh-text-soft); font-size: 13px; }
.sg-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sg-lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sg-flag-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 18px;
  line-height: 1;
  background: transparent;
}
.sg-flag-btn:hover {
  border-color: var(--dh-border);
  background: #fff;
  text-decoration: none;
}
.sg-flag-btn.is-active {
  background: #fff;
  border-color: rgba(38,104,172,.26);
  box-shadow: 0 3px 12px rgba(38,104,172,.10);
}

.sg-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

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

.sg-hero > div {
  min-width: 0;
}

.sg-eyebrow {
  margin: 0 0 8px;
  color: var(--dh-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sg-hero-title {
  margin: 0;
  max-width: 720px;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

.sg-hero-sub {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--dh-text-soft);
  font-size: 16px;
}

.sg-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-items: start;
  gap: 22px;
}

.sg-grid.has-preview {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  justify-content: stretch;
}

.sg-card {
  background: var(--dh-card);
  border: 1px solid var(--dh-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 24px rgba(38,104,172,.10), 0 1px 4px rgba(38,104,172,.06);
}

.sg-card small {
  color: var(--dh-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.sg-card .errorlist {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #dc2626;
  font-size: 12.5px;
}

.sg-conditional[hidden],
.sg-password-card[hidden],
.sg-outlook-card[hidden] { display: none !important; }

.sg-password-card,
.sg-outlook-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(38,104,172,.16);
  background: var(--dh-blue-soft);
}

.sg-password-card p {
  margin: 4px 0 12px;
  color: var(--dh-text-soft);
  font-size: 13px;
}

.sg-outlook-card {
  border-color: rgba(38,104,172,.24);
  background: linear-gradient(135deg, rgba(38,104,172,.10), rgba(255,255,255,.92));
}

.sg-outlook-card p {
  margin: 4px 0 12px;
  color: var(--dh-text-soft);
  font-size: 13px;
}

.sg-lock,
.sg-mail-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
}

.sg-mail-icon {
  color: var(--dh-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.sg-next-oauth {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--dh-blue);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

.sg-outlook-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13.5px;
}

.sg-outlook-hint {
  display: block;
  margin-top: 8px;
  color: var(--dh-text-soft);
  font-size: 12px;
}

.sg-mail-icon .sg-ms-logo {
  display: inline-grid;
  grid-template-columns: 9px 9px;
  grid-template-rows: 9px 9px;
  gap: 2px;
}

.sg-ms-tile { display: block; width: 9px; height: 9px; }
.sg-ms-tile--r { background: #F25022; }
.sg-ms-tile--g { background: #7FBA00; }
.sg-ms-tile--b { background: #00A4EF; }
.sg-ms-tile--y { background: #FFB900; }

.sg-validate-status {
  margin-top: 8px;
  min-height: 18px;
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sg-validate-status[data-state="idle"]:empty { display: none; }
.sg-validate-status[data-state="loading"] { color: var(--dh-text-soft); }
.sg-validate-status[data-state="loading"]::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(38,104,172,.2);
  border-top-color: var(--dh-blue);
  border-radius: 50%;
  animation: sg-spin 0.8s linear infinite;
}

.sg-validate-status[data-state="ok"] { color: #0f7a4f; font-weight: 600; }
.sg-validate-status[data-state="ok"]::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #0f7a4f;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.sg-validate-status[data-state="error"] { color: #b91c1c; }
.sg-validate-status[data-state="error"]::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #b91c1c;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

@keyframes sg-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sg-validate-status[data-state="loading"]::before {
    animation: none;
  }
}

.sg-terms {
  align-items: flex-start;
  line-height: 1.45;
}

.sg-terms a { color: var(--dh-blue); text-decoration: underline; }

.sg-submit {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.sg-option-muted { color: var(--dh-muted); }

.sg-wow-panel {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sg-wow-panel[hidden],
.sg-wow-card[hidden] {
  display: none;
}

.sg-wow-panel.is-loading .sg-wow-card {
  background-image: linear-gradient(90deg,#fff 0%,#f4f7fb 45%,#fff 90%);
  background-size: 220% 100%;
  animation: sg-shimmer 1.1s ease-in-out infinite;
}

@keyframes sg-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.sg-wow-card {
  background: #fff;
  border: 1px solid var(--dh-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--dh-card-shadow);
}

.sg-logo-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 16px;
}

.sg-logo-frame {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--dh-border);
  box-shadow: var(--dh-card-shadow-hover);
  overflow: hidden;
}

.sg-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.sg-logo-frame span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dh-blue);
  background: var(--dh-blue-light);
  font-size: 26px;
  font-weight: 700;
}

.sg-wow-kicker {
  color: var(--dh-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sg-wow-copy {
  color: var(--dh-text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.sg-trust-row {
  color: #0f7a4f;
  font-size: 18px;
  font-weight: 700;
}

.sg-trust-projection {
  color: var(--dh-orange);
  font-size: 14px;
  font-weight: 700;
  margin-top: 5px;
}

.sg-wow-card--accent {
  border-color: rgba(239,105,50,.22);
  background: var(--dh-orange-light);
}

.sg-privacy {
  margin: 2px 0 0;
  color: var(--dh-muted);
  font-size: 12px;
  text-align: center;
}

.sg-centered {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 20px 72px;
}

.sg-verify-card {
  width: min(440px, 100%);
}

.sg-verify-head {
  text-align: center;
  margin-bottom: 24px;
}

.sg-verify-head h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.sg-verify-head p {
  color: var(--dh-text-soft);
  font-size: 14px;
}

.sg-verify-head span { color: var(--dh-muted); font-size: 12px; }

.sg-otp-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 22px;
}

.sg-otp-digit {
  width: 100%;
  height: 64px;
  border-radius: 12px;
  border: 1.5px solid var(--dh-border);
  background: #fff;
  color: var(--dh-text);
  font-size: 28px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-align: center;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  caret-color: var(--dh-blue);
}

.sg-otp-digit:focus {
  border-color: var(--dh-blue);
  box-shadow: 0 0 0 3px var(--dh-blue-soft);
}

.sg-verify-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--dh-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--dh-muted);
  font-size: 13px;
}

.sg-verify-actions button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--dh-blue);
  cursor: pointer;
  font: inherit;
}

.sg-welcome-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.sg-welcome-head h1 {
  font-size: 34px;
  letter-spacing: 0;
}

.sg-welcome-head p {
  color: var(--dh-text-soft);
  font-size: 16px;
}

.sg-grid--welcome {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.sg-grid--welcome.has-preview {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  justify-content: stretch;
}

.sg-steps {
  margin: 8px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sg-steps li strong {
  display: block;
  margin-bottom: 3px;
}

.sg-steps li span,
.sg-note {
  color: var(--dh-text-soft);
}

.sg-note {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--dh-border);
}

.sg-onboarding-actions {
  width: min(560px, 100%);
  margin: 28px auto 0;
  text-align: center;
}

.sg-onboarding-actions a {
  display: inline-block;
  margin-top: 14px;
  color: var(--dh-blue);
  font-weight: 600;
}

@media (max-width: 900px) {
  .sg-grid,
  .sg-grid--welcome {
    grid-template-columns: 1fr;
  }
  .sg-wow-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .sg-top,
  .sg-main {
    width: min(100% - 28px, 1180px);
  }
  .sg-top {
    padding-top: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .sg-brand {
    flex: 0 0 auto;
  }
  .sg-top-actions {
    flex: 0 0 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 8px;
  }
  .sg-lang-switch {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    gap: 2px;
  }
  .sg-flag-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border-radius: 7px;
  }
  .sg-back {
    display: none;
  }
  .sg-main {
    padding-top: 34px;
  }
  .sg-hero {
    display: block;
  }
  .sg-hero-title {
    font-size: 30px;
    max-width: 100%;
  }
  .sg-card {
    padding: 22px;
    border-radius: 14px;
  }
  .sg-logo-card {
    grid-template-columns: 84px 1fr;
  }
  .sg-logo-frame {
    width: 84px;
    height: 84px;
    border-radius: 14px;
  }
  .sg-otp-row {
    gap: 6px;
  }
  .sg-otp-digit {
    height: 56px;
    font-size: 22px;
  }
}
