/* =========================================================
   Postfy Mail — Webmail arayüzü (Roundcube Elastic · Postfy teması)
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-muted: #f4f4f5;
  --bg-hover: #f4f4f5;
  --row-active: #f1f1f4;
  --fg: #09090b;
  --fg-2: #3f3f46;
  --muted: #71717a;
  --muted-2: #a1a1aa;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --primary: #18181b;
  --primary-fg: #fafafa;
  --brand: #4f46e5;
  --brand-solid: #4f46e5;
  --brand-text: #4338ca;
  --brand-soft: #eef2ff;
  --brand-ring: rgba(79, 70, 229, .35);
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --star: #eab308;
  --shadow: 0 10px 30px rgba(24, 24, 27, .12), 0 2px 6px rgba(24, 24, 27, .06);
  --radius: 8px;
  --radius-lg: 12px;
  --av-l: 92%;
  --av-t: 32%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0e; --bg-soft: #101014; --bg-muted: #18181c; --bg-hover: #1c1c21; --row-active: #1d1d23;
    --fg: #fafafa; --fg-2: #d4d4d8; --muted: #a1a1aa; --muted-2: #71717a;
    --border: #26262b; --border-strong: #3a3a42; --primary: #fafafa; --primary-fg: #18181b;
    --brand: #818cf8; --brand-solid: #5b5bd6; --brand-text: #a5b4fc; --brand-soft: rgba(99, 102, 241, .16); --brand-ring: rgba(129, 140, 248, .45);
    --danger: #f87171; --danger-soft: rgba(239, 68, 68, .12); --warn: #fbbf24; --warn-soft: rgba(245, 158, 11, .12); --ok: #4ade80; --ok-soft: rgba(34, 197, 94, .12);
    --shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
    --av-l: 24%; --av-t: 82%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0e; --bg-soft: #101014; --bg-muted: #18181c; --bg-hover: #1c1c21; --row-active: #1d1d23;
  --fg: #fafafa; --fg-2: #d4d4d8; --muted: #a1a1aa; --muted-2: #71717a;
  --border: #26262b; --border-strong: #3a3a42; --primary: #fafafa; --primary-fg: #18181b;
  --brand: #818cf8; --brand-solid: #5b5bd6; --brand-text: #a5b4fc; --brand-soft: rgba(99, 102, 241, .16); --brand-ring: rgba(129, 140, 248, .45);
  --danger: #f87171; --danger-soft: rgba(239, 68, 68, .12); --warn: #fbbf24; --warn-soft: rgba(245, 158, 11, .12); --ok: #4ade80; --ok-soft: rgba(34, 197, 94, .12);
  --shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
  --av-l: 24%; --av-t: 82%;
  color-scheme: dark;
}

/* ---------------- Temel ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#root { height: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg-muted); padding: 1px 6px; border-radius: 5px; }
kbd { font-family: inherit; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-ring); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 12px 16px; }
.clamp1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* İkonlar */
.i { display: inline-flex; width: 20px; height: 20px; flex: none; }
.i svg { width: 100%; height: 100%; }
.i.lg { width: 24px; height: 24px; }
.i.sm { width: 16px; height: 16px; }
.i.xs { width: 14px; height: 14px; }
.i.xl { width: 40px; height: 40px; stroke-width: 1.5; }

