.bg-opaco {
    background: rgba(10, 13, 30, 0.78);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(166, 105, 255, 0.45);
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.55),
                0 0 30px rgba(119,64,255,0.18);
    color: #f8f7ff;
}
body {
    color: #f8f7ff;
}
.navbar.bg-danger {
    background: rgba(10, 13, 30, 0.88) !important;
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(166,105,255,0.45);
}
.card.bg-opaco {
    background: rgba(10,13,30,0.78);
    color: #f8f7ff;
}
.card h5 {
    color: #ffffff;
    font-weight: 600;
}
.card .form-control {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(180,165,255,0.35);
    border-radius: 12px;
    color: #ffffff;
    padding: 11px 14px;
}
.card .form-control::placeholder {
    color: #c5c2d7;
}
.card .form-control:focus {
    background: rgba(255,255,255,0.14);
    color: #ffffff;
    border-color: #9a70ff;
    box-shadow: 0 0 0 3px rgba(154,112,255,0.18);
}
.card .form-control::file-selector-button {
    background: #292044;
    color: white;
    border: none;
}
.card .table {
    --bs-table-bg: transparent;
    --bs-table-color: #f8f7ff;
    --bs-table-border-color: rgba(180,165,255,0.25);
}
.card .table-dark {
    --bs-table-bg: #24203d;
    --bs-table-color: #ffffff;
}
.card .card-header.bg-dark {
    background: #24203d !important;
    border-bottom: 1px solid rgba(166,105,255,0.35);
}
.card form.border {
    border-color: rgba(166,105,255,0.35) !important;
    background: rgba(255,255,255,0.035);
    border-radius: 14px !important;
}
.card .text-muted {
    color: #c5c2d7 !important;
}
.card .text-primary {
    color: #b7a0ff !important;
}
.card .btn-primary {
    background: linear-gradient(110deg,#5939d9,#9c42d7,#2378df);
    border: none;
}
.card .btn {
    border-radius: 10px;
}
.navbar.bg-dark {
    background: rgba(10,13,30,0.88) !important;
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(166,105,255,0.45);
}
.card .table-hover {
    --bs-table-hover-bg: rgba(154,112,255,0.15);
    --bs-table-hover-color: #ffffff;
}
.card .table-striped {
    --bs-table-striped-bg: rgba(255,255,255,0.06);
    --bs-table-striped-color: #ffffff;
}
.card .table-light {
    --bs-table-bg: #24203d;
    --bs-table-color: #ffffff;
}
.card .form-select {
    background-color: #24203d;
    color: #ffffff;
    border: 1px solid rgba(180,165,255,0.35);
    border-radius: 12px;
    color-scheme: dark;
}
.card .form-select option {
    background: #17172c;
    color: #ffffff;
}
.card .card-header.bg-primary {
    background: #35256c !important;
    border-bottom: 1px solid rgba(166,105,255,0.35);
}
.card a:not(.btn) {
    color: #c9b9ff;
}

/* INDIGO GLASS - PULIDO PREMIUM TABLAS */

.card.bg-opaco .table-responsive {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #9464ed rgba(255,255,255,0.08);
}

.card.bg-opaco .table-responsive::-webkit-scrollbar {
    height: 7px;
}

.card.bg-opaco .table-responsive::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}

.card.bg-opaco .table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg,#6540cc,#b25be8);
    border-radius: 10px;
}

.card.bg-opaco .table th,
.card.bg-opaco .table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: rgba(180,165,255,0.18);
}

.card.bg-opaco .table thead th {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.card.bg-opaco .table tbody tr {
    transition: background-color 0.2s ease;
}

/* INDIGO GLASS - TITULOS PREMIUM */

.container-fluid > h2.bg-dark {
    background: rgba(12, 14, 32, 0.62) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(166, 105, 255, 0.42);
    border-radius: 18px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25),
                0 0 22px rgba(154,112,255,0.12);
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 14px 20px !important;
}

