/**
 * BEEP! Interactive Demo Platform Styles
 * Futuristic, CI-aligned (Black/White/Mulish), animation-heavy
 * For C-Level decision makers at leading European retailers
 */

/* ===================================================================
   PARTICLE CANVAS & HERO
   =================================================================== */

.demo-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.demo-page {
    font-family: var(--font-family);
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.demo-hero-full {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    z-index: 1;
}

.demo-hero-full h1 {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroFadeUp 0.8s ease-out;
}

.demo-hero-full .demo-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    max-width: 600px;
    margin: 0 auto 48px;
    animation: heroFadeUp 0.8s ease-out 0.15s both;
}

.demo-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
    animation: heroFadeUp 0.8s ease-out 0.05s both;
}

.demo-badge-pill .pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

/* ===================================================================
   FEATURE SELECTION CARDS (Landing)
   =================================================================== */

.demo-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    animation: heroFadeUp 0.8s ease-out 0.3s both;
}

@media (max-width: 768px) {
    .demo-choice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
}

.demo-choice-card {
    position: relative;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: block;
}

.demo-choice-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 120%, rgba(255,255,255,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.demo-choice-card:hover {
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 80px rgba(255,255,255,0.03);
}

.demo-choice-card:hover::before {
    opacity: 1;
}

.demo-choice-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.4s ease;
}

.demo-choice-card:hover .demo-choice-icon {
    background: rgba(255,255,255,0.12);
    transform: scale(1.05);
}

.demo-choice-icon svg {
    width: 36px; height: 36px;
    stroke: rgba(255,255,255,0.7);
    stroke-width: 1.5;
}

.demo-choice-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.demo-choice-card p {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-bottom: 24px;
}

.demo-choice-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.demo-choice-features span {
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
}

.demo-choice-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.demo-choice-card:hover .demo-choice-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===================================================================
   DEMO APP LAYOUT (Assist & Scan & Go pages)
   =================================================================== */

.demo-app,
.demo-app-page {
    background: #fafbfc;
    color: #111827;
    min-height: 100vh;
}

/* Override dark hero for app pages */
.demo-app-page.demo-page {
    background: #fafbfc;
    color: #111827;
}

.demo-app-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.demo-scango-main {
    max-width: 1200px;
    padding: 0; /* panels carry their own 24px padding; avoid double-padding */
}

/* App header elements */
.demo-app-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-app-title h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.demo-store-name-label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.demo-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-badge-pill.small {
    padding: 4px 12px;
    font-size: 11px;
    margin-bottom: 0;
    animation: none;
}

/* ── Store Assist Two-Column Layout ── */

.demo-assist-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.demo-assist-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.demo-assist-right {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: calc(73px + 24px); /* header height + main top padding */
    height: calc(100vh - 73px - 48px); /* fill viewport height minus header and main vertical padding */
    align-self: flex-start;
    overflow: hidden;
    min-height: 0;
}

@media (max-width: 1024px) {
    .demo-assist-layout {
        grid-template-columns: 1fr;
    }
    .demo-assist-right {
        position: static;
        height: auto;
        min-height: 400px;
    }
}

/* ── Card Header (title + action button) ── */

.demo-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.demo-card-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
}

.demo-card-header h2 svg,
.demo-card-header h2 i {
    width: 20px;
    height: 20px;
}

/* ── Zone List ── */

.demo-zone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── FAQ Category Tabs & List ── */

.demo-faq-categories {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.demo-faq-categories::-webkit-scrollbar { display: none; }

.demo-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Chat Card ── */

.demo-chat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.demo-chat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 100px;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
}

.demo-chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    flex: 1;
    min-height: 0; /* must be 0 so flex parent can constrain height and enable inner scrolling */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .demo-chat-layout {
        grid-template-columns: 1fr;
        min-height: 300px; /* restore sensible min on mobile where layout is stacked */
    }
}

/* ── Chat Thread ── */

.demo-chat-thread {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
    overflow: hidden;
    min-height: 0;
}

.demo-chat-thread-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    background: #fafbfc;
}

.demo-chat-input {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    background: #fafbfc;
}

.demo-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    font-size: 14px;
    font-family: var(--font-family);
    background: #fff;
    color: #111827;
}

.demo-chat-input input:focus {
    outline: none;
    border-color: #000;
}

/* ── Empty State ── */

.demo-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: #9ca3af;
}

.demo-empty-state i,
.demo-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #d1d5db;
}

