/* Milet Mesaj Asistanı — panel stili.
   Renkler ve ölçüler Milet UI kit token'larından (docs/ui-kit/ui-kit.html): koyu tema varsayılan,
   açık tema sistem tercihine göre. */

:root {
  color-scheme: dark;
  --bg: #0A0A0A;
  --surface: #121212;
  --card: #1A1A1C;
  --card-2: #232326;
  --elevated: #2C2C2C;
  --border: #27272A;
  --border-2: #3F3F46;
  --text: #F2F3F5;
  --text-2: #A1A1AA;
  --text-3: #71717A;
  --brand: #0A84FF;
  --brand-soft: rgba(10, 132, 255, .14);
  --accent: #00E5FF;
  --success: #30D158;
  --success-soft: rgba(48, 209, 88, .14);
  --danger: #FF453A;
  --danger-soft: rgba(255, 69, 58, .14);
  --warning: #FF9F0A;
  --warning-soft: rgba(255, 159, 10, .14);
  --info: #8E8CF5;
  --info-soft: rgba(94, 92, 230, .18);
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SFMono-Regular', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F0F2F5;
    --surface: #F7F9FC;
    --card: #FFFFFF;
    --card-2: #F2F4F7;
    --elevated: #FFFFFF;
    --border: #E1E4E8;
    --border-2: #CBD2D9;
    --text: #1A1D1E;
    --text-2: #5A6B7C;
    --text-3: #8A96A3;
    --brand: #007AFF;
    --brand-soft: rgba(0, 122, 255, .10);
    --accent: #0097B2;
    --success: #047857;
    --success-soft: rgba(5, 150, 105, .10);
    --danger: #DC2626;
    --danger-soft: rgba(220, 38, 38, .08);
    --warning: #B45309;
    --warning-soft: rgba(255, 149, 0, .12);
    --info: #5856D6;
    --info-soft: rgba(88, 86, 214, .10);
    --shadow: 0 2px 10px rgba(16, 24, 40, .06);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.xsmall { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.text-danger { color: var(--danger); }
.link { color: var(--brand); text-decoration: none; }
.icon { flex-shrink: 0; }
.h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ---------- Düzen ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; padding: 4px 8px 18px; }
.brand b { font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--card-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); }
.nav-button { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-foot form { margin: 0; }
.sidebar-scrim { display: none; }
.main { min-width: 0; }
.topbar { display: none; }
.content { padding: 28px 32px 64px; max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.page-head p { margin: 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back-link { display: inline-block; color: var(--text-2); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.back-link:hover { color: var(--text); }

/* ---------- Kartlar ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head .h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.align-start { align-items: start; }
.narrow-card { max-width: 520px; }
.callout { display: flex; gap: 14px; align-items: flex-start; }
.callout > .icon { color: var(--brand); margin-top: 2px; }
.checklist { margin: 8px 0 0; padding-left: 18px; }
.checklist li { margin: 4px 0; color: var(--text-2); font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--text-2); font-size: 12.5px; }
.stats-note { margin: 0 0 18px; }

.kv-list { list-style: none; padding: 0; margin: 0 0 12px; }
.kv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv-list li:last-child { border-bottom: 0; }
.kv-list span { color: var(--text-2); }
.attention { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--warning-soft); color: var(--warning); text-decoration: none; margin-top: 8px; font-size: 13px; }
.attention span { color: var(--text); }

.onboarding .steps { margin: 0 0 16px; padding-left: 20px; }
.onboarding .steps li { margin: 8px 0; }
.onboarding .steps li b { display: block; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border-bottom: 0; }
.activity-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); }
.activity-icon.type-dm_sent, .activity-icon.type-link_sent { background: var(--brand-soft); color: var(--brand); }
.activity-icon.type-failed { background: var(--danger-soft); color: var(--danger); }
.activity-text { flex: 1; font-size: 13.5px; min-width: 0; }

.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.empty .icon { color: var(--text-3); }
.empty .h3 { color: var(--text); justify-content: center; margin: 0; }
.empty p { margin: 0; max-width: 460px; }
.empty.small { padding: 24px 12px; font-size: 13px; }

/* ---------- Sütun grafiği (tek seri; dataviz kurallarına göre: ≤24px, 2px aralık, 4px uç) ---------- */
.col-chart { position: relative; padding-top: 6px; }
.col-chart-max { position: absolute; top: 0; left: 0; }
.col-chart-plot { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 22px; border-bottom: 1px solid var(--border-2); }
.col-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.col-bar { width: 100%; max-width: 24px; background: var(--brand); border-radius: 4px 4px 0 0; transition: filter .15s; }
.col-slot:hover .col-bar { filter: brightness(1.18); }
.col-chart-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.table-toggle { margin-top: 12px; }
.table-toggle summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.tooltip { position: fixed; z-index: 60; background: var(--elevated); color: var(--text); border: 1px solid var(--border-2); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font: 600 14px var(--font); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s, color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--card-2); color: var(--text); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.danger, .icon-btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; background: transparent; border: 0; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn.is-copied { color: var(--success); }

/* ---------- Form ---------- */
.input, .select, .textarea { width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-sm); color: var(--text); font: inherit; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-sm, .select-sm { padding: 6px 10px; font-size: 13px; }
.select-sm { width: auto; }
.textarea { resize: vertical; min-height: 70px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.compact { margin-bottom: 0; }
.label { font-weight: 500; font-size: 13px; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-2); }
.field-error { color: var(--danger); font-size: 12.5px; margin: 0; }
.field-row { display: flex; gap: 14px; align-items: flex-start; }
.field-row > .field { flex: 1; min-width: 0; }
.field-row > .narrow { flex: 0 0 220px; }
/* Satırdaki anahtar, yanındaki alanın etiketiyle değil giriş kutusuyla hizalanır (etiket 20px + 6px boşluk; kutu ~44px). */
.field-row > .switch-field { margin: 26px 0 14px; min-height: 44px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; margin: 6px 0 4px; }
.inline-form .input { width: 110px; }
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar .input { max-width: 260px; }
.inline-filter { margin: 0; }

.switch-field { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 4px 0 14px; user-select: none; }
.switch-field input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 40px; height: 24px; border-radius: 999px; background: var(--border-2); position: relative; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-field input:checked + .switch { background: var(--brand); }
.switch-field input:checked + .switch::after { transform: translateX(16px); }
.switch-field input:focus-visible + .switch { box-shadow: 0 0 0 3px var(--brand-soft); }

.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border-2); border-radius: 14px; cursor: pointer; height: 100%; transition: border-color .15s, background .15s; }
.radio-card-body .icon { color: var(--text-2); margin-bottom: 4px; }
.radio-card input:checked + .radio-card-body { border-color: var(--brand); background: var(--brand-soft); }
.radio-card input:checked + .radio-card-body .icon { color: var(--brand); }
.radio-card input:focus-visible + .radio-card-body { box-shadow: 0 0 0 3px var(--brand-soft); }

.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 4px; margin: 14px 0 10px; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--card-2); color: var(--text); font-weight: 600; }

