/* SaaS Dashboard Styling */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

body {
    overflow-x: hidden;
    background-color: #f4f7f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 260px;
    transition: margin 0.25s ease-out;
    background-color: #1e293b !important; /* Deep slate */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    background-color: #0f172a !important; /* Darker slate header */
}

#sidebar-wrapper .list-group {
    width: 260px;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    color: #cbd5e1 !important;
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.2s;
}

#sidebar-wrapper .list-group-item:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.05) !important;
    padding-left: 1.8rem;
}

#sidebar-wrapper .list-group-item.active {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border-left: 4px solid #3b82f6 !important;
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -260px;
}

.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
}

.breadcrumb {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Tenant Badge Styling */
.tenant-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}


/* Mobile Responsiveness Improvements */
@media (max-width: 767.98px) {
    .login-container {
        margin: 40px auto;
        padding: 0 10px;
    }

    #sidebar-wrapper {
        margin-left: -260px;
        position: fixed;
        z-index: 1040;
        height: 100vh;
        overflow-y: auto;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    /* Dim background overlay when sidebar is open on mobile */
    #wrapper.toggled::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1030;
    }

    .tenant-badge {
        display: none !important; /* Hide on very small screens to save space */
    }

    .navbar-nav .nav-item .badge {
        font-size: 0.7rem;
    }

    /* Force tables to scroll instead of breaking layout */
    .table-responsive {
        border: 0;
    }

    /* Scale charts properly */
    canvas {
        max-height: 250px !important;
    }
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -260px;
    }
}

/* Navbar Customizations */
.nav-link.dropdown-toggle:hover {
    background-color: #f8fafc !important;
}

/* Dropdown Customizations */
.dropdown-menu .menu-hover:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
.dropdown-menu .menu-hover-danger:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Utilities */
.letter-spacing-1 { letter-spacing: 0.05em; }

/* About & Contact Page Styling */
.hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
    border-radius: 1rem;
}

.hero-icon-box {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.feature-stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08) !important;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item-box {
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.feature-item-box:hover {
    border-color: #3b82f6 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feature-bullet-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.role-card {
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.role-card:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07) !important;
}

.contact-section-card {
    border-radius: 1rem;
}

.contact-item-pill {
    transition: all 0.2s ease;
}

.contact-item-pill:hover {
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Professional Animations & Modern UI Utility Classes
   ========================================================================== */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(0.5deg);
    }
}

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

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.4);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 28px rgba(59, 130, 246, 0.6);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 125%;
    }
}

/* Entrance Animation Helpers */
.animate-fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: fadeInScale 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Floating Elements */
.floating-element {
    animation: floatAnimation 6s ease-in-out infinite;
}

.floating-element-slow {
    animation: floatAnimationSlow 4s ease-in-out infinite;
}

.pulsing-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s ease-in-out infinite;
}

/* Modern Hero Background */
.hero-wrapper {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 45%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    padding: 120px 0 90px 0;
    overflow: hidden;
}

.hero-mesh-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    opacity: 0.4;
}

/* Glassmorphism Mockup Card */
.hero-glass-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-glass-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 30px 60px -12px rgba(59, 130, 246, 0.2);
}

.floating-badge-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    z-index: 10;
    transition: transform 0.3s ease;
}

.floating-badge-card:hover {
    transform: translateY(-4px) scale(1.03);
}

/* Elevated Hover Cards */
.elevate-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.elevate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.elevate-card:hover .icon-hover-zoom {
    transform: scale(1.12) rotate(4deg);
}

.icon-hover-zoom {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modern Animated Action Buttons */
.btn-shine-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: none;
}

.btn-shine-effect:hover::after {
    animation: shine 1.2s ease-in-out;
}

.btn-shine-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4) !important;
}

.btn-shine-effect .arrow-shift {
    transition: transform 0.2s ease;
}

.btn-shine-effect:hover .arrow-shift {
    transform: translateX(5px);
}

/* Auth Page Modernization */
.auth-body-bg {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(30, 41, 59, 0.12) 0%, transparent 40%),
                #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card-modern {
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2.25rem 2rem;
    text-align: center;
    position: relative;
}

