/* ============================================================
   Halo dek — base design system
   Professional dark workspace. Warm-charcoal base (#181a1b),
   single azure-blue accent, solid surfaces + grey hairlines.
   No glassmorphism — clean, calm, software-grade.
   Shared by the landing page and admin dashboard.
   ============================================================ */

:root {
    /* surfaces — solid neutral-charcoal ramp anchored on #181a1b */
    --bg:        #131516;   /* deepest: app shell / icon rail            */
    --bg-2:      #181a1b;   /* page background                          */
    --surface:   #1e2122;   /* cards, panels (raised one level)         */
    --surface-2: #24282a;   /* inputs, hover, raised two levels         */
    --surface-3: #2b2f31;   /* active rows, strong hover                */
    --hairline:  #2a2e30;   /* grey hairline — solid                    */
    --hairline-2:#373c3f;   /* stronger divider                         */

    /* text */
    --text:   #e8eaed;
    --muted:  #9aa1a8;
    --faint:  #6a7077;

    /* single accent: azure blue */
    --accent:      #0a84ff;
    --accent-2:    #3b9bff;          /* lighter azure (gradients/hover)  */
    --accent-ink:  #ffffff;          /* text/icon on accent fills        */
    --accent-soft: rgba(10, 132, 255, 0.14);
    --accent-line: rgba(10, 132, 255, 0.40);

    /* status */
    --online: #2ec28a;
    --warn:   #f5a524;
    --rose:   #f2576b;

    /* shape + motion (balanced radii) */
    --r-xl: 18px;
    --r-lg: 15px;
    --r-md: 12px;
    --r-sm: 9px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --maxw: 1180px;

    /* neutral depth shadow (no glow, no glass) */
    --shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.72);
    --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.035);

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---- Ambient background (fixed, GPU-cheap, pointer-none) ----
   Professional: almost flat, a single faint azure wash at the top.
   No neon orbs, no saturated glow. */
.mesh {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(60vw 50vh at 50% -8%, rgba(10, 132, 255, 0.07), transparent 70%),
        radial-gradient(40vw 40vh at 90% 4%, rgba(10, 132, 255, 0.035), transparent 72%);
}
/* faint grid layer, fading out toward the bottom */
.mesh::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(120vw 120vh at 50% 0%, #000 30%, transparent 78%);
}

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 2px solid var(--accent);
    background: transparent !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.eyebrow .dot {
    display: none !important;
}

/* ---- Surface panel (solid — glass retired, kept as .glass alias) ---- */
.glass {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow), var(--inset-hi);
}

/* ---- Buttons ---- */
.btn {
    --bg-btn: var(--surface-2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--bg-btn);
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn:hover { border-color: var(--hairline-2); transform: translateY(-1px); }
.btn:active { transform: scale(0.98) translateY(0); }
.btn .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    transition: transform 0.4s var(--ease-spring), background 0.4s var(--ease);
}
.btn:hover .ico { transform: translate(3px, -1px) scale(1.05); }

.btn-primary {
    --bg-btn: linear-gradient(120deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: var(--accent-ink);
    font-weight: 600;
    box-shadow: 0 6px 18px -8px rgba(10, 132, 255, 0.6);
}
.btn-primary .ico { background: rgba(255, 255, 255, 0.18); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost { background: transparent; }

/* ---- Status dot ---- */
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--faint);
    flex: none;
}
.status-dot.is-online {
    background: var(--online);
    box-shadow: 0 0 0 3px rgba(61, 220, 145, 0.18);
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
    transition-delay: var(--d, 0ms);
    will-change: transform, opacity;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---- Chat bubbles (shared visual language) ---- */
.bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14.5px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.bubble a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.bubble.from-visitor {
    align-self: flex-end;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: var(--accent-ink);
    border-bottom-right-radius: 5px;
}
.bubble.from-operator {
    align-self: flex-start;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-bottom-left-radius: 5px;
}
.bubble.from-system {
    align-self: center;
    background: transparent;
    color: var(--faint);
    font-size: 12px;
    text-align: center;
    max-width: 90%;
}

/* ---- Typing indicator dots ---- */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 10px 14px; }
.typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--muted);
    animation: typing-bounce 1.2s var(--ease) infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Skeleton shimmer ---- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border-radius: var(--r-sm);
}
.skeleton::after {
    content: "";
    position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--hairline-2); background-clip: padding-box; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; filter: none; }
}