.radio-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio-row input { accent-color: var(--brand); margin-top: 4px; }
.radio-row > span { display: flex; flex-direction: column; }
.radio-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; margin-right: 10px; }
.form-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.form-preview { position: sticky; top: 24px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Formda tetikleyiciye göre gösterilen bölümler (başlangıç durumu sunucudan gelir) */
.automation-form:not([data-trigger="comment"]) .when-comment { display: none; }
.automation-form:not([data-scope="selected"]) .when-selected { display: none; }
.automation-form:not([data-flow="two_step"]) .when-two-step { display: none; }
.automation-form[data-flow="none"] .when-link { display: none; }
.automation-form[data-mode="any"] .when-keywords { display: none; }
.automation-form:not([data-mode="any"]) .when-any { display: none; }

/* Gönderi seçici */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.media-item { position: relative; display: block; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--card-2); }
.media-item input { position: absolute; opacity: 0; }
.media-item img, .media-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--card-2); }
.media-thumb { display: grid; place-items: center; color: var(--text-3); }
.media-cap { font-size: 11.5px; padding: 6px 8px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-item:has(input:checked) { border-color: var(--brand); }
.media-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .45); border: 2px solid #fff; }
.media-item:has(input:checked) .media-check { background: var(--brand); }
.media-status { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; padding: 10px 0; }