.demo-empty-state p {
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.demo-empty-state span {
    font-size: 13px;
    color: #9ca3af;
    max-width: 300px;
}

/* ── Form Labels & Textarea ── */

.demo-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.demo-textarea {
    min-height: 80px;
    resize: vertical;
}

.demo-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.demo-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.demo-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

/* ── Ghost Button ── */

.demo-btn-ghost {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.demo-btn-ghost:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ── Toast Container ── */

.demo-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* ── Dashboard Row ── */

.demo-dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .demo-dashboard-row {
        grid-template-columns: 1fr;
    }
}

/* ── QR Display ── */

.demo-qr-display {
    display: flex;
    justify-content: center;
    padding: 16px;
}

.demo-qr-display canvas {
    border-radius: 12px;
}

/* ── Container Divs (semantic) ── */

.demo-security-settings,
.demo-loyalty-wizard,
.demo-employee-list,
.demo-offer-list,
.demo-payment-info {
    /* Content rendered by JS */
}

/* ── Endpoint Section Header ── */

.demo-ep-section-header {
    max-width: 900px;
    margin: 0 auto 32px;
    text-align: center;
}

.demo-ep-section-header h2 {
    color: #e6edf3;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.demo-ep-section-header h2 i,
.demo-ep-section-header h2 svg {
    width: 24px;
    height: 24px;
}

.demo-ep-section-header p {
    color: #8b949e;
    font-size: 14px;
}

.demo-app-header {
    background: #000;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.demo-app-header .demo-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.demo-app-header .demo-logo span {
    font-size: 18px;
    font-weight: 700;
}

.demo-store-badge {
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-store-badge .live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

.demo-app-back {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.demo-app-back:hover {
    color: #fff;
}

/* Tab navigation */
.demo-tabs {
    display: flex;
    gap: 6px;
    background: #0a0a0a;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: 73px; /* matches demo-app-header rendered height (16px padding × 2 + ~41px two-line title) */
    z-index: 90;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.demo-tabs::-webkit-scrollbar { display: none; }

.demo-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    font-family: var(--font-family);
}

.demo-tab i,
.demo-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.demo-tab:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
}

.demo-tab.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 0 12px rgba(255,255,255,0.06);
}

/* Content panels */
.demo-panel {
    display: none;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    animation: panelFadeIn 0.3s ease;
}

.demo-panel.active {
    display: block;
}

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

/* ===================================================================
   GLASS CARDS
   =================================================================== */

.demo-glass-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.demo-glass-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.demo-glass-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-glass-card h3 svg {
    width: 20px; height: 20px;
    stroke-width: 2;
}

/* ===================================================================
   KPI METRIC CARDS
   =================================================================== */

.demo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.demo-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #000;
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.demo-kpi-card:hover {
    border-color: #000;
    border-left-color: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.demo-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.demo-kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    line-height: 1.1;
}

.demo-kpi-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.demo-kpi-change.positive { color: #059669; }
.demo-kpi-change.negative { color: #dc2626; }

/* ===================================================================
   FORM ELEMENTS
   =================================================================== */

.demo-input-group {
    margin-bottom: 16px;
}

.demo-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.demo-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font-family);
    transition: border-color 0.2s;
    background: #fff;
    color: #111827;
    box-sizing: border-box;
}

.demo-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.demo-input::placeholder {
    color: #9ca3af;
}

.demo-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font-family);
    background: #fff;
    color: #111827;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    box-sizing: border-box;
}

.demo-select:focus {
    outline: none;
    border-color: #000;
}

.demo-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.demo-toggle-row:last-child {
    border-bottom: none;
}

.demo-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.demo-toggle-sublabel {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Toggle switch */
.demo-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.demo-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.demo-switch-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.demo-switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.demo-switch input:checked + .demo-switch-slider {
    background: #000;
}

.demo-switch input:checked + .demo-switch-slider::before {
    transform: translateX(20px);
}

/* Buttons */
.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.demo-btn-primary {
    background: #000;
    color: #fff;
}

.demo-btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.demo-btn-secondary {
    background: #fff;
    color: #000;
    border: 1px solid #e5e7eb;
}

.demo-btn-secondary:hover {
    border-color: #000;
    background: #f9fafb;
}

.demo-btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.demo-btn-danger:hover {
    background: #fee2e2;
}

.demo-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.demo-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.demo-btn-icon:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ===================================================================
   CHAT UI
   =================================================================== */

.demo-chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.demo-chat-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.demo-chat-header h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.demo-chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* required for flex children to shrink and enable scrolling */
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
    padding: 24px;
}

.demo-chat-empty svg {
    width: 48px; height: 48px;
    margin-bottom: 12px;
    stroke: #d1d5db;
}

.demo-chat-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: msgSlideIn 0.3s ease;
}

