/* =========================================================
   BASE (Bootstrap default – NO TOCAR)
   ========================================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html, body {
    height: 100%;
}

body {
    margin-bottom: 60px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================================
   DARK MODE – Bootstrap Friendly
   ========================================================= */

[data-bs-theme="dark"] {
    --bs-body-bg: #0b1220;
    --bs-body-color: #e5e7eb;
    --bs-border-color: #1f2937;
    --bs-secondary-color: #9ca3af;
    --bs-link-color: #22d3ee;
    --bs-link-hover-color: #67e8f9;
}

/* =========================================================
   DARK CRYSTAL BACKGROUND (CLAVE)
   ========================================================= */

html[data-bs-theme="dark"] body {
    color: var(--bs-body-color);
    background: linear-gradient( rgba(5, 10, 25, 0), rgba(5, 10, 25, 0.94) ), url("/img/zipcalpules.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Overlay sutil para profundidad */
.background-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%);
    z-index: -1;
    pointer-events: none;
}

/* =========================================================
   GLASS / CRYSTAL ELEMENTS (NEGRO REAL)
   ========================================================= */

.glass-navbar,
.content-glass,
.footer-glass,
.card {
    background: rgba(0, 0, 0, 0.55);
   /* backdrop-filter: blur(16px) saturate(120%);*/
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), inset 0 0 0.5px rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

/* =========================================================
   NAVBAR / FOOTER
   ========================================================= */

.glass-navbar {
    margin: 0 12px 12px;
}

[data-bs-theme="dark"] .navbar {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] footer {
    color: var(--bs-secondary-color);
}

/* =========================================================
   FORMS / TABLES
   ========================================================= */

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: rgba(2, 6, 23, 0.85);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

    [data-bs-theme="dark"] .form-control:focus {
        background-color: rgba(2, 6, 23, 0.95);
    }

[data-bs-theme="dark"] .table {
    --bs-table-bg: rgba(2, 6, 23, 0.75);
    --bs-table-color: var(--bs-body-color);
}

/* =========================================================
   CARDS / DASHBOARD
   ========================================================= */

.card-header {
    background: linear-gradient( 90deg, rgba(56, 189, 248, 0.25), rgba(34, 211, 238, 0.12) );
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* =========================================================
   CHART.JS – SCADA LOOK
   ========================================================= */

canvas {
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.35));
}

/* =========================================================
   TEXT / LINKS
   ========================================================= */

a {
    color: #6ee7ff;
    text-decoration: none;
}

    a:hover {
        color: #9befff;
    }

.text-muted {
    color: #9aa4b2 !important;
}

h1, h2, h3, h4 {
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

/* =========================================================
   UTIL / SCADA FEEL
   ========================================================= */

.badge {
    backdrop-filter: blur(6px);
}

/* IMPORTANTÍSIMO: no tapar el fondo */
.container,
.container-fluid {
    background: transparent !important;
}

/* Header fijo arriba */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;
}

/* Footer fijo abajo */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Compensar espacio para que el contenido no quede tapado */
main {
    margin-top: 78px; /* altura aprox del navbar + separacion superior */
    margin-bottom: 50px; /* altura aprox del footer */
}