:root {
    --side: #111827;
    --side-2: #1f2937;
    --bg: #f5f6fa;
    --line: #e5e7eb;
    --muted: #6b7280;
    --accent: #4f46e5;
}

html, body { height: 100%; }
body { background: var(--bg); font-size: 15px; color: #111827; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app { display: flex; min-height: 100vh; }
.side {
    width: 240px; flex: 0 0 240px; background: var(--side); color: #e5e7eb;
    display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; color: #fff; margin-bottom: 22px; text-decoration: none !important; }
.brand small { display: block; color: #9ca3af; font-size: 12px; }
.side .brand { flex-direction: column; align-items: stretch; gap: 6px; }
.side .brand small { text-align: center; }
.brand-logo { display: block; width: 100%; background: #fff; border-radius: 10px; padding: 6px 8px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #0ea5e9); color: #fff;
}
.side nav a { display: block; padding: 9px 12px; border-radius: 8px; color: #d1d5db; margin-bottom: 2px; text-decoration: none; }
.side nav a:hover { background: var(--side-2); color: #fff; }
.side nav a.active { background: #312e81; color: #fff; }
.side-foot { margin-top: auto; border-top: 1px solid #374151; padding-top: 12px; }
.side-foot a, .side-foot button { color: #9ca3af !important; }

.main { flex: 1; padding: 24px 28px; min-width: 0; }

@media (max-width: 991px) {
    .side { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
    .side.open { left: 0; }
    .main { padding: 14px; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; }

.card { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; }
.stat { padding: 16px 18px; }
.stat .v { font-size: 1.6rem; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: #eef0f5; border-radius: 12px; padding: 10px; min-height: 120px; }
.col h6 { font-size: 13px; font-weight: 700; text-transform: uppercase; color: #4b5563; display: flex; justify-content: space-between; }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: block; color: inherit; }
.tcard:hover { border-color: #a5b4fc; text-decoration: none; }
.tcard .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tcard .m { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 6px; }
.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Ajan kartları */
.agent-avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: 0 0 44px; }
.chip { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; margin: 0 4px 4px 0; }

/* Markdown çıktısı */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.2rem; }
.md h2 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.md pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; font-size: 13px; overflow-x: auto; }
.md code { font-size: 13px; }
.md :not(pre) > code { background: #eef2ff; color: #3730a3; padding: 1px 5px; border-radius: 4px; }
.md table { border-collapse: collapse; margin: 10px 0; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 9px; }
.md blockquote { border-left: 3px solid #f59e0b; padding: 4px 12px; background: #fffbeb; color: #78350f; }

/* Çalıştırma adımları */
.steps { font-size: 13px; }
.step { border-left: 3px solid var(--line); padding: 6px 10px 6px 12px; margin-bottom: 6px; background: #fff; border-radius: 0 8px 8px 0; }
.step .h { font-size: 12px; color: var(--muted); }
.step pre { white-space: pre-wrap; margin: 4px 0 0; font-size: 12px; max-height: 260px; overflow: auto; background: #f8fafc; padding: 6px 8px; border-radius: 6px; }
.step.Text { border-color: #6366f1; }
.step.ToolCall { border-color: #0ea5e9; }
.step.ToolResult { border-color: #10b981; }
.step.Error { border-color: #ef4444; background: #fef2f2; }
.step.Info { border-color: #9ca3af; background: #f9fafb; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #111827, #312e81); }
.login-card { width: 100%; max-width: 380px; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
