/**
 * Tissia Custom Styles
 * =====================
 * Design inspired by the Tissia shield logo with Carpathian mountain peaks
 * and the T letterform with roots symbolizing the tree of knowledge.
 *
 * Design Principles:
 * - Rounded corners (rounded-5) throughout
 * - Subtle decorative borders echoing shield construction
 * - Professional teal (#004f59) as primary color
 * - Clean, spacious layouts with generous whitespace
 * - Smooth transitions and subtle animations
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Brand Colors */
    --ts-primary: #004f59;
    --ts-primary-rgb: 0, 79, 89;
    --ts-primary-dark: #003940;
    --ts-primary-light: #e6f0f2;
    --ts-primary-100: #e6f0f2;
    --ts-primary-200: #b3d4d9;
    --ts-primary-300: #80b8c0;
    --ts-primary-400: #4d9ca7;
    --ts-primary-500: #004f59;
    --ts-primary-600: #003940;
    --ts-primary-700: #002d33;

    --ts-secondary: #1e3a5f;
    --ts-secondary-rgb: 30, 58, 95;

    /* Neutral Colors */
    --ts-body-bg: #ffffff;
    --ts-body-color: #2a3436;
    --ts-muted: #546468;
    --ts-border: #d1d8da;
    --ts-light-bg: #f7f9f9;

    /* Typography */
    --ts-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --ts-font-size-base: 1rem;
    --ts-line-height: 1.6;

    /* Spacing */
    --ts-section-padding: clamp(3rem, 8vw, 6rem);
    --ts-container-padding: clamp(1rem, 3vw, 2rem);

    /* Border Radius */
    --ts-radius-sm: 0.375rem;
    --ts-radius: 0.75rem;
    --ts-radius-lg: 1rem;
    --ts-radius-xl: 1.5rem;
    --ts-radius-2xl: 2rem;
    --ts-radius-full: 50rem;

    /* Shadows */
    --ts-shadow-sm: 0 2px 8px rgba(0, 79, 89, 0.06);
    --ts-shadow: 0 4px 24px rgba(0, 79, 89, 0.08);
    --ts-shadow-lg: 0 8px 40px rgba(0, 79, 89, 0.12);
    --ts-shadow-xl: 0 16px 64px rgba(0, 79, 89, 0.16);

    /* Transitions */
    --ts-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ts-transition-fast: 0.15s ease;
    --ts-transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-bs-theme="dark"] {
    --ts-body-bg: #1a2123;
    --ts-body-color: #d1d8da;
    --ts-muted: #7a8a8e;
    --ts-border: #3d4a4d;
    --ts-light-bg: #2a3436;
}


/* ==========================================================================
   Base & Typography
   ========================================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--ts-font-family);
    font-size: var(--ts-font-size-base);
    line-height: var(--ts-line-height);
    color: var(--ts-body-color);
    background-color: var(--ts-body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Better focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--ts-primary);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Selection styling */
::selection {
    background-color: var(--ts-primary);
    color: white;
}


/* ==========================================================================
   Top Bar
   ========================================================================== */

.ts-topbar {
    transition: transform var(--ts-transition);
    font-size: 0.875rem;
    position: relative;
    z-index: 1060;
}

.ts-topbar a {
    transition: opacity var(--ts-transition-fast);
}

.ts-topbar a:hover {
    opacity: 1 !important;
}

.ts-topbar .btn-link {
    color: white !important;
}

.ts-topbar .btn-link:hover,
.ts-topbar .btn-link:focus {
    color: white !important;
    opacity: 1;
}

.ts-topbar .dropdown-toggle::after {
    border-top-color: white;
}

.ts-topbar .dropdown-menu {
    z-index: 1060;
}

.ts-topbar .dropdown {
    position: relative;
    z-index: 1060;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}


/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar-custom {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--ts-transition);
    border-bottom: 1px solid transparent;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--ts-border);
    box-shadow: var(--ts-shadow);
}

[data-bs-theme="dark"] .navbar-custom {
    background: rgba(26, 33, 35, 0.98);
}

[data-bs-theme="dark"] .navbar-custom.scrolled {
    background: rgba(26, 33, 35, 0.95);
    border-bottom-color: var(--ts-border);
}

/* Logo styling */
.ts-logo {
    transition: transform var(--ts-transition);
}

.navbar-brand:hover .ts-logo {
    transform: scale(1.05);
}

.ts-brand-text {
    line-height: 1.2;
}

.ts-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

/* Nav links */
.navbar-custom .nav-link {
    color: var(--ts-body-color);
    font-weight: 500;
    transition: all var(--ts-transition-fast);
    position: relative;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    color: var(--ts-primary);
    background-color: var(--ts-primary-100);
}

.navbar-custom .nav-link.active {
    color: var(--ts-primary);
    font-weight: 600;
}

/* Nav link underline effect */
.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--ts-primary);
    border-radius: var(--ts-radius-full);
    transition: all var(--ts-transition);
    transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: calc(100% - 1.5rem);
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    font-weight: 500;
    transition: all var(--ts-transition);
    border-radius: var(--ts-radius-lg);
}

.btn-primary {
    --bs-btn-bg: var(--ts-primary);
    --bs-btn-border-color: var(--ts-primary);
    --bs-btn-hover-bg: var(--ts-primary-dark);
    --bs-btn-hover-border-color: var(--ts-primary-dark);
    --bs-btn-active-bg: var(--ts-primary-700);
    --bs-btn-active-border-color: var(--ts-primary-700);
}

.btn-outline-primary {
    --bs-btn-color: var(--ts-primary);
    --bs-btn-border-color: var(--ts-primary);
    --bs-btn-hover-bg: var(--ts-primary);
    --bs-btn-hover-border-color: var(--ts-primary);
    --bs-btn-active-bg: var(--ts-primary-dark);
}

/* Button hover lift effect */
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--ts-shadow);
}

.btn:active {
    transform: translateY(0);
}

/* Rounded pill buttons */
.rounded-5 {
    border-radius: var(--ts-radius-2xl) !important;
}


/* ==========================================================================
   Cards & Containers
   ========================================================================== */

.card {
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-xl);
    transition: all var(--ts-transition);
}

.card:hover {
    box-shadow: var(--ts-shadow);
}

/* Card hover effect (reusable) */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-hover.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Card with decorative border accent (inspired by logo shield) */
.ts-card-accent {
    position: relative;
    overflow: hidden;
}

.ts-card-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ts-primary), var(--ts-primary-300));
    border-radius: var(--ts-radius-xl) var(--ts-radius-xl) 0 0;
}

/* Thick border accent for capability cards */
.ts-border-accent {
    border-left-width: 18px !important;
}


/* ==========================================================================
   Section Styling
   ========================================================================== */

section {
    padding: var(--ts-section-padding) 0;
}

/* Section with decorative borders (inspired by shield shape) */
.ts-section-bordered {
    position: relative;
}

.ts-section-bordered::before,
.ts-section-bordered::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--ts-primary-200);
    pointer-events: none;
}

.ts-section-bordered::before {
    top: 2rem;
    left: 2rem;
    border-right: none;
    border-bottom: none;
    border-radius: var(--ts-radius-xl) 0 0 0;
}

.ts-section-bordered::after {
    bottom: 2rem;
    right: 2rem;
    border-left: none;
    border-top: none;
    border-radius: 0 0 var(--ts-radius-xl) 0;
}

@media (max-width: 768px) {
    .ts-section-bordered::before,
    .ts-section-bordered::after {
        width: 50px;
        height: 50px;
    }
}

/* Alternating section backgrounds */
.ts-section-light {
    background-color: var(--ts-light-bg);
}

