/* Light, quiet authentication surface matching the account-security reference. */
body.auth-shell {
  --background: 220 20% 98%;
  --foreground: 222 18% 12%;
  --card: 0 0% 100%;
  --card-foreground: 222 18% 12%;
  --primary: 222 13% 11%;
  --primary-foreground: 0 0% 100%;
  --muted: 220 14% 95%;
  --muted-foreground: 220 8% 48%;
  --accent: 220 14% 95%;
  --accent-foreground: 222 18% 12%;
  --border: 220 12% 88%;
  --input: 220 12% 86%;
  --ring: 220 8% 48%;
  min-height: 100vh;
  background: #f7f8fa;
  color: #191b20;
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.auth-shell::before { display: none; }
body.auth-shell .navbar { display: none !important; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 20px 60px;
  background: #f7f8fa;
}

.auth-card {
  width: min(100%, 520px);
  max-width: 520px;
  padding: 0;
  overflow: hidden;
  color: #191b20;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 15px;
  box-shadow: 0 12px 36px rgba(24, 30, 40, .045);
  animation: auth-enter .36s cubic-bezier(.2,.75,.25,1) both;
}

.auth-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 27px 30px 24px;
  text-align: center;
  border-bottom: 1px solid #e6e7ea;
}

.auth-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  color: #656d78;
  background: #f3f4f6;
  border-radius: 50%;
}
.auth-mark svg { width: 22px; height: 22px; }
.auth-header { margin: 0; }
.auth-header h1 {
  color: #17191d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.015em;
}
.auth-header p {
  margin-top: 4px;
  color: #707783;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .025em;
}

#tab-login, #tab-register, #logged-in-area { padding: 23px 30px 25px; }
.auth-shell .form-group { margin-bottom: 17px; }
.auth-shell .form-group label {
  margin-bottom: 7px;
  color: #30343a;
  font-size: 12px;
  font-weight: 650;
}
.auth-shell .form-group input {
  min-height: 45px;
  padding: 11px 13px;
  color: #191b20;
  background: #fff;
  border: 1px solid #d9dce1;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-shell .form-group input::placeholder { color: #a0a5ad; }
.auth-shell .form-group input:hover { border-color: #c5c9d0; }
.auth-shell .form-group input:focus {
  border-color: #818894;
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 79, 93, .1);
}
.auth-form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.auth-form-row label { margin: 0 !important; }
.auth-forgot { color: #656d78; font-size: 11px; font-weight: 600; }
.auth-forgot:hover, .auth-switch a:hover { color: #17191d; text-decoration: underline; }

.auth-submit {
  min-height: 45px;
  margin-top: 3px;
  color: #fff !important;
  background: #191a1d !important;
  border: 1px solid #191a1d !important;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.auth-submit:hover:not(:disabled) {
  background: #303238 !important;
  box-shadow: 0 5px 12px rgba(20, 22, 26, .13);
  transform: translateY(-1px);
}
.auth-submit:active:not(:disabled) { transform: translateY(0); }

.auth-separator {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  color: #9298a2;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.auth-separator span:first-child, .auth-separator span:last-child { flex: 1; height: 1px; background: #e7e8eb; }
.auth-separator span:nth-child(2) { padding: 0 12px !important; }
.auth-microsoft {
  min-height: 45px;
  color: #292c31 !important;
  background: #fff !important;
  border: 1px solid #d9dce1 !important;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.auth-microsoft:hover:not(:disabled) { background: #f8f9fa !important; border-color: #c5c9d0 !important; transform: translateY(-1px); }
.auth-microsoft:disabled { opacity: .68; cursor: wait; }
.auth-microsoft-note { margin: 8px 0 0; color: #858b95; font-size: 10px; line-height: 1.5; text-align: center; }

.auth-device-area {
  margin-top: 14px !important;
  padding: 15px !important;
  color: #454a53;
  background: #f8f9fa !important;
  border: 1px solid #e0e2e6 !important;
  border-radius: 10px !important;
  text-align: center;
}
.auth-device-area p { color: #666d78 !important; }
.auth-device-area #microsoft-device-code { color: #17191d; }
.auth-device-area .btn { color: #333941; background: #fff; border-color: #d9dce1; }
.auth-switch {
  margin-top: 23px;
  padding-top: 18px;
  color: #777e89;
  border-top: 1px solid #e8e9ec;
  font-size: 11px;
  text-align: center;
}
.auth-switch a { margin-left: 3px; color: #202328; font-weight: 700; }
.auth-shell .form-error { color: #a93636; background: #fff5f5; border-color: #f1d5d5; }
.auth-shell .form-success { color: #26724a; background: #f2fbf6; border-color: #d5ecde; }
.auth-card.is-logged-in .auth-card-head { display: none; }

#logged-in-area { color: #24272c; }
#logged-in-area p { color: #626a75 !important; }
#logged-in-area .btn { color: #292d33; border-color: #d9dce1; }
#logged-in-area .btn:hover { background: #f3f4f6; }

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 540px) {
  .auth-page { min-height: 100vh; align-items: flex-start; padding: 32px 14px 42px; }
  .auth-card { border-radius: 13px; }
  .auth-card-head { padding: 23px 20px 19px; }
  #tab-login, #tab-register, #logged-in-area { padding: 20px 19px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
  .auth-shell .form-group input, .auth-submit, .auth-microsoft { transition: none; }
}
