/* ============ WhatsApp AI Panel — temel tema (şablon sonra geliştirilecek) ============ */
:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --panel-2: #f8fafb;
  --text: #17212b;
  --muted: #6b7785;
  --line: #e3e8ee;
  --brand: #128c7e;
  --brand-2: #25d366;
  --brand-soft: #e7f6f3;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --danger: #c53030;
  --danger-soft: #fdecec;
  --ok: #1f8a4c;
  --ok-soft: #e6f6ec;
  --bubble-in: #ffffff;
  --bubble-out: #d9fdd3;
  --chat-bg: #efeae2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar: #0f2a2a;
  --sidebar-text: #cfe3df;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1418; --panel: #111b21; --panel-2: #17232b; --text: #e6edf2; --muted: #8a9aa6; --line: #24323b;
    --brand-soft: #0f2e2a; --warn-soft: #3a2c12; --danger-soft: #3a1717; --ok-soft: #12301f;
    --bubble-in: #202c33; --bubble-out: #005c4b; --chat-bg: #0b141a; --sidebar: #0a1f1f;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.25rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
code { background: var(--panel-2); padding: .1rem .35rem; border-radius: 6px; font-size: .85em; word-break: break-all; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 1rem; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }

/* ---------- Yerleşim ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand strong { display: block; color: #fff; font-size: .95rem; }
.brand small { font-size: .75rem; opacity: .8; }
.brand-logo, .login-logo {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; flex-shrink: 0;
}
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.dot.ok { background: var(--brand-2); }
.dot.off { background: #e57373; }
.sidebar nav { padding: .6rem; overflow-y: auto; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: 8px;
  color: var(--sidebar-text); font-size: .92rem; text-decoration: none;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); }
.sidebar nav a.active { background: rgba(37, 211, 102, .16); color: #fff; }
.sidebar nav .ico { width: 1.3rem; text-align: center; }
.sidebar nav .badge { margin-left: auto; }
.sidebar-foot { padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; font-size: .85rem; }
.sidebar-foot a { color: var(--sidebar-text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.4rem; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { margin: 0; }
.topbar-right { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--text); cursor: pointer; }
.content { padding: 1.4rem; display: flex; flex-direction: column; gap: 1.2rem; }

/* ---------- Kart, ızgara ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); min-width: 0; }
.card.super { border-color: #e9c46a; }
.card.muted-card { background: var(--panel-2); box-shadow: none; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline { display: inline-flex; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: .8rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 500; }
label.check, label.radio { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .7rem; width: 100%; min-width: 0;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input.sm { width: 140px; padding: .35rem .5rem; font-size: .85rem; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.toggle-row { flex-direction: row; align-items: flex-start; gap: .7rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; }
.toggle-row input { margin-top: .25rem; }
.toggle-row small { display: block; color: var(--muted); font-weight: 400; margin-top: .15rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-size: .9rem; font-weight: 500;
  padding: .5rem .95rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: #f1c4c4; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { padding: .3rem .6rem; font-size: .82rem; }
.btn.big { padding: .75rem 1.2rem; font-size: 1rem; }

.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge { background: var(--brand-2); color: #06301a; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; }

.alert { padding: .75rem 1rem; border-radius: 10px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button, .chip {
  font: inherit; font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none;
}
.chips button.on, .chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.copybox { display: flex; align-items: center; gap: .5rem; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 8px; padding: .5rem .7rem; margin: .4rem 0; flex-wrap: wrap; }
.copybox span { font-size: .78rem; color: var(--muted); min-width: 140px; }
.copybox code { flex: 1; background: none; }

/* ---------- Tablo, liste ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.table tr.off td { opacity: .55; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--panel-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list li a { display: flex; align-items: center; gap: .75rem; padding: .6rem .3rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.list li a:hover { background: var(--panel-2); }
.list small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }

.thumb { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumb.sm { width: 44px; height: 44px; display: grid; place-items: center; }
.thumb.empty { background: var(--panel-2); }
.thumb-row { display: flex; align-items: center; gap: 1rem; }
.thumb-grid { display: flex; gap: .6rem; flex-wrap: wrap; }
.thumb-pick { width: 110px; font-weight: 400; font-size: .8rem; }
.thumb-pick img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }

/* ---------- Genel bakış ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat b { display: block; font-size: 1.7rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.progress { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: .4rem 0 .8rem; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.steps li.done a { color: var(--muted); text-decoration: line-through; }
.howto { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .45rem; }
.checks { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }

/* ---------- Gelen kutusu ---------- */
.content:has(.inbox) { padding: 0; }
.inbox { display: grid; grid-template-columns: 340px 1fr auto; height: calc(100vh - 58px); background: var(--panel); }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-tools { padding: .7rem; display: flex; flex-direction: column; gap: .5rem; border-bottom: 1px solid var(--line); }
.contacts { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.contacts li { display: flex; gap: .7rem; padding: .7rem .8rem; cursor: pointer; border-bottom: 1px solid var(--line); align-items: center; }
.contacts li:hover { background: var(--panel-2); }
.contacts li.active { background: var(--brand-soft); }
.contacts li.manager { background: linear-gradient(90deg, var(--warn-soft), transparent); }
.c-top, .c-bottom { display: flex; justify-content: space-between; gap: .4rem; align-items: center; }
.c-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-top small { color: var(--muted); font-size: .75rem; flex-shrink: 0; }
.c-bottom small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.c-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; align-items: center; }
.c-tags:empty { display: none; }
.pill.ai { background: #ede9fe; color: #6d28d9; border-color: transparent; }
.cost { font-size: .72rem; font-weight: 600; color: #6d28d9; }
.chips button b { font-weight: 700; margin-left: .15rem; }
.chips button b:empty { display: none; }
.store-pick { padding: .6rem .8rem 0; }
.store-pick label { color: var(--sidebar-text); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.store-pick select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
.store-pick option { color: #000; }
.report-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.report-kpis .stat b { font-size: 1.35rem; }
.pnl td:last-child, .pnl th:last-child { text-align: right; }
.pnl tr.total td { font-weight: 700; border-top: 2px solid var(--text); }
.pnl tr.neg td:last-child { color: var(--danger); }
.bar { height: 8px; background: var(--brand-soft); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar span { display: block; height: 100%; background: var(--brand); }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .55rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; font-weight: 500; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.filter-row { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-row label { min-width: 140px; }
@media (prefers-color-scheme: dark) { .pill.ai { background: #2e1065; color: #c4b5fd; } .cost { color: #c4b5fd; } }

.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--chat-bg); }
.chat-empty { margin: auto; text-align: center; max-width: 440px; padding: 2rem; }
.big-ico { font-size: 3rem; }
.chat-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.chat-head small { display: block; }
.handoff { background: var(--danger-soft); color: var(--danger); padding: .5rem .9rem; display: flex; gap: .6rem; align-items: center; font-size: .88rem; }
.handoff .btn { margin-left: auto; }
.messages { flex: 1; overflow-y: auto; padding: 1rem 6%; display: flex; flex-direction: column; gap: .35rem; }
.typing { padding: .3rem 1rem; font-size: .82rem; color: var(--muted); background: var(--panel); }
.day { text-align: center; margin: .6rem 0; }
.day span { background: var(--panel); color: var(--muted); font-size: .75rem; padding: .2rem .6rem; border-radius: 8px; box-shadow: var(--shadow); }

.msg { max-width: min(72%, 560px); padding: .45rem .65rem .3rem; border-radius: 10px; box-shadow: 0 1px .5px rgba(0,0,0,.13); background: var(--bubble-in); align-self: flex-start; word-wrap: break-word; position: relative; }
.msg.out { background: var(--bubble-out); align-self: flex-end; }
.msg.src-system { background: var(--warn-soft); }
.msg.src-owner { background: #fff4d6; }
.msg.rejected { opacity: .5; text-decoration: line-through; }
.m-label { font-size: .72rem; font-weight: 600; color: var(--brand); margin-bottom: .15rem; }
.m-meta { font-size: .7rem; color: var(--muted); text-align: right; margin-top: .1rem; }
.tick.read { color: #34b7f1; }
.m-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .3rem; margin-bottom: .3rem; }
.m-media a { display: block; text-decoration: none; color: var(--text); font-size: .75rem; }
.m-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.note { align-self: center; max-width: 80%; background: var(--warn-soft); color: var(--text); border: 1px dashed var(--warn); border-radius: 10px; padding: .5rem .8rem; font-size: .85rem; }
.note small { display: block; text-align: right; color: var(--muted); font-size: .7rem; }

.msg.draft { border: 2px dashed var(--warn); background: var(--panel); max-width: min(80%, 600px); }
.draft-head { font-size: .78rem; font-weight: 700; color: var(--warn); margin-bottom: .3rem; }
.draft-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 .2rem; }

.composer { display: flex; gap: .4rem; padding: .6rem; background: var(--panel); border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { resize: none; border-radius: 20px; padding: .55rem .9rem; max-height: 180px; }
.switch { flex-direction: row; align-items: center; gap: .35rem; font-size: .85rem; cursor: pointer; }
.contact-info { width: 280px; border-left: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; }
.only-mobile { display: none; }

/* ---------- Eğitim / test sohbeti ---------- */
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 120px); min-height: 520px; padding-bottom: .8rem; }
.pg { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pg-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .8rem; background: var(--panel-2); border-radius: 10px; }
.pg-messages.wa-bg { background: var(--chat-bg); }
.pg .msg.me { align-self: flex-end; background: var(--brand); color: #fff; }
.pg .msg.me a { color: #fff; }
.pg .msg.bot { align-self: flex-start; }
.pg .msg.in { align-self: flex-end; background: var(--bubble-out); }
.pg .msg.out { align-self: flex-start; background: var(--bubble-in); }
.pg .msg.sys { align-self: center; background: transparent; box-shadow: none; color: var(--muted); font-size: .85rem; }
.pg .msg.error { color: var(--danger); }
.actions { display: flex; flex-direction: column; gap: .2rem; margin-top: .4rem; }
.actions span { font-size: .78rem; background: var(--ok-soft); color: var(--ok); padding: .2rem .5rem; border-radius: 6px; }
.fix-btn { margin-top: .35rem; background: none; border: 0; color: var(--brand); cursor: pointer; font-size: .8rem; padding: 0; }
.starters { display: flex; gap: .4rem; flex-wrap: wrap; padding: .6rem 0; }
.starters button { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: .35rem .7rem; border-radius: 999px; cursor: pointer; }
.starters button:hover { border-color: var(--brand); color: var(--brand); }
.pg-form { display: flex; gap: .5rem; align-items: flex-end; padding-top: .6rem; }
.pg-form textarea { resize: none; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.profile { display: grid; grid-template-columns: 140px 1fr; gap: .45rem .8rem; margin: 0; font-size: .88rem; }
.profile dt { color: var(--muted); font-weight: 600; }
.profile dd { margin: 0; }
.kb { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.kb li { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.kb li.off { opacity: .55; }
.kb summary { cursor: pointer; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.kb form { margin-top: .6rem; }

/* ---------- Şablonlar ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tpl { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.tpl.off { opacity: .6; }
.tpl-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; position: relative; }
.tpl-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.tpl-imgs .more { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: .1rem .4rem; border-radius: 6px; }
.tpl-body { font-size: .86rem; color: var(--muted); margin: 0; }
.tpl-pick { display: flex; flex-direction: column; gap: .3rem; max-height: 220px; overflow-y: auto; }
.tpl-opt { text-align: left; font: inherit; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; }
.tpl-opt.on { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Bağlantı ---------- */
.provider-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.provider-pick .opt { border: 2px solid var(--line); border-radius: 12px; padding: .9rem; cursor: pointer; font-weight: 400; gap: .4rem; }
.provider-pick .opt.on { border-color: var(--brand); background: var(--brand-soft); }
.provider-pick .opt input { display: none; }
.provider-pick .opt span { font-size: .85rem; color: var(--muted); }
.qr-box { display: grid; place-items: center; text-align: center; min-height: 300px; background: var(--panel-2); border-radius: 12px; padding: 1rem; }
.qr-box img { width: 264px; height: 264px; background: #fff; padding: 8px; border-radius: 8px; }

/* ---------- Kayıtlar ---------- */
.logs { list-style: none; padding: 0; margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.logs li { display: grid; grid-template-columns: 150px 60px 1fr; gap: .6rem; padding: .35rem .2rem; border-bottom: 1px solid var(--line); }
.logs .lvl-error b { color: var(--danger); }
.logs .lvl-warn b { color: var(--warn); }
.logs span { word-break: break-word; }

/* ---------- Diyalog, bildirim ---------- */
.dlg { border: 0; border-radius: 14px; padding: 1.2rem; width: min(520px, 94vw); background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dlg::backdrop { background: rgba(10, 20, 25, .45); }
.dlg form { display: flex; flex-direction: column; gap: .7rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; }
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; }
.toast { background: #17212b; color: #fff; padding: .65rem 1rem; border-radius: 10px; font-size: .88rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .5s, transform .5s; max-width: 360px; }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Giriş / kurulum ---------- */
body.bare { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, #0f2a2a, #128c7e); padding: 1rem; }
.bare-wrap { width: 100%; display: grid; place-items: center; }
.bare-card { width: min(420px, 100%); }
.bare-card.wide { width: min(720px, 100%); }
.login-logo { margin-bottom: .8rem; width: 48px; height: 48px; font-size: 1.1rem; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .split, .split.even { grid-template-columns: 1fr; }
  .contact-info { position: fixed; right: 0; top: 0; bottom: 0; background: var(--panel); z-index: 20; box-shadow: -10px 0 30px rgba(0,0,0,.2); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: -260px; z-index: 30; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 10px 0 40px rgba(0,0,0,.35); }
  .menu-btn { display: block; }
  .content { padding: 1rem; }
  .topbar { padding: .7rem 1rem; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 54px); }
  .inbox .chat { display: none; }
  .inbox.has-chat .inbox-list { display: none; }
  .inbox.has-chat .chat { display: flex; }
  .only-mobile { display: inline-flex; }
  .messages { padding: .8rem; }
  .msg { max-width: 88%; }
  .grid2, .provider-pick, .checks { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .logs li { grid-template-columns: 1fr; gap: 0; }
  .chat-card { height: calc(100vh - 100px); }
}