.ts-section-primary {
    background-color: var(--ts-primary);
    color: white;
}

.ts-section-gradient {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
    color: white;
}

/* MCP/Integration Highlight Box */
.ts-mcp-highlight {
    background: linear-gradient(135deg, var(--ts-body-color) 0%, var(--ts-secondary) 100%);
}

.ts-integration-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-channel-item {
    transition: all 0.3s ease;
}

.ts-channel-item:hover {
    background-color: var(--ts-primary-subtle) !important;
    transform: translateY(-2px);
}


/* ==========================================================================
   Hero Section Styling
   ========================================================================== */

.ts-hero {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.ts-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* Decorative digital network pattern (AI/tech aesthetic) */
.ts-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 350px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 350'%3E%3Cdefs%3E%3Ccircle id='s' r='2' fill='%23004f59' fill-opacity='0.18'/%3E%3Ccircle id='m' r='3.5' fill='%23004f59' fill-opacity='0.15'/%3E%3Ccircle id='l' r='5' fill='%23004f59' fill-opacity='0.12'/%3E%3C/defs%3E%3Cg stroke='%23004f59' stroke-opacity='0.07' stroke-width='1' fill='none'%3E%3C!-- Grid connections --%3E%3Cline x1='100' y1='80' x2='200' y2='140'/%3E%3Cline x1='200' y1='140' x2='350' y2='100'/%3E%3Cline x1='350' y1='100' x2='500' y2='160'/%3E%3Cline x1='500' y1='160' x2='650' y2='120'/%3E%3Cline x1='650' y1='120' x2='800' y2='180'/%3E%3Cline x1='800' y1='180' x2='950' y2='140'/%3E%3Cline x1='950' y1='140' x2='1100' y2='100'/%3E%3Cline x1='150' y1='200' x2='300' y2='240'/%3E%3Cline x1='300' y1='240' x2='450' y2='200'/%3E%3Cline x1='450' y1='200' x2='600' y2='260'/%3E%3Cline x1='600' y1='260' x2='750' y2='220'/%3E%3Cline x1='750' y1='220' x2='900' y2='280'/%3E%3Cline x1='900' y1='280' x2='1050' y2='240'/%3E%3Cline x1='100' y1='80' x2='150' y2='200'/%3E%3Cline x1='200' y1='140' x2='300' y2='240'/%3E%3Cline x1='350' y1='100' x2='450' y2='200'/%3E%3Cline x1='500' y1='160' x2='600' y2='260'/%3E%3Cline x1='650' y1='120' x2='750' y2='220'/%3E%3Cline x1='800' y1='180' x2='900' y2='280'/%3E%3Cline x1='950' y1='140' x2='1050' y2='240'/%3E%3Cline x1='200' y1='140' x2='150' y2='200'/%3E%3Cline x1='350' y1='100' x2='300' y2='240'/%3E%3Cline x1='500' y1='160' x2='450' y2='200'/%3E%3Cline x1='650' y1='120' x2='600' y2='260'/%3E%3Cline x1='800' y1='180' x2='750' y2='220'/%3E%3Cline x1='950' y1='140' x2='900' y2='280'/%3E%3Cline x1='250' y1='60' x2='350' y2='100'/%3E%3Cline x1='550' y1='80' x2='650' y2='120'/%3E%3Cline x1='850' y1='60' x2='800' y2='180'/%3E%3Cline x1='400' y1='300' x2='450' y2='200'/%3E%3Cline x1='700' y1='320' x2='750' y2='220'/%3E%3Cline x1='1000' y1='300' x2='1050' y2='240'/%3E%3C/g%3E%3Cg%3E%3Cuse href='%23s' x='100' y='80'/%3E%3Cuse href='%23s' x='250' y='60'/%3E%3Cuse href='%23s' x='550' y='80'/%3E%3Cuse href='%23s' x='850' y='60'/%3E%3Cuse href='%23s' x='1100' y='100'/%3E%3Cuse href='%23s' x='150' y='200'/%3E%3Cuse href='%23s' x='400' y='300'/%3E%3Cuse href='%23s' x='700' y='320'/%3E%3Cuse href='%23s' x='1000' y='300'/%3E%3Cuse href='%23m' x='200' y='140'/%3E%3Cuse href='%23m' x='450' y='200'/%3E%3Cuse href='%23m' x='750' y='220'/%3E%3Cuse href='%23m' x='950' y='140'/%3E%3Cuse href='%23m' x='300' y='240'/%3E%3Cuse href='%23m' x='900' y='280'/%3E%3Cuse href='%23l' x='350' y='100'/%3E%3Cuse href='%23l' x='500' y='160'/%3E%3Cuse href='%23l' x='650' y='120'/%3E%3Cuse href='%23l' x='800' y='180'/%3E%3Cuse href='%23l' x='600' y='260'/%3E%3Cuse href='%23l' x='1050' y='240'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 1200px 350px;
    background-repeat: repeat-x;
    background-position: center top;
}

/* Animated nodes overlay - pulse and ripple effects */
.ts-hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 350px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 350'%3E%3Cstyle%3E.p1{animation:pulse 3s ease-in-out infinite}.p2{animation:pulse 3s ease-in-out infinite 1s}.p3{animation:pulse 3s ease-in-out infinite 2s}@keyframes pulse{0%25,100%25{opacity:0.08}50%25{opacity:0.28}}%3C/style%3E%3C!-- Pulse nodes (opacity only, stationary) --%3E%3Ccircle class='p1' cx='350' cy='100' r='12' fill='%23004f59'/%3E%3Ccircle class='p2' cx='800' cy='180' r='14' fill='%23004f59'/%3E%3Ccircle class='p3' cx='1050' cy='240' r='10' fill='%23004f59'/%3E%3Ccircle class='p2' cx='200' cy='140' r='11' fill='%23004f59'/%3E%3Ccircle class='p3' cx='650' cy='120' r='13' fill='%23004f59'/%3E%3C!-- Ripple node 1 at 500,160 --%3E%3Ccircle cx='500' cy='160' r='5' fill='%23004f59' fill-opacity='0.3'/%3E%3Ccircle cx='500' cy='160' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;28' dur='2.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.4;0' dur='2.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='500' cy='160' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;28' dur='2.5s' begin='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.4;0' dur='2.5s' begin='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='500' cy='160' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;28' dur='2.5s' begin='1.6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.4;0' dur='2.5s' begin='1.6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- Ripple node 2 at 300,240 --%3E%3Ccircle cx='300' cy='240' r='4' fill='%23004f59' fill-opacity='0.3'/%3E%3Ccircle cx='300' cy='240' fill='%23004f59'%3E%3Canimate attributeName='r' values='5;35' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.35;0' dur='3s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='300' cy='240' fill='%23004f59'%3E%3Canimate attributeName='r' values='5;35' dur='3s' begin='1s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.35;0' dur='3s' begin='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='300' cy='240' fill='%23004f59'%3E%3Canimate attributeName='r' values='5;35' dur='3s' begin='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.35;0' dur='3s' begin='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- Ripple node 3 at 900,150 --%3E%3Ccircle cx='900' cy='150' r='5' fill='%23004f59' fill-opacity='0.3'/%3E%3Ccircle cx='900' cy='150' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;40' dur='3.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0' dur='3.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='900' cy='150' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;40' dur='3.5s' begin='1.2s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0' dur='3.5s' begin='1.2s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='900' cy='150' fill='%23004f59'%3E%3Canimate attributeName='r' values='6;40' dur='3.5s' begin='2.4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0' dur='3.5s' begin='2.4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-size: 1200px 350px;
    background-repeat: repeat-x;
    background-position: center top;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.ts-footer {
    background-color: var(--ts-primary-700);
}

