:root {
    --bg: #0a0a0f;
    --bg-elevated: #12121a;
    --card: #171720;
    --card-hover: #1f1f2c;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f1f1f5;
    --muted: #8b8b9a;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header img {
    width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
}

.sidebar-header span {
    font-weight: 700; font-size: 1.15rem;
}

.sidebar-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--muted);
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--card);
    color: var(--text);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.topbar {
    height: 64px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title { font-size: 1.25rem; font-weight: 600; }

.topbar-actions {
    display: flex; align-items: center; gap: 16px;
}

.credits-pill {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--accent);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

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

.card h3 {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.card .sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--card-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Tables */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}
.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th { background: var(--bg-elevated); color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: var(--accent); }

/* Chat */
.chat-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message {
    max-width: 80%;
    padding: 16px 18px;
    border-radius: var(--radius);
    line-height: 1.6;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
}

.message.assistant {
    align-self: flex-start;
    background: var(--card);
    border: 1px solid var(--border);
}

.message pre {
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 8px;
}

.message code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.chat-input-area {
    padding: 16px 28px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.chat-input-box {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px 16px;
}

.chat-input-box textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    resize: none;
    max-height: 150px;
    padding: 6px 0;
    font-size: 0.95rem;
}

.chat-input-box textarea:focus { outline: none; }

.chat-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.chat-toolbar select {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
}

.attached-files-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.82rem;
    max-width: 220px;
}

.file-chip img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
}

.file-chip .file-chip-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    flex-shrink: 0;
}

.file-chip .file-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.file-chip .file-chip-remove {
    cursor: pointer;
    color: var(--muted);
    background: none;
    border: none;
    font-size: 0.9rem;
    padding: 2px 4px;
}

.file-chip .file-chip-remove:hover {
    color: #ff5c5c;
}

.file-chip.uploading {
    opacity: 0.6;
}

/* ===== Chat workspace + painel de codigo ===== */
.chat-workspace {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.chat-workspace .chat-layout { flex: 1; min-width: 0; }

.chat-welcome { margin: auto; text-align: center; max-width: 620px; padding: 20px; }
.chat-welcome h2 { margin-bottom: 12px; font-size: 1.9rem; }

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 26px;
}

.suggestion-chip {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.15s, transform 0.15s;
}

.suggestion-chip:hover { border-color: var(--primary); transform: translateY(-2px); }
.suggestion-chip i { color: var(--accent); }

.chat-messages.dragging { outline: 2px dashed var(--primary); outline-offset: -12px; }

