/* Posta Masası — Afyon mermeri: soğuk beyaz zemin, menekşe damar, traverten notlar. */
:root {
  --marble: #f4f4f6;      /* zemin */
  --slab: #ffffff;        /* yüzey */
  --slab-2: #faf9fb;      /* ikinci yüzey */
  --ink: #22202a;
  --ink-2: #4a4655;
  --muted: #64606d;
  --vein: #dedbe4;        /* çizgiler */
  --vein-2: #ebe9ef;
  --violet: #5b3f7a;      /* Afyon menekşe */
  --violet-deep: #452e5e;
  --violet-tint: #efe9f5;
  --travertine: #ede4d6;
  --travertine-ink: #6e5228;
  --ok: #2d6a4f; --ok-tint: #e6f1eb;
  --warn: #9a5f12; --warn-tint: #f6ecdc;
  --no: #a3363b; --no-tint: #f7e7e8;
  --info: #3c5a8a; --info-tint: #e8eef7;
  --wa: #1f7a4a;
  --radius: 10px; --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(34, 32, 42, .05), 0 4px 16px -8px rgba(34, 32, 42, .12);
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Marcellus", Georgia, serif;
  --side-w: 15rem;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--marble); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1 { font: 400 2.15rem/1.15 var(--display); margin: 0; letter-spacing: .005em; text-wrap: balance; }
h2 { font-weight: 600; font-size: 1.05rem; margin: 0; letter-spacing: -.005em; }
h3 { font-weight: 600; font-size: .92rem; margin: 0 0 .45rem; color: var(--ink-2); }
p { margin: 0; }
code { background: var(--slab-2); border: 1px solid var(--vein); border-radius: 5px; padding: .05em .35em; font-size: .86em; }
a { color: var(--violet); text-underline-offset: .18em; }
a:hover { color: var(--violet-deep); }
.muted { color: var(--muted); }
.sub { font-size: .84rem; color: var(--muted); }
.lede { color: var(--muted); margin-top: .35rem; }
.narrow { max-width: 68ch; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 50; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 8px; }
.skip:focus { left: .5rem; }
svg { flex: none; }

