/* ShanBot  - Custom Colors */
:root {
    --color-primary: #575168;
    --color-secondary: #1f76bb;
    --color-primary-dark: #3f3850;
    --color-secondary-dark: #155a94;
    --color-primary-light: #6f697f;
    --color-secondary-light: #3d8fd4;

    /* Theme tokens (SaaS UI) */
    --shanbot-bg: #eef5ff;
    --shanbot-surface: #ffffff;
    --shanbot-surface-soft: #f8fafc;
    --shanbot-surface-strong: #f1f5f9;
    --shanbot-border: rgba(15, 23, 42, 0.10);
    --shanbot-border-soft: rgba(15, 23, 42, 0.08);
    --shanbot-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
    --shanbot-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shanbot-text: #0f172a;
    --shanbot-text-muted: rgba(15, 23, 42, 0.72);
    --shanbot-text-soft: rgba(15, 23, 42, 0.55);
}

/* Background Colors */
.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-secondary {
    background-color: var(--color-secondary) !important;
}

.bg-primary-dark {
    background-color: var(--color-primary-dark) !important;
}

.bg-secondary-dark {
    background-color: var(--color-secondary-dark) !important;
}

.bg-primary-light {
    background-color: var(--color-primary-light) !important;
}

.bg-secondary-light {
    background-color: var(--color-secondary-light) !important;
}

/* Text Colors */
.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

/* Border Colors */
.border-primary {
    border-color: var(--color-primary) !important;
}

.border-secondary {
    border-color: var(--color-secondary) !important;
}

/* Hover States */
.hover\:bg-primary:hover {
    background-color: var(--color-primary) !important;
}

.hover\:bg-secondary:hover {
    background-color: var(--color-secondary) !important;
}

.hover\:bg-primary-light:hover {
    background-color: var(--color-primary-light) !important;
}

.hover\:bg-primary-dark:hover {
    background-color: var(--color-primary-dark) !important;
}

.hover\:bg-secondary-light:hover {
    background-color: var(--color-secondary-light) !important;
}

.hover\:bg-secondary-dark:hover {
    background-color: var(--color-secondary-dark) !important;
}

.hover\:text-primary:hover {
    color: var(--color-primary) !important;
}

.hover\:text-secondary:hover {
    color: var(--color-secondary) !important;
}

.hover\:text-primary-light:hover {
    color: var(--color-primary-light) !important;
}

.hover\:text-primary-dark:hover {
    color: var(--color-primary-dark) !important;
}

.hover\:text-secondary-light:hover {
    color: var(--color-secondary-light) !important;
}

.hover\:text-secondary-dark:hover {
    color: var(--color-secondary-dark) !important;
}

.hover\:text-white:hover {
    color: #fff !important;
}

.hover\:border-secondary:hover {
    border-color: var(--color-secondary) !important;
}

/* Solid Backgrounds */
.bg-gradient-primary,
.bg-gradient-primary-to-r,
.bg-gradient-primary-to-br {
    background-color: var(--color-secondary);
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background-color: transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    background-color: transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-outline-secondary:hover {
    background-color: var(--color-secondary);
    color: white;
}

/* Replace blue-600 with primary color globally */
.bg-blue-600 {
    background-color: var(--color-secondary) !important;
}

.text-blue-600 {
    color: var(--color-secondary) !important;
}

.border-blue-600 {
    border-color: var(--color-secondary) !important;
}

.hover\:bg-blue-700:hover,
.hover\:bg-blue-600:hover {
    background-color: var(--color-secondary-dark) !important;
}

.hover\:text-blue-600:hover {
    color: var(--color-secondary) !important;
}

/* Tailwind gradient classes replaced with inline styles */

/* Links */
a.text-blue-600 {
    color: var(--color-secondary) !important;
}

a.text-blue-600:hover {
    color: var(--color-secondary-dark) !important;
}

/* App layout: SaaS background */
.shanbot-app-body {
    min-height: 100vh;
    position: relative;
    z-index: 0;
    color: var(--shanbot-text);
    background-color: var(--shanbot-bg);
    background-image:
        radial-gradient(80% 70% at 18% 0%, rgba(31, 118, 187, 0.22), transparent 60%),
        radial-gradient(70% 60% at 95% 10%, rgba(147, 197, 253, 0.28), transparent 60%),
        radial-gradient(60% 60% at 85% 100%, rgba(87, 81, 104, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.90)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
    background-size: auto, auto, auto, auto, 260px 260px;
    background-position: center, center, center, center, center;
    background-attachment: fixed, fixed, fixed, fixed, fixed;
}

/* Guest layout: background image */
.shanbot-auth-body {
    background-image:
        linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.55)),
        url("../images/bg_login.jpg"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: cover, cover, 260px 260px;
    background-position: center, center, center;
    background-attachment: fixed, fixed, fixed;
}

.shanbot-auth-shell {
    background: #ffffff;
}

.shanbot-auth-visual-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.70) 0%,
        rgba(0, 0, 0, 0.25) 50%,
        rgba(0, 0, 0, 0.70) 100%
    );
}

