@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500;600&display=swap');

:root {
  --red:       #C8181F;
  --red-dark:  #9E1015;
  --blue:      #1B3A8C;
  --blue-dark: #102060;
  --blue-mid:  #1E4299;
  --grad-blue: linear-gradient(135deg,#0A1540 0%,#1B3A8C 50%,#2A5ACC 100%);
  --grad-red:  linear-gradient(135deg,#9E1015 0%,#C8181F 60%,#E8282F 100%);
  --white:     #FFFFFF;
  --bg:        #F0F4FF;
  --border:    #D8E0F5;
  --text:      #111827;
  --text-soft: #6B7280;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

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

body {
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

/* ─── LEFT PANEL ────────────────────────────────────────── */
.login-left {
  flex: 1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(42,90,204,0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(200,24,31,0.3) 0%, transparent 50%),
    linear-gradient(150deg,#0A1540 0%,#102060 40%,#1B3A8C 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 48px;
  position: relative; overflow: hidden;
}

/* Patrón de puntos decorativo */
.login-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Anillo decorativo grande */
.login-left::after {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 400px; height: 400px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(42,90,204,0.15);
}

.login-left-decoration {
  position: absolute; bottom: -80px; left: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,24,31,0.2) 0%, transparent 70%);
}

.login-left-decoration2 {
  position: absolute; top: 60px; right: 40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(42,90,204,0.3) 0%, transparent 70%);
}

/* ─── Marca ─── */
.login-brand {
  position: relative; z-index: 2; text-align: center; margin-bottom: 16px;
}

.login-brand img {
  height: 76px; filter: brightness(0) invert(1);
  margin-bottom: 18px; drop-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.login-brand-name {
  font-family: var(--font-head); font-size: 48px; font-weight: 800;
  color: var(--white); text-transform: uppercase; letter-spacing: 3px; line-height: 1;
}
.login-brand-name span { color: #FF5C5C; }

.login-brand-sub {
  font-size: 11px; color: rgba(255,255,255,0.45);
  letter-spacing: 3.5px; text-transform: uppercase; margin-top: 10px;
}

/* ─── Tagline ─── */
.login-tagline {
  position: relative; z-index: 2; text-align: center;
  max-width: 360px; margin-top: 44px;
}
.login-tagline h2 {
  font-family: var(--font-head); font-size: 26px; font-weight: 700;
  color: white; text-transform: uppercase; margin-bottom: 10px; line-height: 1.2;
}
.login-tagline p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; }

/* ─── Feature pills ─── */
.login-features {
  position: relative; z-index: 2; margin-top: 36px;
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 360px;
}

.feature-pill {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 12px 16px;
  color: rgba(255,255,255,0.8); font-size: 13.5px;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}
.feature-pill:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.feature-pill-icon {
  width: 32px; height: 32px;
  background: var(--grad-red);
  border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: white;
  box-shadow: 0 4px 12px rgba(200,24,31,0.3);
}

/* ═══════════════════════════════════════════════
   RIGHT PANEL
═══════════════════════════════════════════════ */
.login-right {
  width: 500px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 52px 48px;
  background: linear-gradient(160deg, #FFFFFF 0%, #F0F4FF 100%);
  overflow-y: auto;
}

.login-form-header { width: 100%; margin-bottom: 28px; }

.login-form-title {
  font-family: var(--font-head); font-size: 34px; font-weight: 800;
  color: var(--text); text-transform: uppercase; margin-bottom: 6px; line-height: 1.1;
}
.login-form-title span {
  background: var(--grad-red);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.login-form-sub { font-size: 14px; color: var(--text-soft); }

/* ─── Form ─── */
.login-form { width: 100%; }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-soft); margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-wrap .input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-soft); font-size: 17px; pointer-events: none;
}

.input-wrap input {
  width: 100%; padding: 13px 15px 13px 42px;
  border: 1.5px solid var(--border); border-radius: 11px;
  font-family: var(--font-body); font-size: 14.5px;
  color: var(--text); background: white;
  transition: all 0.22s; outline: none;
}

.input-wrap input:focus {
  border-color: var(--blue);
  background: #FAFBFF;
  box-shadow: 0 0 0 4px rgba(27,58,140,0.08);
}

.input-wrap input:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.toggle-pass {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-soft); font-size: 17px;
  background: none; border: none; padding: 0;
  transition: color 0.2s;
}
.toggle-pass:hover { color: var(--blue); }

.form-options {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; font-size: 13.5px;
}

.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--blue); width: 15px; height: 15px; }
.form-check span { color: var(--text); }

.form-link { color: var(--blue); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.form-link:hover { color: var(--red); }

/* ─── Submit button ─── */
.btn-login-submit {
  width: 100%; padding: 15px;
  background: var(--grad-blue);
  color: white; border: none; border-radius: 12px;
  font-family: var(--font-head); font-size: 18px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 24px rgba(27,58,140,0.35);
  position: relative; overflow: hidden;
}

.btn-login-submit::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.btn-login-submit:hover::before { left: 100%; }
.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(27,58,140,0.45);
  filter: brightness(1.08);
}

.btn-login-submit:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* ─── Error messages ─── */
.error-msg {
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(135deg, rgba(200,24,31,0.06), rgba(232,40,47,0.03));
  border: 1.5px solid rgba(200,24,31,0.2);
  border-radius: 11px; padding: 13px 15px;
  color: var(--red); font-size: 13.5px; font-weight: 600;
  margin-bottom: 20px;
}

/* ─── Quick buttons ─── */
.quick-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1.5px solid var(--border);
  border-radius: 9px; padding: 9px 14px; cursor: pointer;
  font-size: 13px; font-family: var(--font-body);
  transition: all 0.2s; width: 100%; text-align: left;
}
.quick-btn:hover { background: #F8FAFF; }

.quick-badge {
  padding: 3px 10px; border-radius: 6px; font-size: 11px;
  font-weight: 800; color: white; font-family: var(--font-head);
  letter-spacing: 0.5px;
}

/* ─── DB error banner ─── */
.db-error-banner {
  background: linear-gradient(135deg, rgba(200,24,31,0.06), rgba(232,40,47,0.02));
  border: 1.5px solid rgba(200,24,31,0.2);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 24px;
}
.db-error-banner h3 {
  font-family: var(--font-head); font-size: 17px; font-weight: 800;
  color: var(--red); text-transform: uppercase; margin-bottom: 8px;
}
.db-error-banner p { font-size: 13px; color: var(--text); line-height: 1.6; }
.db-error-banner code {
  display: block; background: white; border-radius: 7px;
  padding: 8px 12px; margin-top: 8px; font-size: 12px;
  color: var(--blue); border: 1px solid var(--border);
}

/* ─── Login footer ─── */
.login-footer { margin-top: 28px; text-align: center; font-size: 13px; color: var(--text-soft); }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  body { flex-direction: column; }
  .login-left { padding: 40px 28px; min-height: 260px; }
  .login-features { display: none; }
  .login-right { width: 100%; padding: 36px 28px; }
  .login-tagline { display: none; }
}
