/* === COLORES BASE === */
:root {
  --azul-principal: #152946;   /* azul oscuro principal */
  --azul-secundario: #005BAC;  /* azul corporativo */
  --naranjo-secundario: #d9790b;  /* azul corporativo */
  --azul-suave: #eaf1fa;       /* azul claro de fondo */
  --gris-texto: #1e293b;
  --gris-claro: #6b7280;
  --verde: #22c55e;
  --amarillo: #fbbf24;
  --rojo: #ef4444;
}

/* === BASE GENERAL === */
html, body {
  height: 100%;
  margin: 0;
  background: var(--azul-suave);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body {
  background: var(--azul-suave);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--gris-texto);
}

.app-header {
  background: transparent;
  padding: 1rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
  box-shadow: none;
}

/* === LAYOUT GENERAL === */
.app-content.container {
  background-color: transparent;
  padding: 0rem;
  border-radius: 12px;
  color: var(--gris-texto);
}

/* === TITULOS DE SECCION === */
.section-title {
  font-weight: 600;
  color: var(--azul-principal);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title i {
  color: var(--azul-secundario);
  font-size: 1.2rem;
}

.texto_color_naranja {
  color: var(--azul-secundario);
}


.texto_azul_principal {
  color: var(--azul-principal);
}




.texto_naranja {
  color: var(--naranjo-secundario);
}

.texto_naranja_bold {
  color: var(--naranjo-secundario);
  font-weight: bold;

}




.bg_color_naranja {
  background-color: var(--azul-secundario);
}



.bg_naranja {
  background-color: #d9790b;
}

/* === TARJETAS (CARDS) === */
.card {
  border: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* === TARJETAS DE RESUMEN (top cards) === */
.card-click {
  cursor: pointer;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.card-click:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-click h6 {
  color: var(--gris-claro);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card-click h6 i {
  color: var(--azul-secundario);
}

.card-click span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--azul-principal);
}

/* === TABLAS === */
.table {
  background: #fff;
  color: var(--azul-principal);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
}

.table thead {
  background-color: #f3f6fb;
  color: var(--azul-principal);
  font-weight: 600;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 91, 172, 0.07);
  transition: background 0.2s ease;
}

.table td, .table th {
  padding: 0.8rem;
  vertical-align: middle;
  border: none;
}

/* === PROGRESO === */
.progress {
  background-color: #e5e7eb;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-bar.bg-success { background-color: var(--verde) !important; }
.progress-bar.bg-warning { background-color: var(--amarillo) !important; }
.progress-bar.bg-danger  { background-color: var(--rojo) !important; }

/* === BOTONES === */
.btn-outline-primary {
  color: var(--azul-secundario);
  border-color: var(--azul-secundario);
  font-weight: 500;
}

.btn-outline-primary:hover {
  background-color: var(--azul-secundario);
  color: #fff;
}

.btn-outline-secondary {
  color: #6b7280;
  border-color: #d1d5db;
}

.btn-outline-secondary:hover {
  background-color: #f3f4f6;
  color: var(--azul-principal);
}

.btn-primario {
  background-color: var(--azul-secundario);
  color: white;
}

.btn-primario:hover {
  background-color: #004480;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* === CHART === */
canvas {
  max-width: 100%;
}

#graficoAvanceObra {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .app-content.container {
    padding: 1.5rem;
  }
  .card-click span {
    font-size: 1.6rem;
  }
}

/* === SIDEBAR === */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 1049;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background-color: var(--azul-principal);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  padding-top: 80px;
  transition: transform 0.3s ease;
  transform: translateX(-100%);
  z-index: 1050;
  font-size: 0.95em;
}

.sidebar.open {
  transform: translateX(0);
  width: 350px;
}

.sidebar a {
  display: block;
  padding: 8px 22px;
  color: #efefef;
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.sidebar a:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.sidebar a.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left: 3px solid var(--azul-secundario);
}

.sidebar a i {
  margin-right: 10px;
  color: #9da4b0;
  transition: color 0.3s ease;
}

.sidebar a:hover i,
.sidebar a.active i {
  color: var(--azul-secundario);
}

.sidebar .close-sidebar {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.4rem;
  color: white;
  cursor: pointer;
}

.sidebar-toggle {
  font-size: 1.7rem;
  cursor: pointer;
}

.sidebar .submenu-content {
  background-color: #fff;
  border-left: 3px solid var(--naranjo-secundario);
  border-radius: 6px;
  margin: 5px 15px;
  padding: 10px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.sidebar .submenu-content a {
  color: var(--azul-principal) !important;
}

.sidebar .submenu-content a:hover {
  color: var(--naranjo-secundario);
  
}

/* === CONTENIDO === */
.app-content {
  padding: 2rem 1rem;
  text-align: center;
  flex: 1;
}

/* === BOTONES REDONDOS === */
.btn-circle {
  width: 85%;
  height: 80px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.04s ease;
  margin: 1rem auto;
  display: block;
}

.btn-abrir {
  background-color: var(--azul-secundario);
  color: white;
}

.btn-cerrar {
  background-color: #f33c58;
  color: white;
}

.btn-cerrar:hover {
  background-color: #d32f2f;
  transform: scale(1.05);
}

/* === BOTON FLOTANTE === */
.btn-volver-flotante {
  position: fixed;
  bottom: 4rem;
  left: 1rem;
  background-color: var(--azul-secundario);
  color: white;
  font-size: 1.8rem;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
  text-decoration: none;
}

.btn-volver-flotante:hover {
  background-color: #004480;
  color: white;
}

/* === PROYECTOS / OBRAS === */
.card-proyecto {
  background-color: #fff;
  color: #333;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--azul-secundario);
  transition: transform 0.04s ease;
}

.card-proyecto:hover {
  transform: translateY(-3px);
}

.card-proyecto h5 {
  font-size: 1.2rem;
  color: var(--azul-secundario);
}

/* === OPCIONES === */
.btn-opcion {
  background-color: var(--azul-secundario);
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 1.2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
}
.btn-opcion:hover,
.btn-opcion:focus {
  background-color: #004480;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
}

/* === SCROLLBAR === */
.sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.15);
  border-radius: 8px;
  transition: background-color 0.3s ease;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255,255,255,0.3);
}