/* INDIGO GLASS - FORMULARIO INVENTARIO */

body:has(form input[name="nueva_cuenta"])
.row > .col-12:first-child > .card.bg-opaco {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

/* INDIGO GLASS - LISTA COMPACTA */

body:has(a.btn[href="lista.php"].btn-success)
.card.bg-opaco .table th,
body:has(a.btn[href="lista.php"].btn-success)
.card.bg-opaco .table td {
    padding: 10px 9px;
    font-size: 13px;
}

body:has(a.btn[href="lista.php"].btn-success)
.card.bg-opaco .table thead th {
    white-space: normal;
    min-width: 85px;
    overflow-wrap: normal;
}

body:has(a.btn[href="lista.php"].btn-success)
.card.bg-opaco .table td {
    overflow-wrap: anywhere;
}

body:has(a.btn[href="lista.php"].btn-success)
.card.bg-opaco .table td .btn {
    font-size: 12px;
    padding: 6px 9px;
}

/* INDIGO GLASS - POR VENCER PREMIUM */

/* Titulo de alerta elegante */
.container-fluid > h2.bg-danger {
    background: rgba(95, 20, 48, 0.72) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 100, 145, 0.55);
    border-radius: 18px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.28),
                0 0 20px rgba(255,70,115,0.15);
    color: #ffffff !important;
    padding: 14px 20px !important;
    font-weight: 600;
}

/* Columnas compactas */
body:has(h2.bg-danger) .card.bg-opaco .table th,
body:has(h2.bg-danger) .card.bg-opaco .table td {
    padding: 10px 9px;
    font-size: 13px;
}

body:has(h2.bg-danger) .card.bg-opaco .table thead th {
    white-space: normal;
    min-width: 85px;
}

body:has(h2.bg-danger) .card.bg-opaco .table td {
    overflow-wrap: anywhere;
}

body:has(h2.bg-danger) .card.bg-opaco .table td .btn {
    font-size: 12px;
    padding: 6px 9px;
}

/* INDIGO GLASS - MENU MOBILE */

@media (max-width: 767px) {

    .navbar > .container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 12px 15px;
    }

    .navbar .navbar-brand {
        margin: 0;
        text-align: center;
        white-space: normal;
        font-size: 17px;
    }

    .navbar > .container > .d-flex {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: 100%;
    }

    .navbar > .container > .d-flex > .btn {
        margin: 0 !important;
        padding: 11px 6px;
        font-size: 12px;
        border-radius: 11px;
        white-space: normal;
        min-width: 0;
    }

    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .card.bg-opaco {
        max-width: 100%;
    }

    .card.bg-opaco .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container-fluid > h2 {
        max-width: 100% !important;
        font-size: 19px;
        line-height: 1.4;
    }
}

/* INDIGO GLASS - MOBILE PREMIUM V3 */

@media (max-width: 767px) {

    .navbar > .container {
        gap: 10px;
        padding: 10px 12px;
    }

    .navbar > .container > .d-flex {
        gap: 8px;
    }

    .navbar > .container > .d-flex > .btn {
        padding: 10px 5px;
        font-size: 12px;
        line-height: 1.3;
        min-height: 42px;
    }

    .card.bg-opaco {
        margin-bottom: 16px;
    }

    .card.bg-opaco .card-body {
        padding: 16px !important;
    }

    .card.bg-opaco h2,
    .card.bg-opaco h3 {
        font-size: 21px;
        line-height: 1.3;
    }

    .card.bg-opaco .form-label {
        margin-bottom: 6px;
        font-size: 14px;
    }

    .card.bg-opaco .form-control,
    .card.bg-opaco .form-select {
        min-height: 44px;
        font-size: 16px;
    }

    .card.bg-opaco .table-responsive {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    .card.bg-opaco .table-responsive > table {
        min-width: 850px;
    }

    .container-fluid > h2 {
        padding: 14px 12px !important;
        font-size: 19px !important;
    }
}