/* ---------------- Düğmeler ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius); font-weight: 500; font-size: 14px;
  border: 1px solid transparent; white-space: nowrap; transition: background .12s, border-color .12s, opacity .12s;
  text-decoration: none !important;
}
.btn.primary { background: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { border-color: var(--border); background: var(--bg); color: var(--fg); }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.danger-ghost { color: var(--danger); border-color: var(--border); background: var(--bg); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.lg { height: 46px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: var(--radius); color: var(--fg-2); transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--fg); }
.icon-btn.on { background: var(--bg-muted); color: var(--fg); }
.icon-btn.on.flag { color: var(--star); }
.icon-btn.on.flag svg { fill: currentColor; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.xs { width: 26px; height: 26px; border-radius: 6px; }
.icon-btn.spin .i { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--brand-text); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.vsep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }

/* ---------------- Form öğeleri ---------------- */
.input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--fg); outline: 0; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.input.invalid { border-color: var(--danger); }
.input.xs { height: 28px; font-size: 12.5px; width: auto; padding: 0 28px 0 8px; background-position: right 6px center; }
.input.sm-w { max-width: 120px; }
.input.bare { border: 0; box-shadow: none !important; padding: 0; height: 40px; background-color: transparent; flex: 1; min-width: 0; }
.input.bare.subj { font-weight: 500; font-size: 15px; }
.input:disabled { opacity: .6; background-color: var(--bg-muted); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span:first-child { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.field-err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.hint { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 38px; height: 44px; }
.input-icon .eye { position: absolute; right: 8px; }
.input-wrap { position: relative; display: flex; }
.input-wrap .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.chk input, .row-chk input, .pick-item input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.chk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.switch {
  appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--border-strong); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch:checked { background: var(--brand-solid); }
.switch:checked::after { transform: translateX(16px); }
.switch.sm { width: 32px; height: 18px; }
.switch.sm::after { width: 12px; height: 12px; }
.switch.sm:checked::after { transform: translateX(14px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--bg-muted); padding: 3px; border-radius: var(--radius); gap: 2px; flex-wrap: wrap; }
.seg button, .seg label span { display: inline-block; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; }
.seg button.on, .seg label input:checked + span { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg label input:focus-visible + span { outline: 2px solid var(--brand); }
.seg.sm button { padding: 3px 10px; font-size: 12px; }
.seg.block { display: flex; margin-bottom: 12px; }
.seg.block label { flex: 1; text-align: center; }
.seg.block label span { width: 100%; }

/* ---------------- Rozet / etiket / avatar ---------------- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--bg-muted); color: var(--muted); }
.badge.brand { background: var(--brand-solid); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--bg-muted); color: var(--fg-2); border: 1px solid var(--border); white-space: nowrap; }
.pill.brand { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; margin-right: 6px; }
.avatar {
  --h: 230; width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: hsl(var(--h) 70% var(--av-l)); color: hsl(var(--h) 55% var(--av-t)); font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }

/* ---------------- Bildirim kutuları ---------------- */
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--bg-muted); color: var(--fg-2); font-size: 13.5px; margin: 12px 0; }
.notice > span:not(.i) { flex: 1; min-width: 200px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice .btn { color: var(--fg); }
.empty-state { margin: auto; padding: 48px 24px; text-align: center; color: var(--muted); max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state h3 { color: var(--fg); font-size: 16px; }
.empty-state .i.xl { color: var(--muted-2); }
.empty-state.sm { padding: 24px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.row-actions.center { justify-content: center; }
.row-actions.start { justify-content: flex-start; }

/* =========================================================
   KABUK: üst bar + sol ray
   ========================================================= */
.shell { --sb-w: 248px; display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--border); background: var(--bg); min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none !important; flex: none; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.logo .i { width: 18px; height: 18px; }
.logo.lg { width: 48px; height: 48px; border-radius: 14px; }
.logo.lg .i { width: 26px; height: 26px; }
.brand-text { font-size: 17px; letter-spacing: -.01em; }
.brand-text b { font-weight: 700; }
.brand-text.lg { font-size: 22px; }
.tb-domain { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 99px; white-space: nowrap; }
.tb-spacer { flex: 1; }
.tb-quota { width: 210px; }
.quota { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.quota-text { display: flex; justify-content: space-between; gap: 8px; }
.quota-text span { display: inline-flex; align-items: center; gap: 4px; }
.quota-text b { color: var(--fg); font-weight: 600; }
.quota-bar { height: 6px; border-radius: 99px; background: var(--bg-muted); overflow: hidden; }
.quota-bar span { display: block; height: 100%; border-radius: 99px; background: var(--brand-solid); }
.quota-bar span.warn { background: #f59e0b; }
.quota-bar span.crit { background: #dc2626; }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 99px; min-width: 0; }
.tb-user:hover { background: var(--bg-hover); }
.tb-user-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; min-width: 0; }
.tb-user-text b { font-size: 13px; font-weight: 600; }
.tb-user-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 8px; border-radius: 10px;
  font-size: 11.5px; font-weight: 500; color: var(--muted); text-decoration: none !important; text-align: center; line-height: 1.2;
}
.main { min-width: 0; min-height: 0; overflow: hidden; position: relative; background: var(--bg); }
.main:focus { outline: 0; }


/* ---------------- Yan menü ---------------- */
.sidebar { grid-row: 2; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--border); background: var(--bg-soft); }
.sb-top { padding: 14px 12px 4px; }
.sb-compose {
  position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; font-weight: 600; text-decoration: none !important;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .22); transition: filter .12s, transform .12s;
}
.sb-compose:hover { filter: brightness(1.07); }
.sb-compose:active { transform: translateY(1px); }
.sb-compose.active { box-shadow: 0 0 0 3px var(--brand-ring), inset 0 1px 0 rgba(255, 255, 255, .22); }
.sb-compose .sb-grow { flex: 1; min-width: 0; }
.sb-compose kbd { color: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .3); border-radius: 5px; padding: 0 6px; font-size: 11px; line-height: 18px; }
.sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 10px; }
.sb-section { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); padding: 12px 12px 6px; }
.sb-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; margin-bottom: 2px;
  border-radius: 10px; color: var(--fg-2); font-weight: 500; text-align: left; text-decoration: none !important; transition: background .12s, color .12s;
}
.sb-item:hover { background: var(--bg-hover); color: var(--fg); }
.sb-item .i { color: var(--muted); transition: color .12s; }
.sb-item:hover .i { color: var(--fg); }
.sb-item.active { background: var(--bg); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 0 0 1px var(--border); }
.sb-item.active .i { color: var(--brand); }
.sb-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item .sb-text { flex: 1; min-width: 0; }
.sb-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--brand-solid); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sb-folders { display: none; position: relative; margin: 2px 0 8px 22px; padding-left: 10px; border-left: 1px solid var(--border); }
.shell.sb-folders-on .sb-folders { display: block; }
.sb-folder {
  --d: 0; display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px 0 calc(8px + var(--d) * 14px); margin-bottom: 1px;
  border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none !important; transition: background .12s, color .12s;
}
.sb-folder:hover { background: var(--bg-hover); color: var(--fg); }
.sb-folder.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.sb-fname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-badge { height: 18px; min-width: 20px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); }
.sb-folder.active .sb-badge { background: var(--brand-solid); color: #fff; }
.sb-manage { color: var(--muted-2); font-size: 12.5px; }
.sb-folder.drop-over { background: var(--brand-soft); color: var(--brand-text); outline: 2px dashed var(--brand); outline-offset: -2px; }
.sb-bottom { padding: 10px 12px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.sb-quota { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.sbq-ring { --p: 0; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--brand-solid) calc(var(--p) * 1%), var(--bg-muted) 0); }
.sbq-ring span { width: 31px; height: 31px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--fg-2); }
.sbq-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sbq-text b { font-size: 13px; font-weight: 600; }
.sbq-text small { font-size: 11.5px; color: var(--muted); }
.sbq-text .quota-bar { height: 4px; margin-top: 5px; }
.sb-theme { display: flex; gap: 2px; padding: 3px; margin-bottom: 6px; border-radius: 10px; background: var(--bg-muted); }
.sb-theme button { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sb-theme button:hover { color: var(--fg); }
.sb-theme button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.sb-theme-toggle, .sb-more { display: none; }
.sb-collapse { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; margin-top: 4px; border-radius: 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.sb-collapse:hover { background: var(--bg-hover); color: var(--fg); }
.sb-collapse .i { transition: transform .2s; }
.shell.sb-collapsed { --sb-w: 72px; }
@media (min-width: 861px) {
  .shell.sb-collapsed .sidebar .sb-text, .shell.sb-collapsed .sidebar .sb-section, .shell.sb-collapsed .sidebar .sb-folders, .shell.sb-collapsed .sidebar .sb-theme { display: none; }
  .shell.sb-collapsed .sb-compose { width: 44px; padding: 0; justify-content: center; margin: 0 auto; }
  .shell.sb-collapsed .sb-item { width: 44px; padding: 0; justify-content: center; margin-left: auto; margin-right: auto; }
  .shell.sb-collapsed .sb-scroll { padding-top: 10px; }
  .shell.sb-collapsed .sb-item.active::before { left: -14px; }
  .shell.sb-collapsed .sb-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  .shell.sb-collapsed .sb-quota { padding: 0; border: 0; background: none; justify-content: center; margin-bottom: 6px; }
  .shell.sb-collapsed .sb-theme-toggle { display: flex; }
  .shell.sb-collapsed .sb-collapse { justify-content: center; padding: 0; width: 44px; margin-left: auto; margin-right: auto; }
  .shell.sb-collapsed .sb-collapse .i { transform: rotate(180deg); }
}
@media (min-width: 861px) and (max-width: 1180px) {
  .shell { --sb-w: 72px; }
  .shell .sidebar .sb-text, .shell .sidebar .sb-section, .shell .sidebar .sb-folders, .shell .sidebar .sb-theme { display: none; }
  .shell .sb-compose { width: 44px; padding: 0; justify-content: center; margin: 0 auto; }
  .shell .sb-item { width: 44px; padding: 0; justify-content: center; margin-left: auto; margin-right: auto; }
  .shell .sb-scroll { padding-top: 10px; }
  .shell .sb-item.active::before { left: -14px; }
  .shell .sb-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  .shell .sb-quota { padding: 0; border: 0; background: none; justify-content: center; margin-bottom: 6px; }
  .shell .sb-theme-toggle { display: flex; }
  .shell .sb-collapse { justify-content: center; padding: 0; width: 44px; margin-left: auto; margin-right: auto; }
  .shell .sb-collapse .i { transform: rotate(180deg); }
  .shell .sb-collapse { display: none; }
}
/* Yan menü klasörleri gösterirken posta görünümündeki klasör sütunu gizlenir */
.shell.sb-folders-on .mail-view { grid-template-columns: minmax(340px, 34%) minmax(0, 1fr); grid-template-areas: "l r"; }
.shell.sb-folders-on .mail-view.lay-desktop { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "r"; }
.shell.sb-folders-on .mail-view.lay-list { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l"; }
.shell.sb-folders-on .mail-view .folders { display: none; }

/* =========================================================
   POSTA GÖRÜNÜMÜ
   ========================================================= */
.mail-view {
  display: grid; height: 100%;
  grid-template-columns: 252px minmax(340px, 32%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "f l r";
}
.folders { grid-area: f; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg-soft); }
.folders-head { padding: 14px 14px 8px; }
.folder-list, .side-sec { padding: 4px 10px; }
.folder-list { flex: 1; overflow-y: auto; }
.folder {
  --d: 0; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 calc(10px + var(--d) * 18px); border-radius: var(--radius);
  color: var(--fg-2); font-weight: 500; text-decoration: none !important; cursor: pointer; transition: background .1s;
}
.folder:hover { background: var(--bg-hover); color: var(--fg); }
.folder.active { background: var(--primary); color: var(--primary-fg); }
.folder.active .badge:not(.brand) { background: rgba(255,255,255,.15); color: inherit; }
.folder .i { color: inherit; opacity: .9; }
.folder-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder.drop-over { background: var(--brand-soft); color: var(--brand-text); outline: 2px dashed var(--brand); outline-offset: -2px; }
body.dragging [data-drop] { outline: 1px dashed var(--border-strong); outline-offset: -1px; }
.folders-foot { padding: 14px 16px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

.msglist { grid-area: l; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--border); }
.ml-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 18px; min-height: 64px; }
.ml-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ml-title h1 { font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-tools { display: flex; gap: 2px; }
.ml-search { padding: 0 14px 8px; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.search.sm { height: 36px; margin-bottom: 10px; }
.icon-btn.xs.on { background: var(--brand-soft); color: var(--brand-text); }
.search-info { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand-text); background: var(--brand-soft); padding: 6px 10px; border-radius: var(--radius); margin-top: 8px; }
.search-info > span:not(.i) { flex: 1; min-width: 0; }
.ml-bulk { display: flex; align-items: center; gap: 2px; padding: 6px 10px 6px 14px; margin: 0 10px 6px; background: var(--brand-soft); border-radius: var(--radius); flex-wrap: wrap; }
.bulk-n { margin-right: 8px; font-size: 13px; color: var(--brand-text); }
.bulk-sp { flex: 1; }
.ml-cols { display: flex; align-items: center; gap: 2px; padding: 4px 14px 6px 12px; border-bottom: 1px solid var(--border); }
.ml-cols .row-chk { padding: 0 6px 0 4px; }
.col { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.col:hover { background: var(--bg-hover); color: var(--fg); }
.col.on { color: var(--fg); }
.col-sp { flex: 1; }
.ml-rows { flex: 1; overflow-y: auto; padding: 6px 8px 10px; outline: 0; }
.ml-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 6px 18px; border-top: 1px solid var(--border); min-height: 46px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 2px; }
.page-input { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.page-input input { width: 46px; height: 28px; text-align: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg); }

.row {
  position: relative; display: flex; gap: 6px; align-items: flex-start; padding: 10px 12px 10px 6px; margin-bottom: 2px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent; user-select: none;
}
.row:hover { background: var(--bg-hover); }
.row.active { background: var(--row-active); border-color: var(--border); }
.row.checked { background: var(--brand-soft); }
.row.unread::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand); }
.row.child { margin-left: 26px; }
.row.child::after { content: ""; position: absolute; left: -14px; top: -2px; bottom: 50%; width: 10px; border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); border-bottom-left-radius: 6px; }
.row-chk { display: flex; align-items: center; padding: 3px 4px; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 8px; }
.row-av { margin-right: 2px; }
.row-from { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500; color: var(--fg-2); }
.row-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.row.active .row-date { color: var(--fg-2); }
.row-bot { display: flex; align-items: center; gap: 8px; margin-top: 3px; padding-left: 30px; }
.row-subj { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13.5px; }
.row-subj .ans { color: var(--muted-2); margin-right: 4px; vertical-align: -2px; display: inline-flex; }
.row.unread .row-from { color: var(--fg); font-weight: 600; }
.row.unread .row-subj { color: var(--fg); font-weight: 600; }
.row-ind { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; flex: none; }
.row-size { min-width: 44px; text-align: right; }
.flag-btn { display: inline-flex; padding: 2px; border-radius: 4px; color: var(--muted-2); opacity: 0; }
.row:hover .flag-btn, .flag-btn:focus-visible, .flag-btn.on { opacity: 1; }
.flag-btn.on { color: var(--star); }
.flag-btn.on svg, .flag-ind svg { fill: currentColor; }
.flag-btn:hover { color: var(--star); }
.thr-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 2px; border-radius: 99px; background: var(--bg-muted); font-size: 11px; font-weight: 600; color: var(--fg-2); }
.thr-toggle .i { transition: transform .15s; }
.thr-toggle.open .i { transform: rotate(90deg); }
.drag-ghost { position: fixed; top: -100px; left: -100px; padding: 6px 12px; border-radius: 8px; background: var(--primary); color: var(--primary-fg); font-size: 13px; font-weight: 500; }

