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

:root {
    /* Hyper-Chat Design Tokens */
    --bg-navy: #0F172A;
    /* Midnight Navy */
    --bg-navy-light: #1E293B;
    /* Slate 800 */
    --bg-navy-lighter: #334155;
    /* Slate 700 */

    --primary: #6366F1;
    /* Electric Indigo */
    --primary-hover: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.5);

    --success: #10B981;
    /* Mint Glow */
    --text-main: #F8FAFC;
    /* Cool Gray 50 */
    --text-muted: #94A3B8;
    /* Slate 400 */

    --border-dark: #334155;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-xl: 16px;
    --radius-2xl: 24px;

    /* Layout */
    --container-width: 1200px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-navy);
    color: var(--text-main);
    overflow-x: hidden;
}

/* =============================================
   HERO SECTION
   ============================================= */
.saas-hero {
    position: relative;
    padding: 120px 24px 80px;
    background: var(--bg-navy);
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* Ambient Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #4F46E5;
}

.blob-2 {
    bottom: 0;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #6366F1;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    position: relative;
    z-index: 2;
    align-items: center;
}

/* Hero Content */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: #818CF8;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    color: white;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

/* Hero Input Group */
.hero-input-group {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    position: relative;
}

.hero-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-dark);
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.hero-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(30, 41, 59, 1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px var(--primary-glow);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--primary-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-dark);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: var(--bg-navy-light);
    color: white;
    border-color: var(--text-muted);
}

/* 3D Phone Mockup (Detailed Reconstruction) */
.phone-mockup-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 300px;
    background: var(--bg-navy-light);
    border: 1px solid var(--border-dark);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: rotateY(-12deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: rotateY(0) rotateX(0);
}

.phone-screen {
    background: var(--bg-navy);
    border-radius: 32px;
    height: 560px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Mockup UI Inner */
.mockup-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mockup-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    position: relative;
}

.mockup-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--success);
    border: 2px solid var(--bg-navy);
    border-radius: 50%;
}