.demo-chat-msg.incoming {
    align-self: flex-start;
    background: #f3f4f6;
    color: #111827;
    border-bottom-left-radius: 4px;
}

.demo-chat-msg.outgoing {
    align-self: flex-end;
    background: #000;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.demo-chat-msg-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.demo-chat-msg.outgoing .demo-chat-msg-meta {
    color: rgba(255,255,255,0.5);
}

.demo-chat-input-bar {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    background: #fafbfc;
}

.demo-chat-input-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    font-size: 14px;
    font-family: var(--font-family);
    background: #fff;
    color: #111827;
}

.demo-chat-input-bar input:focus {
    outline: none;
    border-color: #000;
}

.demo-chat-input-bar button {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.demo-chat-input-bar button:hover {
    background: #333;
    transform: scale(1.05);
}

.demo-chat-input-bar button svg {
    width: 18px; height: 18px;
    stroke: #fff;
}

/* Chat DM list */
.demo-dm-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    min-height: 0;
}

.demo-dm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.demo-dm-item:hover {
    background: #f3f4f6;
}

.demo-dm-item.active {
    background: #f0f0f0;
}

.demo-dm-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.demo-dm-info {
    flex: 1;
    min-width: 0;
}

.demo-dm-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.demo-dm-preview {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-dm-meta {
    text-align: right;
    flex-shrink: 0;
}

.demo-dm-time {
    font-size: 11px;
    color: #9ca3af;
}

.demo-dm-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 100px;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    margin-top: 4px;
}

/* Zone context badge */
.demo-zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
}

/* ===================================================================
   QR CODE DISPLAY
   =================================================================== */

