:root {
    --bg: #f5f1e8;
    --panel: #fffdf8;
    --ink: #1f2937;
    --muted: #6b7280;
    --brand: #1e3a8a;
    --brand-soft: #dbeafe;
    --accent: #b98b2f;
    --danger: #b91c1c;
    --border: #e5dcc8;
    --shadow: 0 10px 30px rgba(20, 20, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top, #fefaf0, var(--bg) 42%);
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(6px);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    gap: 14px;
}

.brand {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--ink);
}

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

.hero {
    padding: 92px 0 74px;
    text-align: center;
}

.hero-large {
    padding-top: 84px;
    padding-bottom: 40px;
}

.eyebrow {
    display: inline-block;
    background: #e0e7ff;
    color: #312e81;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin: 0 0 16px;
    line-height: 1.15;
}

.hero p {
    margin: 0 auto 28px;
    max-width: 780px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 10px;
}

.hero-mini-stats {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    text-align: left;
    padding: 16px;
}

.stat-card strong {
    display: block;
    margin-bottom: 5px;
}

.button {
    border: 1px solid transparent;
    background: var(--brand);
    color: #fff;
    padding: 11px 18px;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.button-secondary {
    background: #fff;
    color: var(--brand);
    border-color: #cbd5e1;
}

.button-ghost {
    background: transparent;
    color: var(--ink);
    border-color: #d1d5db;
}

.button-danger {
    background: var(--danger);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.card h3,
.card h2 {
    margin-top: 0;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: min(500px, 100%);
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 9px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.auth-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.auth-google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    white-space: nowrap;
}

.label {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #fff;
}

.input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.14);
}

.row {
    display: flex;
    gap: 10px;
}

.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 9px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.success-note {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    border-radius: 9px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.muted {
    color: var(--muted);
}

.code {
    background: #111827;
    color: #f3f4f6;
    border-radius: 10px;
    padding: 15px;
    font-family: Consolas, "Courier New", monospace;
    overflow-x: auto;
    font-size: 0.88rem;
}

.section-title {
    font-size: clamp(1.35rem, 2vw, 2rem);
    margin: 0 0 18px;
}

.section-block {
    padding-bottom: 40px;
}

.cta-card {
    text-align: center;
}

.model-badges {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.model-badge {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 24px 0;
    text-align: center;
    color: var(--muted);
}

.chat-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
}

.chat-toolbar-group {
    flex: 1;
}

.chat-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffcf4;
    min-height: 280px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 90%;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(20, 20, 40, 0.06);
}

.chat-message.user {
    align-self: flex-end;
    background: #eff6ff;
}

.chat-message.assistant {
    align-self: flex-start;
    background: #fff;
}

.chat-role {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
}

.chat-text {
    white-space: pre-wrap;
    line-height: 1.45;
}

.chat-text .chat-message-body {
    white-space: pre-wrap;
}

.chat-preview-img {
    display: block;
    max-width: 100%;
    max-height: 360px;
    width: auto;
    height: auto;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #f8f8f8;
}

