* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.account-page {
  margin: 0;
  padding: 0 0 40px;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(37, 99, 235, .16), transparent 38%),
    linear-gradient(180deg, #0b1424 0%, #080c17 100%);
  color: #f8fafc;
  font-family: Inter, sans-serif;
}

.account-shell,
.reset-shell {
  width: min(calc(100% - 28px), 560px);
  margin: 30px auto 0;
}

.reset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  margin-bottom: 20px;
  padding: 10px 15px;
  border: 1px solid rgba(125, 170, 230, .22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 0%, rgba(65, 133, 220, .18), transparent 42%),
    linear-gradient(135deg, #07152b 0%, #0b2a52 52%, #123d70 100%);
  box-shadow: 0 12px 28px rgba(3, 20, 44, .24), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.reset-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #f8fafc;
  font: 800 .96rem/1.2 Inter, sans-serif;
  letter-spacing: -.02em;
  text-decoration: none;
}

.reset-brand img {
  display: block;
  width: 38px;
  height: 38px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 11px;
  background: #fff;
  object-fit: contain;
}

.reset-brand span {
  display: grid;
  gap: 3px;
}

.reset-brand small {
  color: #b7c7dd;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .09em;
}

.reset-back,
.account-back-link,
.reset-container .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-family: Inter, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.reset-back:hover,
.account-back-link:hover,
.reset-container .back-link:hover {
  color: #fff;
}

.reset-back {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(191, 219, 254, .2);
  border-radius: 10px;
  background: rgba(8, 18, 34, .32);
}

.reset-back:hover {
  border-color: rgba(147, 197, 253, .4);
  background: rgba(37, 99, 235, .18);
}

.reset-welcome {
  position: relative;
  margin: 0 0 16px;
  padding: clamp(22px, 5vw, 32px);
  overflow: hidden;
  border: 1px solid rgba(125, 170, 230, .25);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 0%, rgba(96, 165, 250, .24), transparent 42%),
    linear-gradient(135deg, #0b2a52 0%, #123d70 55%, #0e1728 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .09);
}

.reset-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(147, 197, 253, .22);
  border-radius: 999px;
  background: rgba(8, 12, 23, .36);
  color: #bfdbfe;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.reset-welcome h1 {
  margin: 0 0 8px;
  color: #fff;
  font: 800 clamp(1.55rem, 5vw, 2rem)/1.15 Inter, sans-serif;
  letter-spacing: -.04em;
}

.reset-welcome p {
  margin: 0;
  color: #cbd5e1;
  font: 400 .92rem/1.6 Inter, sans-serif;
}

.reset-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.reset-progress span {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(191, 219, 254, .42);
  border-radius: 50%;
  background: rgba(191, 219, 254, .16);
}

.reset-progress span.active {
  width: 22px;
  border-color: #60a5fa;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 14px rgba(96, 165, 250, .4);
}

.reset-container,
.dashboard-container,
.forgot-password-card {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid rgba(125, 170, 230, .17);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(59, 130, 246, .08), transparent 42%),
    linear-gradient(145deg, #111b2d 0%, #0d1524 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .035);
  color: #f8fafc;
  font-family: Inter, sans-serif;
}

.dashboard-container {
  width: min(calc(100% - 28px), 620px);
  margin: 30px auto 0;
}

.reset-container h2,
.dashboard-container h2 {
  margin: 0 0 7px;
  color: #f8fafc;
  font: 800 1.12rem/1.3 Inter, sans-serif;
  letter-spacing: -.025em;
}

.reset-container .form-intro {
  margin: 0 0 18px;
  color: #9caec8;
  font: 400 .84rem/1.55 Inter, sans-serif;
}

