/* -------------------- RESET SUAVE -------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* -------------------- LAYOUT GENERAL -------------------- */
body {
    min-height: 100vh;
    color: #ffffff;
    background: radial-gradient(circle at top left, #1d3557, #0f172a 40%, #020617);
    display: flex;
    flex-direction: column;
}

/* Contenedor principal */
.main-container {
    width: 100%;
    max-width: 1100px;
    margin: 80px auto 40px auto;
    padding: 0 16px 40px 16px;
}

/* -------------------- HEADER -------------------- */
.main-header nav a {
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(255,255,255,0.08);
    transition: 0.2s;
}
.main-header nav a:hover {
    background: rgba(56,189,248,0.35);
    color: #fff;
}




.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.main-header h1 {
    font-size: 1.1rem;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-header nav a {
    color: #cbd5f5;
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.9rem;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.main-header nav a:hover {
    color: #ffffff;
    border-color: #38bdf8;
}

/* -------------------- FLASH MESSAGES -------------------- */
.flash-container {
    margin-bottom: 16px;
}

.flash-message {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.4);
    color: #bbf7d0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* -------------------- TARJETAS HOME -------------------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 12px 30px rgba(15,23,42,0.8);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.95);
    border-color: #38bdf8;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.card p {
    font-size: 0.9rem;
    color: #94a3b8;
    flex: 1;
}

/* -------------------- BOTONES -------------------- */
.btn,
.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0b1120;
    box-shadow: 0 10px 25px rgba(56,189,248,0.45);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.btn:hover,
.btn-home:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(56,189,248,0.65);
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.btn:active,
.btn-home:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(15,23,42,0.9);
}

/* Botón Home secundario */
.btn-home {
    margin-bottom: 14px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 10px 25px rgba(34,197,94,0.45);
    color: #ecfdf5;
}

/* -------------------- FORMULARIOS -------------------- */
form.form-container {
    margin-top: 18px;
    background: rgba(15, 23, 42, 0.94);
    border-radius: 16px;
    padding: 18px 16px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 14px 34px rgba(15,23,42,0.9);
    color: #e5e7eb;
}

form h3 {
    margin: 12px 0 8px 0;
    font-size: 0.98rem;
    color: #e5e7eb;
}

form label {
    display: block;
    font-size: 0.84rem;
    color: #cbd5f5;
    margin-bottom: 4px;
    margin-top: 8px;
}

form input[type="number"],
form input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

form input[type="number"]:focus,
form input[type="text"]:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56,189,248,0.5);
}

form button[type="submit"] {
    margin-top: 16px;
}

/* Grid para secciones de costos y parámetros */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 14px;
    margin-top: 8px;
}

/* -------------------- TABLAS -------------------- */
table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #e5e7eb;
}

table thead {
    background: rgba(15,23,42,0.95);
}

table thead th {
    padding: 6px 6px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}

table tbody tr:nth-child(even) {
    background: rgba(15,23,42,0.85);
}

table tbody tr:nth-child(odd) {
    background: rgba(15,23,42,0.75);
}

table tbody td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

/* Inputs dentro de tablas */
table input[type="number"],
table input[type="text"] {
    font-size: 0.8rem;
    padding: 4px 6px;
}

/* -------------------- TITULOS Y TEXTOS -------------------- */
h2 {
    color: #f9fafb;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

p {
    color: #cbd5f5;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .main-container {
        margin-top: 90px;
        padding-bottom: 20px;
    }

    .card {
        padding: 14px 12px;
    }

    form.form-container {
        padding: 14px 12px;
    }
}
/* ===================== */
/*     NAVBAR / HEADER   */
/* ===================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    z-index: 9999;
}

.site-header-inner {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
}

.logo-icon {
    font-size: 1.3rem;
}

.logo-text {
    font-size: 1rem;
    font-weight: 600;
}

/* NAV LINKS */
.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 20px;
    color: #e2e8f0;
    background: rgba(255,255,255,0.08);
    transition: 0.25s ease-in-out;
}

.main-nav a:hover {
    color: white;
    background: rgba(59,130,246,0.55);
}

/* Highlight usuario */
.nav-user {
    color: #94a3b8;
    font-size: 0.85rem;
    padding-right: 5px;
}

/* Logout highlight */
.logout-link {
    background: rgba(239, 68, 68, 0.3);
}
.logout-link:hover {
    background: rgba(239, 68, 68, 0.65) !important;
}

/* Separación para que el contenido no quede debajo */
.main-container {
    padding-top: 90px;
}

/* para lo del pmp*/
.tabla-pmp-resultado th {
  background: #e6f4ff;
}

.tabla-pmp-resultado tr:nth-child(4) th { /* BDP */
  color: #c00;
}

.tabla-pmp-resultado tr:nth-child(5) th { /* DPP */
  color: #8040c0;
}

.tabla-pmp-resultado tr:nth-child(6) th { /* PMP */
  color: #0055ff;
}

.celda-pmp {
  background: #ffcccc;
  font-weight: bold;
}

