/* Estilos personalizados para SysFab */

/* Login */
.login-container {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in;
}

.login-container.hidden {
    display: none !important;
}

.login-box {
    background: white !important;
    padding: 3rem 2.5rem !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    width: 100%;
    max-width: 420px;
    animation: slideInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animaciones adicionales para inputs del login */
.login-box input:focus {
    animation: inputFocus 0.3s ease-out;
    border-color: #10b981 !important;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Efecto de partículas de fondo opcional */
.login-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(5deg);
    }
    66% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* Navegación */
.nav-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.nav-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #eff6ff;
}

/* Cards de estadísticas */
.stat-card {
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1001;
}

/* Ticket de impresión - Formato 80mm (rollo térmico) */
.ticket-container {
    max-width: 80mm;
    width: 80mm;
    margin: 20px auto;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.ticket-content {
    background: white;
    padding: 5mm;
    border: 1px solid #000;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    width: 100%;
    line-height: 1.2;
    color: #000;
}

.ticket h2 {
    font-size: 14px;
    margin-bottom: 8px;
    margin-top: 0;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

.ticket p {
    font-size: 9px;
    margin: 3px 0;
    line-height: 1.3;
}

.ticket table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    margin: 8px 0;
}

.ticket th,
.ticket td {
    padding: 2px 1px;
    text-align: left;
    font-size: 8px;
    vertical-align: top;
}

.ticket th {
    border-bottom: 1px solid #000;
    font-weight: bold;
    font-size: 8px;
}

.ticket .text-center {
    text-align: center;
}

.ticket .text-right {
    text-align: right;
}

.ticket .text-left {
    text-align: left;
}

/* Estilos inline para elementos del ticket */
.ticket tr {
    border-bottom: 1px dotted #ccc;
}

.ticket tfoot tr {
    border-top: 2px solid #000;
    border-bottom: none;
}

/* Modal específico para ticket */
.ticket-modal-content {
    max-width: 90mm;
    width: 90mm;
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    #ticket-modal,
    #ticket-modal * {
        visibility: visible;
    }
    
    #ticket-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        background: white;
        margin: 0;
        padding: 0;
        display: block !important;
    }
    
    .ticket-modal-content {
        max-width: 80mm;
        width: 80mm;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    .ticket-container {
        max-width: 80mm;
        width: 80mm;
        padding: 0;
        margin: 0;
    }
    
    .ticket-content {
        border: none;
        padding: 5mm;
        width: 80mm;
        box-sizing: border-box;
    }
    
    #imprimir-ticket-btn,
    #cerrar-ticket-btn,
    #close-ticket-modal,
    h3 {
        display: none !important;
    }
    
    /* Asegurar que el ticket se imprima correctamente en 80mm */
    .ticket {
        font-size: 10px;
        width: 100%;
    }
    
    .ticket h2 {
        font-size: 14px;
    }
    
    .ticket p {
        font-size: 9px;
    }
    
    .ticket table {
        font-size: 8px;
    }
    
    .ticket th,
    .ticket td {
        font-size: 8px;
        padding: 1px;
    }
}

/* Resultados de búsqueda */
#producto-results {
    position: absolute;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
