/* =========================================================================
   VIBRANT PREMIUM SAAS THEME (GLASSMORPHISM & COLORFUL)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* GLOBAL FONT */
body, h1, h2, h3, h4, h5, h6, p, div, span, a, td, th, input, select, button {
    font-family: 'Outfit', sans-serif !important;
}

body {
    /* Soft, vibrant shifting gradient background */
    background: linear-gradient(-45deg, #f8fafc, #eef2ff, #f0fdfa, #fdf4ff) !important;
    background-size: 400% 400% !important;
    animation: gradientBG 15s ease infinite !important;
    color: #1e293b !important;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   PREMIUM CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* ========================================
   TOP NAVBAR (FROSTED GLASS)
   ======================================== */
header.relative.z-30 {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02) !important;
}

/* Typography in header */
header .text-gray-500, header .text-gray-700, header .text-gray-900 {
    color: #475569 !important;
}

/* ========================================
   VIBRANT SIDEBAR
   ======================================== */
.sidebar-gradient {
    /* Premium Emerald Shifting Gradient */
    background: linear-gradient(135deg, #064e3b, #10b981, #047857) !important;
    background-size: 200% 200% !important;
    animation: sidebarPulse 10s ease infinite !important;
    border-right: none !important;
    box-shadow: 4px 0 24px rgba(6, 78, 59, 0.4) !important;
}

@keyframes sidebarPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    margin: 4px 12px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #34d399;
    font-weight: 700;
    transform: translateX(4px);
}

.sidebar-link i {
    width: 24px;
    font-size: 18px;
    text-align: center;
}

/* ========================================
   FLOATING PANELS & CARDS
   ======================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.bg-white.border.border-gray-150.rounded-lg,
.bg-white.border.border-gray-100.rounded-xl,
.overflow-hidden.bg-white.border.rounded-lg {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 40px -10px rgba(79, 70, 229, 0.08), 0 4px 10px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.bg-white.border.border-gray-150.rounded-lg:hover,
.bg-white.border.border-gray-100.rounded-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.15) !important;
    transform: translateY(-6px) scale(1.01);
}

/* ========================================
   INPUTS & SELECTS
   ======================================== */
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"] {
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    color: #1e293b !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    font-weight: 500;
}

select:focus, input:focus {
    border-color: #4f46e5 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
}

/* ========================================
   DROPDOWNS
   ======================================== */
.origin-top-right.transform.rounded-xl .bg-white {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================
   TABLE STYLING
   ======================================== */
.min-w-full.divide-y.divide-gray-200 {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}
.min-w-full thead th {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase;
}
.min-w-full tbody tr {
    background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02) !important;
    border-radius: 16px !important;
    transition: all 0.2s ease !important;
}
.min-w-full tbody tr td {
    border: none !important;
}
.min-w-full tbody tr td:first-child { border-top-left-radius: 16px !important; border-bottom-left-radius: 16px !important; }
.min-w-full tbody tr td:last-child { border-top-right-radius: 16px !important; border-bottom-right-radius: 16px !important; }
.min-w-full tbody tr:hover {
    transform: scale(1.01) !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.08) !important;
}

/* ========================================
   TAILWIND UTILITY FIXES
   ======================================== */
@media (min-width: 768px) {
    .md\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}
.grid { display: grid !important; }
.gap-6 { gap: 1.5rem !important; }

/* Dashboard Stat Icons (Vibrant colors) */
.bg-purple-100 { background-color: #f3e8ff !important; }
.text-purple-600 { color: #a855f7 !important; }
.bg-green-100 { background-color: #dcfce7 !important; }
.text-green-600 { color: #22c55e !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.text-blue-600 { color: #3b82f6 !important; }

/* Navbar Buttons (Stunning Gradients) */
.bg-green-500 { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; color: white !important; border-radius: 9999px !important; border: none !important; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important; }
.hover\:bg-green-600:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(16, 185, 129, 0.5) !important; }
.bg-red-500 { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; color: white !important; border-radius: 9999px !important; border: none !important; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3) !important; }
.hover\:bg-red-600:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(239, 68, 68, 0.5) !important; }

/* ========================================
   CUSTOM BADGES & BUTTONS (Bypassing Tailwind Purge)
   ======================================== */

/* Status Badges */
.badge-completed { background-color: #f0fdf4 !important; color: #16a34a !important; border: 1px solid #bbf7d0 !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }
.badge-inprogress { background-color: #eff6ff !important; color: #2563eb !important; border: 1px solid #bfdbfe !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }
.badge-pending { background-color: #fffbeb !important; color: #d97706 !important; border: 1px solid #fde68a !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }
.badge-review { background-color: #f5f3ff !important; color: #7c3aed !important; border: 1px solid #ddd6fe !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }

/* Priority Badges */
.badge-high { background-color: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }
.badge-medium { background-color: #fffbeb !important; color: #d97706 !important; border: 1px solid #fde68a !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }
.badge-low { background-color: #eff6ff !important; color: #2563eb !important; border: 1px solid #bfdbfe !important; border-radius: 9999px !important; padding: 2px 12px !important; font-size: 0.75rem !important; font-weight: 600 !important; }

/* Table Action Buttons */
.btn-update {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 16px !important;
    background-color: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.btn-update:hover {
    background-color: #e0e7ff !important;
    color: #4338ca !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.1) !important;
}

.btn-view {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 16px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3) !important;
}
.btn-view:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
}

/* Primary Button (to avoid Tailwind purge issues) */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4) !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}
.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6) !important;
}

/* Custom Dropdown Styling (Bypasses Tailwind Purge) */
.custom-dropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
}
.custom-dropdown-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: rgba(249, 250, 251, 0.5) !important;
}
.custom-dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.custom-dropdown-item:hover {
    background: #eef2ff !important;
    color: #4f46e5 !important;
}
.custom-dropdown-item-red {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #ef4444 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    background: rgba(249, 250, 251, 0.5) !important;
}
.custom-dropdown-item-red:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}