.ts-footer-accent {
    margin-top: -1px;
}

.ts-footer a {
    transition: all var(--ts-transition-fast);
}

.ts-footer .hover-text-white:hover {
    color: white !important;
}

.ts-footer .btn-outline-light:hover {
    background-color: white;
    color: var(--ts-primary) !important;
}


/* ==========================================================================
   Form Styling
   ========================================================================== */

.form-control,
.form-select {
    border-radius: var(--ts-radius-lg);
    border-color: var(--ts-border);
    padding: 0.75rem 1rem;
    transition: all var(--ts-transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--ts-primary-rgb), 0.15);
}

.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: var(--ts-radius-lg);
}

/* Input with icon */
.ts-input-icon {
    position: relative;
}

.ts-input-icon .form-control {
    padding-left: 3rem;
}

.ts-input-icon .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ts-muted);
    pointer-events: none;
}


/* ==========================================================================
   Decorative Elements (Logo-inspired)
   ========================================================================== */

/* Shield-shaped container */
.ts-shield {
    position: relative;
    padding: 2rem;
    background: var(--ts-light-bg);
    border-radius: var(--ts-radius-2xl);
    border: 2px solid var(--ts-border);
}

.ts-shield::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 20%;
    right: 20%;
    height: 4px;
    background: var(--ts-primary);
    border-radius: 0 0 var(--ts-radius) var(--ts-radius);
}

/* Root/branch decorative divider */
.ts-divider-roots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
}

.ts-divider-roots::before,
.ts-divider-roots::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ts-border));
}

.ts-divider-roots::after {
    background: linear-gradient(90deg, var(--ts-border), transparent);
}

.ts-divider-roots svg {
    width: 32px;
    height: 32px;
    color: var(--ts-primary);
}


/* ==========================================================================
   Feature Cards
   ========================================================================== */

.ts-feature-card {
    padding: 2rem;
    background: white;
    border-radius: var(--ts-radius-xl);
    border: 1px solid var(--ts-border);
    transition: all var(--ts-transition);
    height: 100%;
}

.ts-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ts-shadow-lg);
    border-color: var(--ts-primary-200);
}

.ts-feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ts-primary-100);
    color: var(--ts-primary);
    border-radius: var(--ts-radius-lg);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--ts-transition);
}

.ts-feature-card:hover .ts-feature-icon {
    background: var(--ts-primary);
    color: white;
    transform: scale(1.1);
}


/* ==========================================================================
   Pricing Cards
   ========================================================================== */

.ts-pricing-card {
    position: relative;
    padding: 2.5rem;
    background: white;
    border-radius: var(--ts-radius-2xl);
    border: 2px solid var(--ts-border);
    transition: all var(--ts-transition);
    height: 100%;
}

.ts-pricing-card:hover {
    border-color: var(--ts-primary);
    box-shadow: var(--ts-shadow-xl);
}

.ts-pricing-card.featured {
    border-color: var(--ts-primary);
    box-shadow: var(--ts-shadow-lg);
}
/*
.ts-pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--ts-primary), var(--ts-secondary));
    border-radius: var(--ts-radius-2xl) var(--ts-radius-2xl) 0 0;
}
*/

.ts-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ts-primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: var(--ts-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ==========================================================================
   Testimonials
   ========================================================================== */

.ts-testimonial {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: var(--ts-radius-xl);
    border: 1px solid var(--ts-border);
}

.ts-testimonial::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--ts-primary-200);
    line-height: 1;
}


/* ==========================================================================
   Animation Utilities
   ========================================================================== */

.ts-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.ts-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}


/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

/* Background utilities */
.bg-primary-light { background-color: var(--ts-primary-100) !important; }
.bg-light-custom { background-color: var(--ts-light-bg) !important; }
.bg-gradient-dark {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
}

/* Shadow utilities */
.shadow-ts { box-shadow: var(--ts-shadow) !important; }
.shadow-ts-lg { box-shadow: var(--ts-shadow-lg) !important; }

/* Spacing utilities */
.section-padding { padding: var(--ts-section-padding) 0; }

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

/* Rounded corners */
.rounded-4 { border-radius: var(--ts-radius-xl) !important; }
.rounded-5 { border-radius: var(--ts-radius-2xl) !important; }

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--ts-primary), var(--ts-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ==========================================================================
   Back to Top Button
   ========================================================================== */

#backToTop {
    transition: all var(--ts-transition);
}

#backToTop:hover {
    transform: translateY(-4px);
}


/* ==========================================================================
   Cookie Consent
   ========================================================================== */

#cookieConsent {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}


/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 991.98px) {
    .navbar-custom {
        padding: 0.5rem 0;
    }

    .ts-hero {
        min-height: auto;
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    :root {
        --ts-section-padding: 3rem;
    }

    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.5rem; }

    .ts-feature-card,
    .ts-pricing-card {
        padding: 1.5rem;
    }
}


/* ==========================================================================
   Hero Section
   ========================================================================== */

.ts-hero {
    position: relative;
    overflow: hidden;
}

.min-vh-75 {
    min-height: 75vh;
}

.ts-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.ts-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--ts-primary) 0%, var(--ts-primary-300) 50%, transparent 100%);
    opacity: 0.16;
}

.ts-hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004f59' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero Chat Mockup */
.ts-hero-mockup {
    position: relative;
    z-index: 1;
}

.ts-hero-mockup::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, var(--ts-primary-200) 0%, var(--ts-primary-100) 100%);
    border-radius: calc(var(--ts-radius-2xl) + 20px);
    z-index: -1;
    opacity: 0.5;
}

/* Chat message rounded corners */
.rounded-bottom-end-0 {
    border-bottom-right-radius: 0 !important;
}

.rounded-bottom-start-0 {
    border-bottom-left-radius: 0 !important;
}

/* Typing Indicator */
.ts-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ts-typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--ts-primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.ts-typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.ts-typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.ts-typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* ==========================================================================
   Logo/Integration Section
   ========================================================================== */

.ts-logo-item {
    transition: all var(--ts-transition);
}

.ts-logo-item:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

.grayscale {
    filter: grayscale(100%);
    transition: filter var(--ts-transition);
}

.grayscale:hover {
    filter: grayscale(0%);
}


/* ==========================================================================
   Step Cards (How it Works)
   ========================================================================== */

.ts-step-card {
    transition: all var(--ts-transition);
}

.ts-step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ts-shadow-lg) !important;
}

.ts-step-number span {
    box-shadow: 0 4px 12px rgba(var(--ts-primary-rgb), 0.3);
    transition: all var(--ts-transition);
}

.ts-step-card:hover .ts-step-number span {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(var(--ts-primary-rgb), 0.4);
}

.ts-step-icon {
    transition: all var(--ts-transition);
}

.ts-step-card:hover .ts-step-icon i {
    transform: scale(1.1);
}


/* ==========================================================================
   Industry Cards
   ========================================================================== */

.ts-industry-card {
    transition: all var(--ts-transition);
    border: 1px solid transparent;
}

.ts-industry-card:hover {
    background-color: white !important;
    border-color: var(--ts-primary-200);
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow);
}

.ts-industry-icon {
    transition: all var(--ts-transition);
}

.ts-industry-card:hover .ts-industry-icon i {
    transform: scale(1.15);
}


/* ==========================================================================
   Stat Cards
   ========================================================================== */

.ts-stat-card {
    transition: all var(--ts-transition);
}

.ts-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow-lg);
}


/* ==========================================================================
   Benefit Icons
   ========================================================================== */

.ts-benefit-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--ts-transition);
}

.ts-benefit-icon i {
    font-size: 1.25rem;
}


