/* ============ Tokenlar ============ */
:root {
  color-scheme: light;
  --bg: #f3f4f6; --panel: #ffffff; --panel-2: #f8f9fb; --panel-3: #eef0f4;
  --text: #161a23; --text-2: #4a5263; --muted: #7a8296;
  --line: #e3e6ec; --line-strong: #d3d7df;
  --accent: #b4232f; --accent-2: #8f1a24; --accent-soft: #fbeced; --accent-ink: #ffffff;
  --ok: #17803d; --ok-soft: #e7f5ec; --warn: #a86200; --warn-soft: #fdf3e2; --bad: #c0262d; --bad-soft: #fdecec;
  --info: #2a62b8; --info-soft: #e9f0fb;
  --series-in: #2a78d6; --series-out: #eb6834; --grid: #eceef2;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06); --shadow: 0 12px 40px rgba(16,24,40,.16);
  --r: 10px; --r-sm: 7px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115; --panel: #171a20; --panel-2: #1c2027; --panel-3: #232831;
    --text: #e8eaf0; --text-2: #b9bfcc; --muted: #8a92a3;
    --line: #272c35; --line-strong: #343a45;
    --accent: #e3525d; --accent-2: #f07079; --accent-soft: #2c1b1e; --accent-ink: #ffffff;
    --ok: #3fbf6f; --ok-soft: #14261b; --warn: #e0a030; --warn-soft: #2a2213; --bad: #f06a6a; --bad-soft: #2d1919;
    --info: #6ea2f0; --info-soft: #172235;
    --series-in: #3987e5; --series-out: #d95926; --grid: #252a33;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 16px 48px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115; --panel: #171a20; --panel-2: #1c2027; --panel-3: #232831;
  --text: #e8eaf0; --text-2: #b9bfcc; --muted: #8a92a3;
  --line: #272c35; --line-strong: #343a45;
  --accent: #e3525d; --accent-2: #f07079; --accent-soft: #2c1b1e; --accent-ink: #ffffff;
  --ok: #3fbf6f; --ok-soft: #14261b; --warn: #e0a030; --warn-soft: #2a2213; --bad: #f06a6a; --bad-soft: #2d1919;
  --info: #6ea2f0; --info-soft: #172235;
  --series-in: #3987e5; --series-out: #d95926; --grid: #252a33;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 16px 48px rgba(0,0,0,.55);
}

/* ============ Temel ============ */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--bad); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
input, button, textarea, select { font: inherit; color: inherit; }
input, textarea, select { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; padding: 0; box-shadow: none; cursor: pointer; }
kbd { font: 11px ui-monospace, Consolas, monospace; background: var(--panel-3); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; }

