@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Marka kimliği v1.0: mürekkep, kâğıt, aile sarısı. Vurgu yalnızca küçük alanlarda.
   Tema: sistem ayarı izlenir; kullanıcı data-theme ile açık ya da koyuyu sabitleyebilir. */
:root {
  --ink: #121417;
  --paper: #F6F5F1;
  --acc: #FFC857;
  --bg: var(--paper);
  --fg: var(--ink);
  --fg2: #3A3D42;
  --muted: #6B6E73;
  --line: #E3E1DA;
  --line2: #EEECE6;
  --card: #FFFFFF;
  --hover: #F1EFE9;
  --late: #D63F44;
  --late-bg: #FBEBEB;
  --now: #9A6B00;
  --now-bg: #FFF4D9;
  --ok: #2F8A5B;
  --ok-bg: #E6F4EC;
  --info: #3D6FD1;
  --info-bg: #E8EFFC;
  --btn: var(--ink);
  --btn-fg: var(--paper);
  --avatar: var(--ink);
  --avatar-fg: var(--paper);
  --toast: var(--ink);
  --toast-fg: var(--paper);
  --shadow: 0 1px 2px rgba(18, 20, 23, .04), 0 4px 16px rgba(18, 20, 23, .04);
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F11; --fg: #F1F0EC; --fg2: #C4C6CB; --muted: #8E9197;
    --line: #25282C; --line2: #1E2124; --card: #16181B; --hover: #1D2023;
    --late: #FF6B6F; --late-bg: #2A1718; --now: #FFC857; --now-bg: #2A2414;
    --ok: #5BC48A; --ok-bg: #15261C; --info: #7FA5F0; --info-bg: #172033;
    --btn: #F1F0EC; --btn-fg: #121417; --avatar: #2A2D32; --avatar-fg: #F1F0EC; --toast: #2A2D32; --toast-fg: #F1F0EC;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F11; --fg: #F1F0EC; --fg2: #C4C6CB; --muted: #8E9197;
  --line: #25282C; --line2: #1E2124; --card: #16181B; --hover: #1D2023;
  --late: #FF6B6F; --late-bg: #2A1718; --now: #FFC857; --now-bg: #2A2414;
  --ok: #5BC48A; --ok-bg: #15261C; --info: #7FA5F0; --info-bg: #172033;
  --btn: #F1F0EC; --btn-fg: #121417; --avatar: #2A2D32; --avatar-fg: #F1F0EC; --toast: #2A2D32; --toast-fg: #F1F0EC;
  --shadow: none;
  color-scheme: dark;
}

/* Logonun açık ve koyu sürümü: seçili temaya göre biri gösterilir. */
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.5 Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
.dot { color: var(--acc); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 14px; height: 14px; }
.booting { min-height: 100vh; }
.hide { display: none !important; }

/* ---------- Çatı ---------- */
#app:not(.booting) { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px; padding: 22px 14px 14px;
  border-right: 1px solid var(--line);
}
.side-logo { padding: 2px 8px 0; display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 23px; width: auto; display: block; }
.logo .tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--fg2); font-weight: 500;
}
.nav-item:hover { background: var(--hover); color: var(--fg); }
.nav-item.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acc); color: var(--ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.badge.late { background: var(--late); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-weight: 500; font-size: 14px; min-width: 0; }
.side-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user:hover, .side-user.on { background: var(--hover); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--avatar); color: var(--avatar-fg); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.none { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }

.main { padding: 30px clamp(16px, 4vw, 44px) 104px; max-width: 1280px; width: 100%; min-width: 0; }
.mobile-top, .tabbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--fg); }