/* ==========================================================================
   Avatar
   ========================================================================== */

.ts-avatar {
    flex-shrink: 0;
}


/* ==========================================================================
   Gradient Backgrounds
   ========================================================================== */

.ts-section-gradient {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
}

.bg-primary-subtle {
    background-color: var(--ts-primary-100) !important;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-warning-subtle {
    background-color: rgba(232, 168, 36, 0.1) !important;
}

.bg-info-subtle {
    background-color: rgba(8, 145, 178, 0.1) !important;
}


/* ==========================================================================
   Contact Page
   ========================================================================== */

.ts-contact-card {
    transition: all var(--ts-transition);
    border: 1px solid transparent;
}

.ts-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow-lg) !important;
    border-color: var(--ts-primary-200);
}

.ts-contact-icon {
    transition: all var(--ts-transition);
}

.ts-contact-card:hover .ts-contact-icon {
    transform: scale(1.1);
}

.ts-resource-card {
    transition: all var(--ts-transition);
    border: 1px solid transparent;
}

.ts-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow-lg) !important;
    border-color: var(--ts-primary-200);
}

.ts-resource-card:hover .text-primary {
    transform: scale(1.1);
}

/* Form validation states */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--bs-danger);
    background-image: none;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

.invalid-feedback {
    font-size: 0.875rem;
    color: var(--bs-danger);
}

/* Map marker pulse animation */
.ts-map-marker {
    position: relative;
}

.ts-map-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--ts-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}


/* ==========================================================================
   Accordion (FAQ)
   ========================================================================== */

.accordion-button {
    background-color: white;
    border-radius: var(--ts-radius-lg) !important;
    padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--ts-primary-100);
    color: var(--ts-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--ts-primary-rgb), 0.15);
    border-color: var(--ts-primary);
}

.accordion-button::after {
    background-size: 1rem;
}

.accordion-body {
    padding: 1rem 1.5rem 1.5rem;
}


/* ==========================================================================
   Transition Utilities
   ========================================================================== */

.transition-all {
    transition: all var(--ts-transition);
}

.hover-shadow:hover {
    box-shadow: var(--ts-shadow);
}


/* ==========================================================================
   Text Utilities
   ========================================================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tracking-wide {
    letter-spacing: 0.05em;
}


/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ts-topbar,
    .navbar-custom,
    .ts-footer,
    #backToTop,
    #cookieConsent {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}


/* ==========================================================================
   Portal Dashboard Styles
   ========================================================================== */

/* Portal Layout Variables */
:root {
    --ts-sidebar-width: 260px;
    --ts-sidebar-collapsed-width: 72px;
    --ts-topbar-height: 64px;
}

/* Portal Body */
.ts-portal-body {
    background-color: #f8f9fa;
}

/* ==========================================================================
   Portal Sidebar
   ========================================================================== */

