.yy-ai-agent-modes {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #334155;
}

.yy-ai-persona-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #334155;
}

.yy-ai-persona-bar select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
    color: #0f172a;
}

.yy-ai-agent-modes select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
    color: #0f172a;
}

.yy-ai-auto-repair {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.yy-ai-auto-repair input {
    margin: 0;
}

.yy-ai-coding-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #475569;
}

.yy-ai-coding-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
}

.yy-ai-coding-repair {
    border: 1px solid #94a3b8;
    background: #fff;
    color: #0f172a;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
}

.yy-ai-coding-repair:disabled {
    opacity: 0.6;
    cursor: default;
}

.yy-ai-project-repair {
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

.yy-ai-project-repair:disabled {
    opacity: 0.65;
    cursor: default;
}

.yy-ai-coding-result {
    margin-top: 6px;
    font-size: 12px;
    color: #334155;
}

.yy-ai-confirm-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
}

.yy-ai-confirm-label {
    color: #334155;
    margin-right: 4px;
}

.yy-ai-confirm-ok,
.yy-ai-confirm-no {
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid #cbd5e1;
}

.yy-ai-confirm-ok {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.yy-ai-confirm-no {
    background: #fff;
    color: #64748b;
}

.yy-ai-confirm-ok:disabled,
.yy-ai-confirm-no:disabled {
    opacity: 0.6;
    cursor: default;
}

.yy-ai-confirm-result {
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
}

.yy-ai-page-wrap {
    padding: 24px 0 48px;
}

.yy-ai-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.yy-ai-quick-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.yy-ai-quick-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.yy-ai-knowledge-row {
    margin-top: 32px;
}

.yy-ai-section-title {
    margin-bottom: 8px;
    font-size: 22px;
    color: #0f172a;
}

.yy-ai-knowledge-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.yy-ai-knowledge-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b8f66, #2563eb);
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.yy-ai-knowledge-card-body {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.yy-ai-knowledge-card-body span {
    font-size: 12px;
    color: #64748b;
}

.yy-ai-chat-panel,
.yy-ai-widget-panel {
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.yy-ai-widget-panel {
    min-height: 0;
    height: 100%;
}

.yy-ai-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(90deg, #0b8f66, #2563eb);
    color: #fff;
}

.yy-ai-badge {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 2px 8px;
}

.yy-ai-badge--warn {
    background: rgba(245, 158, 11, 0.35);
}

.yy-ai-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.yy-ai-ml-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    opacity: 0.9;
    cursor: pointer;
    user-select: none;
}

.yy-ai-ml-toggle input {
    margin: 0;
}

.yy-ai-header-sub {
    font-size: 12px;
    opacity: 0.92;
    font-weight: 400;
    margin: 4px 0 0;
}

.yy-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    min-height: 280px;
    max-height: 52vh;
}

.yy-ai-msg {
    margin-bottom: 12px;
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.55;
    font-size: 14px;
    white-space: pre-wrap;
}

.yy-ai-msg.user {
    margin-left: auto;
    background: #2563eb;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.yy-ai-msg.bot {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.yy-ai-msg.warn {
    border-color: #f59e0b;
    background: #fffbeb;
}

.yy-ai-ml-anom {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 12px;
    white-space: normal;
}

.yy-ai-ml-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 10px;
    white-space: normal;
}

.yy-ai-ml-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.yy-ai-ml-chip--low {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
    font-weight: 500;
}

.yy-ai-ml-hint {
    font-size: 11px;
    color: #64748b;
}