.chat-form {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.chat-input {
    min-height: 74px;
    resize: vertical;
}

.api-generator .row {
    align-items: center;
}

.code-input {
    min-height: 138px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
    line-height: 1.35;
    background: #fff;
}

.model-key-form {
    margin: 12px 0 14px;
}

.table-wrap {
    overflow-x: auto;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.keys-table th,
.keys-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    text-align: left;
    font-size: 0.9rem;
}

.keys-table th {
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.key-inline {
    font-family: Consolas, "Courier New", monospace;
    min-width: 280px;
    padding: 8px 10px;
}

.button-sm {
    padding: 8px 11px;
    font-size: 0.82rem;
}

.menu-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.84rem;
    font-weight: 600;
}

.menu-chip:hover {
    text-decoration: none;
    background: #eff6ff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-card {
    width: min(520px, 100%);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.modal-card h3 {
    margin: 0 0 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

/* —— ChatGPT-like dashboard (light theme) —— */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.dashboard-gpt {
    margin: 0;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: #fff;
    color: #0d0d0d;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.gpt-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 80;
}

.gpt-backdrop.is-visible {
    display: block;
}

.gpt-app {
    display: flex;
    min-height: 100vh;
    max-height: 100vh;
}

/* Sidebar */
.gpt-sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f4f4f6;
    border-right: 1px solid #e3e3e8;
    transition: width 0.2s ease, min-width 0.2s ease, border-color 0.2s ease;
}

.gpt-app--collapsed .gpt-sidebar {
    width: 0;
    min-width: 0;
    border-right-color: transparent;
    overflow: hidden;
}

.gpt-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 12px 16px;
    gap: 8px;
}

.gpt-sidebar-brand {
    font-weight: 800;
    font-size: 1.05rem;
    color: #111;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.gpt-sidebar-brand:hover {
    color: var(--brand);
}

.gpt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.gpt-icon-btn:hover {
    background: #e8e8ed;
    color: #111;
}

.gpt-sidebar-nav {
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gpt-nav-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #111;
    font-size: 0.94rem;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.12s ease;
}

.gpt-nav-row:hover {
    background: #ebebef;
}

.gpt-nav-row--muted {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.gpt-nav-row--active {
    background: #e8eeff !important;
    color: #1e3a8a;
}

.gpt-search-panel {
    padding: 6px 10px 12px 14px;
    border-bottom: 1px solid #e8e8ed;
}

.gpt-search-input {
    font-size: 0.86rem !important;
    padding: 8px 10px !important;
}

.gpt-search-results {
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gpt-search-hit {
    width: 100%;
    text-align: left;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.35;
    cursor: pointer;
    color: #374151;
    font-family: inherit;
    transition: background 0.12s ease;
}

.gpt-search-hit:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.gpt-search-hint,
.gpt-search-empty {
    font-size: 0.78rem;
    margin: 0;
    padding: 4px 2px;
}

.gpt-nav-soon {
    pointer-events: none;
    cursor: default;
    color: #6b7280;
}

.gpt-nav-soon:hover {
    background: transparent;
}

.gpt-soon-badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5563;
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
    border: 1px solid #e5e7eb;
    padding: 4px 9px;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gpt-msg--flash .gpt-bubble {
    animation: gpt-msg-flash 1.25s ease;
}

@keyframes gpt-msg-flash {
    0%,
    100% {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }
    40% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
    }
}

.gpt-nav-row--link {
    cursor: pointer;
    color: inherit;
}

.gpt-nav-icon {
    display: flex;
    color: #4b5563;
    flex-shrink: 0;
}

.gpt-chat-history-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 4px;
    border-top: 1px solid #e8e8ed;
}

.gpt-chat-history-head {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    padding: 4px 8px 8px;
}

.gpt-chat-history {
    flex: 1;
    min-height: 80px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
}

.gpt-chat-history-empty {
    font-size: 0.78rem;
    margin: 0;
    padding: 8px 8px 12px;
}

.gpt-chat-history-item {
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #111;
    font-family: inherit;
    font-size: 0.86rem;
    padding: 9px 10px;
    cursor: pointer;
    transition: background 0.12s ease;
    line-height: 1.35;
}

.gpt-chat-history-item:hover {
    background: #ebebef;
}

.gpt-chat-history-item--active {
    background: #e8eeff;
    color: #1e3a8a;
}

.gpt-chat-history-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.gpt-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 18px;
    border-top: 1px solid #e3e3e8;
    margin-top: auto;
}

.gpt-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--brand);
}

.gpt-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111;
}

.gpt-user-logout {
    font-size: 0.8rem;
    color: #6b7280;
}

.gpt-user-logout:hover {
    color: var(--brand);
}

/* Main column */
.gpt-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.gpt-main-topbar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 12px;
    border-bottom: 1px solid #ececf1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.gpt-topbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-self: start;
}

.gpt-llm-version {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gpt-llm-version-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.gpt-llm-version-name {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--brand, #2563eb);
    font-variant-numeric: tabular-nums;
}

.gpt-topbar-trailer {
    justify-self: end;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.gpt-reply-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fafbfc;
}

.gpt-reply-lang-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
    white-space: nowrap;
}

.gpt-reply-lang-select {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    padding: 6px 28px 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
        no-repeat right 8px center;
    appearance: none;
    cursor: pointer;
    max-width: 140px;
}

.gpt-reply-lang-select:hover {
    border-color: #9ca3af;
}

@media (max-width: 520px) {
    .gpt-reply-lang-label {
        display: none;
    }

    .gpt-reply-lang {
        padding-left: 6px;
    }
}

.agentb-llm-version-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e8e8ef;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.agentb-llm-version-banner__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
}