.ts-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--ts-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--ts-primary) 0%, var(--ts-primary-dark) 100%);
    z-index: 1040;
    transition: width var(--ts-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ts-sidebar-brand {
    height: var(--ts-topbar-height);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.ts-sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-sidebar-brand img {
    height: 32px;
    transition: opacity var(--ts-transition);
}

.ts-sidebar-brand .logo-full {
    display: block;
}

.ts-sidebar-brand .logo-icon {
    display: none;
    width: 32px;
    height: 32px;
}

/* Sidebar Brand Indicator */
.ts-sidebar-brand-indicator {
    padding: 0.25rem 1rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.ts-brand-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.2);
    border-radius: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Sidebar Section Toggle (collapsible) */
.ts-sidebar-section-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.ts-sidebar-section-toggle:hover {
    color: rgba(255,255,255,0.6);
}

.ts-section-chevron {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.ts-sidebar-section-toggle[aria-expanded="true"] .ts-section-chevron {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.ts-sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.ts-sidebar-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
    transition: all var(--ts-transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.ts-sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.ts-sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-left: 3px solid #fff;
}

.ts-sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.ts-sidebar-nav .nav-link span {
    transition: opacity var(--ts-transition-fast);
}

.ts-sidebar-section {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    margin-top: 0.5rem;
    white-space: nowrap;
    transition: opacity var(--ts-transition-fast);
}

/* Sidebar Footer */
.ts-sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.ts-sidebar-footer .nav-link {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.5);
    transition: all var(--ts-transition-fast);
}

.ts-sidebar-footer .nav-link:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
}

.ts-sidebar-footer .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar Toggle Button */
.ts-sidebar-toggle {
    background: rgba(255,255,255,0.05);
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    width: 100%;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all var(--ts-transition-fast);
    font-size: 0.85rem;
}

.ts-sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

.ts-sidebar-toggle i {
    font-size: 1.1rem;
    width: 24px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--ts-transition);
}

.ts-sidebar-toggle span {
    transition: opacity var(--ts-transition-fast);
}

/* ==========================================================================
   Sidebar Collapsed State
   ========================================================================== */

.ts-sidebar.collapsed {
    width: var(--ts-sidebar-collapsed-width);
}

.ts-sidebar.collapsed .ts-sidebar-brand .logo-full {
    display: none;
}

.ts-sidebar.collapsed .ts-sidebar-brand .logo-icon {
    display: block;
}

.ts-sidebar.collapsed .ts-sidebar-brand-indicator {
    display: none;
}

.ts-sidebar.collapsed .ts-section-chevron {
    display: none;
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link {
    padding: 0.75rem 0;
    justify-content: center;
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-item {
    width: 100%;
    overflow: hidden;
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.15);
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link span {
    display: none;
}

.ts-sidebar.collapsed .ts-sidebar-section {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0.25rem 0 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.ts-sidebar.collapsed .ts-sidebar-footer .nav-link {
    padding: 0.625rem 0;
    justify-content: center;
}

.ts-sidebar.collapsed .ts-sidebar-footer .nav-link span {
    display: none;
}

.ts-sidebar.collapsed .ts-sidebar-toggle {
    justify-content: center;
    padding: 0.75rem 0;
}

.ts-sidebar.collapsed .ts-sidebar-toggle i {
    transform: rotate(180deg);
}

.ts-sidebar.collapsed .ts-sidebar-toggle span {
    display: none;
}

/* Tooltip for collapsed sidebar */
.ts-sidebar.collapsed .ts-sidebar-nav .nav-link {
    position: relative;
}

/* Active indicator using pseudo-element (doesn't affect icon centering) */
.ts-sidebar.collapsed .ts-sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background var(--ts-transition-fast);
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link.active::before {
    background: #fff;
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link::after {
    content: attr(data-title);
    position: absolute;
    left: calc(var(--ts-sidebar-collapsed-width) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #2a3436;
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--ts-transition-fast);
    z-index: 1050;
    pointer-events: none;
    box-shadow: var(--ts-shadow);
}

.ts-sidebar.collapsed .ts-sidebar-nav .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Portal Main Content
   ========================================================================== */

.ts-main {
    margin-left: var(--ts-sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--ts-transition);
}

.ts-main.expanded {
    margin-left: var(--ts-sidebar-collapsed-width);
}

/* ==========================================================================
   Portal Top Bar
   ========================================================================== */

.ts-portal-topbar {
    height: var(--ts-topbar-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Brand Selector (Top Bar) */
.ts-brand-selector-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    background: var(--ts-primary);
    border: none;
    color: #fff;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background var(--ts-transition-fast);
}

.ts-brand-selector-btn:hover,
.ts-brand-selector-btn:focus,
.ts-brand-selector-btn:active,
.ts-brand-selector .show > .ts-brand-selector-btn {
    background: var(--ts-primary-dark, #003d45);
    color: #fff;
}

.ts-brand-selector-btn::after {
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.ts-user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    background: #f8f9fa;
    border: none;
    color: var(--ts-body-color);
    transition: background var(--ts-transition-fast);
}

.ts-user-dropdown .dropdown-toggle:hover {
    background: #e9ecef;
}

.ts-user-dropdown .dropdown-toggle::after {
    display: none;
}

.ts-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ts-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ==========================================================================
   Portal Content Area
   ========================================================================== */

.ts-content {
    padding: 1.5rem;
}

/* ==========================================================================
   Portal Cards
   ========================================================================== */

.ts-card {
    background: #fff;
    border: none;
    border-radius: var(--ts-radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ts-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f3f4;
    background: transparent;
}

.ts-card-body {
    padding: 1.25rem;
}

/* ==========================================================================
   Portal Stats Cards (Dashboard)
   ========================================================================== */

.ts-stat-card {
    padding: 1.25rem;
    border-radius: var(--ts-radius-lg);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform var(--ts-transition-fast), box-shadow var(--ts-transition-fast);
}

.ts-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ts-shadow);
}

.ts-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ts-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ts-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.ts-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ==========================================================================
   Portal Mobile Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .ts-sidebar {
        transform: translateX(-100%);
        width: var(--ts-sidebar-width) !important;
    }

    .ts-sidebar.show {
        transform: translateX(0);
    }

    /* Hide collapse toggle on mobile */
    .ts-sidebar .ts-sidebar-toggle {
        display: none !important;
    }

    /* Reset collapsed styles on mobile */
    .ts-sidebar.collapsed .ts-sidebar-brand .logo-full {
        display: block;
    }

    .ts-sidebar.collapsed .ts-sidebar-brand .logo-icon {
        display: none;
    }

    .ts-sidebar.collapsed .ts-sidebar-brand-indicator {
        display: block;
    }

    .ts-sidebar.collapsed .ts-section-chevron {
        display: inline;
    }

    .ts-sidebar.collapsed .ts-sidebar-nav .nav-link {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }

    .ts-sidebar.collapsed .ts-sidebar-nav .nav-link.active {
        border-left: 3px solid #fff;
        border-radius: 0;
        margin: 0;
        background: rgba(255,255,255,0.15);
    }

    .ts-sidebar.collapsed .ts-sidebar-nav .nav-link span {
        display: inline;
    }

    .ts-sidebar.collapsed .ts-sidebar-section {
        opacity: 1;
        height: auto;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
    }

    .ts-sidebar.collapsed .ts-sidebar-footer .nav-link {
        padding: 0.625rem 1rem;
        justify-content: flex-start;
    }

    .ts-sidebar.collapsed .ts-sidebar-footer .nav-link span {
        display: inline;
    }

    .ts-main {
        margin-left: 0 !important;
    }

    .ts-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
    }

    .ts-sidebar-overlay.show {
        display: block;
    }
}

/* ==========================================================================
   Portal Settings Tabs
   ========================================================================== */

.ts-settings-nav {
    padding: 0;
    gap: 0;
}

.ts-settings-nav .nav-item {
    margin: 0;
}

.ts-settings-nav .nav-link {
    color: var(--ts-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    transition: all var(--ts-transition-fast);
}

.ts-settings-nav .nav-link:hover {
    color: var(--ts-primary);
    background: var(--ts-primary-light);
}

.ts-settings-nav .nav-link.active {
    color: var(--ts-primary);
    background: transparent;
    border-bottom-color: var(--ts-primary);
}

.ts-settings-nav .nav-link i {
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .ts-settings-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ts-settings-nav .nav-link {
        padding: 0.875rem 1rem;
        white-space: nowrap;
    }

    .ts-settings-nav .nav-link span {
        display: none;
    }

    .ts-settings-nav .nav-link i {
        margin: 0 !important;
    }
}

/* ==========================================================================
   Portal Settings Sections
   ========================================================================== */

.ts-settings-section {
    padding: 1.25rem;
    background: var(--ts-light-bg);
    border-radius: var(--ts-radius-lg);
}

.ts-settings-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ts-body-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ts-border);
}

.ts-settings-section-title i {
    color: var(--ts-primary);
}

/* Large Avatar for Profile */
.ts-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--ts-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2rem;
}

/* ==========================================================================
   Dashboard CSP-Compliant Styles
   ========================================================================== */

/* Setup Banner (gradient background) */
.ts-setup-banner {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
}

/* Setup Banner Large Icon */
.ts-setup-banner-icon {
    font-size: 8rem;
    opacity: 0.3;
}

/* Progress Bar Thin Variant */
.ts-progress-thin {
    height: 8px;
}

/* Checklist Circle Icons */
.ts-checklist-icon {
    width: 32px;
    height: 32px;
}

/* Empty State Large Icon */
.ts-empty-icon {
    font-size: 3rem;
}

/* ==========================================================================
   Organization Setup Wizard Styles
   ========================================================================== */

/* Wizard Progress Container */
.wizard-progress {
    background: var(--ts-light-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1rem;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bs-gray-300);
    z-index: 1;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.wizard-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-white);
    border: 3px solid var(--bs-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--bs-gray-500);
    transition: all 0.3s ease;
}

.wizard-step.completed .wizard-step-icon {
    background: var(--ts-primary);
    border-color: var(--ts-primary);
    color: white;
}

.wizard-step.active .wizard-step-icon {
    background: var(--bs-white);
    border-color: var(--ts-primary);
    color: var(--ts-primary);
    box-shadow: 0 0 0 4px rgba(0, 79, 89, 0.2);
}

.wizard-step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--bs-gray-600);
    text-align: center;
    max-width: 80px;
}

.wizard-step.active .wizard-step-label,
.wizard-step.completed .wizard-step-label {
    color: var(--ts-primary);
    font-weight: 600;
}

