body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    margin: 20px; 
    background-color: #f8f9fa; 
    color: #333;
}
h1 { 
    color: #1a252f; 
    border-bottom: 2px solid #34495e; 
    padding-bottom: 10px;
}
table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    margin-top: 20px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
th, td { 
    padding: 12px 15px; 
    text-align: left; 
    border-bottom: 1px solid #e0e0e0;
}
th { 
    background-color: #34495e; 
    color: white; 
    text-transform: uppercase; 
    font-size: 12px;
}
tr:hover { 
    background-color: #f1f2f6; 
}
.text-right { text-align: right; }
.bold { font-weight: bold; }

/* --- NUEVOS ESTILOS PARA LA BARRA DE NAVEGACIÓN --- */
.navbar {
    background-color: #2c3e50;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    color: #f1c40f;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}
.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.nav-menu li {
    margin-left: 20px;
}
.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s ease;
}
.nav-menu a:hover {
    background-color: #34495e;
    color: #f1c40f;
}

/* Contenedor del contenido de las páginas */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Pie de página */
.main-footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
}

/* --- ESTILOS PARA FORMULARIOS Y ALERTAS --- */
.formulario-obra {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 15px;
}
.row-form {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}
.col-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tres-columnas .col-form {
    flex: 1;
}
.col-form label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}
.col-form input, .col-form select {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    color: #444;
}
.col-form input:focus, .col-form select:focus {
    border-color: #34495e;
    outline: none;
}
.row-form-botones {
    margin-top: 25px;
    text-align: right;
}
.btn-guardar {
    background-color: #27ae60;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-guardar:hover {
    background-color: #219653;
}

/* Alertas */
.alerta {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}
.alerta.exito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alerta.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- MEJORAS VISUALES PARA INSUMOS Y CONCEPTOS --- */
.header-seccion {
    margin-bottom: 25px;
}
.badge-codigo {
    background-color: #eec1102b;
    color: #b78a00;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
}
.color-precio {
    color: #27ae60;
}
.titulo-partida {
    background-color: #eaeded;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
    margin-top: 35px;
    border-left: 5px solid #34495e;
    border-radius: 0 4px 4px 0;
}

/* --- COMPONENTES DE EDICIÓN Y BOTONES --- */
.contenedor-formulario-rapido {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}
.contenedor-formulario-rapido summary {
    font-weight: bold;
    cursor: pointer;
    color: #2c3e50;
    outline: none;
}
.grid-4-columnas {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}
.grid-4-columnas input {
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}
.btn-accion {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}
.btn-exito { background-color: #27ae60; color: white; }
.btn-editar { background-color: #f1c40f; color: #333; margin-right: 5px; }
.btn-eliminar { background-color: #e74c3c; color: white; }
.btn-accion:hover { opacity: 0.9; }

/* --- ESTILOS DEL DASHBOARD PRINCIPAL --- */
.dashboard-bienvenida {
    margin-bottom: 30px;
    background: #fdfefe;
    padding: 10px 0;
}
.grid-estadisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.tarjeta-est {
    background: #34495e;
    color: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.tarjeta-est .numero {
    font-size: 32px;
    font-weight: bold;
    color: #f1c40f;
}
.tarjeta-est .etiqueta {
    font-size: 13px;
    text-transform: uppercase;
    margin-top: 5px;
    color: #ecf0f1;
}
.grid-accesos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.acceso-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.acceso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-color: #34495e;
}
.acceso-card .icono {
    font-size: 36px;
    margin-bottom: 15px;
}
.acceso-card h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}
.acceso-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
}

/* --- CUADRO DE RESUMEN ACUMULADO DINÁMICO --- */
.resumen-acumulado {
    background-color: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.resumen-acumulado strong {
    font-size: 20px;
    color: #f1c40f;
    font-family: monospace;
}

/* --- TARJETAS SELECCIONABLES DE OBRAS --- */
.grid-obras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.obra-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.obra-card:hover {
    border-color: #34495e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.obra-icono {
    font-size: 28px;
    margin-bottom: 5px;
}
.obra-codigo {
    font-size: 11px;
    font-weight: bold;
    background: #e2e8f0;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.obra-card h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
}
.obra-ubicacion {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.4;
}
.obra-acciones {
    display: flex;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}
.btn-proyecto {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-ver {
    background-color: #34495e;
    color: white;
}
.btn-ver:hover { background-color: #2c3e50; }
.btn-capturar {
    background-color: #f1c40f;
    color: #2c3e50;
}
.btn-capturar:hover { background-color: #d4ac0d; }

.tarjeta-est-btn {
    background: #34495e;
    color: white;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}
.tarjeta-est-btn:hover {
    transform: translateY(-3px);
    background: #2c3e50;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

