/**
 * Login — Pulse by clantic
 *
 * Estilos de la pantalla de login. Los tokens `:root` de abajo son un
 * override de página: solo oscurecen los fondos (--bg..--bg4) para el look
 * "hero" del login; el resto de tokens (acentos, texto, radios) coinciden
 * con los globales de assets/css/style.css.
 */

:root {
  --bg:       #060a13;
  --bg2:      #0c1220;
  --bg3:      #131c2e;
  --bg4:      #1b2940;
  --border:   rgba(255,255,255,.06);
  --border2:  rgba(255,255,255,.1);
  --text:     #f0f4f8;
  --text2:    #7b8fa6;
  --text3:    #4a5d73;
  --accent:   #3b82f6;
  --accent-h: #2563eb;
  --accent2:  #818cf8;
  --red:      #f43f5e;
  --green:    #10b981;
  --radius:   12px;
  --ease:     cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow: hidden;
}

/* ── Animated background ── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(129,140,248,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59,130,246,.04) 0%, transparent 50%);
  animation: bgShift 20s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes bgShift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, 2%) rotate(3deg); }
}

/* ── Grid dots overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  position: relative;
  z-index: 1;
  animation: loginFadeIn .5s var(--ease);
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card {
  background: rgba(12,18,32,.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 40px 36px 36px;
  box-shadow:
    0 8px 32px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.login-logo .logo-icon svg {
  width: 26px;
  height: 26px;
}
.login-logo h1 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}
.login-logo p {
  font-size: 13px;
  color: var(--text3);
  margin-top: 6px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 7px;
  font-weight: 600;
  letter-spacing: .2px;
}
.form-group input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all .2s var(--ease);
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  background: var(--bg4);
}
.form-group input::placeholder {
  color: var(--text3);
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s var(--ease);
  font-family: inherit;
  margin-top: 6px;
  box-shadow: 0 2px 12px rgba(59,130,246,.3);
  letter-spacing: .2px;
}
.btn-login:hover {
  background: linear-gradient(135deg, var(--accent-h), #4f46e5);
  box-shadow: 0 4px 20px rgba(59,130,246,.4);
  transform: translateY(-1px);
}
.btn-login:active {
  transform: translateY(0);
}

.error-msg {
  background: linear-gradient(90deg, rgba(244,63,94,.1), rgba(244,63,94,.05));
  border: 1px solid rgba(244,63,94,.2);
  color: var(--red);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  text-align: center;
  animation: shakeError .4s var(--ease);
}
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
}
.role-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--border);
}
.role-tab {
  flex: 1;
  padding: 10px 6px;
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all .2s var(--ease);
  text-align: center;
  line-height: 1.4;
}
.role-tab:hover {
  color: var(--text2);
  background: var(--bg3);
}
.role-tab.active {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.role-tab .tab-icon { font-size: 18px; display: block; margin-bottom: 2px; }
.role-tab .tab-icon svg { width: 18px; height: 18px; display: block; margin: 0 auto; }
.role-tab .tab-label { display: block; }
.role-tab .tab-hint { display: block; font-size: 9px; font-weight: 400; opacity: .75; margin-top: 2px; line-height: 1.3; }