.yy-ai-ml-wrong {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.yy-ai-ml-wrong:disabled {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.yy-ai-ml-correct {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    white-space: normal;
}

.yy-ai-ml-correct[hidden] {
    display: none !important;
}

.yy-ai-ml-correct-label {
    font-size: 11px;
    color: #64748b;
}

.yy-ai-ml-opt {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    color: #0f172a;
}

.yy-ai-ml-opt:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.yy-ai-ml-thanks {
    font-size: 12px;
    color: #047857;
}

.yy-ai-ml-adv {
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
    font-family: ui-monospace, Consolas, monospace;
    white-space: normal;
    word-break: break-word;
}

.yy-ai-sources {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.yy-ai-sources-fold {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 6px;
}

.yy-ai-sources-fold > summary {
    cursor: pointer;
    color: #475569;
    font-size: 12px;
    user-select: none;
    list-style: none;
}

.yy-ai-sources-fold > summary::-webkit-details-marker {
    display: none;
}

.yy-ai-sources-fold ul {
    margin: 6px 0 0;
    padding-left: 1.1em;
    color: #64748b;
}

.yy-ai-sources-fold a {
    color: #0369a1;
    text-decoration: none;
}

.yy-ai-sources-fold a:hover {
    text-decoration: underline;
}

.yy-ai-feedback {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.yy-ai-feedback button {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
}

.yy-ai-feedback button.is-on {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.yy-ai-stall-hint {
    color: #b45309;
    font-size: 12px;
    margin-top: 4px;
}

.yy-ai-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Büyük soru yazma alanı (composer) */
.yy-ai-composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
    border-top: 1px solid #e2e8f0;
}

.yy-ai-composer-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0;
}

.yy-ai-composer-box {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 12px 12px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.yy-ai-composer-box:focus-within {
    border-color: #0b8f66;
    box-shadow: 0 0 0 3px rgba(11, 143, 102, 0.18), 0 8px 24px rgba(37, 99, 235, 0.08);
}

.yy-ai-composer-input {
    flex: 1;
    width: 100%;
    min-height: 72px;
    max-height: 180px;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.55;
    color: #0f172a;
    padding: 4px 0;
    font-family: inherit;
}

.yy-ai-composer-input::placeholder {
    color: #94a3b8;
}

.yy-ai-composer-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.yy-ai-composer-plan {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.yy-ai-composer-plan:hover {
    background: #f1f5f9;
}

.yy-ai-composer-send {
    flex-shrink: 0;
    border: 0;
    border-radius: 12px;
    padding: 12px 20px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #0b8f66, #2563eb);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transition: transform 0.12s, filter 0.12s;
}

.yy-ai-composer-send:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.yy-ai-composer-send:active {
    transform: translateY(0);
}

.yy-ai-composer-hint {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

.yy-ai-footnote {
    margin: 0;
    padding: 0 12px 12px;
    font-size: 11px;
    color: #94a3b8;
}

/* Floating widget */
#yyAiWidgetRoot {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147483000;
    font-family: inherit;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    pointer-events: none;
}

#yyAiWidgetRoot * {
    pointer-events: auto;
}

.yy-ai-launcher {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #0b8f66, #2563eb);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

.yy-ai-launcher-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.yy-ai-widget-window {
    display: none;
    width: min(380px, calc(100vw - 24px));
    height: 520px;
    margin-bottom: 12px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
}

.yy-ai-widget-window.yy-ai-is-open {
    display: flex !important;
    flex-direction: column;
}

.yy-ai-widget-close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.yy-ai-typing {
    opacity: 0.7;
    font-style: italic;
}

/* Chat-only page */
.yy-ai-chat-only {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}

.yy-ai-chat-panel--solo {
    min-height: min(78vh, 780px);
}

.yy-ai-chat-panel--solo .yy-ai-messages {
    min-height: 360px;
    max-height: none;
    flex: 1;
}

.yy-ai-chat-panel--solo .yy-ai-composer {
    padding: 18px 20px 12px;
}

.yy-ai-chat-panel--solo .yy-ai-composer-input {
    min-height: 88px;
    font-size: 17px;
}

.yy-ai-chat-panel--solo .yy-ai-composer-box {
    padding: 14px 14px 14px 18px;
    border-radius: 18px;
}

.yy-ai-chat-panel--solo .yy-ai-composer-send {
    min-height: 52px;
    padding: 14px 24px;
    font-size: 16px;
}

@media (max-width: 767px) {
    #yyAiWidgetRoot {
        right: 12px;
        bottom: 12px;
    }
    .yy-ai-widget-window {
        height: 70vh;
    }
    .yy-ai-chat-only {
        padding: 12px 8px 40px;
    }
    .yy-ai-chat-panel--solo {
        min-height: 78vh;
        border-radius: 10px;
    }
    .yy-ai-composer-box {
        flex-direction: column;
        align-items: stretch;
    }
    .yy-ai-composer-send {
        width: 100%;
    }
}

.yy-ai-mode-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.yy-ai-mode-tab {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.yy-ai-mode-tab.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.yy-ai-mode-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.yy-ai-project-panel {
    margin: 0 16px 8px;
    padding: 12px 14px;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #fff;
}

.yy-ai-project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.yy-ai-project-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yy-ai-project-new {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.yy-ai-project-meta {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.yy-ai-project-evidence {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
}

.yy-ai-project-evidence-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#yyAiProjectEvidenceList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 140px;
    overflow: auto;
}

.yy-ai-evidence-item {
    font-size: 12px;
    color: #334155;
    padding: 3px 0;
    border-bottom: 1px solid #eef2f7;
}

.yy-ai-evidence-item.fail {
    color: #b91c1c;
}

.yy-ai-muted {
    color: #94a3b8;
    font-size: 12px;
}

.yy-ai-project-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.yy-ai-step {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
}

.yy-ai-live-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.yy-ai-typing .yy-ai-step {
    opacity: 0.9;
}

.yy-ai-project-download {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b8f66, #2563eb);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.yy-ai-project-preview {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.yy-ai-project-studio {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.yy-ai-project-retry {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.yy-ai-project-diff {
    margin: 0 0 8px;
    padding: 8px 10px;
    max-height: 140px;
    overflow: auto;
    font-size: 11px;
    line-height: 1.4;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    white-space: pre-wrap;
}

.yy-ai-project-job {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    color: #1e3a8a;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.yy-ai-project-job-label {
    font-weight: 600;
}

.yy-ai-project-files {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 160px;
    overflow: auto;
}

.yy-ai-project-changed {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.yy-ai-project-changed-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #047857;
    margin-bottom: 4px;
}

.yy-ai-project-changed ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yy-ai-project-changed li {
    font-size: 12px;
    color: #065f46;
    padding: 2px 0;
}

.yy-ai-project-files li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    color: #334155;
}

.yy-ai-project-file--changed code {
    color: #047857;
    font-weight: 600;
}

.yy-ai-project-files code {
    font-size: 12px;
}

.yy-ai-project-size {
    color: #94a3b8;
    white-space: nowrap;
}

/* IDE surface (v22) */
.yy-ai-codeblock {
    margin: 10px 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    color: #e2e8f0;
}
.yy-ai-codeblock-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    font-size: 11px;
}
.yy-ai-codeblock-lang { color: #94a3b8; text-transform: lowercase; }
.yy-ai-code-copy {
    border: 1px solid #475569;
    background: #334155;
    color: #f8fafc;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
}
.yy-ai-codeblock-pre {
    margin: 0;
    padding: 12px 14px;
    overflow: auto;
    max-height: 360px;
    font-size: 12.5px;
    line-height: 1.45;
    white-space: pre;
}
.yy-ai-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #e2e8f0;
    color: #0f172a;
    padding: 1px 5px;
    border-radius: 4px;
}
.yy-ai-ide-btn {
    border: 1px solid #94a3b8;
    background: #fff;
    color: #0f172a;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}
.yy-ai-ide-btn:disabled { opacity: 0.6; cursor: default; }
.yy-ai-ide-btn--muted {
    background: #f8fafc;
    color: #475569;
}
.yy-ai-hunk-review {
    margin: 8px 0 10px;
    padding: 10px;
    border: 1px solid #fdba74;
    border-radius: 10px;
    background: #fff7ed;
}
.yy-ai-hunk-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.yy-ai-hunk-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.yy-ai-hunk-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow: auto;
}
.yy-ai-hunk-item {
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid #ffedd5;
}
.yy-ai-hunk-status {
    margin: 8px 0 0;
    font-size: 12px;
    color: #9a3412;
}
.yy-ai-file-view {
    margin-top: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.yy-ai-file-view-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.yy-ai-file-view-body {
    margin: 0;
    padding: 10px 12px;
    max-height: 280px;
    overflow: auto;
    font-size: 12px;
    white-space: pre-wrap;
    background: #0f172a;
    color: #e2e8f0;
}
.yy-ai-file-open {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
}
.yy-ai-file-open:hover code { text-decoration: underline; }
.yy-ai-codebase-hits {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.yy-ai-codebase-hits ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}
.yy-ai-codebase-hits li { margin-bottom: 8px; font-size: 12px; }
.yy-ai-codebase-snip {
    margin: 4px 0 0;
    padding: 6px 8px;
    background: #0f172a;
    color: #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    white-space: pre-wrap;
    max-height: 100px;
    overflow: auto;
}
.yy-ai-mention-menu {
    position: absolute;
    z-index: 40;
    left: 16px;
    right: 16px;
    bottom: 110px;
    max-height: 180px;
    overflow: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 6px;
}
.yy-ai-mention-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #0f172a;
}
.yy-ai-mention-item:hover { background: #f1f5f9; }
.yy-ai-fim-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}
.yy-ai-chat-panel { position: relative; }
.yy-ai-muted { color: #94a3b8; font-size: 12px; }

/* P0 IDE buffer / hunk / architect (v23) */
.yy-ai-file-view-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.yy-ai-file-editor {
    display: block;
    width: 100%;
    min-height: 220px;
    border: 0;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.45;
    box-sizing: border-box;
}
.yy-ai-file-view-status {
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    color: #475569;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.yy-ai-hunk-split {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr);
    gap: 8px;
}
@media (max-width: 720px) {
    .yy-ai-hunk-split { grid-template-columns: 1fr; }
}
.yy-ai-hunk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.yy-ai-hunk-item.is-active {
    background: #ffedd5;
    border-radius: 6px;
}
.yy-ai-hunk-peek { flex-shrink: 0; padding: 2px 8px !important; }
.yy-ai-hunk-body {
    margin: 0;
    padding: 8px 10px;
    max-height: 220px;
    overflow: auto;
    font-size: 11px;
    line-height: 1.4;
    white-space: pre-wrap;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
}
.yy-ai-architect-card {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #93c5fd;
    border-radius: 10px;
    background: #eff6ff;
}
.yy-ai-architect-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.yy-ai-architect-plan {
    margin: 0 0 8px;
    padding: 10px;
    min-height: 80px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
}
.yy-ai-architect-plan[contenteditable="true"] {
    outline: 2px solid #3b82f6;
}
.yy-ai-architect-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.yy-hl-kw { color: #7dd3fc; font-weight: 600; }
.yy-hl-str { color: #86efac; }
.yy-hl-cmt { color: #94a3b8; font-style: italic; }

/* Whitelist terminal presets v25 */
.yy-ai-terminal-bar {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #64748b;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
}
.yy-ai-terminal-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.yy-ai-terminal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.yy-ai-term-select {
  flex: 1 1 160px;
  min-width: 140px;
  background: #020617;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}
.yy-ai-terminal-actions,
.yy-ai-terminal-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.yy-ai-terminal-out {
  margin: 0;
  padding: 8px;
  max-height: 180px;
  overflow: auto;
  font-size: 11px;
  background: #020617;
  border-radius: 6px;
  white-space: pre-wrap;
  border: 1px solid #334155;
}
.yy-ai-terminal-out.is-ok { border-color: #059669; }
.yy-ai-terminal-out.is-fail { border-color: #dc2626; }
.yy-ai-terminal-hist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 120px;
  overflow: auto;
  font-size: 11px;
}
.yy-ai-terminal-hist li {
  padding: 3px 0;
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
}
.yy-ai-terminal-hist li.ok { color: #86efac; }
.yy-ai-terminal-hist li.fail { color: #fca5a5; }
.yy-ai-terminal-hist code { color: #e2e8f0; font-size: 10px; }
.yy-ai-evidence-timeline { list-style: none; margin: 0; padding: 0; }
.yy-ai-timeline-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}
.yy-ai-timeline-mark { width: 1.2em; color: #64748b; }
.yy-ai-timeline-item.ok .yy-ai-timeline-mark { color: #059669; }
.yy-ai-timeline-item.fail .yy-ai-timeline-mark { color: #dc2626; }

/* Saf sohbet toolbar + stream UX */
.yy-ai-chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}
.yy-ai-chat-profile,
.yy-ai-agent-modes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}
.yy-ai-chat-profile select,
.yy-ai-agent-modes select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: #0f172a;
}
.yy-ai-stop-btn {
  margin-left: auto;
  border: 1px solid #f87171;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}
.yy-ai-stop-btn:hover { background: #fee2e2; }
.yy-ai-thinking {
  color: #64748b;
  font-style: italic;
}
.yy-ai-dots::after {
  content: '';
  animation: yyAiDots 1.2s steps(4, end) infinite;
}
@keyframes yyAiDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
.yy-ai-stream-live .yy-ai-stream-text {
  white-space: pre-wrap;
  word-break: break-word;
}
.yy-ai-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #0f172a;
  animation: yyAiCaret 0.9s step-end infinite;
}
@keyframes yyAiCaret {
  50% { opacity: 0; }
}
.yy-ai-msg.user {
  cursor: pointer;
}
.yy-ai-msg.user:hover {
  outline: 1px dashed #94a3b8;
}
.yy-ai-msg-actions {
  margin-top: 8px;
}
.yy-ai-retry-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}
.yy-ai-retry-btn:hover { background: #f1f5f9; }
.yy-ai-fast-tag {
  opacity: 0.75;
  font-size: 11px;
}
