body { background-color: #f1f5f9; touch-action: manipulation; overscroll-behavior-y: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.view-section { display: none; opacity: 0; }
.view-section.active { display: flex; flex-direction: column; animation: fadeInView 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes fadeInView { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.modal-pop { animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes popIn { from { opacity: 0; transform: scale(0.95) translateY(15px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Toasts Premium */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; align-items: flex-end;}
.toast { background: white; border-left: 6px solid #10b981; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15); padding: 14px 20px; border-radius: 12px; display: flex; align-items: center; gap: 12px; animation: slideInToast 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; font-weight: 800; color: #1e293b; pointer-events: auto; max-width: 350px; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3b82f6; }
.toast.fade-out { animation: slideOutToast 0.3s forwards; }
@keyframes slideInToast { from { transform: translateX(120%) scale(0.9); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
@keyframes slideOutToast { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* Sidebar Overlay para Móvil */
#sidebar-overlay { display: none; background: rgba(15, 23, 42, 0.6); position: fixed; inset: 0; z-index: 40; backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s; }
#sidebar-overlay.active { display: block; opacity: 1; }
@media (max-width: 768px) {
    #sidebar { position: fixed; transform: translateX(-100%); z-index: 50; height: 100%; transition: transform 0.3s ease-in-out; }
    #sidebar.open { transform: translateX(0); }
}

/* Image Upload Custom */
.img-dropzone { border: 2px dashed #cbd5e1; border-radius: 0.75rem; text-align: center; padding: 1rem; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; background: #f8fafc; }
.img-dropzone:hover { border-color: #10b981; background: #ecfdf5; }
.img-dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 10; display: none; }
.img-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 20; }

/* Timeline & Micro animations */
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #10b981; position: absolute; left: -26px; top: 4px; border: 2px solid white; box-shadow: 0 0 0 2px #e2e8f0; }
.pulse-soft { animation: pulseSoft 2s infinite; }
@keyframes pulseSoft { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.05); } }
.hover-scale { transition: transform 0.2s ease; }
.hover-scale:hover { transform: translateY(-2px); }

/* Notificaciones dropdown */
#notifications-dropdown { display: none; transform-origin: top right; }
#notifications-dropdown.active { display: block; animation: popIn 0.2s forwards; }
.company-customers-dialog{width:min(820px,calc(100vw - 24px));max-height:90dvh;box-sizing:border-box}.company-customers-dialog [data-content]{overflow:auto;max-height:70dvh;padding:12px}.company-customers-dialog input{display:block;width:100%;min-width:0;padding:10px;border:1px solid #d5e0eb;border-radius:8px;box-sizing:border-box}.company-customers-dialog article{padding:12px 0;border-bottom:1px solid #e1e8f0}.company-customers-dialog button{padding:8px 12px;white-space:normal}.company-customers-dialog p{overflow-wrap:anywhere}.company-customers-dialog table{width:100%;min-width:340px}.company-customers-dialog th,.company-customers-dialog td{padding:8px;text-align:left}
.commercial-document.company-customers-dialog{overflow:hidden;width:min(820px,calc(100vw - 24px));max-height:90dvh}.commercial-document.company-customers-dialog[open]{display:flex;flex-direction:column}.company-customers-dialog header,.company-customers-dialog [role=status]{flex-shrink:0}.company-customers-dialog [data-content]{min-height:0;flex:1;max-height:none}.commercial-document.company-customers-dialog [role=status]{margin:8px 0 0}
