/* Custom Styles for Foreign Trade Automation Platform */

/* Vue.js v-cloak directive - Hide uncompiled Vue templates */
[v-cloak] {
    display: none;
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Scrollbar Styling */
::-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;
}

/* Sidebar Hover Effects */
aside nav a {
    transition: all 0.2s ease-in-out;
}

aside nav a:hover {
    transform: translateX(4px);
}

/* Card Hover Effects */
.shadow-md {
    transition: all 0.3s ease-in-out;
}

.shadow-md:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* Button Hover Effects */
button {
    transition: all 0.2s ease-in-out;
}

button:active {
    transform: scale(0.98);
}

/* Loading Animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Table Row Hover */
table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: #f9fafb !important;
}

/* Chart Container */
canvas {
    max-height: 300px;
}

/* Modal Backdrop */
.fixed.inset-0 {
    animation: fadeIn 0.2s ease-in-out;
}

/* Notification Animation */
.notification {
    animation: slideInRight 0.3s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status Indicator Pulse */
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Custom Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-yellow {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    aside {
        display: none;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Print Styles */
@media print {
    aside,
    nav,
    button {
        display: none;
    }

    main {
        padding: 0;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}