/* Okuma paneli */
.reader { grid-area: r; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.rd-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); min-height: 56px; flex-wrap: wrap; }
.tool-group { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-group { gap: 6px; }
.back-btn { display: none; }
.bar-title { flex: 1; font-size: 16px; }
.rd-scroll { flex: 1; overflow-y: auto; }
.rd { max-width: 920px; padding: 22px 32px 40px; }
.rd-subject { font-size: 22px; font-weight: 700; line-height: 1.3; display: flex; align-items: flex-start; gap: 8px; }
.flag-ind { color: var(--star); margin-top: 4px; }
.rd-head { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.rd-meta { flex: 1; min-width: 0; }
.rd-from { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; }
.rd-from .muted { word-break: break-all; }
.rd-to { font-size: 13px; margin-top: 2px; }
.rd-links { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.rd-details { margin-top: 10px; padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.rd-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rd-body { padding: 20px 0; font-size: 14.5px; line-height: 1.65; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; }
.msg-text .q { color: var(--muted); border-left: 3px solid var(--border-strong); padding-left: 10px; display: inline-block; }
.msg-html { word-wrap: break-word; }
.nl { max-width: 620px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; padding-bottom: 16px; }
.nl h2 { font-size: 22px; margin: 18px 20px 6px; }
.nl p { margin: 6px 20px; }
.nl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 20px; }
.nl-foot { font-size: 12px; color: var(--muted); }
.remote-img {
  --h: 230; height: 200px; display: grid; place-items: center; text-align: center; padding: 8px;
  background: repeating-linear-gradient(45deg, var(--bg-muted) 0 10px, var(--bg-soft) 10px 20px); border-bottom: 1px solid var(--border);
}
.remote-img.sm { height: 110px; border: 1px solid var(--border); border-radius: 8px; }
.remote-img::after { content: "🛡 Engellenen resim · " attr(data-name); font-size: 12px; color: var(--muted); }
.remote-img.loaded { background: linear-gradient(135deg, hsl(var(--h) 75% 68%), hsl(calc(var(--h) + 45) 70% 52%)); }
.remote-img.loaded::after { content: attr(data-name); color: #fff; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.atts { border-top: 1px solid var(--border); padding-top: 16px; }
.atts-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.atts-head b { display: inline-flex; align-items: center; gap: 6px; }
.atts-head .btn { margin-left: auto; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.att-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.att-card:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.att-prev { flex: none; border-radius: 8px; }
.att-thumb { --h: 230; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 65%), hsl(calc(var(--h) + 50) 70% 50%)); }
.att-thumb.lg { width: 100%; height: 180px; border-radius: 10px; }
.att-ico { width: 44px; height: 44px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-muted); color: var(--fg-2); }
.att-ico small { font-size: 9px; font-weight: 700; }
.att-ico.pdf { background: var(--danger-soft); color: var(--danger); }
.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.inline-imgs figure { margin: 0; }
.inline-imgs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rd-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.preview-img { --h: 230; height: 420px; max-height: 60vh; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: #fff; font-weight: 600; background: linear-gradient(135deg, hsl(var(--h) 70% 65%), hsl(calc(var(--h) + 60) 70% 48%)); }
.preview-pdf { background: var(--bg-muted); border-radius: 10px; padding: 24px; }
.pdf-page { background: #fff; color: #18181b; max-width: 420px; margin: 0 auto 12px; aspect-ratio: 1 / 1.414; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 10px; }
.pdf-page h4 { font-size: 16px; margin-bottom: 10px; }
.pdf-page span { height: 8px; background: #e4e4e7; border-radius: 4px; }
.pdf-page span.s { width: 60%; }
.raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 0; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* Masaüstü düzeni (önizleme altta) */
.mail-view.lay-desktop { grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: minmax(0, 42%) minmax(0, 1fr); grid-template-areas: "f l" "f r"; }
.mail-view.lay-desktop .folders { grid-row: 1 / -1; }
.mail-view.lay-desktop .msglist { border-right: 0; border-bottom: 1px solid var(--border); }
/* Liste düzeni (önizleme yok) */
.mail-view.lay-list { grid-template-columns: 252px minmax(0, 1fr); grid-template-areas: "f l"; }
.mail-view.lay-list .msglist { border-right: 0; }
.mail-view.lay-list .reader { display: none; }
.mail-view.lay-list.reading .msglist { display: none; }
.mail-view.lay-list.reading .reader { display: flex; grid-area: l; }
.mail-view.lay-list .back-btn { display: inline-flex; }
.drawer-backdrop { display: none; }
.only-drawer { display: none; }

/* Yazdırma görünümü */
.print-view { height: 100%; overflow-y: auto; background: var(--bg-muted); }
.print-bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 2; }
.print-sheet { max-width: 820px; margin: 24px auto; background: #fff; color: #18181b; padding: 40px 48px; border-radius: 6px; box-shadow: 0 4px 24px rgba(0,0,0,.1); }
.print-sheet h1 { font-size: 22px; margin: 10px 0 14px; }
.print-sheet .kv dt { color: #71717a; }
.print-sheet hr { border: 0; border-top: 1px solid #e4e4e7; margin: 18px 0 0; }
.print-brand { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #71717a; }

/* =========================================================
   YENİ İLETİ
   ========================================================= */
.compose { display: flex; flex-direction: column; height: 100%; position: relative; }
.cmp-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--bg); }
.cmp-title { font-size: 18px; font-weight: 700; margin-right: 8px; }
.cmp-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.cmp-status { flex: 1; text-align: right; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-scroll { flex: 1; overflow-y: auto; padding: 18px 24px 40px; }
.cmp-card, .cmp-editor, .cmp-atts { max-width: 1240px; margin-left: auto; margin-right: auto; }
.cmp-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 16px; }
.cmp-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); min-height: 48px; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-label { width: 104px; flex: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.recips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 0; cursor: text; }
.chips { display: contents; }
.chips.static, .chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.recip-input { flex: 1; min-width: 160px; border: 0; outline: 0; background: transparent; height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 99px; padding: 2px 3px 2px 10px; font-size: 13px; font-weight: 500; }
.chip button { display: inline-flex; padding: 3px; border-radius: 50%; color: var(--muted); }
.chip button:hover { background: var(--border); color: var(--fg); }
.chip.invalid { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.cmp-addlinks { display: flex; align-items: center; gap: 10px; flex: none; }
.cmp-editor { border: 1px solid var(--border); border-radius: var(--radius-lg); margin-top: 16px; overflow: hidden; }
.ed-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.ed-sp { flex: 1; }
.color-in { width: 28px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; margin: 0 4px; }
.ed-area { display: block; width: 100%; min-height: 360px; padding: 16px 20px; outline: 0; font-size: 14.5px; line-height: 1.65; background: var(--bg); border: 0; color: var(--fg); }
textarea.ed-area { resize: vertical; white-space: pre-wrap; font-family: inherit; }
.ed-area p { margin: 0 0 .7em; }
.ed-area blockquote, .msg-html blockquote { border-left: 3px solid var(--brand); margin: 8px 0; padding: 2px 14px; color: var(--fg-2); }
.ed-area .sig, .sig-preview { color: var(--muted); }
.ed-area pre { background: var(--bg-muted); padding: 10px; border-radius: 6px; }
.cmp-atts { margin-top: 14px; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.att-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 8px; max-width: 320px; font-size: 13px; }
.att-item .att-name { max-width: 180px; }
.att-drop { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); cursor: pointer; flex-wrap: wrap; }
.att-drop:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.att-drop span:not(.i) { flex: 1; min-width: 180px; }
.att-drop b { color: var(--fg); }
.drop-overlay { position: absolute; inset: 0; display: none; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 2px dashed var(--brand); border-radius: 12px; color: var(--brand-text); z-index: 5; pointer-events: none; font-size: 16px; }
.compose.drop-on .drop-overlay { display: flex; }
.sug .pm-item.hl { background: var(--bg-hover); }
.sug .pm-label small { display: block; color: var(--muted); font-size: 12px; }
.pick-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--bg-hover); }
.pick-item > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.pick-item small { color: var(--muted); }
.pick-target { display: flex; gap: 14px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* =========================================================
   KİŞİLER
   ========================================================= */
.ab-view { display: grid; height: 100%; grid-template-columns: 252px minmax(320px, 30%) minmax(0, 1fr); grid-template-areas: "f l r"; }
.ab-sources { grid-area: f; border-right: 1px solid var(--border); background: var(--bg-soft); overflow-y: auto; display: flex; flex-direction: column; }
.side-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 10px 6px; }
.side-sec + .side-sec { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 6px; }
.side-actions { padding: 8px 10px; }
.folder .ghost-x { opacity: 0; color: inherit; }
.folder:hover .ghost-x, .folder .ghost-x:focus-visible { opacity: 1; }
.ab-list { grid-area: l; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); }
.ab-rows { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.ab-letter { position: sticky; top: 0; background: var(--bg); font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; z-index: 1; }
.ab-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 4px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.ab-row:hover { background: var(--bg-hover); }
.ab-row.active { background: var(--row-active); border-color: var(--border); }
.ab-row.checked { background: var(--brand-soft); }
.ab-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ab-row-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-row-text small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-detail { grid-area: r; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.contact-card, .form-card { max-width: 820px; padding: 28px 32px 40px; }
.cc-head { display: flex; gap: 20px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.cc-head h2 { font-size: 24px; }
.cc-head.edit { align-items: flex-start; border-bottom: 0; }
.cc-head.edit .grid-2 { flex: 1; }
.kv-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.kv-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; word-break: break-word; }
.kv-row small { font-size: 12px; }
.cc-groups { padding: 16px 0; }
.cc-groups .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.chk-pill { position: relative; cursor: pointer; }
.chk-pill input { position: absolute; opacity: 0; }
.chk-pill span { display: inline-flex; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 500; color: var(--fg-2); }
.chk-pill input:checked + span { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.chk-pill input:focus-visible + span { outline: 2px solid var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-size: 13px; font-weight: 500; color: var(--fg-2); padding: 0; margin-bottom: 6px; }
.multi-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.qr { background: #fff; padding: 12px; border-radius: 10px; border: 1px solid var(--border); min-width: 120px; min-height: 120px; display: grid; place-items: center; }
.qr svg { display: block; width: 220px; height: 220px; }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); cursor: pointer; color: var(--muted); text-align: center; margin: 12px 0 14px; position: relative; }
.file-drop:hover, .file-drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* =========================================================
   AYARLAR
   ========================================================= */
.set-view { display: grid; height: 100%; grid-template-columns: 280px minmax(280px, 340px) minmax(0, 1fr); grid-template-areas: "n l c"; }
.set-view.no-list { grid-template-columns: 280px minmax(0, 1fr); grid-template-areas: "n c"; }
.set-view.no-list .set-list { display: none; }
.set-nav { grid-area: n; border-right: 1px solid var(--border); background: var(--bg-soft); padding: 16px 10px; overflow-y: auto; }
.set-h { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; padding: 4px 10px 14px; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--fg-2); text-decoration: none !important; margin-bottom: 2px; }
.set-item > span:not(.i) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-item b { font-weight: 600; color: var(--fg); font-size: 14px; }
.set-item small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.set-item:hover { background: var(--bg-hover); }
.set-item.active { background: var(--primary); color: var(--primary-fg); }
.set-item.active b, .set-item.active small { color: inherit; }
.set-item.active small { opacity: .75; }
.chev { opacity: .5; display: none; }
.set-list { grid-area: l; border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.list-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; min-height: 64px; }
.list-head h2 { flex: 1; font-size: 18px; }
.set-sublist { padding: 4px 10px 12px; }
.set-sub { --d: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px calc(10px + var(--d) * 18px); border-radius: var(--radius); color: var(--fg-2); text-decoration: none !important; cursor: pointer; min-height: 40px; }
.set-sub .grow { display: flex; flex-direction: column; }
.set-sub small { font-size: 12px; }
.set-sub.tall { padding-top: 10px; padding-bottom: 10px; }
.set-sub b { font-weight: 500; color: var(--fg); }
.set-sub:hover { background: var(--bg-hover); }
.set-sub.active { background: var(--row-active); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.set-sub.off .grow { opacity: .55; }
.order { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-muted); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--muted); flex: none; }
.flt-tools { display: flex; align-items: center; gap: 0; }
.set-set { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 16px 8px; padding: 8px 10px 8px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12.5px; }
.tabs-line { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; overflow-x: auto; }
.tabs-line a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px; color: var(--muted); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; white-space: nowrap; }
.tabs-line a:hover { color: var(--fg); }
.tabs-line a.on { color: var(--fg); border-bottom-color: var(--brand); }
.tabs-line.wide { padding: 0; margin-bottom: 16px; }
.dot-on { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.set-content { grid-area: c; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.set-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.content-head { display: flex; align-items: center; gap: 10px; padding: 16px 28px 12px; border-bottom: 1px solid var(--border); min-height: 64px; }
.content-head h2 { font-size: 18px; }
.content-scroll { flex: 1; overflow-y: auto; padding: 20px 28px 32px; }
.content-scroll > * { max-width: 760px; }
.content-foot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 28px; border-top: 1px solid var(--border); background: var(--bg); }
.pref-group { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 18px 10px; margin-bottom: 18px; }
.pref-group legend { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 6px; margin-left: -6px; margin-bottom: 0; }
.pref-row { display: grid; grid-template-columns: minmax(180px, 42%) minmax(0, 1fr); align-items: center; gap: 8px 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pref-row:last-child { border-bottom: 0; }
.pref-row.stack { grid-template-columns: 1fr; }
.pref-row > .input { max-width: 380px; }
.pref-label { font-size: 14px; color: var(--fg); font-weight: 500; }
.switch-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.layout-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.lp input { position: absolute; opacity: 0; }
.lp:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.lp:has(input:focus-visible) { outline: 2px solid var(--brand); }
.lp small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.lp-art { display: grid; height: 64px; gap: 3px; margin-bottom: 4px; }
.lp-art i { background: var(--bg-muted); border-radius: 3px; border: 1px solid var(--border); }
.lp-widescreen { grid-template-columns: 1fr 1.6fr 2.4fr; }
.lp-desktop { grid-template-columns: 1fr 4fr; grid-template-rows: 1fr 1.3fr; }
.lp-desktop i:first-child { grid-row: 1 / 3; }
.lp-list { grid-template-columns: 1fr 4fr; }
.lp-list i:last-child { display: none; }
.lp:has(input:checked) .lp-art i:nth-child(2) { background: var(--brand-soft); border-color: var(--brand); }
.sig-tools { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.sig-fmt { display: inline-flex; gap: 2px; }
.sig-edit { min-height: 110px; }
div.sig-edit { padding: 10px 12px; height: auto; overflow: auto; }
.sig-preview { font-size: 13.5px; padding: 12px 14px; background: var(--bg-soft); border: 1px dashed var(--border-strong); border-radius: var(--radius); margin-top: 6px; }
.rules { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rule-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule-row > select.input { width: auto; min-width: 150px; }
.rule-row > .grow, .rule-row > .input-wrap { min-width: 160px; }
.sieve-peek { margin-top: 6px; }
.sieve-peek summary { cursor: pointer; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.sieve-peek .raw { margin-top: 8px; }
.about-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.about-head h2 { font-size: 20px; }
.about h4 { margin: 20px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.plugin-list { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.plugin-list li { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; flex-wrap: wrap; }
.plugin-list li:last-child { border-bottom: 0; }
.plugin-list b { min-width: 120px; font-family: ui-monospace, Menlo, monospace; font-weight: 600; font-size: 12.5px; }
.plugin-list span { color: var(--muted); flex: 1; min-width: 180px; }

/* =========================================================
   KURULUM
   ========================================================= */
.page-scroll { height: 100%; overflow-y: auto; }
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; }
.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border-radius: 16px; background: linear-gradient(120deg, var(--brand-soft), transparent 70%), var(--bg-soft); border: 1px solid var(--border); }
.page-hero h1 { font-size: 26px; margin: 6px 0 6px; }
.page-hero > div { max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text); }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; background: var(--bg); }
.card h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.card .kv-row:last-of-type { border-bottom: 0; }
.card > p.muted { margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 4px; }
.steps li { counter-increment: s; position: relative; padding: 10px 12px 10px 48px; border-radius: 10px; font-size: 14.5px; }
.steps li:nth-child(odd) { background: var(--bg-soft); }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-solid); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 4px; font-weight: 500; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .i { transition: transform .15s; color: var(--muted); }
.accordion details[open] summary .i { transform: rotate(180deg); }
.accordion details > div { padding: 0 4px 16px; color: var(--fg-2); font-size: 14px; line-height: 1.6; }

/* =========================================================
   GİRİŞ
   ========================================================= */
.login-page { --lb: #3d3ae8; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; height: 100vh; height: 100dvh; overflow: auto; padding: 16px; background: var(--bg); }
.login-side { display: flex; flex-direction: column; min-height: 0; padding: 28px 48px 20px; }
.login-top { display: flex; align-items: center; justify-content: space-between; }
.login-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none !important; }
.login-logo .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--lb); box-shadow: none; }
.login-logo .logo .i { width: 18px; height: 18px; }
.login-logo .brand-text { font-size: 20px; letter-spacing: -.01em; }
.login-logo .brand-text b { font-weight: 600; }
.lt-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); }
.lt-link:hover { color: var(--fg); }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.login-card { width: 100%; max-width: 420px; }
.login-card h1 { font-size: 40px; font-weight: 600; letter-spacing: -.03em; text-align: center; line-height: 1.15; }
.login-sub { font-size: 15.5px; color: var(--muted); text-align: center; margin: 12px 0 40px; line-height: 1.5; }
.login-msg { font-size: 13.5px; padding: 11px 14px; border-radius: 8px; margin: -16px 0 20px; }
.login-msg.err { background: var(--danger-soft); color: var(--danger); }
.login-msg.ok { background: var(--ok-soft); color: var(--ok); }
.lf { display: block; font-size: 14px; font-weight: 500; color: var(--fg); margin-bottom: 8px; }
.lf-in { height: 50px; border-radius: 8px; font-size: 15px; padding: 0 16px; margin-bottom: 22px; border-color: var(--border); }
.lf-in:focus { border-color: var(--lb); box-shadow: 0 0 0 3px rgba(61, 58, 232, .15); }
.lf-in::placeholder { color: var(--muted-2); }
.lf-pass { position: relative; }
.lf-pass .lf-in { padding-right: 52px; margin-bottom: 14px; }
.lf-eye { position: absolute; right: 8px; top: 9px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--muted-2); }
.lf-eye:hover { color: var(--fg); background: var(--bg-hover); }
.caps-warn { font-size: 12.5px; color: var(--warn); margin: -6px 0 12px; }
.lf-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.login-remember { font-size: 14px; color: var(--muted); }
.login-remember input { accent-color: var(--lb); width: 17px; height: 17px; }
.lf-forgot { font-size: 14px; font-weight: 500; color: var(--lb); }
.lf-forgot:hover { text-decoration: underline; }
.login-btn { height: 50px; border-radius: 8px; font-size: 15px; font-weight: 500; background: var(--lb); color: #fff; }
.login-btn:hover { background: #312ed0; }
.login-btn:disabled { opacity: .75; }
.login-help { margin-top: 28px; text-align: center; font-size: 14px; color: var(--muted); }
.login-help a { color: var(--lb); font-weight: 500; }
.login-demo { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted-2); }
.login-foot { display: flex; align-items: center; gap: 22px; font-size: 13.5px; color: var(--muted); }
.login-foot a { color: var(--muted); }
.login-foot a:hover { color: var(--fg); }
:root[data-theme="dark"] .lf-forgot, :root[data-theme="dark"] .login-help a { color: #a5b4fc; }

/* Sağ panel */
.login-panel { position: relative; overflow: hidden; border-radius: 20px; background: var(--lb); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(40px, 6vw, 96px); }
.lp-shape { position: absolute; background: rgba(255, 255, 255, .045); pointer-events: none; }
.lp-shape.a { width: 62%; height: 46%; right: -6%; top: -10%; border-radius: 0 0 0 999px; }
.lp-shape.b { width: 40%; height: 40%; left: -8%; bottom: 6%; border-radius: 0 999px 999px 0; }
.lp-shape.c { width: 34%; height: 22%; right: 8%; bottom: -4%; border-radius: 24px; }
.lp-copy { position: relative; max-width: 560px; }
.lp-copy h2 { font-size: clamp(28px, 2.6vw, 40px); font-weight: 500; line-height: 1.22; letter-spacing: -.02em; }
.lp-copy p { margin-top: 18px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .82); max-width: 520px; }
.lp-shot { position: relative; margin-top: 44px; max-width: 600px; }

/* Ürün kesiti */
.mk { background: #fff; color: #18181b; border-radius: 12px; padding: 0; box-shadow: 0 0 0 6px rgba(255, 255, 255, .14); font-size: 11px; overflow: hidden; }
.mk-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #eceef1; font-size: 12px; }
.mk-logo { width: 20px; height: 20px; border-radius: 6px; background: var(--lb); color: #fff; display: grid; place-items: center; }
.mk-bar b { font-weight: 700; margin-left: 2px; }
.mk-search { margin-left: 18px; flex: 0 1 220px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid #e4e4e7; border-radius: 6px; color: #a1a1aa; font-size: 11px; }
.mk-me { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: #ede9fe; color: #5b21b6; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; }
.mk-body { display: grid; grid-template-columns: 150px 1fr; }
.mk-list { padding-bottom: 8px !important; }
.mk-side { padding: 12px 10px; border-right: 1px solid #eceef1; background: #fafafa; display: flex; flex-direction: column; gap: 2px; }
.mk-new { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border-radius: 7px; background: var(--lb); color: #fff; font-weight: 600; margin-bottom: 8px; }
.mk-f { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 8px; border-radius: 6px; color: #52525b; }
.mk-f span:not(.i) { flex: 1; }
.mk-f em { font-style: normal; font-size: 9.5px; font-weight: 700; color: #4338ca; background: #eef2ff; border-radius: 99px; padding: 0 6px; line-height: 15px; }
.mk-f.on { background: #18181b; color: #fff; }
.mk-f.on em { background: var(--lb); color: #fff; }
.mk-list { padding: 10px 10px 0; }
.mk-h { display: flex; align-items: baseline; gap: 8px; padding: 2px 6px 8px; }
.mk-h b { font-size: 14px; }
.mk-h small { color: #a1a1aa; font-size: 10.5px; }
.mk-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 7px; }
.mk-row.on { background: #f4f4f5; }
.mk-row.u::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px; border-radius: 2px; background: var(--lb); }
.mk-av { --h: 230; width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 9px; font-weight: 700; background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 32%); }
.mk-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.mk-tx b { font-weight: 500; font-size: 11.5px; color: #3f3f46; }
.mk-tx small { color: #71717a; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-row.u .mk-tx b, .mk-row.u .mk-tx small { color: #09090b; font-weight: 600; }
.mk-t { color: #a1a1aa; font-size: 10px; }
.mk-float { position: absolute; right: -56px; top: 92px; width: 250px; background: #fff; color: #18181b; border-radius: 12px; padding: 14px; box-shadow: 0 24px 48px -12px rgba(15, 15, 60, .35), 0 0 0 1px rgba(0, 0, 0, .04); font-size: 11px; display: flex; flex-direction: column; gap: 8px; }
.mkf-head { display: flex; align-items: center; gap: 8px; }
.mkf-subj { font-size: 13px; font-weight: 600; margin-top: 2px; }
.mkf-line { height: 6px; border-radius: 3px; background: #f0f0f3; }
.mkf-line.s { width: 60%; }
.mkf-att { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px; border: 1px solid #eceef1; border-radius: 8px; color: #71717a; }
.mkf-pdf { width: 26px; height: 26px; border-radius: 6px; background: #fef2f2; color: #dc2626; font-size: 8px; font-weight: 800; display: grid; place-items: center; flex: none; }


@media (max-width: 1180px) {
  .login-side { padding: 24px 28px 16px; }
  .mk-float { right: -24px; }
}
@media (max-width: 960px) {
  .login-page { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .login-panel { display: none; }
  .login-side { padding: 20px 20px 16px; }
  .login-card h1 { font-size: 30px; }
  .login-sub { margin-bottom: 30px; }
  .login-foot { flex-wrap: wrap; gap: 8px 18px; }
}

/* =========================================================
   ENGEL SAYFASI
   ========================================================= */
.block-page { height: 100vh; height: 100dvh; overflow-y: auto; background: var(--bg-soft); }
.block-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
.block-main { max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; display: flex; flex-direction: column; gap: 20px; }
.block-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.block-card h1 { font-size: 22px; }
.block-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-muted); color: var(--fg-2); margin-bottom: 4px; }
.block-icon.warn, .block-icon.danger { background: var(--danger-soft); color: var(--danger); }
.block-icon.ok { background: var(--ok-soft); color: var(--ok); }
.block-addr { font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 8px; background: var(--bg-muted); word-break: break-all; }
.block-list { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.block-list h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 4px; }
.block-list ul { list-style: none; padding: 0; margin: 12px 0 0; }
.block-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.block-list li > span:not(.avatar) { flex: 1; min-width: 0; display: flex; flex-direction: column; word-break: break-all; }
.empty-line { color: var(--muted); padding: 14px 0 4px; }

/* =========================================================
   MODAL / AÇILIR MENÜ / BİLDİRİM / İPUCU
   ========================================================= */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(9, 9, 11, .5); animation: fade .12s ease-out; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: pop .14s ease-out; }
.modal.sm { max-width: 420px; }
.modal.md { max-width: 560px; }
.modal.lg { max-width: 860px; }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px 22px; }
.modal header h3 { font-size: 17px; }
.modal-body { padding: 8px 22px 16px; overflow-y: auto; }
.modal-text { color: var(--fg-2); line-height: 1.55; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
.popover { position: fixed; z-index: 90; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); animation: pop .1s ease-out; max-height: calc(100vh - 24px); overflow-y: auto; }
.popover.menu { padding: 5px; min-width: 220px; max-width: 320px; display: flex; flex-direction: column; }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 13.5px; color: var(--fg); }
.pm-item:hover, .pm-item:focus-visible { background: var(--bg-hover); outline: 0; }
.pm-item:disabled { opacity: .45; }
.pm-item.danger { color: var(--danger); }
.pm-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sep { height: 1px; background: var(--border); margin: 4px -5px; }
.pm-head { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-pop { width: 320px; padding: 16px; }
.adv-form h4 { font-size: 15px; margin-bottom: 12px; }
.adv-form fieldset { margin-bottom: 12px; }
.adv-form .field { margin-bottom: 10px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 10px 10px 14px; border-radius: 10px;
  background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow); font-size: 13.5px; transition: opacity .15s, transform .15s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast > span:not(.i) { flex: 1; }
.toast.error .i:first-child { color: #f87171; }
.toast.warn .i:first-child { color: #fbbf24; }
.toast-undo { font-weight: 600; text-decoration: underline; padding: 2px 6px; }
.toast-x { display: inline-flex; padding: 4px; border-radius: 6px; opacity: .7; }
.toast-x:hover { opacity: 1; }
.tooltip { position: fixed; z-index: 130; pointer-events: none; background: var(--primary); color: var(--primary-fg); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 6px; white-space: nowrap; max-width: 280px; }
#printArea { display: none; }

/* =========================================================
   DUYARLI DÜZEN
   ========================================================= */
@media (max-width: 1380px) {
  .tb-domain { display: none; }
}
@media (max-width: 1180px) {
  .tb-quota { width: 160px; }
  .tb-user-text small { max-width: 140px; }
  /* Klasörler çekmeceye dönüşür */
  .mail-view, .mail-view.lay-desktop, .mail-view.lay-list, .ab-view { grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); grid-template-areas: "l r"; }
  .mail-view.lay-desktop { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "r"; }
  .mail-view.lay-list { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l"; }
  .folders, .ab-sources {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px; z-index: 60; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); grid-area: auto !important;
  }
  .folders-open .folders, .folders-open .ab-sources { transform: none; }
  .folders-open .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(9,9,11,.45); z-index: 55; }
  .only-drawer { display: inline-flex; }
  .set-view { grid-template-columns: 240px minmax(240px, 300px) minmax(0, 1fr); }
  .set-item small { display: none; }
  .setup-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; }
  .shell { --sb-w: 0px; }
  .sidebar { grid-row: 3; flex-direction: row; align-items: stretch; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); background: var(--bg); }
  .sb-top, .sb-scroll, .sb-bottom { display: contents; }
  .sb-section, .sb-folders, .sb-quota, .sb-theme, .sb-x, .sb-collapse, .sb-compose kbd { display: none !important; }
  .sb-more { display: flex; }
  .sb-item, .sb-compose { flex: 1; min-width: 0; height: auto; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; margin: 0; font-size: 10.5px; font-weight: 500; border-radius: 10px; }
  .sb-item .sb-text, .sb-compose .sb-text { flex: none; max-width: 100%; font-size: 10.5px; }
  .sb-item.active { background: none; box-shadow: none; color: var(--brand-text); }
  .sb-item.active::before { display: none; }
  .sb-compose { background: none; box-shadow: none; color: var(--fg); }
  .sb-compose > .i { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; }
  .sb-compose.active { box-shadow: none; }
  .sb-count { position: absolute; top: 1px; right: calc(50% - 24px); min-width: 17px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  .topbar { padding: 0 8px 0 12px; gap: 8px; }
  .brand-text { font-size: 16px; }
  .tb-quota, .tb-user-text, .tb-user > .i { display: none; }
  .tb-logout span:not(.i) { display: none; }
  .tb-logout { padding: 0 10px; }

  .mail-view, .mail-view.lay-desktop, .mail-view.lay-list, .ab-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "l"; }
  .msglist, .ab-list { border-right: 0; }
  .reader, .ab-detail { display: none !important; grid-area: l; }
  .mail-view.reading .msglist, .ab-view.reading .ab-list { display: none; }
  .mail-view.reading .reader, .ab-view.reading .ab-detail { display: flex !important; }
  .back-btn { display: inline-flex; }
  .ml-head { padding: 10px 8px 6px 8px; min-height: 56px; }
  .ml-title h1 { font-size: 19px; }
  .ml-search { padding: 0 10px 8px; }
  .ml-cols { padding: 4px 8px 6px 6px; }
  .ml-cols .col[data-sort="size"] { display: none; }
  .row-size { display: none; }
  .row-bot { padding-left: 0; }
  .row-av { display: none; }
  .flag-btn { opacity: 1; }
  .rd { padding: 16px 16px 32px; }
  .rd-subject { font-size: 19px; }
  .rd-bar { padding: 6px 8px; }
  .hide-sm { display: none !important; }
  .rd-date { display: none; }
  .rd-head .avatar.lg { width: 36px; height: 36px; font-size: 13px; }

  .cmp-bar { padding: 8px 10px; gap: 6px; }
  .cmp-tools .btn span:not(.i), .cmp-bar > .btn.ghost span:not(.i) { display: none; }
  .cmp-tools .btn { padding: 0 9px; }
  .cmp-title { font-size: 16px; flex: 1; }
  .cmp-status { order: 10; flex-basis: 100%; text-align: left; }
  .cmp-scroll { padding: 12px 12px 32px; }
  .cmp-card { padding: 0 12px; }
  .cmp-label { width: 72px; font-size: 12.5px; }
  .cmp-row[data-row="to"] { flex-wrap: wrap; }
  .cmp-addlinks { width: 100%; justify-content: flex-end; padding-bottom: 6px; flex-wrap: wrap; }
  .ed-area { min-height: 260px; padding: 14px; }

  .contact-card, .form-card { padding: 20px 16px 32px; }
  .cc-head { flex-wrap: wrap; }
  .grid-2 { grid-template-columns: 1fr; }

  .set-view, .set-view.no-list { grid-template-columns: minmax(0, 1fr); grid-template-areas: "x"; }
  .set-nav, .set-list, .set-content { grid-area: x; display: none; border-right: 0; }
  .set-view.show-nav .set-nav { display: block; }
  .set-view.show-list .set-list { display: flex; }
  .set-view.show-content .set-content { display: flex; }
  .set-view.no-list.show-list .set-content { display: flex; }
  .set-item small { display: block; }
  .chev { display: inline-flex; }
  .content-head { padding: 12px 12px 10px; }
  .content-scroll { padding: 16px 14px 28px; }
  .content-foot { padding: 10px 14px; }
  .pref-group { padding: 4px 14px 8px; }
  .pref-row { grid-template-columns: 1fr; gap: 8px; }
  .pref-row > .input { max-width: none; }
  .layout-pick { grid-template-columns: 1fr; }
  .list-head { padding: 12px 12px 8px; }
  .rule-row > select.input { min-width: 0; flex: 1 1 140px; }

  .page-wrap { padding: 16px 14px 40px; }
  .page-hero { padding: 20px; }
  .page-hero h1 { font-size: 21px; }
  .setup-grid { grid-template-columns: 1fr; }
  .steps li { padding-left: 44px; font-size: 14px; }

  .block-card { padding: 24px 18px; }
  .block-top { padding: 12px 14px; }
  .modal-wrap { padding: 10px; align-items: end; }
  .modal { max-height: calc(100dvh - 20px); }
  .toast { bottom: 76px; }
}
@media (max-width: 420px) {
  .tool-group .icon-btn { width: 34px; height: 34px; }
  .chk-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   YAZDIRMA
   ========================================================= */
@media print {
  body { overflow: visible; background: #fff; color: #000; }
  .topbar, .sidebar, .no-print, .toast, .tooltip { display: none !important; }
  .shell { display: block; height: auto; }
  .main, .print-view { overflow: visible; height: auto; background: #fff; }
  .print-sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block; }
}
.pref-row .seg { flex-wrap: nowrap; justify-self: start; }
