/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Page transitions */
.page {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* Modal animations */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal > div {
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal:not(.hidden) > div {
    transform: scale(1);
}

/* Nav link active state */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, #3b82f6, #d946ef);
    border-radius: 0 4px 4px 0;
    transition: height 0.2s ease;
}

.nav-link.active::before {
    height: 60%;
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.dark .hover-lift:hover {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.dark .status-paid {
    background: #14532d;
    color: #86efac;
}

.status-paid::before {
    background: #22c55e;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.dark .status-pending {
    background: #78350f;
    color: #fcd34d;
}

.status-pending::before {
    background: #f59e0b;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.dark .status-overdue {
    background: #7f1d1d;
    color: #fca5a5;
}

.status-overdue::before {
    background: #ef4444;
}

/* Stock indicators */
.stock-ok {
    color: #22c55e;
}

.stock-low {
    color: #f59e0b;
}

.stock-out {
    color: #ef4444;
}

/* Toast animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.toast {
    animation: slideIn 0.3s ease;
}

.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
}

/* Print styles for invoices */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}