/* Shared chat, auth, and report chrome for the three large-chat layouts. */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-subtle: rgba(37, 99, 235, 0.08);
    --accent-color: #2563eb;
    --border: #e2e8f0;
    --border-color: #e2e8f0;
    --card-bg: #f8fafc;
    --card-bg-subtle: #f1f5f9;
    --btn-bg: #f1f5f9;
    --btn-bg-strong: #e2e8f0;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-primary);
    background: #070b14;
}
a { color: inherit; }
.hidden { display: none !important; }
.variant-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(7, 11, 20, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}
.variant-bar a.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
}
.variant-switch { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.variant-switch a {
    text-decoration: none;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
}
.variant-switch a[aria-current="page"] {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}
.bar-actions { display: flex; align-items: center; gap: 0.55rem; }
.auth-btn-header {
    background: transparent;
    color: #cbd5e1;
    border: none;
    font: inherit;
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.menu-container { position: relative; }
.menu-button {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}
.menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    width: min(16rem, 70vw);
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.8rem;
    padding: 0.35rem;
    z-index: 50;
}
.menu-dropdown a {
    display: block;
    padding: 0.45rem 0.6rem;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 0.45rem;
}
.menu-dropdown a:hover { background: rgba(255,255,255,0.06); }
.user-info { display: flex; align-items: center; gap: 0.4rem; }
.logout-btn {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.big-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
}
.big-chat .app { display: flex; flex-direction: column; min-height: 0; flex: 1; height: 100%; }
.composer-tools { display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem 0; }
.model-select {
    appearance: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 1.8rem 0.45rem 0.85rem;
    font: inherit;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.model-status {
    font-size: 0.72rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    color: white;
    font-weight: 500;
}
.chat-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}
.welcome-screen {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.25rem 0.5rem;
}
.welcome-tagline {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 1rem;
}
.suggestion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.suggestion-chip {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.05rem 1.1rem;
    font: inherit;
    font-size: 1rem;
    text-align: left;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}
.suggestion-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.chat-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.15rem;
}
.chat-message { display: flex; flex-direction: column; }
.chat-message.user { align-items: flex-end; }
.chat-message.agent { align-items: stretch; }
.message-bubble {
    max-width: min(52rem, 100%);
    padding: 0.95rem 1.15rem;
    border-radius: 1.1rem;
    font-size: 1.02rem;
    line-height: 1.6;
}
.message-bubble.user { background: var(--accent); color: white; }
.message-bubble.agent {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    max-width: 100%;
    width: 100%;
}
.agent-label { font-size: 0.75rem; color: var(--accent); margin: 0 0 0.35rem; }
.typing-indicator { display: flex; gap: 0.3rem; align-items: center; }
.typing-indicator span:not(.typing-label) {
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.45;
}
.typing-label { color: var(--text-tertiary); font-size: 0.9rem; }
.chat-input-area { padding: 0.35rem 1rem 1rem; }
.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    padding: 0.85rem 0.9rem;
}
.chat-input-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.chat-textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font: inherit;
    font-size: 1.08rem;
    color: var(--text-primary);
    min-height: 1.7rem;
    max-height: 9rem;
    line-height: 1.45;
}
.chat-textarea:focus { outline: none; }
.chat-send-btn {
    width: 42px; height: 42px; border-radius: 50%; border: none;
    background: var(--accent); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send-btn svg { width: 18px; height: 18px; }
.chat-send-btn:disabled { opacity: 0.4; }
.chat-auth-notice, .free-trial-counter {
    text-align: center; font-size: 0.82rem; color: var(--text-tertiary); margin-top: 0.45rem;
}
.chat-auth-notice a { color: var(--accent); cursor: pointer; }
.post-nudge {
    display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
    margin-top: 0.6rem; font-size: 0.85rem;
}
.post-nudge-btn {
    border: none; background: var(--accent); color: white; border-radius: 999px;
    padding: 0.4rem 0.8rem; font: inherit; cursor: pointer;
}

.auth-modal {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(2, 6, 23, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.auth-modal-content {
    width: min(26rem, 100%);
    background: white; color: #1e293b;
    border-radius: 1rem; padding: 1.25rem;
}
.auth-modal-header { display: flex; justify-content: space-between; align-items: center; }
.auth-title { font-size: 1.15rem; margin: 0; }
.auth-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; }
.auth-tabs { display: flex; gap: 0.5rem; margin: 0.8rem 0; }
.auth-tab { background: none; border: none; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; padding: 0.35rem 0.2rem; }
.auth-tab.active { border-bottom-color: #2563eb; color: #2563eb; }
.auth-message { background: #eff6ff; padding: 0.55rem 0.7rem; border-radius: 0.5rem; font-size: 0.85rem; }
.auth-message.error { background: #fef2f2; color: #b91c1c; }
.auth-form { display: flex; flex-direction: column; gap: 0.55rem; }
.auth-input { border: 1px solid #e2e8f0; border-radius: 0.6rem; padding: 0.65rem 0.75rem; font: inherit; }
.auth-submit { border: none; background: #2563eb; color: white; border-radius: 0.6rem; padding: 0.7rem; font: inherit; cursor: pointer; }
.auth-hint, .auth-panel-title { font-size: 0.8rem; color: #64748b; }
.loading { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; }

.report-container {
    position: fixed; inset: 0; z-index: 70; background: white; color: #1e293b;
    display: flex; flex-direction: column;
}
.report-header { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.2rem; border-bottom: 1px solid #e2e8f0; }
.report-body { flex: 1; overflow: auto; padding: 1.25rem; }
.report-close { background: none; border: none; cursor: pointer; }

@media (max-width: 720px) {
    .suggestion-grid { grid-template-columns: 1fr; }
    .variant-bar { flex-wrap: wrap; }
    .variant-switch a { font-size: 0.72rem; padding: 0.22rem 0.5rem; }
}