.mockup-agent-info {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.mockup-agent-info span {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

.mockup-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mockup-msg {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 18px;
}

.mockup-msg.left {
    background: var(--bg-navy-light);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.mockup-msg.right {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.mockup-input {
    margin: 16px;
    background: var(--bg-navy-light);
    padding: 14px;
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =============================================
   GRID SECTION
   ============================================= */
.features-section {
    padding: 100px 24px;
    background: var(--bg-navy);
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-navy-light);
    border: 1px solid var(--border-dark);
    padding: 40px 32px;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: #1F2937;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
    transition: all 0.3s;
}

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

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
}

/* Mobile */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-input-group {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility */
.trust-label {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-label svg {
    color: var(--success);
}


/* =============================================
   CHAT PAGE
   ============================================= */
.chat-page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    padding: 20px;
    background: var(--bg-navy);
    /* Dark background */
    overflow: visible;
}

.chat-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
}

.brand-mascot {
    height: 32px;
    width: auto;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    /* White text for dark mode */
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 100vh;
    flex: 1;
    border-radius: var(--radius-xl);
    background: var(--bg-container, rgba(30, 41, 59, 0.7));
    /* Dark glass */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle light border */
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Deep shadow */
    overflow: hidden;
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

.chat-footer {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 550px) {
    .chat-page-wrapper {
        padding: 0;
        background: var(--bg-navy);
    }

    .chat-brand-header {
        display: none;
    }

    .chat-container {
        border-radius: 0;
        max-width: 100%;
        border: none;
        box-shadow: none;
        background: var(--bg-navy);
    }

    .chat-footer {
        display: none;
    }
}

/* Chat Header */
.chat-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.8);
    /* Darker header */
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-dark);
    z-index: 20;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.avatar {
    position: relative;
    margin-right: 14px;
}

.avatar img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--bg-navy-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.header-info {
    flex: 1;
}

.header-info h1 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: white;
    letter-spacing: -0.2px;
}

.status-indicator {
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.status-indicator.ai-mode::before {
    background: var(--primary);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.status-indicator.live-available::before {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-indicator.live-offline::before {
    background: var(--text-muted);
}

.status-indicator.live-chatting::before {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Messages Area */
.chat-messages {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Message */
.message {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    max-width: 85%;
    position: relative;
    animation: msgSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Bubble */
.bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    min-width: 0;
    max-width: 100%;
}

.message.bot .bubble {
    background: var(--bg-navy-light);
    color: var(--text-main);
    border: 1px solid var(--border-dark);
    border-bottom-left-radius: 4px;
}

.message.user .bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

/* Timestamp */
.time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
    flex-basis: 100%;
    padding-left: 0;
}

.message.user .time {
    text-align: right;
    padding-right: 4px;
}

/* Message meta row (time) outside bubble */
.message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 10px;
    color: var(--chat-meta-color, #94A3B8);
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Wrapper so bubble and message-meta stack vertically */
.bubble-meta-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.message.user .bubble-meta-wrap {
    align-items: flex-end;
}

.message.user .message-meta {
    justify-content: flex-end;
    padding-right: 4px;
}

.message.bot .message-meta {
    justify-content: flex-start;
    padding-left: 4px;
}

.message-meta .time {
    margin-top: 0;
    color: inherit;
}

/* System Messages */
.message.system {
    align-self: center;
    max-width: 90%;
    flex-direction: column;
    align-items: center;
    margin: 12px 0;
}

.system-bubble {
    background: rgba(30, 41, 59, 0.5) !important;
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    text-align: center;
    border: 1px solid var(--border-dark) !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    box-shadow: none !important;
}

/* System event messages (e.g. "X entered the chat") - centered with lines */
.message.system-event {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 12px 0;
    align-self: center;
}

.message.system-event .system-event-line {
    flex: 1;
    min-width: 0;
    height: 1px;
    background: var(--border-dark);
}

.message.system-event .system-event-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Input Area */
.chat-input-area {
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border-dark);
    backdrop-filter: blur(10px);
}

.input-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.chat-input-field {
    width: 100%;
    background: var(--bg-navy-light);
    border: 1px solid var(--border-dark);
    border-radius: 24px;
    padding: 12px 20px;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: white;
    transition: all 0.2s ease;
}

.chat-input-field:focus {
    border-color: var(--primary);
    background: var(--bg-navy-lighter);
}

.chat-input-field::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    background: var(--primary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chat-send-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.powered-by-footer {
    padding: 8px;
    text-align: center;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-dark);
}

.powered-by-footer a {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.powered-by-footer a:hover {
    color: white;
}

/* Typing Indicator */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px !important;
    min-height: 36px;
    background: rgba(30, 41, 59, 0.5) !important;
    /* Dark glass */
    border-radius: 18px !important;
    border-bottom-left-radius: 4px !important;
    border: 1px solid var(--border-dark) !important;
    width: fit-content;
    margin-bottom: 8px;
}

.typing-bubble .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.4s ease-in-out infinite;
}

.typing-bubble .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-bubble .dot:nth-child(3) {
    animation-delay: 0.4s;
}

.typing-bubble .typing-text {
    margin-right: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.typing-bubble .typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Header Banner - thin branding strip, same frame as EditBotImagesView (110×24) */
.header-banner {
    width: 100%;
    aspect-ratio: 110 / 24;
    height: auto;
    max-height: 56px;
    min-height: 24px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
    opacity: 1;
}

.header-banner.visible {
    display: block;
}

.header-banner.visible+.chat-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

/* Sender Avatar in Chat Bubbles */
.sender-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-bottom: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.bot {
    align-items: flex-end;
}

/* Widget/Iframe Overrides */
/* Unified Mobile Styling for ALL screens under 600px height or width */
@media (max-width: 600px),
(max-height: 600px) {
    .chat-page-wrapper {
        padding: 0;
        height: 100dvh;
        background: var(--bg-navy);
    }

    .chat-brand-header {
        display: none;
    }

    .chat-container {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        max-width: 100%;
        border: none;
        background: var(--bg-navy);
        overflow: hidden;
    }

    .chat-footer {
        display: none;
    }

    .powered-by-footer {
        display: block;
    }

    .chat-header {
        padding: 10px 14px;
    }

    .avatar img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .chat-input-area {
        padding: 8px 12px 12px;
        background: rgba(15, 23, 42, 0.95);
        /* Dark background for input on mobile */
    }

    /* Mobile Login Container Optimization */
    .login-container {
        padding: 24px 20px;
        max-width: 100%;
    }

    .login-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    .login-icon svg {
        width: 24px;
        height: 24px;
    }

    .login-container h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .rotating-text {
        font-size: 0.95rem !important;
        margin-bottom: 16px !important;
    }

    .sub-text {
        font-size: 0.8125rem !important;
        margin-bottom: 28px !important;
        max-width: 100%;
    }

    .login-buttons {
        max-width: 100%;
        gap: 12px;
        margin-bottom: 24px;
    }

    .btn-google,
    .btn-apple {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .login-note {
        font-size: 0.7rem !important;
        max-width: 100%;
    }
}

/* Direct Message Avatar (Input Field) */
.direct-avatar-wrap {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.direct-avatar-btn {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
}

.direct-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-dark);
    object-fit: cover;
    display: block;
}

.direct-avatar-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    padding: 6px 0;
    background: #2A3942;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.direct-avatar-menu.show,
.direct-avatar-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.direct-avatar-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: #e9edef;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}

.direct-avatar-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* WhatsApp-style: Direct Support view only */
#direct-support-view #direct-messages,
#direct-support-chat .chat-messages {
    background: #0b0f12;
}

#direct-support-view .message.user .bubble,
#direct-support-chat .message.user .bubble {
    background: #25D366 !important;
    color: #fff !important;
    border: none !important;
    border-bottom-right-radius: 4px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* Checkmark ticks: sent (one grey), delivered (two grey), read (two blue) */
.msg-tick {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.8;
}
.msg-tick.tick-sent::after { content: '\2713'; color: rgba(255,255,255,0.9); }
.msg-tick.tick-delivered::after { content: '\2713\2713'; color: rgba(255,255,255,0.9); letter-spacing: -2px; }
.msg-tick.tick-read::after { content: '\2713\2713'; color: #34B7F1; letter-spacing: -2px; }

#direct-support-view .message.bot .bubble,
#direct-support-chat .message.bot .bubble {
    background: #2A3942 !important;
    color: #e9edef !important;
    border: none !important;
    border-bottom-left-radius: 4px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

#direct-support-view .message-meta,
#direct-support-chat .message-meta {
    color: var(--chat-meta-color, #94A3B8);
}

#direct-support-view .message.user .message-meta,
#direct-support-chat .message.user .message-meta {
    color: var(--chat-meta-color, #94A3B8);
}

#direct-support-view .message.bot .message-meta,
#direct-support-chat .message.bot .message-meta {
    color: var(--chat-meta-color, rgba(255, 255, 255, 0.6));
}

#direct-support-view .msg-status.sent,
#direct-support-chat .msg-status.sent,
#direct-support-view .msg-status.delivered,
#direct-support-chat .msg-status.delivered {
    color: var(--chat-meta-color, #94A3B8);
}

#direct-support-view .msg-status.read,
#direct-support-chat .msg-status.read {
    color: #3B82F6;
}

#direct-support-view .translation-info,
#direct-support-chat .translation-info {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-top: 4px;
    color: var(--chat-meta-color, rgba(255, 255, 255, 0.7));
    display: flex;
    align-items: center;
    gap: 4px;
}

#direct-support-view .translation-info-icon,
#direct-support-chat .translation-info-icon {
    font-size: 0.65rem;
}

#direct-support-view .chat-input-area,
#direct-support-chat .chat-input-area {
    background: #1c2428;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#direct-support-view .chat-input-field,
#direct-support-chat .chat-input-field {
    background: #2A3942;
    border-color: transparent;
}