/* Telefon önizlemesi */
.phone { border: 1px solid var(--border-2); border-radius: 30px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.phone-body { padding: 16px 14px; min-height: 440px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.pv-label { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.pv-comment { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.pv-reply { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border-2); color: var(--text-2); font-size: 12.5px; }
.pv-bubble { max-width: 86%; padding: 10px 12px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.pv-in { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.pv-out { align-self: flex-start; background: var(--card-2); color: var(--text); border-bottom-left-radius: 6px; }
.pv-buttons { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pv-button { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px; text-align: center; font-weight: 600; color: var(--brand); font-size: 13px; }
.pv-note { align-self: center; font-size: 11.5px; color: var(--text-2); }
.preview-note { margin-top: 10px; text-align: center; }

/* ---------- Rozet, chip, durum ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--card-2); color: var(--text-2); }
.badge-info { background: var(--info-soft); color: var(--info); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); font-size: 12.5px; margin: 2px 4px 2px 0; }
.chip-muted { color: var(--text-2); }
.status-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); border-radius: 999px; padding: 4px 12px 4px 9px; background: transparent; color: var(--text-2); font: 500 13px var(--font); cursor: pointer; }
.status-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status-toggle.is-on { color: var(--success); border-color: transparent; background: var(--success-soft); }
.status-toggle.is-on .dot { background: var(--success); }

/* ---------- Bildirim ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid transparent; }
.flash span { flex: 1; color: var(--text); }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warning, .flash-info { background: var(--warning-soft); color: var(--warning); }
.flash-close { background: none; border: 0; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 2px; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 8px 10px; }
.table form { margin: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-title { font-weight: 600; color: var(--text); text-decoration: none; }
.row-title:hover { color: var(--brand); }
.row-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.actions-col { width: 1%; white-space: nowrap; }
.wrap-cell { max-width: 420px; }
.code-snippet { font-family: var(--mono); font-size: 12px; color: var(--text-2); word-break: break-all; display: block; max-height: 120px; overflow: auto; white-space: pre-wrap; }
pre.code { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 8px 0 0; }
.row-menu { position: relative; }
.row-menu summary { list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-body { position: absolute; right: 0; top: 38px; width: 260px; background: var(--elevated); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); z-index: 10; display: flex; flex-direction: column; gap: 10px; }
.pagination { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 16px 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 10px 14px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; font-weight: 500; }
.tab.is-active { color: var(--text); border-bottom-color: var(--brand); }
.tab-right { margin-left: auto; }

/* ---------- Hesaplar ---------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.account-card { margin-bottom: 0; }
.account-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.account-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.error-note { color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: 10px; margin: 0 0 10px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card-actions form { margin: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1DFFE6, #0A84FF); color: #0A1016; font-weight: 700; display: inline-grid; place-items: center; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }

/* ---------- Gelen kutusu ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 190px); min-height: 520px; }
.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; }
.inbox-search { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 1; }
.inbox-search .input { flex: 1; min-width: 0; }
.conversation { display: flex; gap: 10px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.conversation:hover { background: var(--card-2); }
.conversation.is-active { background: var(--brand-soft); }
.conversation-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.bubble-row { display: flex; }
.bubble-row.out { justify-content: flex-end; }
.bubble { max-width: 72%; padding: 9px 13px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.bubble-row.out .bubble { background: var(--brand-soft); border-color: transparent; }
.bubble.kind-comment { border-style: dashed; }
.bubble-kind { font-size: 11px; color: var(--text-2); font-weight: 600; }
.bubble-text { font-size: 14px; word-break: break-word; }
.bubble-time { font-size: 11px; color: var(--text-3); align-self: flex-end; }
.composer { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; margin: 0; }
.composer .textarea { flex: 1; min-height: 44px; }
.composer-closed { margin: 0; display: flex; gap: 6px; align-items: center; }

/* ---------- Kurulum ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 12px; }
.check-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.check-list li > span:last-child { display: flex; flex-direction: column; }
.check-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.check-list .ok .check-icon { background: var(--success-soft); color: var(--success); }
.check-list .todo .check-icon { background: var(--warning-soft); color: var(--warning); }
.copy-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 4px 4px 12px; }
.copy-field code { flex: 1; word-break: break-all; font-size: 12.5px; }

/* ---------- Herkese açık sayfalar ---------- */
.public-body { min-height: 100vh; display: flex; flex-direction: column; }
.public-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }
.public-head .brand { padding: 0; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 6px 10px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 13px; }
.lang-switch a.is-active { background: var(--card-2); color: var(--text); }
.public-main { flex: 1; padding: 20px; }
.auth-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; }
.error-card { text-align: center; }
.error-code { font-size: 64px; font-weight: 700; background: linear-gradient(90deg, #1DFFE6, #0A84FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.legal { max-width: 820px; margin: 10px auto 40px; padding: 32px; }
.legal h1 { font-size: 28px; margin: 0 0 4px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; }
.legal b { color: var(--text); }
.public-foot { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 22px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--border); }
.public-foot a { color: var(--text-2); }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
  .topbar .brand { padding: 0; }
  .content { padding: 20px 16px 60px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .form-columns { grid-template-columns: 1fr; }
  .form-preview { position: static; }
  .radio-cards { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--border); }
  .thread { max-height: 60vh; }
  .field-row { flex-direction: column; gap: 0; align-items: stretch; }
  .field-row > .narrow { flex: auto; width: 100%; }
  .field-row > .switch-field { margin: 4px 0 14px; min-height: 0; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table.responsive td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 16px; border: 0; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--text-2); font-size: 12px; text-align: left; }
  .table.responsive td.actions-col { width: auto; justify-content: flex-end; }
  .table.responsive td.actions-col::before { content: none; }
  .page-head h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
