* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f4f6fb 60%);
  color: #252b3b; line-height: 1.6; min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: #2563eb; }

.topbar {
  background: #172554; color: #fff; padding: 16px 8%;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 700; }
.brand span { color: #60a5fa; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a, .nav-link { color: #fff; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.topbar nav a:hover, .nav-link:hover { color: #93c5fd; background: none; }
.nav-cta { background: #2563eb; padding: 8px 16px; border-radius: 6px; }
.nav-cta:hover { background: #1d4ed8; color: #fff !important; }
.nav-form { margin: 0; }

.container { flex: 1; width: 100%; max-width: 520px; margin: 48px auto; padding: 0 16px; }

.auth-card, .profile-card {
  background: #fff; border-radius: 14px; padding: 34px;
  box-shadow: 0 10px 35px rgba(23, 37, 84, 0.10);
}
.eyebrow { color: #2563eb; font-size: .75rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 4px; }
h1 { color: #172554; margin: 0 0 6px; font-size: 1.7rem; }
.muted { color: #64748b; margin-top: 0; }

label { display: block; font-weight: 600; font-size: .9rem; margin-top: 14px; }
input {
  width: 100%; padding: 12px; margin: 6px 0 4px;
  border: 1px solid #cbd5e1; border-radius: 8px; font: inherit;
}
input:focus { outline: 2px solid #93c5fd; border-color: #2563eb; }
input:invalid:not(:placeholder-shown):not(:focus) { border-color: #dc2626; }
.hint { color: #64748b; font-size: .8rem; display: block; min-height: 1.2em; }

button.primary {
  background: #2563eb; color: #fff; padding: 12px 24px; border: 0;
  border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; margin-top: 18px;
}
button.primary:hover { background: #1d4ed8; }
button.full { width: 100%; }

.notice, .error-box { padding: 12px 14px; margin-bottom: 18px; border-radius: 8px; }
.notice.success { background: #dcfce7; color: #166534; }
.notice.error, .error-box { background: #fee2e2; color: #991b1b; }
.error-box ul { margin: 0; padding-left: 18px; }
.switch { text-align: center; margin-bottom: 0; }

.strength { height: 6px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-top: 6px; }
#strength-bar { height: 100%; width: 0; transition: width .25s, background .25s; }

.profile-card { text-align: center; }
.avatar {
  width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #172554); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
}
.welcome-message { color: #166534; font-weight: 600; }
.profile-details { text-align: left; margin: 22px 0; border: 1px solid #e2e8f0; border-radius: 10px; }
.profile-details div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; }
.profile-details div:last-child { border-bottom: 0; }
.profile-details span { color: #64748b; }

footer { text-align: center; padding: 20px; color: #64748b; }
@media (max-width: 520px) { .topbar { padding: 14px 5%; } .auth-card, .profile-card { padding: 24px; } }
