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

:root {
  --primary-color: #F52100;
  --primary-hover: #D41C00;
  --primary-glow: rgba(245, 33, 0, 0.15);
  --primary-light: rgba(245, 33, 0, 0.05);
  --bg-gradient: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-dark: #111827;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --border-radius: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.modern-theme {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Contenedor principal de Login */
.login-container {
  display: flex;
  width: 90%;
  max-width: 960px;
  min-height: 540px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 20px auto;
}

/* Lado izquierdo (Logo y Branding) */
.login-branding {
  flex: 1;
  background: rgba(245, 33, 0, 0.03);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
}

.login-branding::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--primary-color);
  filter: blur(120px);
  opacity: 0.25;
  top: 20%;
  left: 20%;
  pointer-events: none;
}

.login-branding img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  animation: float 6s ease-in-out infinite;
}

/* Lado derecho (Formulario) */
.login-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.login-title-modern {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* Inputs Modernos */
.input-group-modern {
  position: relative;
  margin-bottom: 24px;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
  pointer-events: none;
  z-index: 10;
}

.form-control-modern {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-smooth);
  outline: none;
}

.form-control-modern::placeholder {
  color: #9ca3af;
}

.form-control-modern:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(245, 33, 0, 0.15);
}

.form-control-modern:focus + .input-icon {
  color: var(--primary-color);
}

/* Alertas de error */
.alert-modern {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botones Modernos */
.btn-modern {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-glow);
}

.btn-modern:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(245, 33, 0, 0.5);
}

.btn-modern:active {
  transform: translateY(0);
}

/* Dashboard / Inicio Grid modernizado */
.dashboard-wrapper {
  width: 90%;
  max-width: 1100px;
  margin: 20px auto 40px auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--text-primary) 0%, #f52100 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transition: var(--transition-smooth);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 33, 0, 0.2);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 20px rgba(245, 33, 0, 0.05);
}

.dashboard-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-card-title span {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color);
  background: rgba(245, 33, 0, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Botones de acción del menú */
.dashboard-card form {
  margin-bottom: 14px;
}

.dashboard-card form:last-of-type {
  margin-bottom: 0;
}

.dashboard-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  transition: var(--transition-smooth);
}

.dashboard-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 16px rgba(245, 33, 0, 0.12), inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

/* Estilos de cabecera adaptada */
.header-modern {
  width: 100%;
  height: 90px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container-modern {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.header-link:hover {
  color: var(--primary-color);
}

.header-link.btn-logout {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.header-link.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

/* Animación de flotado */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Responsividad general */
@media (max-width: 767px) {
  body.modern-theme {
    padding: 20px 10px;
  }
  .login-container {
    flex-direction: column;
    width: 100%;
    min-height: auto;
  }
  .login-branding {
    padding: 40px;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }
  .login-branding img {
    max-width: 180px;
  }
  .login-form-wrapper {
    padding: 40px 24px;
  }
  .dashboard-wrapper {
    margin-top: 20px;
  }
  .dashboard-card {
    padding: 24px;
  }
}

/* Badge Flotante para opciones Nuevas */
.badge-new {
  position: absolute;
  top: -8px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-color);
  background: rgba(245, 33, 0, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(245, 33, 0, 0.15);
  box-shadow: 0 4px 8px rgba(245, 33, 0, 0.12);
  animation: mini-float 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes mini-float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0px); }
}
