:root{
  --bg: #f8fafc;
  --surface: rgba(255,255,255,.92);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(15, 23, 42, 0.14);

  /* New Brand Palette based on theme.css */
  --brand-primary: #4e88ff;
  --brand-light: #a9c8ff;
  --brand-soft: rgba(78, 136, 255, 0.18);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-md: 0 18px 45px rgba(2, 6, 23, 0.10);
  --shadow-sm: 0 10px 24px rgba(2, 6, 23, 0.06);
  --focus-ring: 0 0 0 4px rgba(78, 136, 255, 0.18);
  --success-soft: rgba(151,216,198,.18);
  --success-text: #166534;
  --danger-soft: rgba(242,163,167,.18);
  --danger-text: #b42318;
}

*{
  box-sizing: border-box;
}

html,
body{
  height: 100%;
}

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-shell{
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, var(--brand-soft), transparent 28%),
    radial-gradient(circle at bottom right, rgba(183,167,200,.14), transparent 30%),
    linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
}

.auth-shell__bg{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(78, 136, 255, 0.08), transparent 25%),
    linear-gradient(315deg, rgba(127,211,207,.06), transparent 20%);
}

.auth-simple{
  width: min(480px, 100%);
  position: relative;
  z-index: 1;
}

.login-card{
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-card__topbar{
  height: 6px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand-primary), #b7a7c8);
}

.login-card__body{
  padding: 40px 36px;
}

.login-logo{
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo img{
  height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.05));
}

.login-head{
  margin-bottom: 28px;
  text-align: center;
}

.login-head__title{
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
  font-weight: 800;
}

.login-head__text{
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-status{
  margin-bottom: 16px;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--success-soft);
  color: var(--success-text);
  border: 1px solid rgba(151,216,198,.38);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.btn-google{
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: rgba(15, 23, 42, 0.86);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .12s ease;
}

.btn-google:hover{
  border-color: rgba(78, 136, 255, 0.30);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-google__icon{
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.auth-divider{
  margin: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.auth-divider::before,
.auth-divider::after{
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.field{
  margin-top: 20px;
}

.field:first-child{
  margin-top: 0;
}

.field__label{
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.90);
}

.control{
  position: relative;
}

.input{
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline: none;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.input--pw {
  padding-right: 50px;
}

.input::placeholder{
  color: rgba(15, 23, 42, 0.35);
}

.input:hover{
  border-color: rgba(78, 136, 255, 0.3);
}

.input:focus{
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
  background: var(--surface-strong);
}

.input.is-invalid{
  border-color: rgba(242, 163, 167, .95);
  box-shadow: 0 0 0 4px rgba(242,163,167,.14);
}

.pw-toggle{
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(31, 41, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  z-index: 2;
}

.pw-toggle:hover{
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.pw-ico--eyeoff {
  display: none;
}

.pw-toggle.is-on {
  color: var(--brand-primary);
}

.pw-toggle.is-on .pw-ico--eye {
  display: none;
}

.pw-toggle.is-on .pw-ico--eyeoff {
  display: block;
}

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

.remember{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.remember input{
  accent-color: var(--brand-primary);
}

.link{
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.link:hover{
  text-decoration: underline;
}

.btn{
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-primary), #3b71db);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 16px 26px rgba(78, 136, 255, 0.20);
  transition: transform .12s ease, box-shadow .18s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(78, 136, 255, 0.24);
}

.cta{
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.cta a{
  color: var(--brand-primary);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 640px){
  .auth-shell{
    padding: 18px 14px;
  }
  .login-card__body{
    padding: 32px 24px;
  }
  .login-logo img{
    height: 64px;
  }
}