.demo-qr-card {
    text-align: center;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.demo-qr-card canvas,
.demo-qr-card img {
    max-width: 180px;
    margin: 0 auto 12px;
    display: block;
    border-radius: 12px;
}

.demo-qr-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.demo-qr-url {
    font-size: 11px;
    color: #9ca3af;
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.demo-qr-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

/* ===================================================================
   PRODUCT GRID & CARDS
   =================================================================== */

.demo-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.demo-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.demo-product-card:hover {
    border-color: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.demo-product-emoji {
    font-size: 32px;
    margin-bottom: 8px;
}

.demo-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.demo-product-brand {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.demo-product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-product-price {
    font-size: 18px;
    font-weight: 800;
    color: #059669;
}

.demo-product-barcode {
    font-size: 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #9ca3af;
}

.demo-product-badges {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.demo-product-badge {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
}

.demo-product-badge.age {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.demo-product-badge.tax {
    background: #f3f4f6;
    color: #6b7280;
}

.demo-product-badge.cat {
    background: #eff6ff;
    color: #2563eb;
}

/* ===================================================================
   FUNNEL VISUALIZATION
   =================================================================== */

.demo-funnel {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-funnel-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.demo-funnel-bar {
    height: 32px;
    border-radius: 8px;
    background: #000;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.demo-funnel-bar span {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.demo-funnel-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    min-width: 140px;
}

/* ===================================================================
   ENDPOINT TRANSPARENCY PANEL
   =================================================================== */

.demo-endpoints-section {
    background: #0a0a0a;
    padding: 64px 24px;
    margin-top: 48px;
}

.demo-endpoints-section h2 {
    color: #e6edf3;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.demo-endpoints-section .section-desc {
    color: #8b949e;
    font-size: 14px;
    text-align: center;
    margin-bottom: 32px;
}

.demo-endpoint-group {
    max-width: 900px;
    margin: 0 auto 24px;
}

.demo-endpoint-group-title {
    color: #8b949e;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.demo-ep-card {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.demo-ep-card:hover {
    border-color: rgba(255,255,255,0.15);
}

.demo-ep-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
}

.demo-ep-method {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-ep-method.get { background: rgba(59,130,246,0.15); color: #60a5fa; }
.demo-ep-method.post { background: rgba(34,197,94,0.15); color: #4ade80; }
.demo-ep-method.put { background: rgba(245,158,11,0.15); color: #fbbf24; }
.demo-ep-method.delete { background: rgba(239,68,68,0.15); color: #f87171; }
.demo-ep-method.stream { background: rgba(168,85,247,0.15); color: #c084fc; }

.demo-ep-path {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: #e6edf3;
    flex: 1;
}

.demo-ep-desc {
    font-size: 12px;
    color: #8b949e;
    display: none;
}

.demo-ep-tier {
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-ep-tier.discover { background: rgba(59,130,246,0.15); color: #60a5fa; }
.demo-ep-tier.assist { background: rgba(52,211,153,0.15); color: #34d399; }
.demo-ep-tier.go { background: rgba(245,158,11,0.15); color: #fbbf24; }
.demo-ep-tier.grow { background: rgba(139,92,246,0.15); color: #a78bfa; }
.demo-ep-tier.prime { background: rgba(45,212,191,0.15); color: #2dd4bf; }

.demo-ep-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.demo-ep-card.expanded .demo-ep-body {
    display: block;
}

.demo-ep-code {
    background: #0d1117;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre;
    overflow-x: auto;
    color: #e6edf3;
}

.demo-ep-code .tok-key { color: #ff7b72; }
.demo-ep-code .tok-str { color: #a5d6ff; }
.demo-ep-code .tok-num { color: #79c0ff; }
.demo-ep-code .tok-bool { color: #ff7b72; }
.demo-ep-code .tok-comment { color: #8b949e; font-style: italic; }

@media (max-width: 768px) {
    .demo-ep-desc { display: none; }
    .demo-ep-path { font-size: 12px; }
}

/* ===================================================================
   SECTION LAYOUT
   =================================================================== */

.demo-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .demo-section-grid {
        grid-template-columns: 1fr;
    }
}

.demo-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-section-title svg {
    width: 24px; height: 24px;
}

/* Zone tags */
.demo-zone-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.demo-zone-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.demo-zone-tag button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    color: #9ca3af;
    transition: color 0.2s;
}

.demo-zone-tag button:hover {
    color: #dc2626;
}

/* FAQ items */
.demo-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.2s;
}

.demo-faq-item:hover {
    border-color: #d1d5db;
}

.demo-faq-question {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.demo-faq-answer {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.demo-faq-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.demo-faq-cat {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

/* Security mode cards */
.demo-security-modes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* Channel items */
.demo-channel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff;
    transition: all 0.2s;
}

.demo-channel-item:hover {
    border-color: #d1d5db;
    background: #fafafa;
}

.demo-security-mode {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-security-mode:hover {
    border-color: #9ca3af;
}

.demo-security-mode.active {
    border-color: #000;
    background: #fafbfc;
}

.demo-security-mode-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.demo-security-mode-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.demo-security-mode-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Payment info card */
.demo-payment-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #000 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
}

.demo-payment-card h3 {
    color: #fff;
    margin-bottom: 20px;
}

.demo-test-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 24px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.demo-test-card-number {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 16px;
}

.demo-test-card-row {
    display: flex;
    gap: 24px;
}

.demo-test-card-field {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 2px;
}

.demo-test-card-value {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* Loyalty wizard */
.demo-loyalty-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.demo-loyalty-type {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-loyalty-type:hover {
    border-color: #9ca3af;
}

.demo-loyalty-type.active {
    border-color: #000;
    background: #fafbfc;
}

.demo-loyalty-type-emoji {
    font-size: 32px;
    margin-bottom: 8px;
}

.demo-loyalty-type-name {
    font-size: 14px;
    font-weight: 700;
}

.demo-loyalty-type-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Employee list */
.demo-employee-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.demo-employee-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #374151;
    font-size: 16px;
    flex-shrink: 0;
}

.demo-employee-info { flex: 1; }

.demo-employee-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.demo-employee-role {
    font-size: 12px;
    color: #6b7280;
}

.demo-role-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.demo-role-badge.manager {
    background: #000;
    color: #fff;
}

.demo-role-badge.employee {
    background: #f3f4f6;
    color: #6b7280;
}

/* Status dot */
.demo-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

.demo-status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}

.demo-status-dot.inactive {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
}

/* ===================================================================
   MODAL / DIALOG
   =================================================================== */

.demo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.demo-modal-overlay.visible {
    display: flex;
}

.demo-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.3s ease;
}

.demo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.demo-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.demo-modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.demo-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.demo-modal-body {
    padding: 24px;
}

.demo-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   =================================================================== */

.demo-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease, toastSlideOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-toast.success { background: #059669; }
.demo-toast.error { background: #dc2626; }

/* ===================================================================
   ANIMATIONS
   =================================================================== */

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

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

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

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(24px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Scroll reveal */
.demo-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.demo-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading skeleton */
.demo-skeleton {
    background: #e5e7eb;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.demo-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* ===================================================================
   RESPONSIVE OVERRIDES
   =================================================================== */

@media (max-width: 640px) {
    .demo-panel { padding: 16px; }
    .demo-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .demo-kpi-value { font-size: 22px; }
    .demo-product-grid { grid-template-columns: 1fr; }
    .demo-section-grid { grid-template-columns: 1fr; }
    .demo-chat-container { height: 400px; }
    .demo-security-modes { grid-template-columns: repeat(2, 1fr); }
    .demo-loyalty-types { grid-template-columns: repeat(2, 1fr); }
}