#direct-support-view .chat-input-field:focus,
#direct-support-chat .chat-input-field:focus {
    background: #333d44;
    border-color: rgba(37, 211, 102, 0.3);
}

#direct-support-view .chat-send-btn,
#direct-support-chat .chat-send-btn {
    background: #25D366;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}

#direct-support-view .chat-send-btn:hover,
#direct-support-chat .chat-send-btn:hover {
    background: #2ee06b;
}

.sender-avatar-right {
    margin-left: 8px;
    flex-shrink: 0;
}

/* =============================================
   SHARED PAGE STYLES (Business, Support, Legal, Contact)
   ============================================= */

.page-body {
    background-color: var(--bg-navy);
    color: var(--text-main);
}

/* Page Navigation */
.page-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.page-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.page-brand-mascot {
    height: 32px;
    width: auto;
}

.page-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.nav-link.support-link {
    color: var(--text-secondary);
}

.nav-link.support-link svg {
    width: 16px;
    height: 16px;
}

/* Header nav updates for index.html */
.top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =============================================
   BUSINESS OWNER PAGE
   ============================================= */

.biz-hero {
    background: var(--primary-gradient);
    padding: 100px 24px 120px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.biz-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -150px;
    right: -100px;
}

.biz-hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    bottom: -80px;
    left: -80px;
}