.reset-container form,
.dashboard-container form,
.forgot-password-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.reset-container input,
.dashboard-container input,
.forgot-password-card input {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(125, 170, 230, .25);
  border-radius: 11px;
  background: #0a1220;
  color: #f8fafc;
  font: 500 .92rem/1.4 Inter, sans-serif;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.reset-container input::placeholder,
.dashboard-container input::placeholder,
.forgot-password-card input::placeholder {
  color: #8796ad;
  opacity: 1;
}

.reset-container input[name="code"] {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .2em;
}

.reset-container input[type="password"] {
  letter-spacing: .01em;
}

.reset-container input:focus,
.dashboard-container input:focus,
.forgot-password-card input:focus {
  border-color: #60a5fa;
  outline: none;
  background: #0d1a2d;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .17);
}

.reset-container label,
.dashboard-container label {
  display: block;
  margin: 2px 0 -7px;
  color: #dbeafe;
  font-size: .82rem;
  font-weight: 600;
}

.reset-container button,
.dashboard-container button,
.forgot-password-card button,
.forgot-password-card .btn {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(147, 197, 253, .24);
  border-radius: 11px;
  background: linear-gradient(120deg, #2563eb, #174a8b);
  box-shadow: 0 10px 22px rgba(29, 78, 216, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #fff;
  font: 700 .93rem/1.2 Inter, sans-serif;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.reset-container button:hover,
.dashboard-container button:hover,
.forgot-password-card button:hover,
.forgot-password-card .btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(120deg, #3b82f6, #1d4ed8);
  box-shadow: 0 13px 26px rgba(29, 78, 216, .3);
}

.reset-container .message,
.reset-container .success,
.reset-container .error,
.forgot-password-card .inviter-message,
.dashboard-container .success,
.dashboard-container .error {
  display: block;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 11px;
  background: rgba(37, 99, 235, .12);
  color: #dbeafe;
  font-size: .84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.reset-container .success,
.dashboard-container .success {
  border-color: rgba(74, 222, 128, .2);
  background: rgba(22, 163, 74, .11);
  color: #bbf7d0;
}

.reset-container .error,
.dashboard-container .error {
  border-color: rgba(248, 113, 113, .24);
  background: rgba(185, 28, 28, .12);
  color: #fecaca;
}

.reset-container .back-link {
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  min-height: 42px;
  border: 1px solid rgba(125, 170, 230, .12);
  border-radius: 10px;
  background: rgba(8, 18, 34, .28);
}

.forgot-password-card {
  max-width: 460px;
}

.forgot-password-card .form-group { margin: 0; }

.forgot-password-card input:focus {
  border-color: #60a5fa;
  outline: none;
  background: #0d1a2d;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .17);
}

.reset-container .message a,
.reset-container .success a,
.forgot-password-card .inviter-message a {
  color: #bfdbfe;
  font-weight: 700;
}

.forgot-password-card > img {
  display: block;
  width: 50px !important;
  height: 50px !important;
  margin: 0 auto 16px !important;
  padding: 5px !important;
  border: 1px solid rgba(147, 197, 253, .24);
  border-radius: 14px !important;
  background: #fff !important;
  object-fit: contain;
}

.forgot-password-card h2,
.dashboard-container h2 {
  margin: 0 0 9px;
  color: #f8fafc;
  font: 800 clamp(1.35rem, 4vw, 1.65rem)/1.2 Inter, sans-serif;
  letter-spacing: -.035em;
  text-align: left;
}

.forgot-password-card > p {
  margin: 0 0 20px;
  color: #aab8ce;
  font: 400 .9rem/1.6 Inter, sans-serif;
  text-align: left;
}

.forgot-password-card .account-back-link {
  justify-content: center;
  width: 100%;
  margin-top: 17px;
}

.account-page :focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  body.account-page {
    padding: 0 0 30px;
  }

  .account-shell,
  .reset-shell {
    margin-top: 20px;
  }

  .reset-welcome,
  .reset-container,
  .dashboard-container,
  .forgot-password-card {
    border-radius: 16px;
  }

  .reset-header { min-height: 60px; padding: 9px 11px; }
  .reset-brand { gap: 8px; font-size: .88rem; }
  .reset-brand img { width: 35px; height: 35px; }
  .reset-brand small { font-size: .55rem; }
  .reset-back { min-height: 36px; padding: 8px 9px; font-size: .73rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reset-back,
  .account-back-link,
  .reset-container .back-link,
  .reset-container button,
  .dashboard-container button,
  .forgot-password-card button,
  .forgot-password-card .btn {
    transition: none;
  }
}
