/* ============================================
   Hipliz AI — design tokens
   Palette: blue / yellow / white
   ============================================ */
:root {
    --bg-0: #ffffff;
    --bg-1: #f7f9fd;
    --bg-2: #eef3fb;

    --accent: #1c66ff;
    --accent-soft: #5c93ff;
    --accent-glow: rgba(28, 102, 255, 0.30);

    --yellow: #ffcc33;
    --yellow-soft: #ffe08a;
    --yellow-glow: rgba(255, 204, 51, 0.35);

    --text-0: #0e1a33;
    --text-1: rgba(14, 26, 51, 0.68);
    --text-2: rgba(14, 26, 51, 0.42);

    --glass-bg: rgba(28, 102, 255, 0.05);
    --glass-bg-strong: rgba(28, 102, 255, 0.09);
    --glass-border: rgba(14, 26, 51, 0.12);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --nav-height: 76px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 0%, #eaf1ff 0%, var(--bg-1) 38%, var(--bg-0) 100%);
    color: var(--text-0);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3 {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
p { color: var(--text-1); line-height: 1.55; margin: 0 0 8px; }
a { color: inherit; text-decoration: none; }

/* ============================================
   Ambient background shapes (signature element)
   ============================================ */
.bg-shapes {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: drift 22s ease-in-out infinite;
}

.shape-1 {
    width: 480px;
    height: 480px;
    top: -160px;
    left: -120px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.shape-2 {
    width: 420px;
    height: 420px;
    bottom: -140px;
    right: -100px;
    background: radial-gradient(circle, var(--yellow) 0%, transparent 70%);
    animation-delay: -9s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .shape { animation: none; }
}

/* ============================================
   Layout
   ============================================ */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 12px);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}

.logo-img {
    height: 32px;
    width: auto;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    font-size: 14px;
    font-weight: 600;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.auth-btn:hover { transform: translateY(-1px); border-color: var(--accent-soft); }

.auth-btn-filled {
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    border-color: transparent;
    color: #0e1a33;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.hi-user {
    font-size: 14px;
    color: var(--text-1);
    padding: 9px 16px;
}

/* ============================================
   Content area
   ============================================ */
/* content-area rules now in Screen sections block above */

.glass {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 32px rgba(14, 26, 51, 0.08);
}

.glass-form {
    width: 100%;
    max-width: 420px;
    padding: 44px 32px;
}

.fade-in {
    animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 13px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 8px 24px var(--accent-glow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--accent-glow); }

.form-btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    box-shadow: none;
    color: var(--text-0);
}

.form-btn-outline:hover { border-color: var(--accent-soft); }

.guest-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.cta-button {
    margin-top: 16px;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #ffffff;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--accent-glow);
    animation: pulse 2.6s ease-in-out infinite;
    transition: transform 0.15s ease;
}

.cta-button:hover { transform: translateY(-2px) scale(1.02); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 10px 30px var(--accent-glow); }
    50% { box-shadow: 0 10px 42px var(--accent-glow), 0 0 0 6px rgba(28, 102, 255, 0.12); }
}

.guest-footer {
    text-align: center;
    padding: 18px;
    font-size: 13px;
    color: var(--text-2);
}

.guest-footer a { color: var(--text-1); }
.guest-footer a:hover { color: var(--accent-soft); }

.landing { padding: 20px 24px 0; }

.landing-hero {
    max-width: 720px;
    margin: 20px auto 50px;
    text-align: center;
}
.landing-hero h1 {
    font-size: 2.1rem;
    line-height: 1.25;
}
.landing-subtitle {
    font-size: 15.5px;
    max-width: 560px;
    margin: 14px auto 0;
}

.landing-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto 56px;
}
@media (min-width: 640px) {
    .landing-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .landing-features { grid-template-columns: repeat(3, 1fr); }
}