.biz-hero-content {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.biz-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.biz-hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.biz-hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 36px;
}

.biz-cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.biz-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.biz-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.biz-cta-primary.large {
    font-size: 1.1rem;
    padding: 18px 40px;
}

.biz-cta-note {
    margin-top: 16px;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Stats Row */
.biz-social-proof {
    background: var(--bg-navy-light);
    padding: 48px 24px;
    border-bottom: 1px solid var(--border-dark);
}

.biz-stats-row {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.biz-stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.biz-stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
}

/* Sections */
.biz-section {
    padding: 80px 24px;
}

.biz-section-alt {
    background: var(--bg-navy-lighter);
}

.biz-section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.biz-section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    text-align: center;
    letter-spacing: -0.8px;
    margin-bottom: 8px;
}

.biz-section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 48px;
}

/* Steps */
.biz-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.biz-step {
    text-align: center;
    position: relative;
}

.biz-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.biz-step-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--bg-navy-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.biz-step-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.biz-step h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.biz-step p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Features Grid */
.biz-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.biz-feature {
    background: var(--bg-navy-light);
    padding: 28px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

.biz-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.biz-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.biz-feature-icon svg {
    width: 24px;
    height: 24px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.biz-feature-icon.purple {
    background: rgba(37, 99, 235, 0.1);
    /* Primary Blue */
    color: #2563EB;
}

.biz-feature-icon.blue {
    background: rgba(14, 165, 233, 0.1);
    /* Sky Blue */
    color: #0EA5E9;
}

.biz-feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    /* Emerald */
    color: #10B981;
}

.biz-feature-icon.pink {
    background: rgba(244, 63, 94, 0.1);
    /* Rose (less pink) */
    color: #F43F5E;
}

.biz-feature-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    /* Amber */
    color: #F59E0B;
}

.biz-feature-icon.teal {
    background: rgba(13, 148, 136, 0.1);
    /* Teal */
    color: #0D9488;
}

.biz-feature h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.biz-feature p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Use Cases */
.biz-use-cases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.biz-use-case {
    background: var(--bg-navy-light);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

.biz-use-case:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.biz-use-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.biz-use-case h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    color: white;
}

.biz-use-case p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* CTA Section */
.biz-cta-section {
    background: var(--primary-gradient);
    padding: 80px 24px;
    text-align: center;
    color: white;
}

.biz-cta-inner {
    max-width: 650px;
    margin: 0 auto;
}

.biz-cta-section h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.biz-cta-section p {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 32px;
}

/* =============================================
   SUPPORT PAGE
   ============================================= */

.support-hero {
    background: var(--primary-gradient);
    padding: 80px 24px 60px;
    text-align: center;
    color: white;
}

.support-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.support-hero p {
    font-size: 1.05rem;
    opacity: 0.8;
    margin-bottom: 32px;
}

.support-search {
    max-width: 540px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    backdrop-filter: blur(12px);
}

.support-search svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.support-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.support-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Quick Links */
.support-section {
    padding: 48px 24px;
}

.support-section-alt {
    background: var(--bg-navy-lighter);
}

.support-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.support-quick-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.support-quick-card {
    background: var(--bg-navy-light);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    color: white;
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.support-quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.support-quick-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.support-quick-icon svg {
    width: 24px;
    height: 24px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.support-quick-icon.purple {
    background: rgba(37, 99, 235, 0.1);
    /* Primary Blue */
    color: #2563EB;
}

.support-quick-icon.blue {
    background: rgba(14, 165, 233, 0.1);
    /* Sky Blue */
    color: #0EA5E9;
}

.support-quick-icon.green {
    background: rgba(16, 185, 129, 0.1);
    /* Emerald */
    color: #10B981;
}

.support-quick-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    /* Amber */
    color: #F59E0B;
}

.support-quick-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.support-quick-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Nav Buttons */
.nav-btn-primary,
.nav-btn-secondary {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn-primary:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.nav-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Footer Refinements */
.main-footer {
    background: var(--bg-navy-dark);
    /* Ensure this var exists or use #020617 */
    border-top: 1px solid var(--border-dark);
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.footer-content p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* Section Title */
.support-section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-section-title svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Article Grid */
.support-article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.support-article-grid.single-col {
    grid-template-columns: 1fr;
}

.support-article {
    background: var(--bg-navy-light);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
}

.support-article h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.support-article h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 20px 0 10px;
    color: white;
}

.support-article p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.support-article a {
    color: var(--primary);
}

/* Platform Badge */
.support-platform-badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Steps */
.support-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-step-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.support-step-item strong {
    display: block;
    font-size: 0.92rem;
    color: white;
    margin-bottom: 4px;
}

.support-step-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Code Block */
.support-code-block {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-dark);
    margin: 16px 0;
}

.support-code-header {
    background: #0F172A;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    opacity: 0.85;
}

.support-code-block pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    background: #1E293B;
}

