:root {
  --primary: #073B4C;
  --primary-light: #0d546c;
  --primary-dark: #002431;
  --accent-sky: #27AEE4;
  --accent-teal: #2DD4BF;
  --accent-emerald: #10B981;
  --surface: #F8FAFC;
  --surface-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-light: rgba(226, 232, 240, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-ambient: 0 20px 40px -15px rgba(7, 59, 76, 0.12), 0 0 1px 1px rgba(7, 59, 76, 0.05);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef3f7 0%, #dce6ee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-main);
}

.login-wrapper {
  width: 100%;
  max-width: 1120px;
  min-height: 640px;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

/* ══════════════════════════════════════════════ */
/* PANEL IZQUIERDO: FORMULARIO Y LOGIN MSFT        */
/* ══════════════════════════════════════════════ */
.login-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  position: relative;
  z-index: 2;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.login-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.login-content {
  margin: 36px 0;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Botón corporativo de Microsoft */
.btn-msft-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  background: #ffffff;
  color: #2F2F2F;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn-msft-login:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(7, 59, 76, 0.08);
  transform: translateY(-1px);
}

.btn-msft-login:active {
  transform: translateY(0);
  background: #F1F5F9;
}

.msft-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Badge de Seguridad */
.security-note {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: #F8FAFC;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #EEF2F6;
}

.security-note svg {
  color: var(--accent-teal);
  flex-shrink: 0;
}

/* Alerta de Error y No Autorizado */
.alert-error {
  display: none;
  align-items: flex-start;
  gap: 12px;
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  color: #9A3412;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(154, 52, 18, 0.06);
}

.alert-error.visible {
  display: flex;
}

.alert-error-icon {
  color: #EA580C;
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-error-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-error-title {
  font-weight: 700;
  font-size: 13px;
  color: #9A3412;
}

.alert-error-msg {
  color: #7C2D12;
}

.alert-error-action {
  font-size: 12px;
  color: #C2410C;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}


.login-footer {
  font-size: 11px;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #F1F5F9;
  padding-top: 16px;
}

/* ══════════════════════════════════════════════ */
/* PANEL DERECHO: SHOWCASE & FOTOGRAFÍA PRESA     */
/* ══════════════════════════════════════════════ */
.showcase-panel {
  position: relative;
  background-image: url('../assets/dam_potrerillos.jpg');
  background-size: cover;
  background-position: center center;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Overlay petrolero con gradiente y efecto de profundidad */
.showcase-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, rgba(7, 59, 76, 0.82) 0%, rgba(0, 36, 49, 0.72) 100%);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.showcase-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Micro-tarjetas flotantes Glassmorphism */
.glass-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  margin-left: auto;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.glass-card:nth-child(1) { animation-delay: 0.1s; }
.glass-card:nth-child(2) { animation-delay: 0.2s; margin-right: 18px; }
.glass-card:nth-child(3) { animation-delay: 0.3s; }

.glass-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background: rgba(39, 174, 228, 0.15); color: #0284C7; }
.icon-teal { background: rgba(45, 212, 191, 0.15); color: #0D9488; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #059669; }

.glass-card-info {
  display: flex;
  flex-direction: column;
}

.glass-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.glass-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

/* Pie del Showcase */
.showcase-footer {
  color: #FFFFFF;
  margin-top: auto;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.showcase-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.showcase-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 440px;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 860px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
  }
  .showcase-panel {
    display: none;
  }
  .login-panel {
    padding: 36px 28px;
  }
}