.landing-feature-card {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.03);
}
.landing-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    margin-bottom: 12px;
}
.landing-feature-card h3 { font-size: 1rem; margin-bottom: 6px; }
.landing-feature-card p { font-size: 13.5px; margin: 0; }

.landing-cta {
    text-align: center;
    max-width: 480px;
    margin: 0 auto 60px;
    padding: 36px 24px;
    border-radius: var(--radius-lg);
    background: rgba(28, 102, 255, 0.04);
    border: 1px solid var(--glass-border);
}
.landing-cta h2 { font-size: 1.4rem; }


/* ============================================
   Bottom nav — same bar on phone and desktop
   ============================================ */
.bottom-nav {
    display: none; /* toggled to flex by app.js once logged in */
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 50;
    gap: 6px;
    padding: 8px;
    width: min(420px, calc(100% - 32px));
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 36px rgba(14, 26, 51, 0.14);
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.bottom-nav .nav-item i { font-size: 17px; }

.bottom-nav .nav-item:hover { color: var(--text-1); }

.bottom-nav .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    box-shadow: 0 6px 18px var(--accent-glow);
}

@media (min-width: 768px) {
    .bottom-nav {
        width: min(480px, calc(100% - 48px));
    }
    .bottom-nav .nav-item {
        font-size: 12px;
    }
    .bottom-nav .nav-item i { font-size: 18px; }
}

/* ============================================
   Chat overlay
   ============================================ */
.chat-page-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--bg-1), var(--bg-0));
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.chat-header i {
    cursor: pointer;
    padding: 10px;
    font-size: 18px;
    color: var(--text-1);
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}

.chat-header i:hover { background: var(--glass-bg); color: var(--text-0); }
.chat-header h2 { font-size: 1.05rem; margin: 0; }

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.chat-empty-state {
    text-align: center;
    margin-top: 30px;
    color: var(--text-1);
}

.chat-empty-state ul {
    list-style: none;
    padding: 0;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg {
    max-width: 78%;
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    line-height: 1.5;
    font-size: 14.5px;
}

.msg-user {
    margin-left: auto;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-bottom-right-radius: 4px;
}

.msg-ai {
    background: rgba(255, 204, 51, 0.16);
    border: 1px solid rgba(255, 204, 51, 0.4);
    border-bottom-left-radius: 4px;
}

.msg-loading {
    color: var(--text-2);
    font-style: italic;
}

.chat-input-pill {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 14px;
    margin-bottom: calc(var(--nav-height) + 14px);
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    backdrop-filter: blur(16px);
}

#chat-input {
    flex: 1;
    resize: none;
    max-height: 120px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.4;
    padding: 8px 4px;
}

#chat-input::placeholder { color: var(--text-2); }

.chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    color: var(--text-1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.chat-icon-btn:hover { background: var(--glass-bg-strong); color: var(--text-0); }

.chat-send-btn {
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #ffffff;
    box-shadow: 0 6px 18px var(--accent-glow);
}

/* ============================================
   Auth forms (login.php / signup.php)
   The glass-form card sits directly in <body> on these
   pages with no .app-container wrapper, so center it here.
   ============================================ */
body:has(> .glass-form) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.glass-form form { width: 100%; }

.form-group { margin-bottom: 14px; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.04);
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-group input::placeholder { color: var(--text-2); }

.form-group input:focus {
    border-color: var(--accent-soft);
    background: rgba(28, 102, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(28, 102, 255, 0.15);
}

.password-container { position: relative; }

.password-container input { padding-right: 44px; }

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-2);
    cursor: pointer;
    font-size: 15px;
    transition: color 0.15s ease;
}

.toggle-password:hover { color: var(--accent-soft); }

.terms-container {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 0 22px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-1);
}

.terms-container input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--accent);
    cursor: pointer;
}

.terms-container a {
    color: var(--accent);
    font-weight: 600;
}

.terms-container a:hover { text-decoration: underline; }

.glass-form form .form-btn {
    display: block;
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
}

/* ============================================
   Create-assistant wizard
   ============================================ */
