/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ───────────────────────────────────────────────── */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #EEF2F7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A2A3A;
}

/* ─── Card ───────────────────────────────────────────────── */
.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-card {
  background: #FFFFFF;
  border: 1px solid #D8E2EE;
  border-radius: 14px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow: 0 4px 24px rgba(30, 60, 100, 0.08);
}

/* ─── Brand ──────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #1565C0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  color: #1A2A3A;
  line-height: 1.2;
}

.brand-text p {
  font-size: 12px;
  color: #6B7C93;
  margin-top: 2px;
}

/* ─── Heading ────────────────────────────────────────────── */
.login-heading {
  font-size: 20px;
  font-weight: 700;
  color: #1A2A3A;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13px;
  color: #6B7C93;
  margin-bottom: 1.75rem;
}

/* ─── Form ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374557;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: #93A3B8;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1.5px solid #D0DCE8;
  border-radius: 8px;
  font-size: 14px;
  color: #1A2A3A;
  background: #F8FAFD;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input-wrap input::placeholder { color: #A8B8CC; }

.input-wrap input:focus {
  border-color: #1565C0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

/* Eye toggle for password */
.eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #93A3B8;
  display: flex;
  align-items: center;
}

.eye-toggle:hover { color: #1565C0; }

.eye-toggle svg {
  position: static;
  transform: none;
  stroke: currentColor;
}

/* ─── Error ──────────────────────────────────────────────── */
.error-msg {
  display: none;
  align-items: center;
  gap: 7px;
  background: #FFF0F0;
  border: 1px solid #FBBCBC;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 13px;
  color: #B91C1C;
  margin-bottom: 1rem;
}

.error-msg svg {
  width: 15px;
  height: 15px;
  stroke: #B91C1C;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.error-msg.show { display: flex; }

/* ─── Submit button ──────────────────────────────────────── */
.btn-login {
  width: 100%;
  height: 42px;
  background: #1565C0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.16s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn-login:hover  { background: #0D47A1; }
.btn-login:active { transform: scale(0.98); }

.btn-login .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer note ────────────────────────────────────────── */
.login-footer {
  text-align: center;
  font-size: 12px;
  color: #93A3B8;
  margin-top: 1.5rem;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-card { padding: 2rem 1.25rem 1.75rem; }
}