/* ---------- Kontroller ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--vein); background: var(--slab); border-radius: 8px; padding: .5rem .95rem; min-height: 2.5rem; font-weight: 500; line-height: 1.2; transition: background-color .15s, border-color .15s, color .15s; }
button:hover { border-color: #c5c0cf; background: var(--slab-2); }
button:active { transform: translateY(1px); }
button.primary { background: var(--violet); border-color: var(--violet); color: #fff; }
button.primary:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--vein-2); }
button.small { padding: .3rem .7rem; min-height: 2.1rem; font-size: .86rem; }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--violet); text-decoration: underline; text-underline-offset: .18em; font-weight: 500; }
button.link:hover { color: var(--violet-deep); background: none; }
button:disabled, button:disabled:hover { opacity: .45; cursor: not-allowed; transform: none; background: var(--slab); border-color: var(--vein); }
button.primary:disabled { background: var(--violet); border-color: var(--violet); }
.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border-color: transparent; background: transparent; }
.icon-btn svg, .nav svg, .search svg, .back::before { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a.button { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; text-decoration: none; color: #fff; background: var(--wa); border-radius: 8px; padding: .5rem .95rem; font-weight: 500; line-height: 1.2; }
a.button:hover { background: #17633b; color: #fff; }
a.button.small { min-height: 2.1rem; padding: .3rem .7rem; font-size: .86rem; }
a.button svg { width: 1rem; height: 1rem; fill: currentColor; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=time], input[type=number], input[type=url], input[type=date], select, textarea {
  background: var(--slab); border: 1px solid var(--vein); border-radius: 8px; padding: .5rem .7rem; min-height: 2.5rem; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #c5c0cf; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
input:disabled, textarea:disabled { background: var(--slab-2); color: var(--ink-2); }
input[type=checkbox], input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: var(--violet); margin: 0; }
textarea { width: 100%; resize: vertical; line-height: 1.55; }
label.field { display: block; margin: 1rem 0; font-weight: 500; font-size: .92rem; }
label.field input, label.field select { display: block; width: 100%; margin-top: .35rem; font-weight: 400; font-size: 15px; }
label.field small { display: block; font-weight: 400; color: var(--muted); margin-top: .3rem; font-size: .84rem; }
label.check { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; }

/* ---------- İskelet ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem .9rem; background: var(--slab); border-right: 1px solid var(--vein); }
.brand { display: flex; align-items: center; gap: .65rem; padding: 0 .45rem; }
.brand-mark { width: 2.1rem; height: 2.1rem; }
.brand b { display: block; font: 400 1.15rem/1.1 var(--display); }
.brand span { font-size: .78rem; color: var(--muted); }
.nav { display: grid; gap: .2rem; }
.nav button { display: flex; align-items: center; gap: .7rem; width: 100%; border: 0; background: transparent; color: var(--ink-2); padding: .55rem .7rem; min-height: 2.75rem; text-align: left; border-radius: 9px; }
.nav button:hover { background: var(--marble); }
.nav button.active { background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; }
.nav button.active svg { stroke: var(--violet); }
.count { margin-left: auto; min-width: 1.45rem; padding: .05rem .4rem; border-radius: 99px; background: var(--violet); color: #fff; font-size: .74rem; font-weight: 600; text-align: center; }
.side-foot { margin-top: auto; display: grid; gap: .9rem; padding-top: .85rem; border-top: 1px solid var(--vein-2); }
.engine { display: grid; gap: .5rem; padding: 0 .7rem; font-size: .84rem; color: var(--muted); }
.me-line { display: grid; gap: .3rem; padding: 0 .45rem; }
.me { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.me b { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me span:not(.avatar) { font-size: .78rem; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; font-size: .9rem; }
.me-line button { justify-self: start; }
.engine .meter { height: 5px; border-radius: 99px; background: var(--vein-2); overflow: hidden; }
.engine .meter > span { display: block; height: 100%; background: var(--violet); border-radius: inherit; }
.engine .state { display: flex; align-items: center; gap: .45rem; color: var(--ink-2); }
.engine .state.off { color: var(--no); }
.engine button { justify-self: start; margin-left: -.7rem; }
.content { min-width: 0; }
main { padding: 2rem clamp(1rem, 3.5vw, 2.75rem) 7rem; max-width: 84rem; }
.page-head { margin-bottom: 1.5rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: none; padding: .25rem .2rem; min-height: 2.25rem; color: var(--muted); margin: 0 0 .9rem -.2rem; }
.back::before { content: ""; width: 1.1rem; height: 1.1rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.back:hover { color: var(--ink); background: none; }
.banner { margin: 1rem clamp(1rem, 3.5vw, 2.75rem) 0; max-width: calc(84rem - 2 * clamp(1rem, 3.5vw, 2.75rem)); padding: .8rem 1rem; border-radius: var(--radius); background: var(--travertine); color: var(--travertine-ink); display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.banner button.link { color: inherit; }
.banner.err { background: var(--no-tint); color: var(--no); }

/* ---------- Ortak bloklar ---------- */
.block { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.block-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: 1rem 1.2rem .2rem; }
.block-head .n { font-size: .82rem; font-weight: 600; color: var(--violet-deep); background: var(--violet-tint); border-radius: 99px; padding: .05rem .55rem; }
.block-head .push { margin-left: auto; }
.block-text { padding: .3rem 1.2rem 0; color: var(--muted); font-size: .9rem; max-width: 64ch; }
.block-body { padding: .9rem 1.2rem 1.2rem; display: grid; gap: .75rem; }
.block.hot { border-color: #cdbfdc; }
.block.hot .block-head h2::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--violet); margin-right: .55rem; vertical-align: .12em; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.push { margin-left: auto; }
.items { display: grid; gap: .6rem; }
.ok-text { color: var(--ok); } .err-text { color: var(--no); }
.note { background: var(--travertine); color: var(--travertine-ink); border-radius: var(--radius); padding: .7rem .9rem; font-size: .9rem; margin: 0; }

