/* ====== VARIABLES ====== */
:root {
  --color-primario: #009045;   /* Verde Institucional*/
  --color-secundario: #b8dabe;; /* Verde complementario */
  --color-fondo: #f4f6f9;
  --color-fuente: #303030;
}


/* ====== ESTILOS GENERALES ====== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--color-fondo);
}

.hero-section h1,
.hero-section p {
  color: white !important;
}


label, .form-label, .titulo-seccion {
  color: #303030 !important;
 
}


h6, h1, h2, h3, h4, h5 {
  color: var(--color-primario) !important;
  font-weight: bold;
}


a {
  color: var(--color-fuente) !important;
  text-decoration: none;
}
a:hover {
  color: var(--color-fuente) !important;
  text-decoration: underline;
}

/* ====== BOTONES ====== */
.btn, button, input[type="submit"], .btn-accion, .btn-login {
  background-color: var(--color-primario) !important;
  border: none !important;
  color: #fff !important;
  font-weight: bold;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn:hover, button:hover, input[type="submit"]:hover, 
.btn-accion:hover, .btn-login:hover {
  background-color: var(--color-secundario) !important;
}

/* ====== TABLAS ====== */
table {
  border: 1px solid var(--color-primario);
  width: 100%;
  border-collapse: collapse;
}
table th {
  background-color: var(--color-primario);
  color: #fff !important;
  text-align: center;
  padding: 8px;
}
table td {
  color: var(--color-primario);
  padding: 8px;
}
.table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
.table tbody tr:hover {
  background-color: #eaf3ea;
}

/* ====== ALERTAS ====== */
.alert {
  border-radius: 8px;
  font-weight: bold;
  padding: 10px 15px;
}
.alert-success {
  background-color: #d9f2e6 !important;
  color: var(--color-primario) !important;
  border: 1px solid var(--color-primario) !important;
}
.alert-danger {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}
.alert-info {
  background-color: #d1ecf1 !important;
  color: var(--color-primario) !important;
}

/* ====== FORMULARIOS ====== */
input[type="text"],
input[type="password"],
input[type="email"],
select, textarea {
  border: 1px solid var(--color-primario) !important;
  color: var(--color-primario) !important;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--color-secundario) !important;
  box-shadow: 0 0 4px var(--color-secundario) !important;
}

/* ====== LOGIN ====== */
.login-bg {
  background: url("https://emserchia.gov.co/wordem/wp-content/uploads/2019/05/Historia.jpg") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 380px;
}
.login-box h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-primario);
}


/* ====== SIDEBAR ====== */
.sidebar {
  width: 220px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--color-primario);
  padding-top: 20px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}
.sidebar a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: white !important;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.3s;
}

.sidebar a i {
  margin-right: 10px;
  font-size: 18px;
  color: #ffffff !important;  /* ícono blanco */
}


.sidebar a:hover {
  background: var(--color-secundario);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
}

/* ====== CONTENT ====== */
.content {
  margin-left: 220px;
  padding: 20px;
  transition: margin-left 0.3s ease;
}



/* ====== TOPBAR ====== */
.topbar {
  background: var(--color-primario);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ====== OVERLAY ====== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 900;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.overlay.active {
  display: block;
  opacity: 1;
}



/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    opacity: 0;
  }
  .sidebar.active {
    transform: translateX(0);
    opacity: 1;
  }
  .content {
    margin-left: 0;
  }
  .login-box {
    margin: 0 15px;
  }
}

/* ====== BARRA INSTITUCIONAL ====== */
.topbar-institucional {
  background: var(--color-primario);
  border-bottom: 3px solid var(--color-secundario);
}

.logo-img {
  height: 60px;
  width: auto;
  max-height: 60px;
}

/* En móvil más pequeño */
@media (max-width: 768px) {
  .logo-img {
    height: 40px;
  }
}

/* =======================================================
   HOME - INDEX
======================================================= */

.hero-section {
  position: relative;
  background: url('../img/imagen-fondo1.jpg') center center / cover no-repeat;
  color: white;
  padding: 100px 20px;
  border-radius: 12px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0, 144, 69, 0.75),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.btn-hero {
  background-color: white !important;
  color: var(--color-primario) !important;
  font-weight: bold;
  padding: 12px 28px;
  border-radius: 50px;
  transition: 0.3s;
}

.btn-hero:hover {
  background-color: var(--color-secundario) !important;
  color: white !important;
}

/* =======================================================
   FORMULARIO
======================================================= */

.section-card {
  margin-bottom: 30px;
  border-left: 6px solid var(--color-primario);
}

.section-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* =======================================================
   DASHBOARD
======================================================= */

.dashboard-header {
  background: linear-gradient(135deg, var(--color-primario), #0c6b38);
  color: white;
  padding: 30px;
  border-radius: 12px;
}

.card-metric {
  border-left: 6px solid var(--color-primario);
  transition: 0.3s;
}

.card-metric:hover {
  transform: translateY(-5px);
}

.metric-number {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-primario);
}

.quick-link {
  text-decoration: none;
}

.quick-link .card {
  transition: 0.3s;
}

.quick-link .card:hover {
  transform: scale(1.03);
}


/* =======================================================
   LOGIN
======================================================= */

.login-logo {
  height: 90px;
  width: auto;
}

@media (max-width: 768px) {
  .login-logo {
    height: 70px;
  }
}