.support-code-block code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    color: #E2E8F0;
    line-height: 1.6;
}

/* Lists */
.support-ordered-list {
    padding-left: 24px;
    margin: 12px 0;
}

.support-ordered-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.support-bullet-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.support-bullet-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.support-bullet-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    position: absolute;
    left: 0;
    top: 8px;
}

.support-highlight-box {
    background: rgba(99, 102, 241, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--primary);
    margin: 16px 0;
    border: 1px solid var(--border);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-navy-light);
    border-radius: 14px;
    border: 1px solid var(--border-dark);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(79, 70, 229, 0.2);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-align: left;
}

.faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 22px 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* =============================================
   LEGAL PAGES (Privacy, Terms)
   ============================================= */

.legal-content {
    padding: 60px 24px 80px;
}

.legal-inner {
    max-width: 760px;
    margin: 0 auto;
}

.legal-inner h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.legal-date {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 40px;
}

.legal-inner section {
    margin-bottom: 36px;
}

.legal-inner h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.legal-inner h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    margin: 20px 0 8px;
}

.legal-inner p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-inner ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-inner li {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 6px;
}

.legal-inner a {
    color: var(--primary);
}

/* =============================================
   CONTACT PAGE
   ============================================= */

.contact-content {
    padding: 60px 24px 80px;
}

.contact-inner {
    max-width: 900px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 48px;
}

.contact-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact-card {
    background: var(--bg-navy-light);
    padding: 28px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

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

.contact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-card-icon svg {
    width: 22px;
    height: 22px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card-icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7C3AED;
}

.contact-card-icon.blue {
    background: rgba(14, 165, 233, 0.1);
    color: #0EA5E9;
}

.contact-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.contact-card-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: opacity 0.2s;
}

.contact-link:hover {
    opacity: 0.75;
}

.contact-info-box {
    background: var(--bg-navy-light);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
}

