/* ==========================================================================
   🎨 VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================================================== */
:root {
    --powder-blush: #FFA69E;
    --alice-blue: #edf6f9;
    --pearl-agua: #83c5be;
    --light-blue: #AED9E0;
    --blue-slate: #5E6472;
    --tangerine-dream: #e29578;
    
    /* Gradientes */
    --grad-primary: linear-gradient(135deg, #83c5be 0%, #a2d2ff 100%);
    --grad-accent: linear-gradient(135deg, #FFA69E 0%, #e29578 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8fbff;
    color: var(--blue-slate);
}

/* Ajuste para el contenedor principal */
main {
    overflow-x: hidden;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* ==========================================================================
   🧭 SIDEBAR Y NAVEGACIÓN
   ========================================================================== */
.sidebar {
    width: 280px;
    height: calc(100vh - 40px);
    margin: 20px;
    border-radius: 30px;
    background: var(--grad-primary);
    color: white;
    position: sticky;
    top: 20px;
    box-shadow: 0 20px 40px rgba(131, 197, 190, 0.3);
}

.sidebar hr { 
    border-top: 1px solid rgba(255,255,255,0.2); 
}

.nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 15px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateX(5px);
}

/* ==========================================================================
   📊 CONTENEDORES Y TABLA DE EXISTENCIAS (UNIFICADA)
   ========================================================================== */

/* 🕵️ Estilo para el Buscador */
.custom-search {
    border-left: 4px solid var(--tangerine-dream) !important;
    transition: box-shadow 0.2s ease-in-out;
}
.custom-search:focus-within {
    box-shadow: 0 0 0 3px rgba(226, 149, 120, 0.25) !important; 
}

/* Estructura base de la Tabla flotante */
.table-custom {
    border-collapse: separate !important;
    border-spacing: 0 10px !important; /* Espaciado limpio universal */
    margin-top: -10px;
}

/* 🟠 ENCABEZADOS: Tangerine Dream Sólido */
.table-custom thead tr {
    background-color: var(--tangerine-dream) !important;
}

.table-custom thead th {
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
    letter-spacing: 0.5px;
    border: none !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
}

/* Redondeado de esquinas del header naranja */
.table-custom thead th:first-child { border-radius: 15px 0 0 15px !important; }
.table-custom thead th:last-child { border-radius: 0 15px 15px 0 !important; }

/* ⚪ FILAS DE DATOS */
.table-custom tbody tr {
    background: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.table-custom tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 8px 20px rgba(131, 197, 190, 0.12) !important;
}

.table-custom tbody td {
    padding: 14px 16px !important;
    border: none !important;
    color: #4a505a;
    font-size: 0.85rem !important;
    white-space: nowrap;          /* Evita deformaciones en pantallas chicas */
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;      /* Agrega los "..." de forma elegante */
}

/* Redondeado de esquinas para las tarjetas de datos blancas */
.table-custom tbody tr td:first-child { border-radius: 15px 0 0 15px !important; }
.table-custom tbody tr td:last-child { border-radius: 0 15px 15px 0 !important; }

/* Botones dentro de la tabla */
.table-custom .btn {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 6px;
}

/* ==========================================================================
   ✨ TARJETAS, BOTONES Y COMPONENTES VIBRANTES
   ========================================================================== */
.stat-card {
    border: none;
    border-radius: 25px;
    padding: 25px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    border-left: 8px solid var(--pearl-agua);
    transition: 0.3s;
}
.stat-card.orange { border-left-color: var(--tangerine-dream); }

.icon-box {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}
.bg-icon-teal { background: #e0f2f1; color: #00897b; }
.bg-icon-orange { background: #fff3e0; color: #fb8c00; }

.time-badge {
    background: var(--grad-primary);
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(131, 197, 190, 0.3);
}

.btn-action {
    background: var(--grad-accent);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 15px;
    font-weight: 600;
    transition: 0.3s;
}
.btn-action:hover {
    box-shadow: 0 10px 20px rgba(226, 149, 120, 0.4);
    color: white;
    transform: translateY(-2px);
}

.btn-sidebar {
    background-color: var(--powder-blush);
    color: #ffffff !important;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;  
}
.btn-sidebar:hover {
    background-color: var(--powder-blush);
    color: rgb(206, 113, 113) !important;
    box-shadow: 0 4px 8px rgba(94, 100, 114, 0.15); 
    transform: translateY(-1px);
}

/* ==========================================================================
   🔐 VISTAS DE LOGIN Y LANDING
   ========================================================================== */
.login-card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 400px;
    width: 100%;
}
.btn-login {
    background-color: var(--pearl-agua, #00d1b2);
    border: none;
    color: white;
    transition: all 0.3s ease;
}
.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: white;
}
.form-control {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eee;
}
.form-control:focus {
    box-shadow: 0 0 10px rgba(0,209,178,0.1);
    border-color: var(--pearl-agua, #00d1b2);
}
.full-height-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.client-hero-bg {
    min-height: 100vh;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    color: white;
}
.login-column {
    background: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 3rem;
    border-radius: 50px 0 0 50px;
}
.feature-icon {
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

/* ==========================================================================
   📱 AJUSTES MÓVILES EXCLUSIVOS (RESPONSIVIDAD MÍNIMA NECESARIA)
   ========================================================================== */
@media (max-width: 768px) {
    h2.fw-bold { font-size: 1.4rem; }
    .p-5 { padding: 1.5rem !important; }
}

@media (max-width: 991px) {
    .login-column {
        border-radius: 0;
        min-height: auto;
        padding: 2rem;
    }
    .client-hero-bg { min-height: 60vh; padding-top: 3rem; }
}

/* Fondo semitransparente que bloquea la pantalla */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro difuminado */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Asegura que esté por encima de todo */
}

/* El círculo animado */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db; /* Color del spinner */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animación de rotación */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


#btn-procesar-venta:not([disabled]) {
    cursor: pointer !important;
}

