body  {
    margin: 0;
    /*height: 100vh;*/ height: 100%;
    display: flex;
    background: linear-gradient(135deg, #0d1117, #0a2342, #001f3f);
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sidebar {
    position: fixed;            /* se mantiene en su lugar */
    top: 0;
    left: 0;
    height: 100vh;              /* ocupa toda la altura de la ventana */
    overflow-y: auto; 
    /*-----------------*/
    width: 260px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* ==== Scrollbar personalizado (WebKit) ==== */
.sidebar::-webkit-scrollbar-track {
  background: #0b1726; /* fondo oscuro */
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0,255,255,0.8), rgba(13,202,240,0.7));
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,255,255,0.4);
  transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(13,202,240,1), rgba(0,255,255,1));
  box-shadow: 0 0 12px rgba(0,255,255,0.6);
}

.sidebar::-webkit-scrollbar {
  width: 0;
}
.sidebar:hover::-webkit-scrollbar {
  width: 8px;
}

.user-info {
    text-align: center;
}

.user-icon {
    font-size: 3rem;
    color: #00d4ff;
    margin-bottom: 0.5rem;
}

.username {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.logout-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
    color: #fff;
}

.pedidos-list {
    margin-top: 2rem;
    overflow-y: auto;
    max-height: 60vh;
}

.pedido-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: all 0.2s ease;
}

.pedido-item:hover {
    transform: scale(1.03);
    background: rgba(0, 212, 255, 0.15);
}

.content {
    margin-left: 260px;  /*igual al ancho del sidebar */
    height: 100vh;
    flex: 1;
    /*padding: 2rem;*/
    overflow-y: auto;
}


h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

h2, h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00d4ff;
}

label {
    color: #cdd9e5;
    font-weight: 500;
    display: block;
    margin: 3px;
}

#resultado {
    margin-top: 15px;
    font-size: 1rem;

}

input, select, textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff !important;
    width: 300px;
    padding: 6px;
}

input:focus, select:focus, textarea:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 0.2rem rgba(0,212,255,0.25);
}

.pedido-card {
    width: 95%;
    /*max-width: 900px;*/
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    padding: 1rem;
    margin: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    animation: fadeIn 1.1s ease;
    /*overflow-y: auto;
    max-height: 90vh;*/
}

.btn-custom {
    background: #00d4ff;
    border: none;
    color: #001f3f;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background: #00a6c2;
    transform: scale(1.05);
    color: #fff;
}

.section-divider {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 2rem 0;
}

.ui-helper-hidden-accessible { 
    display: none; 
}

    /* --- Corregir el comportamiento del menú autocomplete --- */
.ui-autocomplete {
  position: absolute !important;
  z-index: 9999 !important;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Opcional: eliminar mensaje accesible */
.ui-helper-hidden-accessible {
  display: none;
}

/* Evita que el body o flex layout recorten el menú */
body {
  overflow: visible !important;
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 50px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.5);
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}



/*SOLO PARA ALERT*/
.alert-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1065; /* más alto que modal */
}

.alert-toast {
    min-width: 280px;
    max-width: 360px;
    background: linear-gradient(135deg, #0f2a3d, #123c56);
    color: #e6f7ff;
    border-left: 4px solid #00c2ff;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
    margin-bottom: 10px;
    animation: slideIn .25s ease-out;
    font-size: 0.9rem;
}

.alert-toast.success {
    border-left-color: #2bd97f;
}

.alert-toast.error {
    border-left-color: #ff6b6b;
}

.alert-toast.warning {
    border-left-color: #f7b731;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* PARA TABS*/
.nav-tabs .nav-link {
    color: #9ecfe6;
    border: none;
}

.nav-tabs .nav-link.active {
    background-color: #0d3b55;
    color: #ffffff;
    border-bottom: 2px solid #00c2ff;
}

.nav-tabs {
    border-bottom: 1px solid #1b4f6b;
}

/* PARA SUPERPOSICION DE MODALES */
#modalDetalleReceta { /* Modal recetas */
    position: fixed;
    z-index: 2010;
}
#modalStockDrogueria { /* Modal Stock Suizo */
    position: fixed;
    z-index: 2020; 
}
#alert-container { /* Notificaciones */
    position: fixed;
    z-index: 2030; 
}