.model-caps-hint { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.cap-pill {
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cap-pill.img { color: var(--success); border-color: rgba(34, 197, 94, 0.4); }

.message { position: relative; }
.message-body { overflow-wrap: anywhere; }
.message-body h3, .message-body h4 { margin: 12px 0 6px; }
.message-body a { color: var(--primary-light); text-decoration: underline; }
.message-body .inline-code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

.msg-meta { font-size: 0.72rem; color: var(--muted); margin-top: 8px; }

.copy-msg-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

.message:hover .copy-msg-btn { opacity: 1; }
.copy-msg-btn:hover { color: var(--primary-light); }

.msg-attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.msg-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.msg-file { font-size: 0.8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* Blocos de codigo nas mensagens */
.code-block-wrapper {
    margin: 12px 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #0d0d14;
}

.code-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #16161f;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.code-lang { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.05em; font-weight: 700; }
.code-block-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.code-act {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.code-act:hover { background: var(--primary); color: #fff; }
.code-act.copied { background: #22c55e; color: #fff; }

.code-block-wrapper pre { margin: 0; padding: 14px; background: transparent; overflow-x: auto; }
.code-block-wrapper code { color: #c9d1d9; font-size: 0.84rem; }

.code-expand {
    width: 100%;
    background: #16161f;
    border: none;
    border-top: 1px solid var(--border);
    color: var(--primary-light);
    padding: 8px;
    font-size: 0.78rem;
    cursor: pointer;
}

.code-expand:hover { background: rgba(99, 102, 241, 0.12); }

/* Imagens geradas pela IA */
.generated-images { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }

.generated-image {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-elevated);
    max-width: 380px;
}

.generated-image img { width: 100%; display: block; }

.generated-image figcaption {
    display: flex;
    gap: 8px;
    padding: 10px;
    flex-wrap: wrap;
}

/* Painel lateral de codigo */
.code-panel {
    width: 0;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    background: #0b0b11;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s ease;
}

.code-panel.open { width: 46%; max-width: 720px; min-width: 340px; }

.code-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #12121a;
    gap: 10px;
}

.code-panel-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; }
.code-panel-title i { color: var(--accent); }
.code-panel-actions { display: flex; gap: 6px; }

.code-panel-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    background: #0f0f16;
}

.code-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}

.code-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.code-panel-body { flex: 1; overflow: auto; padding: 16px; }
.code-panel-body pre { background: transparent; margin: 0; }
.code-panel-body code { color: #c9d1d9; font-size: 0.85rem; line-height: 1.65; white-space: pre; }

/* ===== Indique e Ganhe ===== */
.referral-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.referral-hero h2 { font-size: 1.6rem; margin: 8px 0 10px; line-height: 1.3; }
.referral-hero p { max-width: 620px; line-height: 1.6; }

.referral-badge {
    text-align: center;
    padding: 20px 28px;
    border-radius: 16px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.referral-badge i { font-size: 1.6rem; color: var(--accent); }
.referral-badge-value { font-size: 2.2rem; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.referral-badge-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.referral-link-box { display: flex; gap: 10px; flex-wrap: wrap; }
.referral-link-box input { flex: 1; min-width: 240px; font-family: monospace; font-size: 0.85rem; }

.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.ranking-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.ranking-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

.ranking-list li.me { border-color: var(--primary); background: rgba(99, 102, 241, 0.12); }
.rank-pos { font-weight: 800; color: var(--accent); min-width: 30px; }
.rank-name { flex: 1; }
.rank-count { color: var(--muted); font-size: 0.8rem; }

.steps-inline { display: flex; flex-direction: column; gap: 12px; }
.steps-inline > div { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.9rem; }

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Caixa de lucro no admin */
.profit-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.profit-sim {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    line-height: 1.7;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.alert-info { background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3); color: var(--accent); }

/* Landing */
.landing-page { overflow-x: hidden; }

.landing-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
}

.landing-logo img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.landing-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.landing-nav a:hover { color: var(--primary-light); text-decoration: none; }

.landing-hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.20), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.18), transparent 45%),
        radial-gradient(circle at top, rgba(99, 102, 241, 0.12), transparent 60%);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.landing-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    max-width: 900px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 60%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero p {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 680px;
    margin-bottom: 32px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text);
}

.hero-badge i { color: var(--accent); }

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 24px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted);
    font-size: 0.9rem;
}

.trust-strip div { display: flex; align-items: center; gap: 8px; }
.trust-strip i { color: var(--success); }

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-block;
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
}

.section-heading p { color: var(--muted); font-size: 1.05rem; }

/* Use cases */
.use-cases { padding: 80px 40px; max-width: 1240px; margin: 0 auto; }

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.use-case-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.2s, border-color 0.2s;
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.use-case-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 18px;
}

.use-case-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.use-case-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* Code showcase */
.code-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 80px 40px;
    max-width: 1240px;
    margin: 0 auto;
}

.code-showcase-text h2 { font-size: 2rem; font-weight: 800; margin: 12px 0 16px; line-height: 1.3; }
.code-showcase-text p { color: var(--muted); margin-bottom: 20px; line-height: 1.7; }

.check-list { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; color: var(--text); }
.check-list i { color: var(--success); }

.mock-window {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.mock-window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #16161f;
    border-bottom: 1px solid var(--border);
}