/* Hide labels on mobile */
@media (max-width: 768px) {
    .wizard-step-label {
        display: none;
    }
    .wizard-step-icon {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}

/* Wizard Card */
.wizard-card {
    background: var(--bs-white);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.wizard-card-header {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
    color: white;
    padding: 1.5rem 2rem;
}

.wizard-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.wizard-card-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.wizard-card-body {
    padding: 2rem;
}

.wizard-card-footer {
    padding: 1.5rem 2rem;
    background: var(--ts-light-bg);
    border-top: 1px solid var(--bs-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Wizard Form Styling */
.wizard-form .form-label {
    font-weight: 500;
    color: var(--ts-secondary);
    margin-bottom: 0.5rem;
}

.wizard-form .form-text {
    color: var(--bs-gray-600);
    font-size: 0.85rem;
}

.wizard-form .form-control:focus,
.wizard-form .form-select:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 3px rgba(0, 79, 89, 0.15);
}

.wizard-form .mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Wizard Buttons */
.btn-wizard-next {
    background: var(--ts-primary);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-wizard-next:hover {
    background: var(--ts-secondary);
    color: white;
    transform: translateY(-1px);
}

.btn-wizard-back {
    background: transparent;
    border: 2px solid var(--bs-gray-300);
    color: var(--bs-gray-600);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-wizard-back:hover {
    border-color: var(--ts-primary);
    color: var(--ts-primary);
}

/* Wizard Error Styling */
.wizard-form .is-invalid {
    border-color: var(--bs-danger);
}

.wizard-form .invalid-feedback {
    font-size: 0.85rem;
}

/* Step indicator mobile */
.step-indicator-mobile {
    display: none;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--ts-primary);
    font-weight: 500;
}

@media (max-width: 576px) {
    .step-indicator-mobile {
        display: block;
    }
    .wizard-card-body {
        padding: 1.5rem;
    }
    .wizard-card-footer {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
        gap: 1rem;
    }
    .wizard-card-footer .btn {
        width: 100%;
    }
}

/* Wizard Progress Bar */
.ts-wizard-progress {
    height: 6px;
}

/* Disabled container state */
.ts-wizard-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Enable container state */
.ts-wizard-enabled {
    opacity: 1;
    pointer-events: auto;
}

/* Next Step Badges (completion page) */
.ts-next-step-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

/* Sector Selection Cards */
.ts-sector-option .btn-check:checked + .btn {
    background-color: var(--ts-primary);
    border-color: var(--ts-primary);
    color: white;
}

.ts-sector-option .btn-check:checked + .btn .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Category and Industry Cards */
.ts-selection-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ts-selection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ts-selection-card.selected {
    background-color: var(--ts-primary) !important;
    border-color: var(--ts-primary) !important;
    color: white !important;
}

.ts-selection-card.selected .text-muted,
.ts-selection-card.selected .text-primary {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Logo Preview */
.ts-logo-preview {
    display: none;
}

.ts-logo-preview.show {
    display: block;
}

.ts-logo-preview-img {
    max-height: 100px;
}

/* Widget Preview (Brand step) */
.ts-widget-preview-container {
    background: var(--ts-light-bg);
}

.ts-widget-preview {
    max-width: 300px;
}

.ts-preview-header {
    background: var(--ts-primary);
    margin: -1rem -1rem 1rem -1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.ts-preview-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.9rem;
}

/* Chat Preview (Agent step) */
.ts-chat-preview-container {
    background: var(--ts-light-bg);
}

.ts-chat-preview {
    max-width: 350px;
}

.ts-chat-message {
    max-width: 80%;
}

/* Working Hours Grid */
.ts-hours-row.day-closed .ts-hours-times {
    opacity: 0.4;
    pointer-events: none;
}

/* Color Swatch (Review page) */
.ts-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}

/* Success Animation (Complete page) */
@keyframes ts-checkmark-draw {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes ts-checkmark-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.ts-success-checkmark {
    animation: ts-checkmark-scale 0.5s ease-in-out;
}

.ts-success-checkmark .checkmark-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: ts-checkmark-draw 0.6s ease-out 0.2s forwards;
}

/* Success Animation (Complete page) */
.success-animation {
    margin: 0 auto;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--ts-primary);
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon::before,
.check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #FFFFFF;
    transform: rotate(-45deg);
}

.check-icon .icon-line {
    height: 5px;
    background-color: var(--ts-primary);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(0, 79, 89, 0.5);
}

.check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #FFFFFF;
}

@keyframes rotate-circle {
    0% { transform: rotate(-45deg); }
    5% { transform: rotate(-45deg); }
    12% { transform: rotate(-405deg); }
    100% { transform: rotate(-405deg); }
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 14px; top: 46px; }
}

@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 8px; top: 38px; }
}

/* Card styling */
.step-number {
    font-weight: 600;
    font-size: 0.875rem;
}


/* ==========================================================================
   Demo Chat Page Styles
   ========================================================================== */

/* Section */
.ts-demo-section {
    min-height: calc(100vh - 200px);
    background: linear-gradient(180deg, var(--ts-light-bg) 0%, var(--ts-body-bg) 100%);
}

/* Chat Container */
.ts-demo-chat-container {
    background: var(--ts-body-bg);
}

/* Chat Header */
.ts-demo-chat-header {
    /* Uses Bootstrap bg-primary bg-gradient */
}

/* Agent Avatar (header) */
.ts-demo-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.1rem;
}

/* Status Dot */
.ts-demo-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    background-color: #198754;
    border-radius: 50%;
    animation: ts-demo-pulse 2s infinite;
}

@keyframes ts-demo-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Messages Area */
.ts-demo-chat-messages {
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    background: var(--ts-body-bg);
    scroll-behavior: smooth;
}

/* Custom scrollbar for messages */
.ts-demo-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ts-demo-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ts-demo-chat-messages::-webkit-scrollbar-thumb {
    background: var(--ts-border);
    border-radius: 3px;
}

.ts-demo-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--ts-muted);
}

/* Message Avatar (in messages) */
.ts-demo-msg-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.8rem;
}

/* Message Content */
.ts-demo-msg-content {
    max-width: 85%;
}

/* Message Bubble */
.ts-demo-msg-bubble {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ts-demo-msg-bubble p {
    white-space: pre-wrap;
}

/* User Message Alignment */
.ts-demo-message-user .ts-demo-msg-content {
    margin-left: auto;
}

/* Agent message styling */
.ts-demo-message-agent .ts-demo-msg-bubble {
    background-color: var(--ts-light-bg) !important;
    border: 1px solid var(--ts-border);
}

/* User message styling */
.ts-demo-message-user .ts-demo-msg-bubble {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-primary-dark) 100%) !important;
}

/* Typing Indicator */
.ts-demo-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

.ts-demo-typing-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--ts-muted);
    border-radius: 50%;
    animation: ts-demo-typing-bounce 1.4s infinite ease-in-out both;
}

.ts-demo-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ts-demo-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.ts-demo-typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes ts-demo-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Actions */
.ts-demo-quick-actions {
    background: var(--ts-light-bg);
    border-top: 1px solid var(--ts-border);
}

.ts-demo-quick-btn {
    font-size: 0.8125rem;
    transition: all var(--ts-transition-fast);
}

.ts-demo-quick-btn:hover {
    transform: translateY(-1px);
}

/* Chat Input */
.ts-demo-chat-input {
    background: var(--ts-body-bg);
}

.ts-demo-chat-input textarea {
    resize: none;
    min-height: 44px;
    max-height: 150px;
    transition: border-color var(--ts-transition-fast), box-shadow var(--ts-transition-fast);
}

.ts-demo-chat-input textarea:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 3px rgba(var(--ts-primary-rgb), 0.15);
}

/* Input disabled state */
.ts-demo-input-disabled {
    background: var(--ts-light-bg);
}

.ts-demo-input-disabled textarea {
    background: var(--ts-light-bg);
    cursor: not-allowed;
}

.ts-demo-input-disabled button {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Coming Soon State */
.ts-demo-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.ts-demo-coming-soon-icon {
    animation: ts-demo-float 3s ease-in-out infinite;
}

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

/* CTA Section */
.ts-demo-cta {
    border: 2px dashed var(--ts-primary-200);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .ts-demo-chat-messages {
        min-height: 300px;
        max-height: 400px;
    }

    .ts-demo-msg-content {
        max-width: 90%;
    }

    .ts-demo-avatar {
        width: 40px;
        height: 40px;
    }

    .ts-demo-msg-avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .ts-demo-chat-messages {
        min-height: 280px;
        max-height: 350px;
    }

    .ts-demo-quick-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

    .ts-demo-cta {
        padding: 1.5rem !important;
    }
}


/* ==========================================================================
   Dashboard Enhanced Styles
   ========================================================================== */

/* Activity Icon in Recent Activity List */
.ts-activity-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--ts-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Stat Change Badge */
.ts-stat-change {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

/* Purple color utilities (for response time stat) */
.bg-purple-subtle {
    background-color: rgba(111, 66, 193, 0.15) !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Stat Card Compact Styles for 7 cards */
.ts-stat-card {
    padding: 1rem;
}

@media (max-width: 575.98px) {
    .ts-stat-card {
        padding: 0.75rem;
    }

    .ts-stat-value {
        font-size: 1.25rem;
    }

    .ts-stat-label {
        font-size: 0.75rem;
    }

    .ts-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Date Range Dropdown */
#dateRangeDropdown .dropdown-menu {
    min-width: 200px;
}

#dateRangeDropdown .dropdown-item.active {
    background-color: var(--ts-primary);
    color: white;
}

#dateRangeDropdown .dropdown-item:hover:not(.active) {
    background-color: var(--ts-light-bg);
}

/* Custom Date Modal */
#customDateModal .modal-content {
    border: none;
}