/* ---------- Bugün ---------- */
.clocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin-bottom: 1.75rem; border: 1px solid var(--vein); border-radius: var(--radius-lg); background: var(--slab); overflow: hidden; box-shadow: var(--shadow); }
.clock { position: relative; padding: .85rem 1rem .9rem; border-left: 1px solid var(--vein-2); display: grid; gap: .1rem; }
.clock:first-child { border-left: 0; }
.clock::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--c, var(--vein)); }
.clock:first-child::before { inset: 0 auto 0 0; }
.clock.green { --c: var(--ok); } .clock.yellow { --c: #c08a2e; } .clock.red { --c: #c9c4d1; }
.clock .t { font-size: 1.55rem; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.clock.red .t { color: var(--muted); }
.clock .z { font-weight: 600; font-size: .9rem; }
.clock .s { font-size: .8rem; color: var(--muted); }
.today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); gap: 1.5rem; align-items: start; }
.today-main, .today-side { display: grid; gap: 1.25rem; min-width: 0; }
.stat { display: grid; gap: .25rem; padding: 1rem 1.2rem; }
.stat + .stat { border-top: 1px solid var(--vein-2); }
.stat .big { font-size: 1.6rem; font-weight: 500; line-height: 1.1; }
.stat .big small { font-size: .95rem; color: var(--muted); font-weight: 400; }
.stat .meter { height: 6px; border-radius: 99px; background: var(--vein-2); overflow: hidden; margin: .35rem 0 .1rem; }
.stat .meter > span { display: block; height: 100%; background: var(--violet); }
.stat .row { margin-top: .5rem; }
.done-note { padding: 2.2rem 1.4rem; text-align: center; color: var(--muted); }
.done-note b { display: block; font: 400 1.4rem/1.3 var(--display); color: var(--ink); margin-bottom: .35rem; }
.reply-list { display: grid; }
.reply-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--vein-2); }
.reply-row:first-child { border-top: 0; padding-top: .2rem; }
.reply-row .grow { flex: 1 1 13rem; min-width: 0; }
.reply-row .grow b { font-weight: 600; }

/* WhatsApp görevi */
.task { border: 1px solid var(--vein); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .6rem; background: var(--slab-2); }
.task-head { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.task-head b { font-weight: 600; }
.task textarea { background: var(--slab); font-size: .92rem; }
.task .row { gap: .4rem; }

/* ---------- Firmalar ---------- */
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--vein); scrollbar-width: none; }
.tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); margin-bottom: -1px; padding: .6rem .8rem; min-height: 2.75rem; }
.tabs button:hover { color: var(--ink); background: transparent; }
.tabs button[aria-selected=true] { border-bottom-color: var(--violet); color: var(--ink); font-weight: 600; }
.tabs button .muted { font-weight: 400; margin-left: .15rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.search { position: relative; display: block; flex: 0 1 22rem; }
.search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 1.1rem; height: 1.1rem; }
.search input { width: 100%; padding-left: 2.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-size: .82rem; padding: .2rem .6rem; min-height: 2rem; border-radius: 99px; background: var(--violet-tint); color: var(--violet-deep); border: 0; font-weight: 500; }
.chip:hover { background: #e2d8ee; }
.filter-panel { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; padding: .9rem 1.1rem; margin-bottom: 1rem; background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius); }
.filter-panel label:not(.check) { display: inline-flex; gap: .5rem; align-items: center; font-weight: 500; font-size: .9rem; }
.table-wrap { overflow-x: auto; background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.firms { min-width: 860px; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--vein-2); vertical-align: middle; }
th { font-weight: 500; color: var(--muted); font-size: .82rem; background: var(--slab-2); position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: 0; }
table.firms tbody tr { cursor: pointer; transition: background-color .12s; }
table.firms tbody tr:hover { background: var(--slab-2); }
table.firms tbody tr.sel { background: var(--violet-tint); }
th.cb, td.cb { width: 2.75rem; cursor: default; padding-right: 0; }
td.cb input { display: block; }
.firm { font-weight: 600; }
.tag { display: inline-block; font-size: .72rem; font-weight: 500; padding: .05rem .45rem; border-radius: 5px; background: var(--travertine); color: var(--travertine-ink); margin-left: .4rem; vertical-align: .1em; }
.tag.custom { background: var(--violet-tint); color: var(--violet-deep); }
.actions { white-space: nowrap; text-align: right; }