.auth-input-group .form-control {
    border-radius: 0.6rem;
    border: 1px solid #cbd5e1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-input-group .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

/* Mobile Responsive Improvements */
@media (max-width: 991.98px) {
    .hero-wrapper {
        padding: 90px 0 60px 0;
    }

    .hero-glass-card {
        margin-top: 2rem;
    }

    .display-4 {
        font-size: 2.25rem !important;
    }
}

@media (max-width: 575.98px) {
    .hero-wrapper {
        padding: 75px 0 45px 0;
    }

    .display-4 {
        font-size: 1.85rem !important;
    }

    .btn-shine-effect {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Recipe Portal Index Redesign & Blue Synchronization
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

:root {
    --portal-blue-primary: #2563eb;
    --portal-blue-dark: #1d4ed8;
    --portal-blue-light: #3b82f6;
    --portal-blue-deep: #1e3a8a;
    --portal-blue-bg: #eff6ff;
    --portal-slate-dark: #0f172a;
    --portal-slate-card: #1e293b;
}

/* Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
    z-index: 1060;
    width: 0%;
    transition: width 0.1s linear;
}

/* Reveal on Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-fade-up {
    transform: translateY(35px);
}

.reveal-scale-in {
    transform: scale(0.92);
}

.reveal-slide-left {
    transform: translateX(-35px);
}

.reveal-slide-right {
    transform: translateX(35px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Delay modifiers for staggered reveals */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Modern Landing Navbar - Dark Blue Theme */
.landing-nav-modern {
    background-color: #0f172a !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
    transition: all 0.35s ease;
}

.landing-nav-modern.scrolled {
    background-color: #0b1329 !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(37, 99, 235, 0.3);
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    border-bottom-color: rgba(59, 130, 246, 0.45);
}

/* Grand Hero Icon Showcase Container */
.hero-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.hero-icon-glow-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.15) 50%, transparent 70%);
    animation: blueGlowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.hero-icon-badge-3d {
    width: 170px;
    height: 170px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid rgba(59, 130, 246, 0.45);
    border-radius: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.5), 0 0 35px rgba(37, 99, 235, 0.35);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-icon-badge-3d:hover {
    transform: translateY(-8px) scale(1.05) rotate(2deg);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 35px 65px -10px rgba(37, 99, 235, 0.5), 0 0 50px rgba(59, 130, 246, 0.45);
}

.hero-icon-badge-3d i {
    font-size: 5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.4));
}

.nav-link-blue {
    color: rgba(255, 255, 255, 0.78) !important;
    font-weight: 500;
    position: relative;
    transition: all 0.25s ease;
}

.nav-link-blue::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: #3b82f6;
    border-radius: 2px;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

.nav-link-blue:hover {
    color: #ffffff !important;
}

.nav-link-blue:hover::after {
    width: 70%;
}

/* Blue Hero Section */
.hero-wrapper-blue {
    position: relative;
    background: radial-gradient(circle at 75% 25%, rgba(37, 99, 235, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(30, 58, 138, 0.25) 0%, transparent 50%),
                linear-gradient(135deg, #0b1329 0%, #1e293b 55%, #0f172a 100%);
    padding: 135px 0 95px 0;
    overflow: hidden;
}

.hero-mesh-blue {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(59, 130, 246, 0.15) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    opacity: 0.6;
}

/* Glassmorphism Manufacturing Card (Replacing AI Console Live Monitor) */
.hero-mfg-glass-card {
    background: rgba(30, 41, 59, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 1.35rem;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.15);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mfg-glass-card:hover {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 35px 70px -15px rgba(37, 99, 235, 0.3), 0 0 40px rgba(59, 130, 246, 0.25);
    transform: translateY(-4px);
}

/* Modern Blue Feature Cards */
.card-blue-hover {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-blue-hover:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 20px 35px -10px rgba(37, 99, 235, 0.12), 0 8px 15px -6px rgba(15, 23, 42, 0.04);
}

.card-blue-hover:hover .icon-blue-wrapper {
    background-color: #2563eb !important;
    color: #ffffff !important;
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.icon-blue-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff;
    color: #2563eb;
    transition: all 0.3s ease;
}

/* End CTA Section & Button Customization (User requirement: Register to Factory is blue button, rest is all white) */
.cta-section-white {
    background: #ffffff !important;
    border: 1px solid rgba(37, 99, 235, 0.15) !important;
    box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.08), 0 10px 20px -10px rgba(0, 0, 0, 0.03) !important;
}

.btn-register-factory-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.45) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-weight: 700 !important;
}

.btn-register-factory-blue:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.01) !important;
    box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.6) !important;
}

.btn-cta-all-white {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s ease !important;
}

.btn-cta-all-white:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
    border-color: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12) !important;
}

.support-pill-white {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.25s ease !important;
}

.support-pill-white:hover {
    border-color: #2563eb !important;
    box-shadow: 0 8px 20px -5px rgba(37, 99, 235, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* Step Card Blue Styling */
.workflow-step-card-blue {
    position: relative;
    background: #ffffff;
    border-radius: 1.15rem;
    padding: 2rem 1.6rem;
    border: 1px solid #e2e8f0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.workflow-step-card-blue:hover {
    transform: translateY(-7px);
    border-color: #3b82f6;
    box-shadow: 0 20px 35px -10px rgba(37, 99, 235, 0.15);
}

.workflow-badge-blue {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Pulsing Blue Dot */
.pulsing-blue-dot {
    width: 10px;
    height: 10px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #3b82f6;
    animation: pulseDot 1.8s ease-in-out infinite;
}


