*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,110,247,.18) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}
body::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,.14) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  pointer-events: none;
}

/* ── Card ── */
.card {
  background: rgba(255,255,255,.98);
  border-radius: 22px;
  padding: 42px 40px 38px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,.32), 0 4px 16px rgba(0,0,0,.12);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.15);
}

/* ── Brand icon ── */
.icon-wrap {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(79,110,247,.35);
}
.icon-wrap svg { width: 27px; height: 27px; fill: #fff; }

h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 5px;
  letter-spacing: -.4px;
}
.subtitle {
  text-align: center;
  color: #64748b;
  font-size: .85rem;
  margin-bottom: 28px;
}

/* ── Alert ── */
.alert {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: .875rem;
  margin-bottom: 20px;
}

/* ── Form fields ── */
.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .92rem;
  color: #0f172a;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  font-family: inherit;
}
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79,110,247,.14);
}
input::placeholder { color: #94a3b8; }

.eye-btn {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #94a3b8; display: flex; align-items: center;
  transition: color .15s;
}
.eye-btn:hover { color: #4f6ef7; }

/* ── Row (remember + forgot) ── */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}
.remember {
  display: flex; align-items: center; gap: 8px;
  font-size: .855rem; color: #374151; cursor: pointer;
}
.remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #4f6ef7; cursor: pointer;
}
.forgot {
  font-size: .855rem; color: #4f6ef7;
  text-decoration: none; font-weight: 600;
}
.forgot:hover { text-decoration: underline; }

/* ── Submit ── */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #4f6ef7 0%, #3b56d9 100%);
  color: #fff; border: none; border-radius: 11px;
  font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: opacity .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(79,110,247,.35);
  font-family: inherit; letter-spacing: .1px;
}
.btn-login:hover { opacity: .92; box-shadow: 0 6px 20px rgba(79,110,247,.45); }

/* ── Footer ── */
.footer-note {
  text-align: center;
  margin-top: 20px;
  font-size: .75rem;
  color: #475569;
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body { padding: 16px 14px; justify-content: flex-start; padding-top: 40px; }
  .card { padding: 32px 22px 26px; border-radius: 18px; }
  h1 { font-size: 1.35rem; }
  .subtitle { font-size: .8rem; margin-bottom: 22px; }
  .icon-wrap { width: 50px; height: 50px; }
  .icon-wrap svg { width: 23px; height: 23px; }
  input[type="email"],
  input[type="password"],
  input[type="text"] { font-size: .875rem; padding: 11px 14px; }
  .other-portals { grid-template-columns: 1fr 1fr; }
}