.wizard-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 60px;
}

.wizard-back {
    align-self: flex-start;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 16px;
    color: var(--text-1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-back:hover { color: var(--accent); }

.wizard-card {
    width: 100%;
    max-width: 560px;
    padding: 36px 32px;
}

.wizard-progress {
    display: flex;
    gap: 18px;
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.wizard-step {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.wizard-step.active { color: var(--accent); }

.wizard-error {
    color: #d64545;
    font-size: 13px;
    min-height: 18px;
    margin: 10px 0 0;
}

.wizard-next {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wizard-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.wizard-actions .form-btn { margin-top: 0; flex: 1; display:flex; align-items:center; justify-content:center; gap:8px; }

/* Source selection cards */
.source-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.source-card {
    display: block;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    background: rgba(28, 102, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.source-card.selected {
    border-color: var(--accent-soft);
    background: rgba(28, 102, 255, 0.08);
}

.source-toggle { display: none; }

.source-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
}

.source-card-head i { color: var(--accent); width: 18px; text-align: center; }

.source-card-sub {
    font-size: 13px;
    margin: 4px 0 0 28px;
}

.source-input {
    display: none;
    margin: 12px 0 0 28px;
}

.source-card.selected .source-input { display: block; }

.source-input input[type="url"],
.source-input textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.04);
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    resize: vertical;
}

.source-input input:focus,
.source-input textarea:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(28, 102, 255, 0.15);
}

/* Customize step */
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}

.logo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 22px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.logo-upload:hover { border-color: var(--accent-soft); background: rgba(28, 102, 255, 0.03); }

.logo-placeholder-icon { font-size: 22px; color: var(--text-2); }
.logo-upload-text { font-size: 13px; color: var(--text-2); }

.logo-preview {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 4px;
}

.logo-upload.has-logo .logo-placeholder-icon { display: none; }

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

#theme_color {
    width: 48px;
    height: 40px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.color-presets { display: flex; gap: 8px; }

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.color-swatch:hover { transform: scale(1.12); }

/* Manage assistant page */
.manage-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
}

.manage-logo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #ffffff;
}

.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-active { background: rgba(34, 197, 94, 0.14); color: #1a9850; }
.status-draft { background: rgba(255, 204, 51, 0.22); color: #a67a00; }
.status-training { background: rgba(28, 102, 255, 0.14); color: #1c66ff; }
.status-inactive { background: rgba(14, 26, 51, 0.1); color: #6b7688; }

/* ============================================
   Manage assistant page
   ============================================ */
.manage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 560px;
}

@media (min-width: 860px) {
    .manage-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 920px;
    }
}

.wizard-success {
    color: #1a9850;
    font-size: 13px;
    margin: 8px 0 0;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.copy-row input,
.copy-row textarea {
    flex: 1;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.04);
    color: var(--text-1);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    resize: none;
}

.copy-btn {
    width: 42px;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text-1);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover { background: var(--glass-bg-strong); color: var(--accent); }

.manage-danger-zone {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.form-btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    background: rgba(214, 69, 69, 0.1);
    border: 1px solid rgba(214, 69, 69, 0.3);
    color: #b23a3a;
    box-shadow: none;
}

.form-btn-danger:hover {
    background: rgba(214, 69, 69, 0.18);
    transform: none;
    box-shadow: none;
}

/* ============================================
   Manage assistant page — tabs
   ============================================ */
.manage-card { max-width: 560px; }

.manage-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.manage-head-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.manage-head-logo.manage-logo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #ffffff;
}

.manage-flat {
    width: 100%;
    max-width: 640px;
}

.tab-nav {
    display: flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 22px;
    background: rgba(28, 102, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    flex: 1 0 auto;
    white-space: nowrap;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

@media (max-width: 480px) {
    .tab-btn { font-size: 12.5px; padding: 9px 12px; }
}

.tab-btn:hover { color: var(--text-1); }

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #ffffff;
}

.tab-btn-danger.active {
    background: rgba(214, 69, 69, 0.85);
}

/* ============================================
   Screen sections (Build, Help, Info) — top-aligned, centered column
   ============================================ */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px;
    overflow-y: auto;
    width: 100%;
}

.screen-section {
    width: 100%;
    max-width: 480px;
    padding-top: 8px;
}

.screen-section h1 { margin-bottom: 6px; }
.screen-section p  { margin-bottom: 18px; }

/* ── Help bot chat ───────────────────────────────────────────── */
.help-chat-wrap {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(28, 102, 255, 0.03);
    backdrop-filter: blur(12px);
}

.help-chat-window {
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.help-bubble-bot {
    align-self: flex-start;
    background: rgba(255, 204, 51, 0.18);
    border: 1px solid rgba(255, 204, 51, 0.4);
    border-bottom-left-radius: 4px;
}

.help-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.help-typing { color: var(--text-2); font-style: italic; }

.help-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 12px;
    border-top: 1px solid var(--glass-border);
}

.help-chat-input-row textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    max-height: 100px;
    padding: 6px 4px;
}