.time { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.time b { font-weight: 600; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; }
.dot.green { background: var(--ok); } .dot.yellow { background: #c08a2e; } .dot.red { background: #bdb7c6; }
.badge { display: inline-flex; align-items: center; gap: .35rem; border-radius: 99px; padding: .12rem .6rem; font-size: .8rem; font-weight: 500; white-space: nowrap; background: var(--vein-2); color: var(--ink-2); }
.badge.contacted { background: var(--info-tint); color: var(--info); }
.badge.replied { background: var(--ok-tint); color: var(--ok); }
.badge.deal { background: var(--ok); color: #fff; }
.badge.silent { background: var(--warn-tint); color: var(--warn); }
.badge.nurture { background: var(--violet-tint); color: var(--violet-deep); }
.badge.low_priority { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--vein); }
.badge.invalid, .badge.do_not_contact, .badge.unsubscribed { background: var(--no-tint); color: var(--no); }
.next { font-size: .86rem; white-space: nowrap; color: var(--ink-2); }
.next.due { color: var(--no); font-weight: 600; }

.bulk { position: fixed; left: var(--side-w); right: 0; bottom: 0; display: flex; gap: .7rem; align-items: center; justify-content: flex-end; padding: .8rem clamp(1rem, 3.5vw, 2.75rem); padding-bottom: calc(.8rem + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; z-index: 6; }
.bulk > span { margin-right: auto; font-weight: 500; }
.bulk select { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.bulk select option { color: var(--ink); }
.bulk button.ghost { color: #fff; }
.bulk button.ghost:hover { background: rgba(255,255,255,.1); }
.bulk button.primary { background: #fff; color: var(--violet-deep); border-color: #fff; }
.bulk button.primary:hover { background: var(--violet-tint); }

/* ---------- Çekmece ---------- */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(34, 32, 42, .38); animation: fade .18s ease-out; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(42rem, 100%); background: var(--marble); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(34, 32, 42, .18); animation: slide .22s cubic-bezier(.2, .8, .2, 1); outline: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.4rem 1rem; background: var(--slab); border-bottom: 1px solid var(--vein); }
.drawer-head h2 { font: 400 1.6rem/1.2 var(--display); margin: 0 0 .3rem; }
.drawer-head .sub { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; display: grid; gap: 1rem; align-content: start; }
.drawer-foot { padding: .9rem 1.4rem; padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); background: var(--slab); border-top: 1px solid var(--vein); display: flex; gap: .6rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.drawer-foot:empty { display: none; }
.drawer-foot .msg { margin-right: auto; color: var(--no); font-size: .9rem; }
@keyframes slide { from { transform: translateX(2.5rem); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.action-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
details.section { border: 1px solid var(--vein); border-radius: var(--radius); background: var(--slab); }
details.section > summary { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; min-height: 2.9rem; cursor: pointer; font-weight: 600; list-style: none; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: ""; width: .5rem; height: .5rem; border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
details.section[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details.section > .inner { padding: 0 1rem 1rem; display: grid; gap: .6rem; }
.choice { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.choice button { border-radius: 99px; }
.choice button[aria-pressed=true] { background: var(--violet); border-color: var(--violet); color: #fff; }
.choice select { border-radius: 99px; }
.drawer-body h3 { margin-bottom: .5rem; }
.mail-preview { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .6rem; }
.mail-preview > b { font-weight: 600; font-size: 1.02rem; }
.mail-preview pre { white-space: pre-wrap; font-family: var(--font); margin: 0; font-size: .92rem; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.msg-card { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius); padding: .8rem 1rem; display: grid; gap: .2rem; justify-items: start; }
.msg-card b { font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; }
.timeline li { position: relative; padding: .35rem 0 .35rem 1.2rem; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: .2rem; top: .85rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--vein); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: calc(.4rem - .5px); top: 1.3rem; bottom: -.4rem; width: 1px; background: var(--vein-2); }
.when { display: grid; gap: .35rem; }
.when label { display: flex; gap: .55rem; align-items: center; min-height: 2.5rem; }
.when input[type=time] { min-height: 2.2rem; padding: .25rem .5rem; }

/* ---------- Özel mail onayı ---------- */
.review { max-width: 54rem; display: grid; gap: 1rem; }
.review-progress { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-weight: 500; }
.bar { flex: 1 1 10rem; height: 6px; background: var(--vein); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--violet); transition: width .25s ease-out; }
.cmail { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; display: grid; gap: .75rem; box-shadow: var(--shadow); }
.cmail.approved { border-color: #b9d6c6; }
.cmail-head { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.cmail-head > b { font: 400 1.4rem/1.2 var(--display); }
.cmail input[type=text] { width: 100%; font-weight: 600; }
.cmail textarea { font-size: .95rem; }
.cmail .tail { white-space: pre-wrap; color: var(--muted); font-size: .85rem; border-left: 2px solid var(--vein); padding-left: .8rem; }
.research { font-size: .87rem; background: var(--slab-2); border: 1px solid var(--vein-2); border-radius: var(--radius); padding: .7rem .9rem; color: var(--ink-2); }
.research a { margin-right: .8rem; }
.vtag { display: inline-block; font-size: .74rem; font-weight: 600; padding: .05rem .5rem; border-radius: 5px; margin-right: .35rem; }
.vtag.site { background: var(--ok-tint); color: var(--ok); }
.vtag.liste { background: var(--warn-tint); color: var(--warn); }
.review-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.review-actions .push { margin-left: auto; }

/* ---------- Ayarlar ---------- */
.settings { display: grid; gap: 1rem; max-width: 50rem; }
.panel { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.panel > h2 { margin-bottom: .8rem; }
.panel-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.panel-head h2 { margin: 0; }
.panel-head .push { margin-left: auto; }
.panel .section { margin-top: .6rem; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); margin-right: .45rem; }
.status-dot.off { background: var(--no); }
.steps { padding-left: 1.2rem; margin: .9rem 0 0; color: var(--ink-2); } .steps li { margin: .35rem 0; }
.flow-steps { margin: .4rem 0 1rem; padding-left: 1.2rem; color: var(--ink-2); font-size: .92rem; } .flow-steps li { margin: .4rem 0; }
.num { width: 4.75rem; }
table.occ { font-size: .88rem; }
table.occ th { position: static; }
table.occ input[type=text] { width: 100%; }
.panel > details:not(.section) { margin-top: .6rem; }
.panel > details:not(.section) > summary { display: inline-flex; align-items: center; min-height: 2.5rem; cursor: pointer; color: var(--violet); font-weight: 500; font-size: .9rem; text-decoration: underline; text-underline-offset: .18em; }
.panel > details:not(.section)[open] > summary { margin-bottom: .4rem; }
.panel > details:not(.section) p { margin: .6rem 0; }
.tpl { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius); padding: 0; margin-bottom: .7rem; max-width: 54rem; }
.tpl > summary { padding: .85rem 1.1rem; cursor: pointer; display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; }
.tpl > summary b { font-weight: 600; }
.tpl[open] { box-shadow: var(--shadow); }
.tpl[open] > summary { border-bottom: 1px solid var(--vein-2); }
.tpl > :not(summary) { margin: .7rem 1.1rem; }
.tpl input[type=text] { width: calc(100% - 2.2rem); display: block; font-weight: 600; }
.tpl textarea { width: calc(100% - 2.2rem); display: block; }
.tpl button { margin-bottom: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.card { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); padding: 1rem 1.2rem; display: grid; gap: .2rem; box-shadow: var(--shadow); }
.card b { font-size: 1.6rem; font-weight: 500; }
table.queue td:first-child { white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); max-width: min(30rem, calc(100% - 2rem)); background: var(--ink); color: #fff; padding: .75rem 1.1rem; border-radius: 10px; z-index: 30; box-shadow: 0 8px 30px rgba(34, 32, 42, .3); animation: rise .2s ease-out; }
.toast.err { background: var(--no); }
@keyframes rise { from { transform: translate(-50%, .6rem); opacity: 0; } }
body:has(.bulk:not([hidden])) .toast { bottom: 5.5rem; }

/* ---------- Ekip, konuşma, notlar ---------- */
.page-head-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.seg { display: inline-flex; padding: .2rem; gap: .15rem; border-radius: 10px; background: var(--slab); border: 1px solid var(--vein); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; min-height: 2.25rem; padding: .35rem .8rem; color: var(--ink-2); border-radius: 8px; }
.seg button[aria-pressed=true] { background: var(--violet-tint); color: var(--violet-deep); font-weight: 600; }
.tag.owner { background: var(--info-tint); color: var(--info); }
.tag.bad { background: var(--no-tint); color: var(--no); }
mark { background: var(--warn-tint); color: var(--warn); padding: 0 .25em; border-radius: 3px; font-weight: 600; }
.snippet { margin: .45rem 0 0; padding: .45rem .7rem; border-left: 2px solid #cdbfdc; background: var(--slab-2); color: var(--ink-2); font-size: .88rem; border-radius: 0 6px 6px 0; max-width: 70ch; overflow-wrap: anywhere; }
.block.warn { border-color: #e4c99b; }
.block.warn.hot .block-head h2::before { background: var(--warn); }
button.danger { background: var(--no); border-color: var(--no); color: #fff; }
button.danger:hover { background: #8a2c31; border-color: #8a2c31; }
.danger-text { color: var(--no) !important; }
button.link.strong { font-weight: 600; color: var(--ink); text-decoration: none; }
button.link.strong:hover { text-decoration: underline; }
.reply-row.tight { padding: .5rem 0; }
.reply-row .row { gap: .4rem; }
.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid2 > * { min-width: 0; }
.form label.field, .drawer-body label.field { margin: .6rem 0; }
.form select, .form textarea, .drawer-body .grid2 select, .drawer-body .grid2 textarea { width: 100%; display: block; margin-top: .35rem; font-weight: 400; }
label.field textarea { display: block; margin-top: .35rem; font-weight: 400; }
.msg-card.in { border-left: 3px solid var(--violet); }
.msg-card.out { background: var(--slab-2); }
.msg-meta { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: baseline; }
.dir { font-size: .74rem; font-weight: 600; color: var(--violet-deep); }
.msg-card.out .dir { color: var(--muted); }
.mail-text { white-space: pre-wrap; font-size: .92rem; line-height: 1.6; color: var(--ink-2); max-width: 72ch; overflow-wrap: anywhere; margin-top: .25rem; }
.msg-card .row { margin-top: .3rem; }
.composer { background: var(--slab); border: 1px solid #cdbfdc; border-radius: var(--radius); padding: .9rem 1rem 1rem; display: grid; gap: .55rem; box-shadow: 0 0 0 4px var(--violet-tint); }
.composer h3 { margin: 0; color: var(--violet-deep); }
.composer .icon-btn { width: 2.25rem; height: 2.25rem; }
.note-add { display: grid; gap: .5rem; justify-items: start; }
.team-note { border-top: 1px solid var(--vein-2); padding-top: .6rem; display: grid; gap: .2rem; }
.team-note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.team-note.done p { color: var(--muted); text-decoration: line-through; }
.team-note.list-note p { color: var(--ink-2); font-size: .9rem; }
.reminder-add { display: grid; gap: .5rem; }
.reminder-add input[type=text] { flex: 1 1 12rem; }
.email-list { display: grid; gap: .1rem; margin-bottom: .4rem; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; padding: .45rem 0; border-bottom: 1px solid var(--vein-2); }
.email-row .grow { flex: 1 1 12rem; overflow-wrap: anywhere; font-weight: 500; }
.email-row.bounced .grow { color: var(--no); text-decoration: line-through; }
.email-row .tag { margin-left: 0; }
.note.warn { background: var(--warn-tint); color: var(--ink-2); }
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1rem; background: rgba(34, 32, 42, .55); backdrop-filter: blur(3px); }
.gate .login-box h1 { margin: 0 0 .2rem; font-size: 1.7rem; }
.gate .login-box input { width: 100%; display: block; margin-top: .35rem; }
.login-help { margin-top: 1.1rem; }
.login-box label.field input { width: 100%; display: block; margin-top: .35rem; }

/* ---------- Kullanıcılar ---------- */
.update-bar { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 35; display: flex; gap: .7rem; align-items: center; padding: .55rem .6rem .55rem 1rem; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 8px 30px rgba(34, 32, 42, .3); }
.from-box { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--vein-2); display: grid; gap: .5rem; }
.from-box h3 { margin: 0; }
.from-box input { flex: 1 1 16rem; }
.table-wrap.flat { box-shadow: none; margin-top: .8rem; }
table.users td { vertical-align: top; }
table.users tr.inactive td { color: var(--muted); }
table.users .tag { margin-left: .35rem; }
.row.end { justify-content: flex-end; }
.temp-pass { margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--ok-tint); display: grid; gap: .4rem; }
.temp-pass code { font-size: 1.05rem; padding: .3rem .6rem; background: var(--slab); letter-spacing: .03em; user-select: all; }
.add-user input { flex: 1 1 10rem; }
.mt { margin-top: 1.2rem; }

/* ---------- Rapor ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.tile { background: var(--slab); border: 1px solid var(--vein); border-radius: var(--radius-lg); padding: .9rem 1.1rem; display: grid; gap: .15rem; align-content: start; box-shadow: var(--shadow); }
.tile b { font-size: 1.7rem; font-weight: 500; line-height: 1.15; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.25rem; align-items: start; }
.report-h { margin: 2rem 0 .2rem; font-size: 1.15rem; }
.report-sub { margin-bottom: .7rem; }
.funnel { display: grid; gap: .65rem; }
.funnel-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 3rem; align-items: center; gap: .7rem; font-size: .9rem; }
.funnel-track { height: 14px; border-radius: 4px; background: var(--vein-2); overflow: hidden; }
.funnel-bar { display: block; height: 100%; background: var(--chart, #7a4fb0); border-radius: 0 4px 4px 0; }
.funnel-n { text-align: right; font-weight: 600; }
.chart { margin: 0 0 1.1rem; position: relative; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .55rem; font-size: .92rem; }
.chart .plot { position: relative; height: 120px; margin-left: 1.8rem; border-bottom: 1px solid var(--vein); }
.chart .grid-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--vein-2); }
.chart .y-label { position: absolute; left: -1.8rem; width: 1.5rem; text-align: right; font-size: .72rem; color: var(--muted); transform: translateY(50%); }
.chart .cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart .col { flex: 1; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; border-radius: 0; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.chart .col:hover { background: rgba(122, 79, 176, .06); }
.chart .col .cbar { display: block; width: min(24px, 70%); background: #7a4fb0; border-radius: 4px 4px 0 0; min-height: 0; }
.chart .col .cbar.zero { height: 2px !important; background: var(--vein); }
.chart .x-labels { display: flex; gap: 2px; margin-left: 1.8rem; margin-top: .35rem; }
.chart .x-labels span { flex: 1; text-align: center; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: visible; }
.chart-tip { position: absolute; top: 1.6rem; transform: translateX(-50%); margin-left: .9rem; background: var(--ink); color: #fff; font-size: .8rem; padding: .3rem .55rem; border-radius: 6px; pointer-events: none; white-space: nowrap; z-index: 2; }
.chart-table > summary { cursor: pointer; font-size: .86rem; color: var(--violet); min-height: 2.25rem; display: flex; align-items: center; }
table.data th.num, table.data td.num { text-align: right; white-space: nowrap; }
table.data th { position: static; }
.rate { display: inline-flex; align-items: center; gap: .5rem; justify-content: flex-end; }
.rate-bar { width: 4.5rem; height: 6px; border-radius: 99px; background: var(--vein-2); overflow: hidden; }
.rate-bar > span { display: block; height: 100%; background: #7a4fb0; }

/* ---------- İşlem kaydı ---------- */
table.audit td { vertical-align: top; font-size: .9rem; }
table.audit th { position: static; }
.nowrap { white-space: nowrap; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--muted); }
.audit-detail { margin-top: .3rem; }
.audit-detail > summary { cursor: pointer; color: var(--violet); font-size: .84rem; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .4rem; }
.audit-detail pre { white-space: pre-wrap; font-family: var(--font); font-size: .82rem; background: var(--slab-2); border: 1px solid var(--vein-2); border-radius: 6px; padding: .5rem .6rem; margin: .2rem 0 0; max-height: 16rem; overflow: auto; }

/* ---------- Giriş ---------- */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background: radial-gradient(120% 90% at 85% 0%, var(--violet-tint) 0, transparent 55%), var(--marble); }
.login-box { width: min(24rem, 100%); background: var(--slab); border: 1px solid var(--vein); border-radius: 18px; padding: 2rem 1.8rem 1.8rem; box-shadow: 0 20px 60px -30px rgba(69, 46, 94, .45); }
.login-box h1 { margin-top: 1rem; }
.login-box .lede { margin-bottom: .5rem; }
.login-box button { width: 100%; min-height: 2.9rem; }
.login-box .err-text { margin-top: .8rem; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .today { grid-template-columns: minmax(0, 1fr); }
  .today-side { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}
@media (max-width: 820px) {
  :root { --side-w: 0px; }
  body { font-size: 15px; }
  .shell { display: block; }
  .side { position: fixed; inset: auto 0 0 0; height: auto; z-index: 15; flex-direction: row; align-items: center; gap: 0; padding: .3rem .5rem calc(.3rem + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--vein); }
  .brand, .side-foot { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .page-head-row { flex-direction: column; align-items: stretch; }
  .page-head-row .push { margin-left: 0; }
  .report-grid { grid-template-columns: 1fr; }
  .audit td:nth-child(5), .audit th:nth-child(5) { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; gap: 0; }
  .nav button { flex: 1; flex-direction: column; gap: .15rem; justify-content: center; padding: .35rem .2rem; font-size: .74rem; min-height: 3.2rem; position: relative; text-align: center; }
  .nav button.active { background: transparent; }
  .nav .count { position: absolute; top: .2rem; left: calc(50% + .45rem); margin: 0; font-size: .66rem; min-width: 1.2rem; padding: 0 .3rem; }
  main { padding: 1.25rem 1rem 8rem; }
  .banner { margin: .75rem 1rem 0; }
  h1 { font-size: 1.75rem; }
  .clocks { grid-template-columns: repeat(2, 1fr); }
  .clock:nth-child(odd) { border-left: 0; }
  .clock:nth-child(n+3) { border-top: 1px solid var(--vein-2); }
  .bulk { left: 0; bottom: calc(3.9rem + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .toast { bottom: 5rem; }
  .search { flex: 1 1 100%; }
  .drawer-panel { width: 100%; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 1rem; padding-right: 1rem; }
  /* Firmalar tablosu kart görünümüne geçer */
  table.firms { min-width: 0; }
  table.firms thead { display: none; }
  table.firms tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .75rem; padding: .85rem .9rem; border-bottom: 1px solid var(--vein-2); }
  table.firms td { padding: 0; border: 0; }
  table.firms td.cb { grid-row: 1 / span 3; padding-top: .2rem; width: auto; }
  table.firms td:nth-child(2) { grid-column: 2 / 4; }
  table.firms td:nth-child(3) { grid-column: 2; }
  table.firms td:nth-child(4) { grid-column: 3; justify-self: end; }
  table.firms td:nth-child(5) { grid-column: 2; }
  table.firms td.actions { grid-column: 3; justify-self: end; }
  table.firms .time .sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