.mock-window-bar span {
    width: 11px; height: 11px; border-radius: 50%; background: #ff5f56;
}
.mock-window-bar span:nth-child(2) { background: #ffbd2e; }
.mock-window-bar span:nth-child(3) { background: #27c93f; }

.mock-window-title { margin-left: 10px; color: var(--muted); font-size: 0.82rem; }

.mock-window-body {
    padding: 20px;
    position: relative;
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    line-height: 1.7;
    overflow-x: auto;
}

.mock-window-body pre { background: transparent; margin: 0; }
.mock-window-body code { color: #c9d1d9; }
.tok-comment { color: #6b7280; }

.mock-copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 6px;
}

/* Features */
.features { padding: 80px 40px; max-width: 1240px; margin: 0 auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: left;
}

.feature i {
    font-size: 1.6rem;
    color: var(--primary-light);
    margin-bottom: 14px;
    display: block;
}

.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* Models */
.landing-models { padding: 80px 40px; max-width: 1240px; margin: 0 auto; }

.model-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.model-stat {
    text-align: center;
    padding: 22px 14px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
}

.model-stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.model-stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.brand-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 34px;
    padding: 20px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.brand-item { display: flex; align-items: center; gap: 10px; }

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
}

.brand-name { font-size: 0.85rem; font-weight: 600; }
.brand-count { font-size: 0.72rem; color: var(--muted); }

.model-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

.model-card-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12));
    border-color: rgba(99, 102, 241, 0.4);
}

.more-value { font-size: 2rem; font-weight: 800; }
.more-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }

.cap-badge.cap-img { color: var(--success); border-color: rgba(34, 197, 94, 0.4); }

/* Landing referral banner */
.landing-referral { padding: 20px 40px 60px; max-width: 1240px; margin: 0 auto; }

.referral-banner {
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 36px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.14));
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.referral-banner-icon {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    flex-shrink: 0;
}

.referral-banner-text h2 { font-size: 1.6rem; margin: 8px 0 10px; }
.referral-banner-text p { color: var(--muted); line-height: 1.65; margin-bottom: 16px; max-width: 720px; }

@media (max-width: 768px) {
    .referral-banner { flex-direction: column; text-align: center; padding: 26px 20px; }
    .referral-banner-text p { margin-left: auto; margin-right: auto; }
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.model-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.model-card:hover { border-color: var(--accent); }

.model-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.model-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

.model-tag.free { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.model-tag.pro { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.model-card h4 { font-size: 0.98rem; margin-bottom: 10px; }

.model-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.cap-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--muted);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.model-context { font-size: 0.75rem; }

/* How it works */
.how-it-works { padding: 80px 40px; max-width: 1100px; margin: 0 auto; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.step-card {
    text-align: center;
    padding: 28px 20px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    margin: 0 auto 18px;
}

.step-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.step-card p { color: var(--muted); font-size: 0.9rem; }

/* CTA */
.cta-section {
    text-align: center;
    padding: 90px 20px;
    margin: 40px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.14));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.cta-section h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 12px; }
.cta-section p { color: var(--muted); margin-bottom: 28px; font-size: 1.05rem; }

/* Footer */
.landing-footer { padding: 60px 40px 30px; border-top: 1px solid var(--border); }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1240px;
    margin: 0 auto 40px;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 6px; }
.footer-col a { color: var(--muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary-light); }

.footer-copy {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    max-width: 1240px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.02);
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin: 24px 0;
    color: var(--muted);
}

.pricing-card ul li { padding: 8px 0; }

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1), transparent 60%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card .logo {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    display: block; margin: 0 auto 20px;
}

/* Page content */
.page-content {
    padding: 28px;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 { font-size: 1.6rem; font-weight: 700; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; height: auto; }
    .main-content { margin-left: 0; }
    .app-layout { flex-direction: column; }
    .chat-messages { padding: 16px; }
    .message { max-width: 95%; }
    .landing-hero h1 { font-size: 2.2rem; }
    .landing-header { padding: 14px 18px; }
    .landing-nav { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
    .landing-nav a:not(.btn) { display: none; }
    .use-cases, .features, .landing-models, .how-it-works { padding: 56px 20px; }
    .code-showcase { grid-template-columns: 1fr; padding: 56px 20px; gap: 32px; }
    .section-heading h2 { font-size: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .cta-section { margin: 20px; padding: 56px 20px; }
    .trust-strip { gap: 18px; font-size: 0.8rem; }
    .chat-workspace { flex-direction: column; height: auto; }
    .code-panel.open { width: 100%; max-width: 100%; min-width: 0; max-height: 60vh; }
    .generated-image { max-width: 100%; }
}


/* Utilities */
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