.contact-info-box h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.contact-info-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.contact-info-item svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-info-item strong {
    display: block;
    font-size: 0.92rem;
    color: white;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.contact-info-item a {
    color: var(--primary);
}

/* =============================================
   RESPONSIVE - NEW PAGES
   ============================================= */

@media (max-width: 768px) {
    .biz-hero {
        padding: 60px 20px 80px;
    }

    .biz-hero h1 {
        font-size: 2rem;
    }

    .biz-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .biz-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .biz-features-grid {
        grid-template-columns: 1fr;
    }

    .biz-use-cases {
        grid-template-columns: repeat(2, 1fr);
    }

    .biz-section {
        padding: 48px 20px;
    }

    .biz-section-title {
        font-size: 1.7rem;
    }

    .support-quick-links {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -40px;
    }

    .support-article-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .page-nav-links {
        gap: 4px;
    }

    .nav-link {
        font-size: 0.78rem;
        padding: 6px 12px;
        min-height: 40px;
    }

    /* Tablet touch targets */
    .btn-primary,
    .btn-ghost {
        min-height: 44px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .biz-hero h1 {
        font-size: 1.7rem;
    }

    .support-hero h1 {
        font-size: 1.8rem;
    }

    .support-quick-links {
        grid-template-columns: 1fr;
    }

    .biz-use-cases {
        grid-template-columns: 1fr;
    }

    .biz-cta-primary {
        width: 100%;
        justify-content: center;
    }

    .biz-cta-section h2 {
        font-size: 1.6rem;
    }

    /* Mobile Touch Targets - Ensure all interactive elements are touch-friendly */
    .btn-primary,
    .btn-ghost,
    .nav-btn-primary,
    .nav-btn-secondary {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 0.9375rem;
    }

    /* Form inputs mobile optimization */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }

    .chat-input-field {
        min-height: 44px;
        font-size: 16px;
        padding: 12px 20px;
    }

    /* Navigation mobile */
    .page-nav {
        padding: 12px 16px;
    }

    .page-nav-links {
        gap: 8px;
    }

    .nav-link {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    /* Ticket page mobile */
    .ticket-page-container {
        padding: 0 16px;
        margin: 20px auto;
    }

    .ticket-header-card {
        padding: 24px 20px;
    }

    /* Contact page mobile */
    .contact-grid {
        gap: 24px;
    }

    .contact-form-card,
    .contact-info-box {
        padding: 24px 20px;
    }

    /* General mobile spacing */
    .biz-section,
    .support-section {
        padding: 40px 16px;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    /* Improve text readability on mobile */
    p,
    li {
        line-height: 1.7;
    }

    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }

    /* Ensure proper spacing for content */
    .biz-section p,
    .support-section p {
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Card spacing on mobile */
    .biz-feature,
    .biz-use-case,
    .support-quick-card,
    .support-article-card {
        padding: 20px;
    }
}

/* =============================================
   TICKET PAGE
   ============================================= */

.ticket-page-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.ticket-header-card {
    background: var(--bg-navy-light);
    border-radius: 20px;
    border: 1px solid var(--border-dark);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.status-open {
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
}

.status-in-progress {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.status-resolved {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.status-closed {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.ticket-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.conversation-thread {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.message-bubble {
    max-width: 85%;
    padding: 20px;
    border-radius: 18px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.message-admin {
    align-self: flex-start;
    background: var(--bg-navy-light);
    border: 1px solid var(--border-dark);
    border-bottom-left-radius: 4px;
    color: var(--text-main);
}

.message-user {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.message-admin .message-header {
    color: var(--primary);
}

.message-user .message-header {
    color: rgba(255, 255, 255, 0.8);
}

.message-content {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-time {
    font-weight: 400;
    font-size: 0.7rem;
    opacity: 0.7;
}

.reply-card {
    background: var(--bg-navy-light);
    border-radius: 20px;
    border: 1px solid var(--border-dark);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    bottom: 24px;
}

.reply-card h3 {
    color: white;
}

.reply-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 16px;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-navy);
    color: white;
}

.reply-textarea:focus {
    border-color: var(--primary);
    background: var(--bg-navy);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.submit-reply-btn {
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.error-container {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

/* =============================================
   DIRECT SUPPORT & TABS
   ============================================= */
.chat-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    padding: 3px;
    margin: 8px 12px 0;
    border-radius: 10px;
    border: 1px solid var(--border-dark);
}

.chat-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 6px 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.chat-tab.active {
    background: var(--bg-navy-light);
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tab Badge */
.tab-badge {
    background: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    margin-left: 8px;
    transform-origin: center;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.view-container {
    display: none;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.view-container.active {
    display: flex;
}

/* Direct Support Login */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 32px 24px;
    background: var(--bg-navy);
    color: var(--text-main);
    max-width: 420px;
    margin: 0 auto;
}

.login-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.login-icon svg {
    width: 28px;
    height: 28px;
}

.login-container h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.rotating-text {
    font-size: 1rem !important;
    font-weight: 500;
    color: var(--text-main) !important;
    margin-bottom: 20px !important;
    transition: opacity 0.5s ease;
    min-height: 1.5em;
    line-height: 1.5;
}

.sub-text {
    color: var(--text-muted);
    font-size: 0.875rem !important;
    margin-bottom: 36px !important;
    line-height: 1.6;
    max-width: 320px;
    font-weight: 400;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 28px;
}

.btn-google,
.btn-apple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-google {
    background: #FFFFFF;
    color: #1F2937;
}

.btn-google:hover {
    background: #F9FAFB;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-apple {
    background: #FFFFFF;
    color: #1F2937;
}

.btn-apple svg {
    fill: #1F2937;
    width: 18px;
    height: 18px;
}

.btn-apple:hover {
    background: #F9FAFB;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-apple:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-apple:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-apple:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-note {
    font-size: 0.75rem !important;
    margin-top: 0;
    opacity: 0.65;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 320px;
}

/* Direct Support Chat */
.direct-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Translation */
.translated-text {
    display: block;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.9;
}

.original-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    display: block;
}