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

:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-premium: 0 10px 40px -10px rgba(37, 99, 235, 0.15);
}

/* Premium Ultra-Modern Dark Theme Palette */
.dark {
    --background: 222 47% 7%;      /* Deep Obsidian Slate #0B0F19 */
    --foreground: 210 40% 98%;     /* Bright Readable White #F8FAFC */
    --card: 222 40% 11%;           /* Elevated Rich Slate Card #111827 */
    --card-foreground: 210 40% 98%;
    --popover: 222 40% 11%;
    --popover-foreground: 210 40% 98%;
    --primary: 217 91% 60%;        /* Vibrant Electric Blue #3B82F6 */
    --primary-foreground: 222 47% 11%;
    --secondary: 217 32% 17%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217 33% 15%;          /* #1E293B */
    --muted-foreground: 215 20% 70%;/* Crisp Slate Neutral */
    --accent: 217 33% 18%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 210 40% 98%;
    --border: 217 33% 18%;         /* #1E293B Distinct Borders */
    --input: 217 33% 18%;
    --ring: 217 91% 60%;
    --shadow-premium: 0 10px 40px -10px rgba(59, 130, 246, 0.3);
}

* {
    border-color: hsl(var(--border));
}

body {
    font-family: 'Inter', sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s ease, border-color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary) / 0.4);
}

.scrollbar-thin::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: hsl(var(--primary) / 0.2);
    border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}
 
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
 
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
 
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.shadcn-card {
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}

.shadcn-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: hsl(var(--primary) / 0.3);
}

/* Ultra-Refined Dark Mode Overrides */
.dark body {
    background-color: #0B0F19 !important;
    color: #F8FAFC !important;
}

/* Glassmorphism Header & Navigation in Dark Mode */
.dark header, 
.dark .glass {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Elevated Cards in Dark Mode */
.dark .shadcn-card {
    background-color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

.dark .shadcn-card:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 14px 35px -5px rgba(59, 130, 246, 0.25) !important;
}

/* Tables in Dark Mode */
.dark table thead {
    background-color: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.dark table tbody tr {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.dark table tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

/* Form Inputs & Select Dropdowns in Dark Mode */
.dark input, 
.dark select, 
.dark textarea {
    background-color: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

.dark input:focus, 
.dark select:focus, 
.dark textarea:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

/* Dark Mode Navigation Sidebar */
.dark aside {
    background-color: #0F172A !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Image Zoom & Zoom Cards */
.card-image-zoom {
    overflow: hidden;
}

.card-image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadcn-card:hover .card-image-zoom img {
    transform: scale(1.08);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: hsl(var(--background));
    z-index: 100;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid hsl(var(--border));
    padding: 2rem;
}

.mobile-drawer.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.shadcn-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
}

.shadcn-button-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}

.shadcn-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45);
}

.shadcn-button-outline {
    border: 1px solid hsl(var(--border));
    background-color: transparent;
}

.shadcn-button-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.glass {
    background: hsl(var(--card) / 0.45) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid hsl(var(--border) / 0.3) !important;
    box-shadow: var(--shadow-premium) !important;
}

.hero-gradient {
    background: radial-gradient(circle at center, hsla(var(--primary), 0.12) 0%, transparent 70%);
}

/* Gradients & Glows */
.text-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)), #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-premium {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), #9333ea03, #ec489903);
}

.glow-primary {
    box-shadow: 0 0 35px -5px hsl(var(--primary) / 0.45);
}

/* Motion Primitives */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, hsl(var(--muted) / 0.5), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 0.9; transform: scale(1.1); }
    80% { opacity: 1; transform: scale(0.89); }
    100% { opacity: 1; transform: scale(1); }
}

.animate-bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Success Effect */
.success-glow {
    animation: successPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes successPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* Input Styles */
input, select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.15) !important;
    border-color: hsl(var(--primary) / 0.5) !important;
}

/* Session Visibility */
body.is-logged-in .is-logged-in-hidden {
    display: none !important;
}

body:not(.is-logged-in) .is-logged-in-show {
    display: none !important;
}

body.is-logged-in .is-logged-in-show {
    display: flex !important;
}