.btn { border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--r-sm); padding: 7px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .12s, border-color .12s; text-decoration: none; }
.btn:hover { background: var(--panel-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-3); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 16px; width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 6px; font-size: 13px; }
.sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; letter-spacing: .3px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; }
.chip.ok { color: var(--ok); background: var(--ok-soft); }
.chip.bad { color: var(--bad); background: var(--bad-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.chip.none { color: var(--muted); background: var(--panel-3); }
.chip.info { color: var(--info); background: var(--info-soft); }

/* ============ Giriş ============ */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(1200px 600px at 20% 10%, #c8303b 0%, #8f1a24 45%, #4d0e14 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.55) 1.2px, transparent 1.6px), radial-gradient(rgba(255,255,255,.3) 1px, transparent 1.4px); background-size: 46px 46px, 23px 23px; background-position: 0 0, 11px 17px; opacity: .35; pointer-events: none; }
.login-art h2 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; max-width: 420px; position: relative; z-index: 1; }
.login-art p { opacity: .85; max-width: 420px; position: relative; z-index: 1; }
.login-art .brand-big { position: relative; z-index: 1; }
.login-side { display: grid; place-items: center; padding: 24px 16px; background: var(--panel); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login-card h1 { font-size: 24px; margin: 0; }
.brand-big { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 17px; flex: none; }
.login-art .logo { background: rgba(255,255,255,.16); }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* ============ Yerleşim ============ */
.app { display: grid; grid-template-columns: 248px 390px 1fr; height: 100vh; }
.app.page-mode { grid-template-columns: 248px 1fr; }
.app.page-mode .list { display: none; }

.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px; }
.brand b { display: block; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.compose-btn { justify-content: center; padding: 10px; font-size: 14px; }
nav { display: grid; gap: 1px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); padding: 12px 12px 4px; font-weight: 700; }
nav a { padding: 7px 12px; border-radius: var(--r-sm); cursor: pointer; display: flex; gap: 10px; align-items: center; user-select: none; color: var(--text-2); }
nav a .ico { width: 18px; text-align: center; font-size: 15px; }
nav a .badge { margin-left: auto; }
nav a:hover { background: var(--panel-3); color: var(--text); }
nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { background: var(--accent); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; font-weight: 700; line-height: 18px; min-width: 20px; text-align: center; }
.badge:empty { display: none; }
.badge.warn { background: var(--warn); }
.badge.soft { background: var(--panel-3); color: var(--text-2); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.side-foot .who { min-width: 0; flex: 1; font-size: 12px; }
.side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* ============ Liste ============ */
.list { background: var(--panel-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.list-head { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.search { flex: 1; position: relative; min-width: 0; }
.search input { width: 100%; padding-left: 32px; background: var(--panel-2); }
.search::before { content: "⌕"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.list-title { display: flex; gap: 10px; align-items: center; padding: 10px 14px; min-height: 48px; border-bottom: 1px solid var(--line); }
.list-title h2 { font-size: 16px; margin: 0; }
.list-title .right { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bulkbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.bulkbar b { font-size: 13px; margin-right: 4px; }
.items { flex: 1; overflow-y: auto; }
.group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 12px 14px 6px; background: var(--panel-2); position: sticky; top: 0; z-index: 1; }
.item { padding: 10px 14px 10px 10px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; grid-template-columns: 22px 34px 1fr; gap: 10px; align-items: start; position: relative; background: var(--panel-2); }
.item:hover { background: var(--panel); }
.item.sel { background: var(--accent-soft); }
.item.checked { background: var(--info-soft); }
.item .chk { margin-top: 9px; opacity: .35; }
.item:hover .chk, .item.checked .chk, .items.selecting .chk { opacity: 1; }
.item .body { min-width: 0; display: grid; gap: 1px; }
.item .row1 { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.item .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.item .date { color: var(--muted); font-size: 12px; white-space: nowrap; display: flex; gap: 5px; align-items: center; }
.item .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.item .snip { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.unread .who, .item.unread .subj { font-weight: 700; color: var(--text); }
.item.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.item .star { color: #e2a400; }
.tag { font-size: 11px; padding: 0 7px; border-radius: 10px; margin-left: 6px; font-weight: 600; line-height: 18px; display: inline-block; vertical-align: 1px; }
.tag.queued { color: var(--warn); background: var(--warn-soft); } .tag.sent { color: var(--ok); background: var(--ok-soft); } .tag.failed, .tag.partial { color: var(--bad); background: var(--bad-soft); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: 12px; }
.list-empty { padding: 60px 24px; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.list-empty .big { font-size: 34px; opacity: .6; }
.skeleton { height: 64px; margin: 8px 12px; border-radius: 8px; background: linear-gradient(90deg, var(--panel-3), var(--panel), var(--panel-3)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ============ Okuma ============ */
.reader { background: var(--panel); overflow-y: auto; min-width: 0; min-height: 0; }
.empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.empty .big { font-size: 44px; opacity: .5; }
.msg-actions { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; align-items: center; }
.msg-head { padding: 20px 24px 12px; }
.msg-head h1 { font-size: 21px; line-height: 1.3; margin: 0 0 16px; word-break: break-word; }
.sender { display: flex; gap: 12px; align-items: flex-start; }
.sender .info { min-width: 0; flex: 1; font-size: 13px; }
.sender .info .name { font-size: 14px; }
.sender .info .addr { color: var(--muted); }
.sender .when { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }
.details { margin-top: 10px; font-size: 12.5px; color: var(--text-2); display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; word-break: break-word; }
.authrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.banner { margin: 0 24px 12px; padding: 11px 14px; border-radius: var(--r-sm); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner .btn { margin-left: auto; }
.msg-frame { width: 100%; border: 0; min-height: 200px; display: block; background: #fff; }
.frame-wrap { margin: 0 24px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.msg-text { margin: 0 24px; padding: 18px 20px; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); border-radius: var(--r); }
.atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 24px 14px; }
.att { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; text-decoration: none; color: inherit; display: inline-flex; gap: 10px; align-items: center; background: var(--panel-2); max-width: 280px; }
.att:hover { border-color: var(--line-strong); background: var(--panel-3); }
.att .fi { font-size: 20px; }
.att .meta { min-width: 0; display: grid; }
.att .meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att .x { cursor: pointer; color: var(--bad); border: 0; background: none; font-size: 14px; }
.delivery { margin: 0 24px 14px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.delivery .dh { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.delivery ul { list-style: none; margin: 0; padding: 6px 0; }
.delivery li { padding: 6px 14px; font-size: 12.5px; display: grid; grid-template-columns: 20px 1fr; gap: 6px; word-break: break-word; }
.delivery li.ok { color: var(--ok); } .delivery li.bad { color: var(--bad); } .delivery li.warn { color: var(--warn); }
.quick { margin: 18px 24px 28px; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.quick textarea { width: 100%; border: 0; border-radius: 0; min-height: 64px; resize: vertical; box-shadow: none !important; display: block; }
.quick .qf { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--panel-2); border-top: 1px solid var(--line); font-size: 12px; }
.quick .qf .btn:first-of-type { margin-left: auto; }

/* ============ Sayfalar ============ */
.page { padding: 28px 32px 48px; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .right { margin-left: auto; display: flex; gap: 6px; }
.page h3 { margin: 0 0 12px; font-size: 15px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); margin-bottom: 14px; }
.stat { padding: 14px 16px; cursor: default; }
.stat.click { cursor: pointer; }
.stat.click:hover { border-color: var(--line-strong); }
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); }
.two { grid-template-columns: 2fr 1fr; margin-bottom: 14px; }
.three { grid-template-columns: repeat(3, 1fr); }
.page .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 14px; }

/* grafik */
.viz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.viz-head h3 { margin: 0; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-head .btn { margin-left: auto; }
.chart { position: relative; height: 230px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover, .chart .hit.on { fill: var(--panel-3); opacity: .6; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; z-index: 3; transform: translate(-50%, -100%); }
.tip b { display: block; margin-bottom: 2px; }
.tip .r { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.tbl td.n, table.tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }

.rowlist { display: grid; }
.rowlist .r { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rowlist .r:last-child { border-bottom: 0; }
.rowlist .r .t { min-width: 0; flex: 1; }
.rowlist .r .t b, .rowlist .r .t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowlist .r .t span { color: var(--muted); font-size: 12.5px; }
.rowlist .r.click { cursor: pointer; }
.rowlist .r.click:hover .t b { color: var(--accent); }
.bar { height: 6px; background: var(--panel-3); border-radius: 3px; overflow: hidden; width: 80px; flex: none; }
.bar i { display: block; height: 100%; background: var(--series-in); border-radius: 3px; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .s { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.checklist .s.ok { background: var(--ok-soft); color: var(--ok); }
.checklist .s.todo { background: var(--panel-3); color: var(--muted); }
.checklist .s.bad { background: var(--bad-soft); color: var(--bad); }
.checklist small { display: block; color: var(--muted); }

.health { display: grid; gap: 0; }
.health .h { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.health .h:last-child { border-bottom: 0; }

.dns { width: 100%; border-collapse: collapse; font-size: 13px; }
.dns th, .dns td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dns th { color: var(--muted); font-weight: 600; font-size: 12px; }
.dns code, code.c { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--panel-3); padding: 2px 6px; border-radius: 4px; display: inline-block; max-width: 100%; }
.copy { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 6px; font-size: 11px; cursor: pointer; padding: 2px 8px; margin-left: 4px; color: var(--text-2); }
.copy:hover { background: var(--panel-3); }

.form-grid { display: grid; gap: 8px; max-width: 560px; }
.form-grid label { font-weight: 600; font-size: 13px; margin-top: 6px; }
.form-grid textarea { min-height: 100px; resize: vertical; }
.form-grid .hint { font-size: 12px; color: var(--muted); margin-top: -4px; }
.tpl { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: grid; gap: 6px; background: var(--panel-2); }
.tpl input { font-weight: 600; }
.tpl textarea { min-height: 90px; }
.tpl .tf { display: flex; justify-content: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 7px 14px; cursor: pointer; border-right: 1px solid var(--line-strong); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.logbox { background: #0d1014; color: #c9d1d9; border-radius: var(--r); padding: 12px 14px; font: 12px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; height: calc(100vh - 230px); min-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.logbox .l-in { color: #79c0ff; } .logbox .l-out { color: #ffa657; } .logbox .l-err { color: #ff7b72; } .logbox .l-ok { color: #7ee787; } .logbox .l-dim { color: #6e7681; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }

/* ============ Yazma penceresi ============ */
.composer { position: fixed; inset: 0; background: rgba(10,12,18,.5); display: grid; place-items: center; padding: 16px; z-index: 20; }
.composer-card { background: var(--panel); width: 100%; max-width: 820px; max-height: 100%; border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.composer-card.drag::after { content: "Dosyaları buraya bırak"; position: absolute; inset: 0; background: rgba(180,35,47,.12); border: 2px dashed var(--accent); border-radius: 14px; display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: 18px; }
.composer-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.composer-head .st { font-size: 12px; color: var(--muted); margin-left: 10px; font-weight: 400; }
.field { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 0 16px; gap: 6px; }
.field label { width: 52px; color: var(--muted); font-size: 13px; flex: none; }
.field input { flex: 1; border: 0; border-radius: 0; padding: 11px 4px; background: transparent; box-shadow: none !important; min-width: 0; }
.toolbar { display: flex; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.toolbar button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 9px; cursor: pointer; min-width: 30px; }
.toolbar button:hover { border-color: var(--line); background: var(--panel-3); }
.toolbar select { padding: 4px 8px; font-size: 13px; margin-left: auto; }
.editor { min-height: 260px; max-height: 52vh; overflow-y: auto; padding: 14px 18px; outline: none; line-height: 1.6; }
.editor:empty::before { content: "İletini yaz…"; color: var(--muted); }
.editor blockquote { margin: 0 0 0 4px; padding-left: 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.composer .atts { padding: 8px 16px 0; }
.composer-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.composer-foot .hint { margin-left: auto; font-size: 12px; color: var(--muted); }

.modal { position: fixed; inset: 0; background: rgba(10,12,18,.5); display: grid; place-items: center; padding: 16px; z-index: 25; }
.modal .card { max-width: 520px; width: 100%; box-shadow: var(--shadow); }
.kb { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 13px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1d2330; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; box-shadow: var(--shadow); max-width: calc(100% - 32px); display: flex; gap: 12px; align-items: center; }
.toast button { background: none; border: 0; color: #ff9aa2; font-weight: 700; cursor: pointer; }

.mobile-only { display: none !important; }

@media (max-width: 1200px) { .app { grid-template-columns: 220px 340px 1fr; } .app.page-mode { grid-template-columns: 220px 1fr; } .two { grid-template-columns: 1fr; } .three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .app, .app.page-mode { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 85vw); z-index: 15; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .mobile-only { display: inline-grid !important; }
  .reader { display: none; }
  .app.reading .list { display: none; }
  .app.reading .reader, .app.page-mode .reader { display: block; height: 100vh; }
  .msg-head, .msg-actions { padding-left: 16px; padding-right: 16px; }
  .frame-wrap, .msg-text, .delivery, .quick, .banner { margin-left: 12px; margin-right: 12px; }
  .atts { padding-left: 12px; padding-right: 12px; }
  .page { padding: 16px 16px 40px; }
  .three { grid-template-columns: 1fr; }
  .composer { padding: 0; }
  .composer-card { border-radius: 0; height: 100%; }
  .editor { max-height: none; flex: 1; }
  .dns td:nth-child(5), .dns th:nth-child(5) { display: none; }
  .composer-foot .hint { display: none; }
  .sender .when { display: none; }
}
@media (min-width: 861px) { .back { display: none !important; } }
