/* Custom CSS for Cargo Sphere */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Blobs Animation for Login */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
  animation: blob 7s infinite;
}
.animation-delay-2000 {
  animation-delay: 2s;
}
.animation-delay-4000 {
  animation-delay: 4s;
}

/* View Transitions */
.view-section {
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
.view-section.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

#dashboard-shell.active {
    display: flex; /* Override for dashboard flex layout */
}

/* Page Transitions inside dashboard */
.page-view {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}
.page-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar */
::-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;
}

/* Glass panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Nav Link active state styling */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.nav-link:hover {
    background-color: #1e293b;
    color: white;
}
.nav-link.active {
    background: linear-gradient(to right, #0d9488, #3b82f6); /* teal-600 to blue-500 */
    color: white;
    font-weight: 500;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-yellow { background: #fef08a; color: #854d0e; } /* Expected */
.badge-green { background: #bbf7d0; color: #166534; } /* Arrived / Completed */
.badge-blue { background: #bfdbfe; color: #1e40af; } /* Loading / In Transit */
.badge-purple { background: #e9d5ff; color: #6b21a8; } /* Ready to Depart */
.badge-red { background: #fecaca; color: #991b1b; } /* Delayed / Warning */

/* Mobile App Layout Fix (Driver Mode) */
.mobile-app-container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: calc(100vh - 4rem); /* minus header */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