/* ---------- Ortak bileşenler ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 10px 2px; font-size: 14px; }
.foot-note { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.link { color: var(--fg2); font-size: 13.5px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--fg); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--acc); color: var(--ink); border-color: var(--acc); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg2); }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.block { width: 100%; height: 44px; }
.btn.danger, .icon-btn.danger { color: var(--late); }
.btn.danger-solid { background: var(--late); border-color: var(--late); color: #fff; }
.btn.ok { color: var(--ok); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn.boxed { border: 1px solid var(--line); background: var(--card); color: var(--fg2); }

.input, .select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font-size: 14px; min-width: 0; width: 100%;
}
.input[type="date"], .input[type="time"], .input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 38px; }
.input::-webkit-date-and-time-value { text-align: left; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus { outline: none; border-color: var(--fg); }
.select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px top 50%, right 10px top 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.sm, .input.sm { height: 34px; font-size: 13px; }

.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--fg2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Seçim çipleri: tür, sonuç, etiket, tarih kısayolları. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 500; color: var(--fg2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pick:hover { border-color: var(--muted); }
.pick.on { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); font-weight: 600; }
.pick.on.bad { background: var(--late); border-color: var(--late); color: #fff; }
.pick.on.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.pick.small { height: 30px; font-size: 12.5px; padding: 0 10px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg2); padding: 2px 9px; border-radius: 999px; background: var(--hover); white-space: nowrap; }
.chip.st-yeni { background: var(--hover); color: var(--fg2); }
.chip.st-ulasilamadi { background: var(--now-bg); color: var(--now); }
.chip.st-gorusuldu { background: var(--info-bg); color: var(--info); }
.chip.st-firsat { background: var(--acc); color: var(--ink); }
.chip.st-musteri { background: var(--ok-bg); color: var(--ok); }
.chip.st-kayip, .chip.st-uygun_degil { background: var(--late-bg); color: var(--late); }
.chip.warn { background: var(--now-bg); color: var(--now); }
.chip.outline { background: none; border: 1px solid var(--line); font-weight: 500; }

.meta { display: inline-flex; align-items: center; gap: 4px; }
.late { color: var(--late); font-weight: 600; }
.now { color: var(--now); font-weight: 600; }

/* ---------- Liste satırları ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; min-width: 0; }
.item + .item { border-top: 1px solid var(--line2); }
.item:hover { background: var(--hover); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.item-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; min-width: 0; }
.item-title > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12.5px; color: var(--muted); }
.item-side { display: flex; align-items: center; gap: 6px; flex: none; }
.check {
  width: 24px; height: 24px; border-radius: 50%; border: 1.8px solid var(--muted); flex: none; display: grid; place-items: center; color: transparent;
}
.check .ic { width: 13px; height: 13px; stroke-width: 3; }
.check:hover { border-color: var(--fg); color: var(--muted); }
.task-kind { width: 30px; height: 30px; border-radius: 9px; background: var(--hover); display: grid; place-items: center; color: var(--fg2); flex: none; }

/* ---------- Kurum listesi ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .select { width: auto; height: 36px; max-width: 220px; }
.search-wrap { position: relative; flex: 1 1 260px; display: flex; align-items: center; min-width: 0; }
.search-wrap .ic { position: absolute; left: 11px; color: var(--muted); }
.search { height: 40px; padding-left: 34px; }
.count-line { font-size: 13px; color: var(--muted); margin: 0 0 8px 2px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.acc-list .item { padding: 11px 8px; }

/* ---------- Kurum detayı ---------- */
.acc-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.acc-head h1 { overflow-wrap: anywhere; }
.acc-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.qa {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--fg2);
}
.qa:hover { border-color: var(--muted); color: var(--fg); }
.qa.off { opacity: .4; pointer-events: none; }
.qa .ic { width: 20px; height: 20px; }
.log-btn { margin-bottom: 16px; height: 52px; font-size: 15px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.kv a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 4px 0 14px; }
.step { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 0; min-width: 0; }
.step i { height: 6px; border-radius: 3px; background: var(--hover); display: block; }
.step.done i { background: var(--fg); }
.step.on i { background: var(--acc); }
.step.on { color: var(--fg); }
.step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.deal-nums div { background: var(--hover); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.deal-nums b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.deal-nums span { font-size: 12px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line2); }
.tl:first-child { border-top: 0; }
.tl-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--hover); display: grid; place-items: center; color: var(--fg2); }
.tl-ic.ok { background: var(--ok-bg); color: var(--ok); }
.tl-ic.bad { background: var(--late-bg); color: var(--late); }
.tl-ic.warn { background: var(--now-bg); color: var(--now); }
.tl-head { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; font-size: 14px; }
.tl-head b { font-weight: 600; }
.tl-meta { font-size: 12.5px; color: var(--muted); }
.tl-note { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; color: var(--fg2); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tl-actions { margin-left: auto; display: flex; gap: 2px; }
.stars { color: var(--now); letter-spacing: 1px; font-size: 12px; }
.history { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 500; }
details[open] summary { margin-bottom: 8px; }

.contact { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); }
.contact:first-child { border-top: 0; }

