/* Yerel Excel - Yapay Zekâ Paneli */
.hdr-btn.active { background: rgba(255,255,255,.28); }
.hdr-btn.ai-btn { background: linear-gradient(135deg, #7c3aed, #2563eb); font-weight: 700; box-shadow: 0 2px 8px rgba(37,99,235,.35); }
.hdr-btn.ai-btn:hover { filter: brightness(1.08); }
.ai-dock { position: relative; width: 400px; min-width: 320px; max-width: 720px; flex-direction: column; background: #fff; border-left: 1px solid var(--excel-border-color); box-shadow: -6px 0 18px rgba(0,0,0,.08); z-index: 30; flex: none; }
.ai-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 5; }
.ai-resize:hover { background: rgba(37,99,235,.25); }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: linear-gradient(135deg, #1e3a8a, #6d28d9); color: #fff; }
.ai-title { display: flex; gap: 10px; align-items: center; }
.ai-title b { display: block; font-size: 14px; }
.ai-title small { display: block; font-size: 11px; opacity: .85; }
.ai-title small.on { color: #86efac; opacity: 1; }
.ai-spark { font-size: 20px; }
.ai-head-btns { display: flex; gap: 4px; }
.ai-head-btns button { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ai-head-btns button:hover { background: rgba(255,255,255,.3); }
.ai-ctxbar { padding: 6px 12px; font-size: 11.5px; background: #f5f3ff; border-bottom: 1px solid #e5e7eb; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-priv { color: #b45309; }
.ai-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #fafafa; user-select: text; }
.ai-msgs * { user-select: text; -webkit-user-select: text; }
.ai-msg { display: flex; flex-direction: column; gap: 6px; max-width: 94%; }
.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-msg.assistant { align-self: flex-start; }
.ai-bubble { padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.ai-msg.user .ai-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 3px; }
.ai-msg.assistant .ai-bubble { background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 3px; }
.ai-bubble code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.ai-bubble pre { background: #0f172a; color: #e2e8f0; padding: 8px; border-radius: 6px; overflow-x: auto; font-size: 11.5px; margin: 4px 0; }
.ai-bubble ul { margin: 4px 0 4px 18px; }
.ai-typing { display: flex; gap: 4px; padding: 12px 14px; }
.ai-typing span { width: 7px; height: 7px; background: #94a3b8; border-radius: 50%; animation: aiBlink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; } .ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
.ai-actions { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 8px 10px; }
.ai-actions.applied { background: #ecfdf5; border-color: #a7f3d0; }
.ai-actions.rejected { background: #f3f4f6; border-color: #e5e7eb; opacity: .7; }
.ai-actions-h { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: #3730a3; }
.ai-actions ol { margin: 0 0 6px 18px; font-size: 12px; line-height: 1.55; color: #334155; }
.ai-act-btns { display: flex; gap: 6px; align-items: center; }
.ai-act-btns button, .ai-btnrow button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 12px; font-family: inherit; }
.ai-act-btns button.pri, .ai-btnrow button.pri { background: #107c41; border-color: #107c41; color: #fff; font-weight: 600; }
.ai-ok { color: #047857; font-weight: 600; font-size: 12px; } .ai-muted { color: #64748b; font-size: 12px; }
.ai-foot { border-top: 1px solid #e5e7eb; padding: 8px 10px 10px; background: #fff; }
.ai-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.ai-chip { flex: none; border: 1px solid #ddd6fe; background: #f5f3ff; color: #5b21b6; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.ai-chip:hover { background: #ede9fe; }
.ai-inputrow { display: flex; gap: 6px; align-items: flex-end; }
.ai-inputrow textarea { flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 13px; user-select: text; -webkit-user-select: text; outline: none; }
.ai-inputrow textarea:focus { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.15); }
.ai-inputrow button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; font-size: 16px; cursor: pointer; }
.ai-inputrow button:disabled { opacity: .5; cursor: wait; }
.ai-hint { font-size: 10.5px; color: #94a3b8; margin-top: 4px; }
.ai-settings { padding: 12px 14px; overflow-y: auto; font-size: 12.5px; background: #fff; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.ai-settings h4 { margin-top: 4px; font-size: 13px; color: #1e3a8a; }
.ai-settings label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; color: #334155; }
.ai-settings input[type=text], .ai-settings input:not([type]), .ai-settings input[type=password], .ai-settings input[type=number], .ai-settings select { border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 12.5px; user-select: text; outline: none; }
.ai-settings .ai-chk { flex-direction: row; align-items: flex-start; gap: 6px; font-weight: 500; }
.ai-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-note { font-size: 11.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 7px 9px; line-height: 1.5; user-select: text; }
.ai-btnrow { display: flex; gap: 6px; flex-wrap: wrap; }

/* Hızlı işlemler */
.ai-quick { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fafafa; }
.aq-head { padding: 10px 12px 6px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.aq-head input { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 10px; font: inherit; outline: none; user-select: text; }
.aq-head input:focus { border-color: #7c3aed; }
.aq-cats { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.aq-cats button { border: 1px solid #ddd6fe; background: #f5f3ff; color: #5b21b6; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.aq-cats button.on { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.aq-grid { flex: 1; overflow-y: auto; padding: 10px 12px; display: grid; grid-template-columns: 1fr; gap: 6px; align-content: start; }
.aq-card { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; cursor: pointer; position: relative; }
.aq-card:hover { border-color: #7c3aed; box-shadow: 0 2px 8px rgba(124,58,237,.15); }
.aq-ic { font-size: 20px; width: 28px; text-align: center; flex: none; }
.aq-card b { display: block; font-size: 12.5px; color: #1e293b; } .aq-card small { display: block; font-size: 11px; color: #64748b; margin-top: 1px; }
.aq-ai { margin-left: auto; border: 0; background: #ede9fe; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; flex: none; }
.aq-empty { text-align: center; color: #94a3b8; padding: 24px; }
.aq-foot { padding: 7px 12px; font-size: 11px; color: #64748b; background: #fff; border-top: 1px solid #e5e7eb; }
.ai-chip-quick { background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 600; }
.ai-chip-quick:hover { background: #6d28d9; }

.ai-head-btns button.on { background: #fde047; color: #713f12; }
.ai-meta { font-size: 10.5px; color: #94a3b8; margin: -2px 4px 0; }

.ai-head-btns select#aiQuick { background: rgba(255,255,255,.15); border: 0; color: #fff; height: 28px; border-radius: 6px; font-size: 12px; max-width: 96px; cursor: pointer; }
.ai-head-btns select#aiQuick option { color: #111; }

.ai-webrow { display: flex; align-items: center; gap: 6px; padding: 2px 2px 6px; font-size: 12.5px; color: #334155; cursor: pointer; user-select: none; }
.ai-webrow input { accent-color: #107c41; }
.ai-webrow small { color: #94a3b8; }
.ai-bubble a { color: #2563eb; word-break: break-all; }
