/* --- INPUTS Y FORMULARIOS --- */

/* MODO OSCURO (Por defecto) */
.form-control::placeholder,
.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus,
.custom-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* MODO CLARO */
body.light-mode .custom-input,
body.light-mode #login-container .custom-input {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .custom-input::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
}

body.light-mode .custom-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3) !important;
}


/* --- SELECTOR DE PLATAFORMA (PÍLDORAS) --- */

/* MODO OSCURO (Por defecto) */
.pildora-container {
    background: var(--glass-bg);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    display: inline-flex;
    margin-bottom: 20px;
}

.btn-pildora {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-pildora.active {
    background: var(--accent-color);
    color: #0f172a;
    font-weight: bold;
}

/* MODO CLARO */
body.light-mode .pildora-container {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .btn-pildora {
    color: rgba(0, 0, 0, 0.5);
}

body.light-mode .btn-pildora.active {
    background: #0dcaf0 !important;
    color: rgb(22, 22, 22) !important;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
}


.custom-modal-sm {
    max-width: 380px;
}

.modal-dialog-centered.custom-modal-sm {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: auto;
}
/* --- MODALES BENTO STYLE Y DESPLEGABLES --- */

.modal-dialog-centered.custom-modal-sm {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: auto;
}

/* Modal Bento Pro - Elevación y Legibilidad */
.modal-content.bento-style,
.bento-style {
    background: linear-gradient(150deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.98) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
    color: #f8fafc !important;
    overflow: hidden;
}

.modal-content.bento-style .modal-header,
.bento-style .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.modal-content.bento-style .modal-header.border-0,
.bento-style .modal-header.border-0 {
    border-bottom: none !important;
}

.header-indicator {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    margin: 0 auto;
}

/* Botón cerrar en modales */
.modal-content .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
    opacity: 0.65;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-content .btn-close:hover {
    opacity: 1;
    transform: scale(1.08);
}

.modal-content .btn-close:focus {
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.35);
    outline: none;
}

/* Subtarjetas internas para modales */
.modal-subcard {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
}

/* Estilos de inputs dentro de modales */
.modal-content .form-control {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    border-radius: 12px;
}

.modal-content .form-control:focus {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25) !important;
}

/* --- SELECTS Y DESPLEGABLES GLOBALES (Dark & Light) --- */
.form-select,
select.form-control,
select {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus,
select:focus {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25) !important;
}

/* Regla indispensable para opciones en Modo Oscuro (evita fondo blanco con texto blanco) */
select option,
.form-select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 8px 12px;
}

.input-group-custom {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.input-group-custom:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.input-group-custom i {
    color: #38bdf8;
    font-size: 1.1rem;
}

.input-group-custom input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border: none;
    padding: 14px;
    border-radius: 15px;
    color: #0f172a;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary-gradient:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    transform: translateY(-1px);
}

.btn-primary-gradient:active {
    transform: scale(0.97);
}

.btn-cancel-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    padding: 10px;
    transition: color 0.2s;
}

.btn-cancel-text:hover {
    color: #ffffff;
}

.hover-info {
    transition: all 0.3s ease;
}

.hover-info:hover {
    color: #38bdf8 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* ============================================================
   MODO CLARO (Modales, Selects y Formularios)
   ============================================================ */
body.light-mode .modal-content.bento-style,
body.light-mode .bento-style {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04) inset !important;
    color: #0f172a !important;
}

body.light-mode .modal-content .modal-header,
body.light-mode .bento-style .modal-header {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .modal-content .btn-close {
    filter: none;
    opacity: 0.6;
}

body.light-mode .modal-content .btn-close:hover {
    opacity: 1;
}

body.light-mode .modal-subcard {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.09);
}

body.light-mode .modal-content .form-control {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.25) !important;
    color: #0f172a !important;
}

body.light-mode .modal-content .form-control:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.2) !important;
}

body.light-mode .modal-content .form-label,
body.light-mode .modal-content h4,
body.light-mode .modal-content h5,
body.light-mode .modal-content .modal-title {
    color: #0f172a !important;
}

body.light-mode .modal-content .text-white-50,
body.light-mode .modal-content .text-white {
    color: #475569 !important;
}

body.light-mode .form-select,
body.light-mode select.form-control,
body.light-mode select {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.28) !important;
    color: #0f172a !important;
}

body.light-mode .form-select:focus,
body.light-mode select:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.2) !important;
}

body.light-mode select option,
body.light-mode .form-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}


body.light-mode .input-group-custom {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .input-group-custom i,
body.light-mode .input-group-custom input {
    color: #1e293b !important;
}

body.light-mode .btn-cancel-text {
    color: #475569 !important;
}

body.light-mode .btn-cancel-text:hover {
    color: #0f172a !important;
}

body.light-mode .header-indicator {
    background: rgba(0, 0, 0, 0.15) !important;
}

/* --- NAV PILL FLOTANTE (Para módulos antiguos como Ventas) --- */
.nav-container-floating {
    position: fixed;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    z-index: 1000;
}

.nav-pill-main {
    display: flex;
    padding: 10px 25px;
    border-radius: 40px;
    gap: 30px;
}

.nav-pill-search {
    display: flex;
    padding: 10px 18px;
    border-radius: 40px;
    cursor: pointer;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
}

.nav-item.active {
    color: #38bdf8;
}

.nav-item i {
    font-size: 1.4rem;
}

body.light-mode .nav-pill-main,
body.light-mode .nav-pill-search {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .nav-item {
    color: #0f172a !important;
}

body.light-mode .nav-item.active {
    color: #0369a1 !important;
}

body.light-mode .nav-item:hover,
body.light-mode .nav-item:focus {
    color: #020617 !important;
}

/* --- BADGES Y ESTADOS GLOBALES --- */
.badge-estado {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-pendiente {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.estado-proceso {
    background: rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.estado-completado {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Fix de badges y selects globales */
body.light-mode .badge.bg-opacity-50 {
    color: #000 !important;
}