/* ---------- Pano ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--hover); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.lane.drop { outline: 2px dashed var(--fg); outline-offset: -2px; }
.lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.lane-head h3 { font-size: 13.5px; }
.lane-head span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.deal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
}
.deal-card[draggable="true"] { cursor: grab; }
.deal-card:hover { border-color: var(--muted); }
.deal-card.dragging { opacity: .4; }
.deal-card.cold { border-left: 3px solid var(--now); }
.deal-title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.deal-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.close-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.zone { border: 2px dashed var(--line); border-radius: var(--r); padding: 14px; text-align: center; font-weight: 600; color: var(--muted); font-size: 14px; }
.zone.drop.win { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.zone.drop.lose { border-color: var(--late); color: var(--late); background: var(--late-bg); }
.board-tabs { display: none; }

/* ---------- Bugün / ölçümler ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-align: left;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0;
}
a.stat:hover, button.stat:hover { border-color: var(--muted); }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat.late b { color: var(--late); }
.goals { display: flex; flex-direction: column; gap: 12px; }
.goal { display: grid; grid-template-columns: 110px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 14px; }
.goal-name { font-weight: 500; color: var(--fg2); }
.goal-num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.goal-num b { color: var(--fg); font-size: 15px; }
.bar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--fg); border-radius: 4px; }
.bar.full i { background: var(--ok); }
.bar.acc i { background: var(--acc); }
.bar.thin { height: 5px; }
.group-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px 6px; }
.group-label:first-child { margin-top: 0; }
.group-label.late { color: var(--late); }

/* ---------- Rapor tabloları ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.t th { text-align: right; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t th:first-child, .t td:first-child { text-align: left; white-space: normal; }
.t td.tags { text-align: left; white-space: normal; font-size: 12.5px; color: var(--fg2); min-width: 160px; }
.t tr:last-child td { border-bottom: 0; }
.t .pct { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.t .pct .bar { width: 52px; }
.t .over { color: var(--ok); font-weight: 700; }
.t .under { color: var(--fg); }
.t input { width: 64px; text-align: right; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.insight { background: var(--now-bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--fg2); margin-bottom: 14px; }
.insight b { color: var(--fg); }

/* ---------- Formlar ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg2); min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.wide { grid-column: 1 / -1; }
.check-line { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 14px !important; color: var(--fg) !important; }
.check-line input { width: 18px; height: 18px; accent-color: var(--fg); flex: none; }
.form-err { color: var(--late); font-size: 13.5px; }
.form-err:empty { display: none; }
.note-info { font-size: 13px; color: var(--fg2); background: var(--now-bg); padding: 8px 12px; border-radius: 10px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .06em; background: var(--hover); padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; user-select: all; }
.section-title { margin: 6px 0 2px; }

/* ---------- Pencereler ---------- */
.modal {
  border: 0; padding: 0; border-radius: 18px; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--card); color: var(--fg); box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
}
.modal::backdrop { background: rgba(18, 20, 23, .4); backdrop-filter: blur(2px); }
.modal-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -4px -8px -2px 0; }
.modal-head h2 { font-size: 19px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.confirm-modal { width: min(420px, calc(100vw - 32px)); }
.confirm-msg { font-size: 16px; line-height: 1.5; }
.picker-results { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.picker-results button { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line2); font-size: 14px; }
.picker-results button:first-child { border-top: 0; }
.picker-results button:hover { background: var(--hover); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--hover); border-radius: 10px; padding: 8px 12px; font-weight: 600; }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; grid-column: 1 / -1; }
.auth-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.auth-logo { margin-bottom: 14px; }
.auth-logo img { height: 30px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- Ekle düğmesi ---------- */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
  background: var(--acc); color: var(--ink); box-shadow: 0 8px 24px rgba(18, 20, 23, .18);
}
.fab:hover { filter: brightness(.97); }
body:has(dialog[open]) .fab { display: none; }