.help-chat-input-row textarea::placeholder { color: var(--text-2); }

/* ── Email verify banner ─────────────────────────────────────── */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 204, 51, 0.15);
    border: 1px solid rgba(255, 204, 51, 0.5);
    margin-bottom: 18px;
    font-size: 13.5px;
    color: #a67a00;
}

.verify-banner-ok {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.35);
    color: #1a9850;
}

.verify-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 204, 51, 0.6);
    background: rgba(255, 204, 51, 0.25);
    color: #85610a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.verify-btn:hover { background: rgba(255, 204, 51, 0.4); }

/* ── Profile info rows ───────────────────────────────────────── */
.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    gap: 12px;
}

.profile-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.profile-info-value {
    font-size: 14px;
    color: var(--text-0);
    text-align: right;
}

/* Info page — buttons directly on background */
.info-btn-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    max-width: 320px;
}

.info-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-0);
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.info-btn i { width: 18px; text-align: center; color: var(--accent); }
.info-btn:hover { background: var(--glass-bg-strong); border-color: var(--accent-soft); transform: translateX(4px); }

.info-btn-danger { color: #b23a3a; }
.info-btn-danger i { color: #b23a3a; }
.info-btn-danger:hover { border-color: rgba(214,69,69,.4); background: rgba(214,69,69,.08); transform: translateX(4px); }

/* ============================================
   Notification banners (user-facing)
   ============================================ */
.notif-bar {
    width: 100%;
    padding: 0;
    animation: slideDown .3s ease both;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.notif-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 20px;
    font-size: 13px;
    line-height: 1.4;
}

.notif-bar-inner strong { margin-right: 6px; }
.notif-bar-inner span   { color: rgba(255,255,255,.85); }
.notif-bar-text { flex:1; cursor:pointer; }
.notif-bar-text:hover strong { text-decoration: underline; }

.notif-bar-info    .notif-bar-inner { background: rgba(28,102,255,.9);   color:#fff; backdrop-filter:blur(8px); }
.notif-bar-update  .notif-bar-inner { background: rgba(34,197,94,.85);   color:#fff; backdrop-filter:blur(8px); }
.notif-bar-warning .notif-bar-inner { background: rgba(255,204,51,.95);  color:#3a2c00; backdrop-filter:blur(8px); }
.notif-bar-warning .notif-bar-inner span { color: rgba(58,44,0,.75); }

.notif-close {
    flex-shrink: 0;
    background: rgba(255,255,255,.25);
    border: none;
    color: #fff;
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.notif-close:hover { background: rgba(255,255,255,.4); }

.notif-bar-warning .notif-close { background: rgba(58,44,0,.15); color: #3a2c00; }
.notif-bar-warning .notif-close:hover { background: rgba(58,44,0,.25); }

/* ── Blip story circles ──────────────────────────────────────── */
.blip-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    box-shadow: 0 4px 14px var(--accent-glow);
    flex-shrink: 0;
}

.blip-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--bg-0);
    background: var(--bg-2);
}

/* Generic inputs used outside auth forms (URL fields, textareas) */
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.04);
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    outline: none;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-group input[type="url"]::placeholder,
.form-group textarea::placeholder { color: var(--text-2); }

.form-group input[type="url"]:focus,
.form-group textarea:focus {
    border-color: var(--accent-soft);
    background: rgba(28, 102, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(28, 102, 255, 0.15);
}

/* Language dropdown */
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.04);
    color: var(--text-0);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    outline: none;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(28, 102, 255, 0.15);
}

.field-hint {
    font-size: 12px;
    color: var(--text-2);
    margin: 6px 0 0;
}

/* Generic file upload box (business file, distinct from the round logo upload) */
.file-upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.file-upload-box:hover { border-color: var(--accent-soft); background: rgba(28, 102, 255, 0.03); }
.file-upload-box i { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.file-upload-box .file-upload-text { font-size: 13.5px; color: var(--text-1); }
.file-upload-box .file-upload-name { font-weight: 600; color: var(--text-0); }

/* Chip showing an already-attached file source, with a remove control */
.kb-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(28, 102, 255, 0.08);
    border: 1px solid var(--glass-border);
    font-size: 13px;
    color: var(--text-0);
    margin-top: 10px;
}

.kb-file-chip i.fa-file-lines { color: var(--accent); }

.kb-file-chip .kb-remove {
    cursor: pointer;
    color: var(--text-2);
    display: flex;
}

.kb-file-chip .kb-remove:hover { color: #b23a3a; }

.kb-source-block {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.kb-source-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Pill-style radio groups (widget position / widget style) */
.option-pill-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.option-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.03);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-1);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.option-pill input { display: none; }
.option-pill i { color: var(--accent); }

.option-pill.selected {
    border-color: var(--accent-soft);
    background: rgba(28, 102, 255, 0.1);
    color: var(--text-0);
}
.bot-attach-preview {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 0 10px 8px;
    background: #1d1d26;
    border-radius: 12px;
    font-size: 12.5px;
    color: rgba(242,242,245,0.75);
    max-width: calc(100% - 20px);
    box-sizing: border-box;
    align-items:center; justify-content:center;
}
.attach-thumb-wrap {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    align-items:center; justify-content:center;
}
.attach-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    align-items:center; justify-content:center;
}
.bot-attach-preview .remove-attach { margin-left: auto; cursor: pointer; opacity: 0.6; flex-shrink: 0; }
.bot-attach-preview .remove-attach:hover { opacity: 1; }

.image-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483001;
    padding: 24px;
}
.image-modal-box {
    background: #1d1d26;
    border-radius: 16px;
    padding: 16px;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.image-modal-box img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    background: #0f0f14;
}
.image-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.image-modal-btn {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.image-modal-btn-secondary { background: rgba(255,255,255,0.08); color: #f2f2f5; }
.image-modal-btn-primary { background: var(--bot-color); color: #fff; }

.connect-section { margin-top: 28px; }
.connect-section-title {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-2);
    margin-bottom: 10px;
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 480px) {
    .connect-grid { grid-template-columns: repeat(3, 1fr); }
}

.connect-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(28, 102, 255, 0.03);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.connect-pill:hover {
    border-color: var(--accent-soft);
    background: rgba(28, 102, 255, 0.08);
    transform: translateY(-1px);
}

.connect-pill i { color: var(--accent); flex-shrink: 0; }

.connect-pill-website {
    grid-column: 1 / -1;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #fff;
    border-color: transparent;
}
.connect-pill-website i { color: #fff; }

.hint-banner {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 204, 51, 0.12);
    border: 1px solid rgba(255, 204, 51, 0.4);
    font-size: 13px;
    color: var(--text-1);
    margin-bottom: 20px;
    line-height: 1.5;
}
.hint-banner i { color: #a67a00; flex-shrink: 0; margin-top: 2px; }

.status-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 18px;
}
.status-toggle-row div p { margin: 2px 0 0; font-size: 12.5px; }

.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(14, 26, 51, 0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Build tab header */
.build-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.build-new-btn { margin: 0; width: auto; padding: 10px 20px; }

/* Assistant list rows on the Build tab */
.assistant-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 12px;
}
.assistant-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.assistant-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    font-size: 16px;
}
.assistant-row-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.assistant-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.assistant-empty {
    padding: 40px 24px;
    text-align: center;
}

/* Help screen — two option cards */
.help-option-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.help-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    text-decoration: none;
    color: var(--text-0);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.help-option-card:hover {
    border-color: var(--accent-soft);
    background: var(--glass-bg-strong);
    transform: translateX(3px);
}
.help-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.help-option-card h3 { font-size: 1rem; margin-bottom: 2px; }
.help-option-card p { font-size: 12.5px; margin: 0; }
.help-option-arrow { margin-left: auto; color: var(--text-2); flex-shrink: 0; }

/* ============================================
   Landing page v2 — hero, steps, bento
   ============================================ */
.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a67a00;
    background: rgba(255, 204, 51, 0.16);
    border: 1px solid rgba(255, 204, 51, 0.4);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.lp-hero {
    display: flex;
    flex-direction: column;
    gap: 36px;
    max-width: 1080px;
    margin: 20px auto 64px;
    padding: 0 4px;
}
@media (min-width: 860px) {
    .lp-hero { flex-direction: row; align-items: center; gap: 48px; }
    .lp-hero-copy { flex: 1.1; text-align: left; }
    .lp-hero-demo { flex: 1; }
}
.lp-hero-copy { text-align: center; }
.lp-hero-copy h1 { font-size: 2.15rem; line-height: 1.22; }
@media (min-width: 860px) { .lp-hero-copy h1 { font-size: 2.5rem; } }
.lp-hero-copy .guest-actions { justify-content: center; }
@media (min-width: 860px) { .lp-hero-copy .guest-actions { justify-content: flex-start; } }

.lp-trust { margin-top: 14px; font-size: 12.5px; color: var(--text-2); }

.lp-hero-demo { display: flex; justify-content: center; }

.lp-demo-card {
    width: 100%;
    max-width: 340px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(14, 26, 51, 0.12);
    overflow: hidden;
    transform: rotate(-1.2deg);
    transition: transform 0.3s ease;
}
.lp-demo-card:hover { transform: rotate(0deg); }

.lp-demo-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
}
.lp-demo-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.55); }
.lp-demo-title { margin-left: 6px; font-size: 12.5px; font-weight: 700; color: #fff; font-family: 'Sora', sans-serif; }

.lp-demo-body {
    min-height: 200px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-1);
}
.lp-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.lp-msg-user { align-self: flex-end; background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-bottom-right-radius: 4px; }
.lp-msg-bot { align-self: flex-start; background: rgba(255, 204, 51, 0.18); border: 1px solid rgba(255, 204, 51, 0.4); border-bottom-left-radius: 4px; }

.lp-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 56px;
    padding: 0 4px;
}
@media (min-width: 700px) { .lp-steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.lp-step-num {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent-soft);
    margin-bottom: 8px;
}
.lp-step h3 { font-size: 1.05rem; }
.lp-step p { font-size: 13.5px; }

.lp-bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto 56px;
    padding: 0 4px;
}
@media (min-width: 640px) { .lp-bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .lp-bento { grid-template-columns: repeat(3, 1fr); } }

.lp-spotlight {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(28, 102, 255, 0.06), rgba(255, 204, 51, 0.08));
}
@media (min-width: 700px) { .lp-spotlight { flex-direction: row; align-items: flex-start; gap: 22px; } }
.lp-spotlight h3 { font-size: 1.15rem; }

.lp-source-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lp-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-1);
}