.agentb-llm-version-banner__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand, #2563eb);
    letter-spacing: 0.03em;
}

.gpt-expand-sidebar {
    display: none;
}

.gpt-app--collapsed .gpt-expand-sidebar {
    display: inline-flex;
}

.gpt-menu-mobile {
    display: none;
}

/* Thread */
.gpt-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 20px 12px;
    scroll-behavior: smooth;
}

.gpt-thread-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gpt-empty {
    text-align: center;
    padding: min(10vh, 72px) 16px 32px;
}

.gpt-empty-title {
    font-size: clamp(1.65rem, 4.5vw, 2.15rem);
    font-weight: 600;
    margin: 0 0 12px;
    color: #111;
    letter-spacing: -0.03em;
}

.gpt-empty-sub {
    margin: 0;
    font-size: 1rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.gpt-msg {
    display: flex;
    width: 100%;
}

.gpt-msg--user {
    justify-content: flex-end;
}

.gpt-msg--assistant {
    justify-content: flex-start;
}

.gpt-bubble {
    max-width: min(100%, 88%);
    border-radius: 20px;
    padding: 12px 16px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.gpt-msg--user .gpt-bubble {
    background: #f4f4f6;
    border: 1px solid #e8e8ed;
}

.gpt-msg--assistant .gpt-bubble {
    background: #fff;
    border: 1px solid #ececf1;
}

.gpt-msg-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.gpt-msg-text {
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 0.96rem;
    color: #1f2937;
}

.gpt-msg-text .chat-message-body {
    white-space: pre-wrap;
}

.gpt-streaming-body {
    min-height: 1.45em;
}

.gpt-stream-caret {
    display: inline-block;
    width: 8px;
    height: 1.15em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--brand, #2563eb);
    border-radius: 2px;
    animation: gpt-stream-caret-blink 1s step-end infinite;
}

@keyframes gpt-stream-caret-blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

.gpt-tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: var(--brand);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.gpt-tts-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.gpt-tts-btn:active {
    transform: scale(0.96);
}

.gpt-tts-btn:disabled {
    cursor: wait;
}

.gpt-tts-btn.is-loading {
    opacity: 0.55;
}

.gpt-tts-btn.is-playing {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.gpt-tts-icon {
    display: block;
    flex-shrink: 0;
}

/* Composer (wide pill) */
.gpt-composer-wrap {
    flex-shrink: 0;
    padding: 12px 20px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 35%);
}

.gpt-composer-wide {
    max-width: 720px;
    margin: 0 auto;
}

.gpt-composer-form {
    margin: 0;
}

.gpt-composer-pill {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px 10px 14px;
    border-radius: 26px;
    border: 1px solid #d9d9e0;
    background: #fff;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

.gpt-composer-pill:focus-within {
    border-color: #b4b4c0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
}

.gpt-composer-plus {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #9ca3af;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpt-composer-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.45;
    font-family: inherit;
    padding: 10px 4px;
    min-height: 28px;
    max-height: 200px;
    background: transparent;
    color: #111;
}

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

.gpt-composer-send {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.gpt-composer-send:hover {
    opacity: 0.93;
    transform: scale(1.03);
}

.gpt-composer-foot {
    font-size: 0.72rem;
    margin: 10px 0 0;
    text-align: center;
}

/* Mobile sidebar overlay */
@media (max-width: 768px) {
    .gpt-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 90;
        min-width: 260px;
        width: min(280px, 88vw);
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: none;
    }

    .gpt-app--sidebar-open .gpt-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
    }

    .gpt-app--collapsed .gpt-sidebar {
        transform: translateX(-100%);
        width: min(280px, 88vw);
        min-width: 260px;
    }

    .gpt-menu-mobile {
        display: inline-flex;
    }

    .gpt-expand-sidebar {
        display: none !important;
    }

    .gpt-app--collapsed .gpt-expand-sidebar {
        display: none !important;
    }

    .gpt-msg--user .gpt-bubble,
    .gpt-msg--assistant .gpt-bubble {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .topbar-inner {
        flex-wrap: wrap;
    }
    .hero {
        padding-top: 66px;
    }
    .hero-mini-stats {
        grid-template-columns: 1fr;
    }
    .chat-toolbar,
    .chat-form,
    .row {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-actions {
        flex-direction: column;
    }
    .chat-message {
        max-width: 100%;
    }
}