/* ---------- Çevrimdışı şeridi ---------- */
:root { --offline-h: calc(26px + env(safe-area-inset-top)); }
body.offline::before {
  content: 'Çevrimdışı · son görülen veriler gösteriliyor, görüşme kayıtları sıraya alınır'; position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: var(--offline-h); padding: calc(4px + env(safe-area-inset-top)) 12px 0; box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-align: center; font-size: 12.5px; font-weight: 600; background: var(--acc); color: var(--ink);
}
body.offline[data-offline="server"]::before { content: 'Sunucuya ulaşılamıyor · son görülen veriler gösteriliyor'; }
body.offline { padding-top: var(--offline-h); }
body.offline .side { top: var(--offline-h); height: calc(100vh - var(--offline-h)); }
.queue-note { background: var(--now-bg); color: var(--fg2); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Bildirim ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--toast); color: var(--toast-fg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-right: 9px; vertical-align: 2px; }
.toast.err::before { background: var(--late); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Dar ekran ---------- */
@media (max-width: 1100px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #app:not(.booting) { display: block; }
  /* iOS 16 pikselden küçük kutulara odaklanınca sayfayı büyütür. */
  input, select, textarea, .input, .select, .select.sm, .input.sm, .search { font-size: 16px; }
  html, body { overflow-x: clip; }
  .side { display: none; }
  .mobile-top {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-top .row { gap: 2px; flex-wrap: nowrap; }
  body.offline .mobile-top { top: var(--offline-h); padding-top: 10px; }
  .mobile-top .logo img { height: 21px; }
  .main { padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; box-shadow: none; background: none; justify-content: center; position: relative; }
  .tabbar .nav-item.on { color: var(--fg); }
  .tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; font-size: 10.5px; }
  .tab-add { width: 50px; height: 50px; border-radius: 16px; background: var(--acc); color: var(--ink); display: grid; place-items: center; justify-self: center; align-self: center; }
  .tab-add .ic { width: 24px; height: 24px; stroke-width: 2.4; }
  .fab { display: none; }
  #toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .card { padding: 14px; }
  .stats { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 22px; }
  .page-head { margin-bottom: 14px; }
  .fields { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .modal.confirm-modal { margin: auto; border-radius: 18px; width: calc(100vw - 32px); }
  .modal-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .filters .select { flex: 1 1 140px; max-width: none; }
  .board { display: block; }
  .board .lane { display: none; background: none; padding: 0; min-height: 0; }
  .board .lane.on { display: flex; }
  .board .lane-head { display: none; }
  .board-tabs { display: flex; margin-bottom: 12px; width: 100%; }
  .board-tabs button { flex: 1; justify-content: center; padding: 0 6px; }
  .close-zones { display: none; }
  .goal { grid-template-columns: 90px minmax(0, 1fr) 56px; }
  .hbar { grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 30px; }
  .item-side .hide-m { display: none; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
