:root { --ink:#13213a; --ink-2:#24365a; --bg:#f4f6f9; --white:#fff; --line:#dde1e7; --soft:#eef1f5; --steel:#5b6475; --gold:#a0714f; --ok:#1f7a4d; --warn:#9a6700; --err:#b42318; --r:8px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.5 "Manrope", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #c9d2e1; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand img { display: block; height: 34px; width: auto; }
.side .brand { display: block; color: #fff; font: 500 24px "Bodoni Moda", Georgia, serif; text-decoration: none; padding: 4px 10px 18px; }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 6px; color: #c9d2e1; text-decoration: none; }
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.side nav .grp { font-size: 11px; color: #8592a8; padding: 16px 10px 6px; }
.side .cnt { background: var(--gold); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.main { padding: 24px clamp(14px, 3vw, 34px) 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.top h1 { font: 500 28px "Bodoni Moda", Georgia, serif; margin: 0; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 13.5px; white-space: nowrap; }
.btn:hover { background: var(--ink-2); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: #fff; color: var(--err); border-color: #f1c4c0; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; }
.kpi span { color: var(--steel); font-size: 12.5px; }
.kpi b { display: block; font-size: 22px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--steel); }
.kpi.alert { border-color: #f0c9a6; background: #fffaf3; }
table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th { text-align: left; font-size: 12px; color: var(--steel); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
table.t tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--soft); border: 1px solid var(--soft); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--soft); white-space: nowrap; }
.pill.ok { background: #e3f3ea; color: var(--ok); }
.pill.warn { background: #fdf2dc; color: var(--warn); }
.pill.err { background: #fde7e5; color: var(--err); }
.pill.blue { background: #e6edf8; color: var(--ink); }
.muted { color: var(--steel); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--steel); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
input, select, textarea { font: inherit; color: inherit; }
.filters input, .filters select, .f input, .f select, .f textarea { height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: #fff; min-width: 0; }
.f textarea { height: auto; padding: 10px; min-height: 90px; width: 100%; resize: vertical; }
.f { display: grid; gap: 4px; }
.f label { font-size: 12.5px; font-weight: 600; }
.f small { color: var(--steel); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cols, .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } .side { position: static; height: auto; } .side nav { display: flex; flex-wrap: wrap; gap: 4px; } .side nav .grp { display: none; } .cols, .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.flash { background: #e8f5ee; color: var(--ok); border: 1px solid #c7e6d4; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.inline-edit { width: 110px; height: 32px; border: 1px solid transparent; border-radius: 6px; padding: 0 8px; background: transparent; text-align: right; font-variant-numeric: tabular-nums; }
.inline-edit:hover { border-color: var(--line); background: #fff; }
.inline-edit:focus { border-color: var(--ink); background: #fff; outline: none; }
.inline-edit.saved { border-color: var(--ok); }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; }
.bulk input, .bulk select { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.imgs figure { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: grab; }
.imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.imgs button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); cursor: pointer; color: var(--err); font-weight: 700; }
.imgs figure:first-child::after { content: "Kapak"; position: absolute; left: 4px; bottom: 4px; background: var(--ink); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.spec-row { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 6px; margin-bottom: 6px; }
.spec-row input { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 20px; }
.tree > ul { padding: 0; }
.tree li { padding: 6px 0; border-bottom: 1px solid var(--soft); }
.tree .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); height: calc(100vh - 130px); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--soft); text-decoration: none; }
.chat-list a.on { background: var(--soft); }
.chat-list b { display: flex; justify-content: space-between; }
.chat-list small { color: var(--steel); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv { display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; background: #efeae2; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 10px; background: #fff; white-space: pre-line; }
.msg.visitor { align-self: flex-start; }
.msg.bot { align-self: flex-start; background: #f2f4f7; color: var(--steel); }
.msg.admin { align-self: flex-end; background: #d9fdd3; }
.msg small { display: block; font-size: 11px; color: var(--steel); }
.chat-reply { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-reply select { max-width: 190px; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: #fff; }
.chat-reply input { height: 40px; border: 1px solid var(--line); border-radius: 20px; padding: 0 14px; }
@media (max-width: 760px) { .chat-layout { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 260px; } .chat-msgs { min-height: 360px; } }
.progress { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.progress div { height: 100%; background: var(--ink); width: 0; transition: width .4s; }
pre.log { background: #0f1a2e; color: #d5deec; padding: 12px; border-radius: 6px; max-height: 280px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--ink); }
.login form { background: #fff; padding: 30px; border-radius: 12px; width: min(380px, 92vw); display: grid; gap: 14px; }
.login h1 { font: 500 30px "Bodoni Moda", Georgia, serif; margin: 0 0 6px; }
.err { color: var(--err); }
.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--soft); font-size: 13px; }
.bar { height: 8px; background: var(--ink); border-radius: 4px; }
details.log summary { cursor: pointer; color: var(--steel); }

.lock { font-size: 12px; margin-left: 2px; cursor: help; }
/* yapay zekâ */
.ai-card { border-color: #cfdaf5; background: linear-gradient(180deg, #f7f9ff, #fff 60%); margin-bottom: 16px; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.agent { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; align-content: start; }
.agent h3 { margin: 0; font: 600 16px/1.3 inherit; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.agent p { margin: 0; color: var(--steel); font-size: 13.5px; line-height: 1.5; }
.agent .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.agent details summary { cursor: pointer; font-size: 13px; color: var(--steel); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff > div { background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.diff .after { background: #f3fbf5; border-color: #cde8d4; }
.act { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
.act-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.act.busy { opacity: .5; pointer-events: none; }
.chat-ai { display: grid; grid-template-rows: 1fr auto; height: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.chat-ai .msgs { overflow: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.chat-ai .m { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.chat-ai .m.user { justify-self: end; background: var(--ink); color: #fff; }
.chat-ai .m.assistant { background: #f1f3f7; }
.chat-ai form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-ai input { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 21px; padding: 0 14px; }
.kw-table td { font-size: 13px; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 7px; border-radius: 10px; background: #eef1f6; color: var(--steel); margin: 1px; }