.shanbot-app-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
    z-index: -1;
}

/* App surfaces (cards, headers, sidebars, etc.) */
.shanbot-app-body .bg-white {
    background-color: var(--shanbot-surface) !important;
}

.shanbot-app-body .bg-white:not([class*="border"]) {
    outline: 1px solid var(--shanbot-border);
    outline-offset: -1px;
}

.shanbot-app-body .bg-gray-50,
.shanbot-app-body .bg-gray-100 {
    background-color: var(--shanbot-surface-soft) !important;
}

.shanbot-app-body :where(.bg-gray-50, .bg-gray-100):not([class*="border"]) {
    outline: 1px solid var(--shanbot-border-soft);
    outline-offset: -1px;
}

.shanbot-app-body .shadow,
.shanbot-app-body .shadow-sm,
.shanbot-app-body .shadow-md {
    box-shadow: var(--shanbot-shadow-soft) !important;
}

.shanbot-app-body .shadow-lg,
.shanbot-app-body .shadow-xl,
.shanbot-app-body .shadow-2xl {
    box-shadow: var(--shanbot-shadow) !important;
}

/* Logo */
.shanbot-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    background-color: #ffffff;
    border: 1px solid var(--shanbot-border);
    box-shadow: var(--shanbot-shadow-soft);
}

.shanbot-logo-img {
    display: block;
    filter: drop-shadow(0 10px 16px rgba(17, 24, 39, 0.18));
}

/* Notifications dropdown must overlay all */
.shanbot-topbar {
    position: relative;
    z-index: 45;
}

.shanbot-notification-dropdown {
    z-index: 70 !important;
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: 1px solid rgba(17, 24, 39, 0.10) !important;
}

.shanbot-notification-dropdown .bg-gray-50 {
    background-color: #f9fafb !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* In-app widget should not block app overlays */
.shanbot-app-body #shanbot-widget {
    z-index: 40 !important;
}

/* Readability tweaks */
.shanbot-app-body :where(.bg-white, .bg-gray-50, .bg-gray-100) .text-gray-400 {
    color: var(--shanbot-text-soft) !important;
}

.shanbot-app-body :where(.bg-white, .bg-gray-50, .bg-gray-100) .text-gray-500,
.shanbot-app-body :where(.bg-white, .bg-gray-50, .bg-gray-100) .text-gray-600 {
    color: var(--shanbot-text-muted) !important;
}