#customDateModal input[type="date"] {
    cursor: pointer;
}

/* Recent Activity Item Hover */
.ts-card-body .list-group-item {
    transition: background-color var(--ts-transition-fast);
}

.ts-card-body .list-group-item:hover {
    background-color: var(--ts-light-bg);
}

/* Star Rating Display */
.ts-activity-icon + .flex-grow-1 .bi-star-fill {
    font-size: 0.75rem;
}

/* Responsive adjustments for 7 stat cards */
@media (min-width: 1200px) {
    /* First row: 4 cards (col-xl-3 each) */
    /* Second row: 3 cards (col-xl-4 each) */
}

@media (max-width: 767.98px) {
    /* 2 cards per row on mobile */
    .row.g-3.mb-4 > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Date Range Display */
.mb-3 small.text-muted {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}


/* ==========================================================================
   Conversations List Styles
   ========================================================================== */

/* Conversations Table */
.ts-conversations-table {
    font-size: 0.9rem;
}

.ts-conversations-table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ts-muted);
    padding: 0.75rem;
}

.ts-conversations-table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

/* Conversation Row */
.ts-conversation-row {
    transition: background-color var(--ts-transition-fast);
}

.ts-conversation-row:hover {
    background-color: var(--ts-light-bg);
}

.ts-conversation-row.ts-conversation-open {
    background-color: rgba(var(--ts-primary-rgb), 0.03);
}

.ts-conversation-row.ts-conversation-open:hover {
    background-color: rgba(var(--ts-primary-rgb), 0.06);
}

/* Visitor Avatar */
.ts-visitor-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--ts-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Subject Link */
.ts-subject-link {
    transition: color var(--ts-transition-fast);
}

.ts-subject-link:hover {
    color: var(--ts-primary) !important;
}

/* Status Badges */
.ts-status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: var(--ts-radius-full);
}

.ts-status-pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.ts-status-active {
    background-color: rgba(25, 135, 84, 0.15);
    color: #0f5132;
}

.ts-status-handoff_requested {
    background-color: rgba(255, 128, 0, 0.15);
    color: #b35900;
}

.ts-status-handed_off {
    background-color: rgba(13, 110, 253, 0.15);
    color: #084298;
}

.ts-status-resolved {
    background-color: rgba(32, 201, 151, 0.15);
    color: #0d6655;
}

.ts-status-closed {
    background-color: rgba(108, 117, 125, 0.15);
    color: #495057;
}

/* Channel Icons */
.ts-channel-icon {
    font-size: 1.1rem;
}

.ts-channel-icon i {
    transition: transform var(--ts-transition-fast);
}

.ts-conversation-row:hover .ts-channel-icon i {
    transform: scale(1.1);
}

/* Rating Display */
.ts-rating-display {
    white-space: nowrap;
}

.ts-rating-display .bi {
    font-size: 0.7rem;
}

/* Card Footer for Pagination */
.ts-card-footer {
    background-color: var(--ts-light-bg);
}

/* Pagination Styling */
.pagination .page-link {
    border: none;
    color: var(--ts-muted);
    background: transparent;
    padding: 0.375rem 0.75rem;
}

.pagination .page-link:hover {
    background-color: var(--ts-primary-light);
    color: var(--ts-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--ts-primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background-color: transparent;
    color: var(--ts-border);
}

/* Filter Badges */
.badge.rounded-pill.px-3.py-2 {
    font-weight: 500;
    font-size: 0.8rem;
}

/* Responsive Table Adjustments */
@media (max-width: 991.98px) {
    .ts-conversations-table thead th,
    .ts-conversations-table tbody td {
        padding: 0.625rem 0.5rem;
    }

    .ts-visitor-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .ts-conversations-table {
        font-size: 0.85rem;
    }

    .ts-status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Inbox Read/Unread Styles */

/* Unread: bold, prominent — like Gmail unread rows */
.ts-conversation-unread .ts-visitor-name {
    font-weight: 700;
    color: var(--ts-body-color);
}

.ts-conversation-unread td {
    color: var(--ts-body-color);
}

.ts-subject-unread {
    font-weight: 600;
    color: var(--ts-body-color) !important;
}

/* Read: dimmed with visible gray background */
.ts-conversation-row:not(.ts-conversation-unread) > * {
    --bs-table-bg: #edeef0;
    --bs-table-color: inherit;
}

.ts-conversation-row:not(.ts-conversation-unread) .ts-visitor-name {
    font-weight: 500;
    color: var(--ts-muted);
}

.ts-conversation-row:not(.ts-conversation-unread) .ts-subject-link {
    color: var(--ts-muted) !important;
}

.ts-conversation-row:not(.ts-conversation-unread) .ts-visitor-avatar {
    opacity: 0.7;
}

/* Empty State Icon */
.ts-card-body .bi-chat-square-text {
    opacity: 0.5;
}


/* ==========================================================================
   Conversation Detail Styles
   ========================================================================== */

/* Messages Card */
.ts-messages-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 500px;
}

.ts-messages-card .ts-card-header {
    flex-shrink: 0;
}

.ts-messages-card .ts-card-footer {
    flex-shrink: 0;
}

/* Messages Container */
.ts-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--ts-light-bg);
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.ts-messages-container::-webkit-scrollbar {
    width: 6px;
}

.ts-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.ts-messages-container::-webkit-scrollbar-thumb {
    background: var(--ts-border);
    border-radius: 3px;
}

.ts-messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--ts-muted);
}

/* Date Separator */
.ts-date-separator {
    text-align: center;
    margin: 1rem 0;
    position: relative;
}

.ts-date-separator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--ts-border);
}

.ts-date-separator span {
    position: relative;
    background: var(--ts-light-bg);
    padding: 0 1rem;
    font-size: 0.75rem;
    color: var(--ts-muted);
    font-weight: 500;
}

/* Message Base */
.ts-message {
    margin-bottom: 1rem;
    display: flex;
}

/* User Message */
.ts-message-user {
    justify-content: flex-end;
}

.ts-message-user .ts-message-bubble {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-primary-dark) 100%);
    color: white;
    border-radius: var(--ts-radius-lg) var(--ts-radius-lg) 0 var(--ts-radius-lg);
    max-width: 75%;
}

.ts-message-user .ts-message-meta {
    color: rgba(255, 255, 255, 0.7);
}

/* Assistant Message */
.ts-message-assistant {
    justify-content: flex-start;
}

.ts-message-assistant .ts-message-bubble {
    background: white;
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-lg) var(--ts-radius-lg) var(--ts-radius-lg) 0;
    max-width: 75%;
}

/* Human Agent Message */
.ts-message-human_agent {
    justify-content: flex-start;
}

.ts-message-human_agent .ts-message-bubble {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: var(--ts-radius-lg) var(--ts-radius-lg) var(--ts-radius-lg) 0;
    max-width: 75%;
}

/* Fallback Message Indicator */
.ts-message-fallback .ts-message-bubble {
    border-color: rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.05);
}

/* Message Bubble */
.ts-message-bubble {
    padding: 0.875rem 1rem;
}

/* Message Sender Label */
.ts-message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    opacity: 0.8;
}

.ts-message-assistant .ts-message-sender {
    color: var(--ts-primary);
}

.ts-message-human_agent .ts-message-sender {
    color: #0d6efd;
}

/* Message Content */
.ts-message-content {
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.ts-message-content p {
    margin-bottom: 0.5rem;
}

.ts-message-content p:last-child {
    margin-bottom: 0;
}

/* Message Meta */
.ts-message-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--ts-muted);
}

