/*
 * login.css — Login Page
 */

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

html, body {
  height: 100%;
  font-family: 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f0f2f5;
  padding: 20px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #e8f1ff 0%, #f0f2f5 50%, #e8f0fb 100%);
  z-index: 0;
}

.login-box {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
}

/* Logo */
.login-box .logo {
  display: block;
  max-width: 140px;
  height: auto;
  margin: 0 auto 20px;
  object-fit: contain;
}

/* Title */
.login-box h2 {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #22205f;
  letter-spacing: -.4px;
  margin-bottom: 22px;
}

/* ── Microsoft SSO Button ─────────────────────────────── */
.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  background: #ffffff;
  border: 1.5px solid #d0d7e3;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #1b2033;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 4px;
}

.btn-microsoft:hover {
  background: #f7f8ff;
  border-color: #22205f;
  box-shadow: 0 3px 10px rgba(34,32,95,.12);
  color: #22205f;
}

/* ── Divider ──────────────────────────────────────────── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: #a0aec0;
  font-size: 12px;
  font-weight: 500;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e9f0;
}

/* ── Form ─────────────────────────────────────────────── */
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Inputs */
.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #f7f8fa;
  border: 1.5px solid #e5e9f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1b2033;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.login-box input:focus {
  border-color: #22205f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(34,32,95,.1);
}

.login-box input::placeholder { color: #a0aec0; }

/* Captcha box */
.captcha-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-box input { flex: 1; }

.captcha-box img {
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e5e9f0;
  background: #f7f8fa;
  object-fit: cover;
  flex-shrink: 0;
}

/* Refresh captcha */
.refresh-btn {
  background: transparent;
  border: 1.5px solid #e5e9f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all .15s;
}

.refresh-btn svg { flex-shrink: 0; }
.refresh-btn:hover { background: #f0f2f5; border-color: #d0d7e3; color: #22205f; }
.refresh-btn:hover svg { stroke: #22205f; }

/* Responsive */
@media (max-width: 480px) {
  .login-box { padding: 28px 20px; border-radius: 16px; }
  .captcha-box { flex-direction: column; align-items: stretch; }
  .captcha-box input {
    height: 48px;
    font-size: 16px; /* evita zoom en iOS */
  }
  .captcha-box img { height: 48px; width: 100%; object-fit: cover; margin: 0 auto; }
}
.login-box button[type="submit"] {
  height: 46px;
  background: #f66a24;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(246,106,36,.35);
  letter-spacing: .2px;
}

.login-box button[type="submit"]:hover {
  background: #d94e09;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(246,106,36,.45);
}

.login-box button[type="submit"]:active { transform: translateY(0); }

/* Notices (error, warning, info) */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #ffffff;
  border: 1.5px solid #e5e9f0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #22205f;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  line-height: 1.45;
}

.notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.notice--error {
  border-color: #fca5a5;
  color: #991b1b;
}
.notice--error svg { stroke: #e53e3e; }

.notice--warning {
  border-color: #fde68a;
  color: #78350f;
}
.notice--warning svg { stroke: #d97706; }