/* Borders */
.shanbot-app-body .border-gray-100,
.shanbot-app-body .border-gray-200,
.shanbot-app-body .border-gray-300,
.shanbot-app-body .border-gray-400 {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

.shanbot-app-body .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

/* Tables */
.shanbot-app-body table {
    border-collapse: separate;
    border-spacing: 0;
}

.shanbot-app-body thead {
    background-color: var(--shanbot-surface-strong) !important;
    background-image: none !important;
}

.shanbot-app-body thead th {
    color: var(--shanbot-text) !important;
}

.shanbot-app-body table :where(th, td) {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

.shanbot-app-body tbody tr:hover {
    background-color: var(--shanbot-surface-soft) !important;
}

/* Hover utility backgrounds (lists, rows, pills, etc.) */
.shanbot-app-body .hover\:bg-gray-50:hover,
.shanbot-app-body .hover\:bg-gray-100:hover,
.shanbot-app-body .hover\:bg-blue-50:hover,
.shanbot-app-body .hover\:bg-indigo-50:hover,
.shanbot-app-body .hover\:bg-green-50:hover,
.shanbot-app-body .hover\:bg-yellow-50:hover,
.shanbot-app-body .hover\:bg-red-50:hover {
    background-color: rgba(15, 23, 42, 0.03) !important;
}

/* Form controls */
.shanbot-app-body :where(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        textarea,
        select
    ) {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    color: var(--shanbot-text) !important;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.shanbot-app-body :where(input, textarea, select)::placeholder {
    color: var(--shanbot-text-soft) !important;
}

.shanbot-app-body :where(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
        textarea,
        select
    ):focus {
    outline: none;
    border-color: var(--color-secondary) !important;
    box-shadow: 0 0 0 3px rgba(31, 118, 187, 0.18),
        0 18px 35px rgba(17, 24, 39, 0.10);
}

.shanbot-app-body :where(input, textarea, select):disabled {
    opacity: 0.7;
}

/* Active/Focus States */
.focus\:ring-blue-500:focus {
    --tw-ring-color: var(--color-secondary);
}

.focus\:border-blue-500:focus {
    border-color: var(--color-secondary);
}

/* Badges */
.badge-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-secondary {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Sidebar Active States */
.sidebar-item.active,
.sidebar-item:hover {
    background-color: var(--color-secondary) !important;
    color: white !important;
}

/* Cards with primary accent */
.card-primary {
    border-top: 4px solid var(--color-primary);
}

.card-secondary {
    border-top: 4px solid var(--color-secondary);
}

/* ============================================
   ANIMATIONS & EFFECTS - Welcome Page Styles
   ============================================ */

/* Solid background - no animation */
.animated-gradient {
    background-color: #1f76bb;
}

/* Soft card (used on landing page) */
.soft-card {
    background: #ffffff;
    border: 1px solid var(--shanbot-border);
    box-shadow: var(--shanbot-shadow);
    color: var(--shanbot-text);
}

.soft-card .text-white {
    color: var(--shanbot-text) !important;
}

.soft-card .text-white\/90,
.soft-card .text-white\/80,
.soft-card .text-white\/70,
.soft-card .text-white\/60 {
    color: var(--shanbot-text-muted) !important;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Glow effect */
.glow-effect {
    box-shadow: 0 0 20px rgba(31, 118, 187, 0.3);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(31, 118, 187, 0.5);
}

/* Shimmer effect removed - no gradient animations */

/* Feature card hover effect */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Pricing card hover */
.pricing-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(31, 118, 187, 0.05);
    transition: left 0.5s;
}

.pricing-card:hover::before {
    left: 100%;
}

/* Particle effect background */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particle-float 20s infinite;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(360deg);
        opacity: 0;
    }
}

/* Scan line effect */
@keyframes scan {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #1f76bb;
    animation: scan 4s linear infinite;
}

/* Additional animations for hero section */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-30px) translateX(10px);
    }
}

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

.float-animation-slow {
    animation: float 8s ease-in-out infinite;
}

/* Spin animation for decorative elements */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Fade in animation for chat messages */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
    opacity: 0;
}

/* Fade in and out animation loop for chat bubbles */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    15% {
        opacity: 1;
        transform: translateX(0);
    }
    85% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(10px);
    }
}

.chat-bubble-1 {
    animation: fadeInOut 3s ease-in-out infinite;
    opacity: 0;
}

.chat-bubble-2 {
    animation: fadeInOut 3s ease-in-out infinite;
    animation-delay: 3s;
    opacity: 0;
}

.chat-bubble-3 {
    animation: fadeInOut 3s ease-in-out infinite;
    animation-delay: 6s;
    opacity: 0;
}

/* Dynamic chat message animation */
.chat-message-animated {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.chat-message-animated.show {
    opacity: 1;
    transform: translateX(0);
}