.ts-message-tokens,
.ts-message-response-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ts-message-fallback-badge {
    color: #ffc107;
}

/* System Message */
.ts-message-system {
    text-align: center;
    font-size: 0.8rem;
    color: var(--ts-muted);
    background: rgba(108, 117, 125, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--ts-radius-full);
    margin: 0.5rem auto;
    max-width: 80%;
}

.ts-message-system .ts-message-time {
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* Sidebar Info List */
.ts-info-list {
    font-size: 0.875rem;
}

.ts-info-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ts-border);
}

.ts-info-list li:last-child {
    border-bottom: none;
}

.ts-info-list li i {
    width: 20px;
    margin-right: 0.5rem;
    text-align: center;
    flex-shrink: 0;
}

.ts-info-list li .text-muted {
    margin-right: 0.375rem;
}

.ts-info-list li code {
    font-size: 0.8rem;
    background: var(--ts-light-bg);
    padding: 0.125rem 0.375rem;
    border-radius: var(--ts-radius-sm);
}

/* Handoff Reason */
.ts-handoff-reason,
.ts-user-agent {
    flex-direction: column;
}

.ts-handoff-reason > div,
.ts-user-agent > div {
    margin-top: 0.25rem;
    padding-left: 1.625rem;
}

/* Visitor Avatar Large */
.ts-visitor-avatar-lg {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--ts-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Card Footer */
.ts-messages-card .ts-card-footer {
    background: white;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .ts-messages-card {
        height: auto;
        min-height: 400px;
        max-height: 60vh;
    }

    .ts-message-bubble {
        max-width: 85% !important;
    }
}

@media (max-width: 575.98px) {
    .ts-messages-container {
        padding: 0.75rem;
    }

    .ts-message-bubble {
        padding: 0.75rem;
        max-width: 90% !important;
    }

    .ts-message-content {
        font-size: 0.85rem;
    }

    .ts-visitor-avatar-lg {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   ABOUT PAGE STYLES
   ==========================================================================

   Note: Hero section uses the same .ts-hero classes as index.html
   Those styles are already in custom.css, so no duplication needed here.

   ========================================================================== */


/* ==========================================================================
   Story Section - Accent Line
   ========================================================================== */

.ts-story-content {
    position: relative;
}

.ts-story-content::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(
        to bottom,
        var(--ts-primary) 0%,
        var(--ts-primary-300) 100%
    );
    border-radius: 2px;
}

@media (max-width: 767.98px) {
    .ts-story-content::before {
        display: none;
    }
}


/* ==========================================================================
   Value Cards
   ========================================================================== */

.ts-value-card {
    transition: all var(--ts-transition);
}

.ts-value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ts-shadow-lg);
}

.ts-value-card:hover .ts-value-icon {
    transform: scale(1.1);
}

.ts-value-icon {
    transition: transform var(--ts-transition);
}


/* ==========================================================================
   Stats Section
   ========================================================================== */

.ts-stat-item {
    padding: 1rem;
}

.letter-spacing-wide {
    letter-spacing: 0.1em;
}


/* ==========================================================================
   Europe Map Section - Circular Leaflet Map with Pulse
   ========================================================================== */

.ts-europe-map-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse rings around the map */
.ts-map-pulse {
    position: absolute;
    width: 280px;
    height: 280px;
    border: 2px solid var(--ts-primary);
    border-radius: 50%;
    opacity: 0.2;
    animation: ts-map-pulse 3s ease-out infinite;
}

.ts-map-pulse:nth-child(2) {
    animation-delay: 1s;
}

.ts-map-pulse:nth-child(3) {
    animation-delay: 2s;
}

@keyframes ts-map-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Circular map container */
.ts-europe-map-container {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 79, 89, 0.15),
        0 0 0 4px rgba(0, 79, 89, 0.1);
    z-index: 1;
}

/* The actual Leaflet map */
#europeMap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Grayscale filter for the map tiles */
.ts-europe-map-container .leaflet-tile-pane {
    filter: grayscale(100%) contrast(1.1);
}

/* Hide Leaflet controls and attribution for cleaner look */
.ts-europe-map-container .leaflet-control-container {
    display: none;
}

.ts-europe-map-container .leaflet-control-attribution {
    display: none;
}

/* Custom marker styling */
.ts-europe-marker {
    background: var(--ts-primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Location badge below map */
.ts-map-location-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
}


/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 991.98px) {
    .ts-europe-map-container {
        width: 220px;
        height: 220px;
    }

    .ts-map-pulse {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 767.98px) {
    .ts-europe-map-container {
        width: 180px;
        height: 180px;
    }

    .ts-map-pulse {
        width: 200px;
        height: 200px;
    }
}


/* ==========================================================================
   Reduced Motion - Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .ts-map-pulse {
        animation: none;
        opacity: 0.15;
        transform: scale(1.1);
    }

    .ts-map-pulse:nth-child(2) {
        transform: scale(1.2);
    }

    .ts-map-pulse:nth-child(3) {
        transform: scale(1.3);
    }
}

/* ==========================================================================
   Quick Access Cards (Dashboard - Completed Setup)
   ========================================================================== */

.ts-quick-access-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border-radius: var(--ts-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all var(--ts-transition-fast);
    height: 100%;
    min-height: 140px;
    color: inherit;
}

.ts-quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow);
    color: inherit;
}

.ts-quick-access-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--ts-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: transform var(--ts-transition-fast);
}

.ts-quick-access-card:hover .ts-quick-access-icon {
    transform: scale(1.1);
}

.ts-quick-access-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ts-text-dark);
}

.ts-quick-access-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ts-text-muted);
    margin-top: 0.25rem;
}

.ts-quick-access-subtitle {
    font-size: 0.7rem;
    color: var(--ts-text-muted);
    opacity: 0.75;
    margin-top: 0.125rem;
}

/* Purple color support for quick access cards */
.bg-purple-subtle {
    background-color: rgba(111, 66, 193, 0.1) !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Responsive adjustments for quick access cards */
@media (max-width: 991.98px) {
    .ts-quick-access-card {
        padding: 1rem 0.75rem;
        min-height: 120px;
    }

    .ts-quick-access-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .ts-quick-access-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .ts-quick-access-card {
        padding: 0.875rem 0.5rem;
        min-height: 110px;
    }

    .ts-quick-access-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .ts-quick-access-value {
        font-size: 1.125rem;
    }

    .ts-quick-access-label {
        font-size: 0.7rem;
    }

    .ts-quick-access-subtitle {
        font-size: 0.65rem;
    }
}


/* ==========================================================================
   Product Images
   ========================================================================== */

.product-img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover;
}

.product-img-fallback {
    width: 40px;
    height: 40px;
}

/* Heatmap grid */
.heatmap-grid {
    display: grid;
    grid-template-columns: 72px repeat(24, 1fr);
    gap: 2px;
    font-size: 11px;
}
.heatmap-hour {
    text-align: center;
    color: #64748b;
    padding-bottom: 4px;
}
.heatmap-day {
    display: flex;
    align-items: center;
    color: #374151;
    font-weight: 500;
    padding-right: 6px;
    white-space: nowrap;
}
.heatmap-cell {
    border-radius: 3px;
    min-height: 28px;
    transition: opacity 0.15s;
}
.heatmap-cell:hover {
    opacity: 0.8;
}
@media (max-width: 768px) {
    .heatmap-grid {
        grid-template-columns: 56px repeat(24, 1fr);
        gap: 1px;
        font-size: 9px;
    }
    .heatmap-cell {
        min-height: 18px;
    }
}
