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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a1628 0%, #0d2461 50%, #0a1f4e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 16px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 15%, rgba(59,130,246,0.16) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 85%, rgba(14,165,233,0.12) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Card ── */
.login-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.06);
  animation: slideUp .35s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* accent line top */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #2563eb);
  border-radius: 0 0 4px 4px;
}

/* ── Brand ── */
.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand img {
  max-width: 200px;
  max-height: 60px;
  object-fit: contain;
}

.brand-tag {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  padding: 3px 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #1d4ed8;
}

/* ── Divider ── */
.login-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 0 0 24px;
}

/* ── Heading ── */
.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
}

.login-sub {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: 22px;
}

/* ── Input fields ── */
.field-group {
  position: relative;
  margin-bottom: 14px;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: .9rem;
  pointer-events: none;
  transition: color .2s;
}

.field-group:focus-within .field-icon { color: #2563eb; }

.field-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 42px 0 40px;
  font-size: .9rem;
  font-family: inherit;
  color: #111827;
  background: #f9fafb;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.field-input::placeholder { color: #9ca3af; }

.field-input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* password toggle */
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px 6px;
  font-size: .88rem;
  transition: color .2s;
  line-height: 1;
}
.pw-toggle:hover { color: #2563eb; }

/* ── Captcha ── */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.captcha-box .c-icon {
  color: #1d4ed8;
  font-size: 1rem;
  flex-shrink: 0;
}

.captcha-label {
  font-size: .85rem;
  color: #374151;
  white-space: nowrap;
  flex: 1;
}

.captcha-label strong {
  color: #1d4ed8;
  font-size: .95rem;
}

.captcha-input {
  width: 68px;
  height: 38px;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  flex-shrink: 0;
}

.captcha-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ── Submit button ── */
.btn-login {
  display: block;
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .02em;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 4px 16px rgba(37,99,235,.38);
  margin-top: 6px;
}

.btn-login:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(37,99,235,.48);
  transform: translateY(-1px);
}

.btn-login:active { transform: none; }

/* ── Links ── */
.login-links {
  text-align: center;
  margin-top: 18px;
}

.login-links a {
  font-size: .83rem;
  color: #6b7280;
  text-decoration: none;
  transition: color .2s;
}
.login-links a:hover { color: #2563eb; }

/* ── Footer — bawah card ── */
.login-footer {
  text-align: center;
  font-size: .74rem;
  color: rgba(255,255,255,.32);
  letter-spacing: .02em;
  width: 100%;
  max-width: 420px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .login-card { padding: 32px 22px 28px; }
}

/* ── Alert notifications ── */
.alerts {
  border: 0;
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  padding: .85rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp .3s ease;
}
.alerts.hide { display: none; }
.alerts .alert-body { flex: 1; font-size: .88rem; color: #374151; }
.alerts .alert-body b { display: block; font-size: .9rem; color: #111827; margin-bottom: 1px; }
.alerts.alert-danger { border-left: 4px solid #ef4444; }
.alerts.alert-success { border-left: 4px solid #22c55e; }
.alerts .a-icon { font-size: 1.2rem; flex-shrink: 0; }
.alerts.alert-danger .a-icon { color: #ef4444; }
.alerts.alert-success .a-icon { color: #22c55e; }
.alerts .close {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px;
  transition: color .2s;
}
.alerts .close:hover { color: #374151; }
