/* ElityFlow — evrak & mühür temalı arayüz */
:root {
  --paper: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --ink: #1b2430;
  --ink-2: #4a5566;
  --ink-3: #7b8594;
  --line: #dde1da;
  --line-2: #c9cec5;
  --primary: #24408e;
  --primary-2: #1b3274;
  --primary-soft: #e6ebf8;
  --ok: #1e7a4c;
  --ok-soft: #e2f2e9;
  --bad: #b3261e;
  --bad-soft: #fbe7e5;
  --warn: #a8661a;
  --warn-soft: #fbf0dd;
  --info: #24408e;
  --info-soft: #e6ebf8;
  --side: #17213a;
  --side-ink: #c9d1e4;
  --side-hover: #22305a;
  --shadow: 0 1px 2px rgba(23, 33, 58, .06), 0 4px 16px rgba(23, 33, 58, .05);
  --shadow-lg: 0 20px 60px rgba(23, 33, 58, .25);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stamp: "Saira Stencil One", "Instrument Sans", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f141d; --surface: #161d29; --surface-2: #1d2534; --ink: #e6eaf2; --ink-2: #b4bccb; --ink-3: #8690a2;
    --line: #273042; --line-2: #34405a; --primary: #7d9bf2; --primary-2: #9bb3f7; --primary-soft: #1f2a48;
    --ok: #4cc28a; --ok-soft: #15301f; --bad: #f07b72; --bad-soft: #3a1a18; --warn: #e4a85a; --warn-soft: #36280f;
    --info: #7d9bf2; --info-soft: #1f2a48; --side: #0b1018; --side-ink: #aeb8cc; --side-hover: #1a2233;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f141d; --surface: #161d29; --surface-2: #1d2534; --ink: #e6eaf2; --ink-2: #b4bccb; --ink-3: #8690a2;
  --line: #273042; --line-2: #34405a; --primary: #7d9bf2; --primary-2: #9bb3f7; --primary-soft: #1f2a48;
  --ok: #4cc28a; --ok-soft: #15301f; --bad: #f07b72; --bad-soft: #3a1a18; --warn: #e4a85a; --warn-soft: #36280f;
  --info: #7d9bf2; --info-soft: #1f2a48; --side: #0b1018; --side-ink: #aeb8cc; --side-hover: #1a2233;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 650; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
.ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--side); }
.brand img { max-height: 30px; max-width: 120px; border-radius: 6px; background: #fff; padding: 2px; }
.brand small { display: block; color: var(--side-ink); font-weight: 400; font-size: .75rem; opacity: .75; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.nav-group { margin: 16px 10px 6px; font-size: .74rem; color: var(--side-ink); opacity: .6; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); font-weight: 500; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a.active { background: #fff; color: var(--side); }
.nav a .count { margin-left: auto; background: #f0b429; color: #1b2430; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.nav-cta { margin: 6px 10px 4px; }
.side-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.plan-chip { display: block; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--side-ink); }
.plan-chip:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.plan-chip b { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input { padding-left: 36px; background: var(--paper); }
.topbar .search .ic { position: absolute; left: 11px; top: 11px; color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { padding: 26px 28px 60px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--ink-2); }
.impersonate-bar { background: #f0b429; color: #1b2430; padding: 8px 28px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.trial-bar { background: var(--warn-soft); color: var(--warn); padding: 8px 28px; font-size: .9rem; border-bottom: 1px solid var(--line); }

/* ---------- Bildirim menüsü ---------- */
.bell { position: relative; }
.bell .dot { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: var(--primary-soft); }
.notif small { display: block; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px 6px; border-radius: 8px; font: inherit; }
.user-btn:hover { background: var(--surface-2); }
.dropdown .menu-item { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--ink); }
.dropdown .menu-item:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Bileşenler ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-body { padding: 18px; }
.panel + .panel { margin-top: 18px; }
.grid > .panel + .panel, .grid > * + .panel { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 .9rem/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(.94); background: var(--ok); }
.btn-bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-bad:hover { filter: brightness(.94); background: var(--bad); }
.btn-warn { color: var(--warn); border-color: var(--warn); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 6px 10px; font-size: .82rem; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 8px; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-ok, :root[data-theme="dark"] .btn-bad { color: #0f141d; }

label, .label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--ink-2); }
.req::after { content: " *"; color: var(--bad); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: .93rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { min-height: 96px; resize: vertical; }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.field { margin-bottom: 16px; }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0 0 6px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-success { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--bad-soft); color: var(--bad); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: var(--surface-2); color: var(--ink-3); }
.badge-outline { background: transparent; border: 1px solid currentColor; }

.alert { padding: 12px 14px; border-radius: var(--r); margin-bottom: 16px; border: 1px solid; font-size: .92rem; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert-error { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.avatar { --h: 220; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: hsl(var(--h) 45% 88%); color: hsl(var(--h) 45% 28%); font-size: .75rem; font-weight: 700; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar.sm { width: 24px; height: 24px; font-size: .62rem; }
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 85%); }

.wf-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.wf-icon.sm { width: 28px; height: 28px; border-radius: 7px; }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a.rowlink { color: var(--ink); font-weight: 600; }
.code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); font-size: .82rem; }

/* İstatistik */
.stat { padding: 16px 18px; }
.stat .v { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--ink-2); font-size: .88rem; }
.stat.alert-stat .v { color: var(--bad); }
.stat a { color: inherit; }

/* Liste öğeleri */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item .t { font-weight: 600; }
.list-item .s { font-size: .82rem; color: var(--ink-3); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .ic { color: var(--line-2); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); font-size: 1rem; margin-bottom: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--ink-2); font-weight: 600; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font: 600 .92rem var(--font); white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .active { color: var(--primary); border-bottom-color: var(--primary); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters > div { min-width: 140px; }
.filters label { font-size: .76rem; margin-bottom: 4px; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px; }
.pager a, .pager span { padding: 6px 11px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; }
.pager .cur { background: var(--primary); color: #fff; border-color: var(--primary); }

.progress { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.warn > span { background: var(--warn); }
.progress.bad > span { background: var(--bad); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 20, 29, .55); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* Toast */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; animation: pop .2s; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Talep detay ---------- */
.req-head { display: flex; gap: 16px; align-items: flex-start; }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: .88rem; margin-top: 6px; }
.req-meta span { display: inline-flex; gap: 6px; align-items: center; }
.doc { position: relative; overflow: hidden; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.dl > div { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.dl > div.full { grid-column: 1 / -1; }
.dl dt { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.dl dd { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.dl .heading { grid-column: 1 / -1; border: 0; padding-top: 18px; font-weight: 700; }

/* Islak mühür — sayfanın tek "imza" öğesi */
.stamp {
  position: absolute; right: 26px; top: 22px; transform: rotate(-12deg);
  font-family: var(--stamp); font-size: 1.55rem; letter-spacing: .06em; line-height: 1;
  padding: 10px 18px 8px; border: 4px double currentColor; border-radius: 10px; opacity: .82;
  pointer-events: none; mix-blend-mode: multiply; text-align: center;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 61%, #000 75%);
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 61%, #000 75%);
  animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp small { display: block; font-family: var(--font); font-size: .62rem; letter-spacing: .02em; margin-top: 4px; color: currentColor; font-weight: 700; }
.stamp.ok { color: var(--ok); }
.stamp.bad { color: var(--bad); }
.stamp.muted { color: var(--ink-3); }
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@keyframes stamp { from { transform: rotate(-12deg) scale(1.6); opacity: 0; } }

.action-box { border: 2px solid var(--primary); background: var(--primary-soft); border-radius: var(--r-lg); padding: 18px; }
.action-box h3 { color: var(--primary); }
.action-box .btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }

/* Zaman çizelgesi */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); border: 2px solid var(--surface); }
.timeline .dot.ok { background: var(--ok); color: #fff; }
.timeline .dot.bad { background: var(--bad); color: #fff; }
.timeline .dot.warn { background: var(--warn); color: #fff; }
.timeline .dot.info { background: var(--primary); color: #fff; }
.timeline .msg { white-space: pre-wrap; font-size: .9rem; }
.timeline .when { font-size: .76rem; color: var(--ink-3); }
.timeline .comment { background: var(--surface-2); border-radius: 0 10px 10px 10px; padding: 9px 12px; margin-top: 4px; font-size: .9rem; white-space: pre-wrap; }

.steps { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: .88rem; }
.step.pending { border-color: var(--primary); background: var(--primary-soft); }
.step.overdue { border-color: var(--bad); background: var(--bad-soft); }

.files { display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; color: var(--ink); }
.file-row:hover { background: var(--surface-2); text-decoration: none; }

/* Akış seçimi */
.wf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wf-card { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); transition: border-color .12s, transform .12s; }
.wf-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.wf-card .t { font-weight: 650; }
.wf-card .d { font-size: .85rem; color: var(--ink-3); margin-top: 2px; }

/* Görev kutusu */
.task-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.task-card:last-child { border-bottom: 0; }
.task-card .sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.task-card .sum b { color: var(--ink); font-weight: 600; }
.task-card .acts { display: flex; gap: 6px; }
.bulkbar { position: sticky; bottom: 16px; margin-top: 14px; background: var(--ink); color: var(--surface); border-radius: 12px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); }

/* Mini grafik */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .7rem; color: var(--ink-3); }
.bars .b span { width: 100%; max-width: 30px; background: var(--primary); border-radius: 5px 5px 2px 2px; min-height: 2px; position: relative; }
.bars .b span[data-v]:hover::after { content: attr(data-v); position: absolute; top: -22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: .7rem; }
.hbar { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: .86rem; margin-bottom: 8px; }
.hbar .progress { height: 10px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.checklist .box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checklist .done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .done a { color: var(--ink-3); text-decoration: line-through; }

/* ---------- Kimlik sayfaları ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--side); color: #dfe5f2; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { color: #fff; font-size: 2.3rem; max-width: 14ch; line-height: 1.12; }
.auth-art p { max-width: 42ch; color: #b8c2da; }
.auth-art .slip { position: relative; margin: 30px 0; max-width: 380px; }
.auth-art .slip .s { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.auth-art .slip .s b { color: #fff; display: block; font-size: .92rem; }
.auth-art .slip .s small { color: #98a3bf; }
.auth-art .slip .stamp { top: auto; bottom: -26px; right: -6px; color: #7fd1a6; mix-blend-mode: normal; font-size: 1.35rem; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form form, .auth-form .box { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 1.5rem; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--ink-2); }
.hp { position: absolute; left: -9999px; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: var(--surface); display: flex; flex-direction: column; }
.price-card.current { border: 2px solid var(--primary); }
.price-card .p { font-size: 2rem; font-weight: 700; margin: 8px 0 2px; }
.price-card ul { padding: 0; list-style: none; margin: 14px 0; flex: 1; }
.price-card li { padding: 4px 0; font-size: .9rem; display: flex; gap: 8px; }
.price-card li .ic { color: var(--ok); margin-top: 3px; }

/* Yazdırma */
@media print {
  .side, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .topbar .search { display: none; }
  .content { padding: 18px 16px 50px; }
  .g-2, .g-3, .form-grid, .dl { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .task-card { grid-template-columns: auto 1fr; }
  .task-card .acts { grid-column: 1 / -1; }
  .action-box .btns { grid-template-columns: 1fr; }
  .stamp { font-size: 1.1rem; right: 12px; top: 12px; }
  .impersonate-bar, .trial-bar { padding: 8px 16px; }
  .hbar { grid-template-columns: 100px 1fr 34px; }
}
@media (max-width: 520px) {
  .g-4 { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 1.5rem; }
}

/* ---------- Akış tuvali ---------- */
.fc { position: relative; background: var(--paper); user-select: none; -webkit-user-select: none; }
.fc-svg { display: block; touch-action: none; cursor: grab; outline: none; }
.fc-svg.fc-panning { cursor: grabbing; }
.fc-dot { fill: var(--line-2); }
.fc-bg { fill-opacity: 1; }
.fc-shape { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.fc-n { cursor: move; }
.fc-ro .fc-n { cursor: default; }
.fc-n:hover .fc-shape { stroke: var(--ink-3); }
.fc-label { font: 600 13px var(--font); fill: var(--ink); }
.fc-sub { font: 500 11px var(--font); fill: var(--ink-3); }
.fc-icon { color: var(--ink-2); }
.fc-accent { fill: var(--primary); }
.fc-start .fc-shape { fill: var(--side); stroke: var(--side); }
.fc-start .fc-label, .fc-start .fc-icon { fill: #fff; color: #fff; }
.fc-end-ok .fc-shape { fill: var(--ok-soft); stroke: var(--ok); }
.fc-end-ok .fc-icon { color: var(--ok); }
.fc-end-bad .fc-shape { fill: var(--bad-soft); stroke: var(--bad); }
.fc-end-bad .fc-icon { color: var(--bad); }
.fc-condition .fc-shape { fill: var(--warn-soft); stroke: var(--warn); }
.fc-condition .fc-icon { color: var(--warn); }
.fc-notify .fc-accent { fill: var(--warn); }
.fc-selected .fc-shape { stroke: var(--primary); stroke-width: 3; }
.fc-drop .fc-shape { stroke: var(--primary); stroke-width: 3; stroke-dasharray: 5 4; }
.fc-edge { fill: none; stroke: var(--ink-3); stroke-width: 2; }
.fc-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.fc-ro .fc-hit { cursor: default; }
.fc-e-ok .fc-edge { stroke: var(--ok); }
.fc-e-bad .fc-edge { stroke: var(--bad); stroke-dasharray: 6 4; }
.fc-e-sel .fc-edge { stroke: var(--primary); stroke-width: 3; }
.fc-e-done .fc-edge { stroke: var(--primary); }
.fc-edge.fc-travelled { stroke-width: 3.5; }
.fc-tmp { stroke: var(--primary); stroke-dasharray: 5 4; pointer-events: none; }
.fc-arrow { fill: var(--ink-3); } .fc-arrow-ok { fill: var(--ok); } .fc-arrow-bad { fill: var(--bad); } .fc-arrow-sel, .fc-arrow-done { fill: var(--primary); }
.fc-elabel { font: 600 11px var(--font); fill: var(--ink-2); pointer-events: none; }
.fc-elabel-bg { fill: var(--surface); stroke: var(--line); }
.fc-port { fill: var(--surface); stroke: var(--ink-3); stroke-width: 2; }
.fc-port-out { cursor: crosshair; opacity: 0; transition: opacity .12s; }
.fc-n:hover .fc-port-out, .fc-selected .fc-port-out { opacity: 1; }
.fc-port-approved { stroke: var(--ok); fill: var(--ok-soft); }
.fc-port-rejected { stroke: var(--bad); fill: var(--bad-soft); }
.fc-port-in { pointer-events: none; opacity: .6; }
/* Talep durumu */
.fc-st-done .fc-shape { stroke: var(--ok); stroke-width: 2.5; }
.fc-st-current .fc-shape { stroke: var(--primary); stroke-width: 3; fill: var(--primary-soft); }
.fc-st-rejected .fc-shape { stroke: var(--bad); stroke-width: 2.5; fill: var(--bad-soft); }
.fc-st-returned .fc-shape { stroke: var(--warn); stroke-width: 2.5; }
.fc-pulse { fill: var(--primary); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.fc-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.fc-zoom button { width: 32px; height: 30px; border: 0; background: none; color: var(--ink); font-size: 16px; cursor: pointer; }
.fc-zoom button + button { border-top: 1px solid var(--line); }
.fc-zoom button:hover { background: var(--surface-2); }

/* ---------- Tasarımcı ---------- */
.designer { display: grid; grid-template-columns: 1fr 340px; height: calc(100vh - 210px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.designer .canvas-wrap { position: relative; min-width: 0; }
.designer .canvas-wrap .fc { position: absolute; inset: 0; }
.palette { position: absolute; left: 12px; top: 12px; z-index: 5; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: var(--shadow); }
.palette button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: 600 .82rem var(--font); cursor: pointer; text-align: left; }
.palette button:hover { border-color: var(--primary); }
.palette .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.inspector { border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; background: var(--surface); }
.inspector h3 { display: flex; align-items: center; gap: 8px; }
.inspector .field { margin-bottom: 12px; }
.inspector .hint { font-size: .78rem; }
.designer-errors { margin-bottom: 12px; }
.designer-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.designer-bar .title-input { font-size: 1.25rem; font-weight: 650; border: 1px solid transparent; background: transparent; padding: 4px 8px; max-width: 420px; }
.designer-bar .title-input:hover, .designer-bar .title-input:focus { border-color: var(--line-2); background: var(--surface); }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; }

/* Form oluşturucu */
.fb { display: grid; grid-template-columns: 220px 1fr 340px; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); min-height: 520px; }
.fb-types { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.fb-types button { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: 500 .86rem var(--font); color: var(--ink); }
.fb-types button:hover { border-color: var(--primary); }
.fb-canvas { padding: 18px; overflow-y: auto; }
.fb-canvas .form-grid { gap: 0 14px; }
.fb-item { position: relative; border: 1px dashed transparent; border-radius: 10px; padding: 10px 10px 2px; cursor: pointer; }
.fb-item:hover { border-color: var(--line-2); }
.fb-item.sel { border: 2px solid var(--primary); background: var(--primary-soft); }
.fb-item .fb-tools { position: absolute; right: 6px; top: 6px; display: none; gap: 2px; }
.fb-item:hover .fb-tools, .fb-item.sel .fb-tools { display: flex; }
.fb-item .fb-tools button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; color: var(--ink-2); }
.fb-item input, .fb-item select, .fb-item textarea { pointer-events: none; }
.fb-item.dragging { opacity: .4; }
.fb-item.drop-before { box-shadow: 0 -3px 0 var(--primary); }
.opt-row { display: flex; gap: 6px; margin-bottom: 6px; }
.opt-row input { flex: 1; }

@media (max-width: 1100px) {
  .designer { grid-template-columns: 1fr; height: auto; }
  .designer .canvas-wrap { height: 60vh; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
  .fb { grid-template-columns: 1fr; }
  .fb-types { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Form ekleri: tablo, hesaplanan alan, kişi seçici ---------- */
.tbl-edit td { padding: 6px 8px; }
.tbl-edit input { padding: 7px 9px; font-size: .88rem; }
.tbl-edit tbody tr:hover { background: transparent; }
.calc-out, .tbl-edit output { display: block; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; padding: 7px 0; }
.tbl-edit output { text-align: right; font-size: .9rem; }
.picker { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px; position: relative; background: var(--surface); }
.picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.picker .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: .84rem; font-weight: 600; }
.picker .chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; }
.picker .chip button:hover { background: rgba(0,0,0,.08); }
.picker .picker-q { border: 0; padding: 6px; }
.picker .picker-q:focus { box-shadow: none; }
.picker-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 30; max-height: 260px; overflow: auto; }
.picker-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; color: var(--ink); font: inherit; cursor: pointer; }
.picker-list button:hover { background: var(--surface-2); }
.dl .tbl { grid-column: 1 / -1; }
.dl table.table { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.readonly-bar { background: var(--bad-soft); color: var(--bad); padding: 8px 28px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.secret-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; word-break: break-all; user-select: all; }
.qr { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; border: 1px solid var(--line); }
.chart-svg { width: 100%; height: auto; display: block; max-height: 260px; }
.chart-svg .grid { stroke: var(--line); }
.chart-svg text { font: 11px var(--font); fill: var(--ink-3); }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.subnav { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.subnav a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .88rem; background: var(--surface); }
.subnav a:hover { text-decoration: none; border-color: var(--line-2); }
.subnav a.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
code.inline { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; }
pre.code { background: var(--side); color: #dfe5f2; padding: 14px; border-radius: 10px; overflow: auto; font-size: .82rem; line-height: 1.5; }
.fc-parallel .fc-shape, .fc-join .fc-shape { fill: var(--primary-soft); stroke: var(--primary); }
.fc-parallel .fc-icon, .fc-join .fc-icon { color: var(--primary); }
.designer-tools { position: absolute; left: 12px; bottom: 12px; z-index: 5; display: flex; gap: 6px; }
.designer-tools button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; height: 32px; padding: 0 10px; cursor: pointer; color: var(--ink); font: 600 .8rem var(--font); box-shadow: var(--shadow); }
.designer-tools button:disabled { opacity: .45; cursor: default; }
.col-row { display: grid; grid-template-columns: 1fr 100px 28px; gap: 6px; margin-bottom: 6px; align-items: center; }
.col-row .formula { grid-column: 1 / -1; }
.chipbar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chipbar button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font: 600 .76rem var(--font); cursor: pointer; color: var(--ink-2); }
.tbl-edit output { white-space: nowrap; min-width: 110px; }
.tbl-edit th.num { text-align: right; }

/* ---------- Raporlar (widget panosu) ---------- */
.report-head h1 { margin-bottom: 2px; }
.report-actions { gap: 8px; }
.split { display: inline-flex; }
.split .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.split .btn + .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.rfilters { padding: 12px 16px 14px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.rf-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font: 600 .8rem/1.2 var(--font); cursor: pointer; }
.chip-btn:hover { border-color: var(--line-2); color: var(--ink); }
.chip-btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.rf-fields { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.rf { display: flex; flex-direction: column; gap: 4px; min-width: 150px; margin: 0; }
.rf > span { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.rf select, .rf input { min-width: 150px; }
.rf-switch { display: inline-flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 500; cursor: pointer; padding: 9px 0; margin: 0 0 0 auto; user-select: none; }
.rf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-track { width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.sw-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.rf-switch input:checked + .sw-track { background: var(--primary); }
.rf-switch input:checked + .sw-track::after { transform: translateX(14px); }
.rf-switch input:focus-visible + .sw-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.redit-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border: 1px dashed var(--primary); background: var(--primary-soft); color: var(--primary); border-radius: var(--r); font-size: .88rem; flex-wrap: wrap; }
.redit-bar .spacer { flex: 1; }

.rgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.rgrid > .panel + .panel { margin-top: 0; }
.rcard { min-width: 0; display: flex; flex-direction: column; position: relative; transition: box-shadow .15s, opacity .15s; }
.rcard.s-2 { grid-column: span 2; } .rcard.s-3 { grid-column: span 3; } .rcard.s-4 { grid-column: span 4; }
.rcard.s-6 { grid-column: span 6; } .rcard.s-8 { grid-column: span 8; } .rcard.s-12 { grid-column: span 12; }
.rhead { display: flex; align-items: center; gap: 6px; padding: 12px 10px 0 16px; min-height: 44px; }
.rhead h3 { margin: 0; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhead .spacer { flex: 1; }
.rhead .icon-btn { width: 30px; height: 30px; color: var(--ink-3); }
.rgrip { display: none; color: var(--ink-3); cursor: grab; }
.rinfo { color: var(--ink-3); display: inline-flex; cursor: help; flex: none; }
.rinfo:hover { color: var(--ink-2); }
.rseg { display: inline-flex; background: var(--surface-2); border-radius: 7px; padding: 2px; }
.rseg button { border: 0; background: transparent; color: var(--ink-3); width: 28px; height: 24px; border-radius: 5px; display: grid; place-items: center; cursor: pointer; }
.rseg button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.rbody { padding: 10px 16px 16px; min-width: 0; flex: 1; }
.t-donut .rbody { display: flex; align-items: center; justify-content: center; }
.t-donut .rdonut { width: 100%; }
.rcard.t-table .rbody { padding: 8px 0 6px; }
.rcard.t-table .rmore { margin: 4px 12px 6px; }
.rcard.loading .rbody { opacity: .45; transition: opacity .2s; }
.rskel { height: 120px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--paper) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: rsk 1.2s infinite linear; }
.t-kpi .rskel { height: 52px; }
@keyframes rsk { to { background-position: -200% 0; } }
.rnone { padding: 28px 10px; text-align: center; color: var(--ink-3); font-size: .9rem; }

/* gösterge kartı */
.t-kpi .rhead { padding-top: 12px; min-height: 36px; }
.t-kpi .rhead h3 { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.t-kpi .rbody { padding: 2px 16px 12px; }
.kval { font-size: 1.85rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 20px; margin-top: 2px; }
.ksub { font-size: .78rem; color: var(--ink-3); }
.kdelta { font-size: .76rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.kdelta.up { background: var(--ok-soft); color: var(--ok); }
.kdelta.down { background: var(--bad-soft); color: var(--bad); }
.kspark { margin-top: 8px; height: 34px; }
.kspark svg { display: block; width: 100%; }
.rcard.linked { cursor: pointer; }
.rcard.linked:hover { box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.t-kpi .rseg, .t-kpi .rinfo { display: none; }
.t-kpi:hover .rinfo { display: inline-flex; }

/* grafikler */
.rsvg svg { display: block; width: 100%; height: auto; overflow: visible; }
.rsvg text, .rdonut text { font: 11px var(--font); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.rsvg .gl { stroke: var(--line); stroke-dasharray: 2 3; }
.rsvg .axis { stroke: var(--line-2); }
.rsvg .guide { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.rsvg .nodata { font-size: 13px; fill: var(--ink-3); }
.rlegend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 6px; }
.rlegend button { border: 0; background: transparent; color: var(--ink-2); font: 500 .8rem var(--font); padding: 3px 6px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.rlegend button:hover { background: var(--surface-2); }
.rlegend button.off { opacity: .4; text-decoration: line-through; }
.rlegend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.rnote { font-size: .74rem; color: var(--ink-3); text-align: right; margin-top: 2px; }
.rtip { position: fixed; z-index: 200; pointer-events: none; background: var(--ink); color: var(--surface); padding: 8px 10px; border-radius: 8px; font-size: .8rem; box-shadow: var(--shadow-lg); max-width: 300px; line-height: 1.45; }
.rtip b { display: block; margin-bottom: 2px; }
.rtip div { display: flex; align-items: center; gap: 6px; }
.rtip div i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rtip div span { margin-left: auto; padding-left: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rdonut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.rdonut .dchart { flex: none; }
.rdonut .arc { transition: opacity .15s, transform .15s; transform-origin: 84px 84px; }
.rdonut svg:hover .arc:not(:hover), .rdonut svg .arc.hl ~ .arc:not(.hl) { opacity: .55; }
.rdonut .arc.hl { transform: scale(1.04); }
.rdonut .dtotal { font-size: 22px; font-weight: 700; fill: var(--ink); }
.rdonut .dlabel { font-size: 11px; }
.dlist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 6px; }
.dlist li { display: grid; grid-template-columns: 10px 1fr auto 38px; gap: 8px; align-items: center; font-size: .86rem; padding: 3px 4px; border-radius: 6px; }
.dlist li:hover { background: var(--surface-2); }
.dlist i { width: 10px; height: 10px; border-radius: 3px; }
.dlist .dl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlist .dl a { color: inherit; }
.dlist b { font-variant-numeric: tabular-nums; }
.dlist small { text-align: right; }
.rhbars { display: grid; gap: 9px; }
.rhb { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.rhl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.rhl small { display: block; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; }
.rhl a { color: inherit; }
.rht { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.rht span { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.rhv { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.rtable th { cursor: pointer; user-select: none; white-space: nowrap; }
.rtable th:hover { color: var(--ink); }
.rtable td { white-space: nowrap; }
.rtable .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.rtable td:first-child, .rtable th:first-child { padding-left: 16px; }
.rtable td:last-child, .rtable th:last-child { padding-right: 16px; }
.rcellbar { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rcellbar .progress { flex: 1; }
.t-bad { color: var(--bad); }
.rscale { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: .74rem; color: var(--ink-3); margin-top: 6px; }
.rscale i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2), var(--primary)); }
.rempty { padding: 40px; text-align: center; }

/* düzenleme modu */
.rgrid.editing .rcard { outline: 1px dashed var(--line-2); outline-offset: 3px; }
.rgrid.editing .rgrip { display: inline-flex; }
.rgrid.editing .rcard { cursor: grab; }
.rcard.dragging { opacity: .4; }
.rcard.drop-before { box-shadow: -4px 0 0 0 var(--primary), var(--shadow); }
.rcard.drop-after { box-shadow: 4px 0 0 0 var(--primary), var(--shadow); }
.rmenu { position: absolute; z-index: 120; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; }
.rmenu-h { font-size: .72rem; color: var(--ink-3); font-weight: 600; padding: 4px 8px; }
.rmenu-sizes { display: flex; gap: 4px; padding: 2px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.rmenu-sizes button { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 4px; font: 600 .76rem var(--font); color: var(--ink-2); cursor: pointer; }
.rmenu-sizes button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.rmenu .mi { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; font: 500 .87rem var(--font); color: var(--ink); cursor: pointer; }
.rmenu .mi:hover:not(:disabled) { background: var(--surface-2); }
.rmenu .mi:disabled { opacity: .4; cursor: default; }
.rmenu .mi.bad { color: var(--bad); }

/* widget ekle penceresi */
.radd-q { margin-bottom: 14px; }
.radd-cat h4 { font-size: .78rem; color: var(--ink-3); margin: 10px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.radd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.radd-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.radd-item:hover { border-color: var(--line-2); background: var(--surface-2); }
.radd-item.on { border-color: var(--primary); background: var(--primary-soft); }
.radd-t { flex: 1; min-width: 0; }
.radd-t b { display: block; font-size: .9rem; }
.radd-t small { display: block; font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.radd-st { font-size: .76rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.radd-item:not(.on) .radd-st { color: var(--ink-3); }
.radd-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); flex: none; position: relative; }
.radd-ic::after { content: ""; position: absolute; inset: 8px; border-radius: 2px; background: var(--primary); opacity: .75; }
.radd-ic.t-kpi::after { inset: 11px 7px; }
.radd-ic.t-donut::after { inset: 7px; border-radius: 50%; background: transparent; border: 4px solid var(--primary); }
.radd-ic.t-series::after { inset: 9px 7px; clip-path: polygon(0 100%, 30% 40%, 55% 70%, 100% 0, 100% 100%); border-radius: 0; }
.radd-ic.t-hbar::after { inset: 9px 7px; background: linear-gradient(var(--primary) 0 25%, transparent 25% 37%, var(--primary) 37% 62%, transparent 62% 75%, var(--primary) 75%); }
.radd-ic.t-heatmap::after { inset: 8px; background: repeating-conic-gradient(var(--primary) 0 25%, transparent 0 50%) 0 0/7px 7px; }

@media (max-width: 1500px) {
  .rcard.s-2 { grid-column: span 4; }
  .rcard.s-3 { grid-column: span 4; }
}
@media (max-width: 1100px) {
  .rcard.s-4, .rcard.s-8 { grid-column: span 6; }
  .rcard.s-2, .rcard.s-3 { grid-column: span 6; }
}
@media (max-width: 760px) {
  .rgrid { gap: 12px; }
  .rcard.s-4, .rcard.s-6, .rcard.s-8, .rcard.s-12 { grid-column: span 12; }
  .rf-switch { margin-left: 0; }
  .rf { min-width: 0; flex: 1 1 140px; }
  .rf select, .rf input { min-width: 0; width: 100%; }
}
@media print {
  .rfilters .rf-presets, .report-actions, .redit-bar, .rmenu-btn, .rseg, .rinfo { display: none !important; }
  .rcard { break-inside: avoid; box-shadow: none; }
  .content { padding: 0; }
}

/* ---------- Güncelleme ---------- */
.small { font-size: .82rem; }
.upd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.upd-grid .panel + .panel { margin-top: 0; }
.upd-ver { display: flex; gap: 18px; align-items: center; padding: 18px; }
.upd-ver h3 { margin: 0 0 2px; }
.upd-ver p { margin: 0 0 6px; }
.upd-ok { display: flex; gap: 6px; flex-wrap: wrap; }
.upd-stamp { font-family: var(--stamp); color: var(--primary); border: 2.5px solid currentColor; border-radius: 10px; padding: 8px 14px; font-size: 1.5rem; letter-spacing: .02em; transform: rotate(-4deg); flex: none; line-height: 1; background: var(--primary-soft); }
.upd-stamp.sm { font-size: 1rem; padding: 6px 9px; border-width: 2px; border-radius: 8px; }
.upd-tabs { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 9px; margin-bottom: 14px; }
.upd-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font: 600 .86rem var(--font); color: var(--ink-2); cursor: pointer; }
.upd-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.upd-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 20px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); cursor: pointer; color: var(--ink-3); transition: border-color .15s, background .15s; margin: 0; position: relative; }
.upd-drop b { color: var(--ink); }
.upd-drop:hover, .upd-drop.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.upd-drop.busy { pointer-events: none; opacity: .8; }
.upd-prog { width: min(360px, 90%); height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.upd-prog i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.upd-remote { margin-top: 14px; }
.upd-pkgs { display: flex; flex-direction: column; }
.upd-pkg { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.upd-pkg:last-child { border-bottom: 0; }
.upd-remote .upd-pkg { border: 1px solid var(--line); border-radius: var(--r); }
.upd-pkg .badge { margin-left: 6px; }
.upd-notes { margin-top: 6px; }
.upd-notes summary { cursor: pointer; font-size: .84rem; color: var(--primary); font-weight: 600; }
.upd-notes pre { white-space: pre-wrap; font: .84rem/1.5 var(--font); background: var(--surface-2); padding: 10px 12px; border-radius: 8px; margin: 6px 0 0; max-height: 260px; overflow: auto; }
.upd-steps-info { padding-left: 18px; margin: 0 0 12px; font-size: .86rem; color: var(--ink-2); display: grid; gap: 6px; }
.upd-mig { list-style: none; padding: 0; margin: 0; font-size: .82rem; display: grid; gap: 4px; }
.upd-confirm { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.upd-confirm p { margin: 0 0 4px; }
.upd-run { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.upd-run li { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.upd-run li:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 32px; bottom: -4px; width: 2px; background: var(--line); }
.upd-run li.done:not(:last-child)::before { background: var(--ok); }
.upd-run .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; background: var(--surface); position: relative; z-index: 1; }
.upd-run li b { display: block; }
.upd-run li small { color: var(--ink-3); }
.upd-run .res { font-size: .84rem; color: var(--ink-2); margin-top: 2px; }
.upd-run li.run .dot { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
.upd-run li.done .dot { background: var(--ok); border-color: var(--ok); }
.upd-run li.done .dot::after { content: "✓"; color: #fff; font-size: .75rem; font-weight: 700; }
.upd-run li.fail .dot { background: var(--bad); border-color: var(--bad); }
.upd-run li.fail .dot::after { content: "!"; color: #fff; font-size: .8rem; font-weight: 700; }
.upd-run li.fail .res { color: var(--bad); }
.upd-final { margin-top: 12px; }
.upd-final .alert { margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .upd-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .upd-ver { flex-direction: column; align-items: flex-start; } .upd-pkg { flex-wrap: wrap; } }
.nowrap { white-space: nowrap; }
.upd-err { max-width: 420px; white-space: normal; overflow-wrap: anywhere; margin-top: 4px; }
