/* Rasyonel Yayın Yönetim Sistemi — tasarım sistemi */
:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --surface-3: #f1f3f6; --hover: #f4f6fa;
  --border: #e4e7ec; --border-strong: #d0d5dd;
  --text: #101828; --text-2: #475467; --muted: #8a94a6;
  --primary: #9a6700; --primary-hover: #7a5200; --primary-soft: #fff6d6; --primary-ring: #ffc72c66;
  --brand: #ffc72c; --brand-hover: #f5b800; --brand-ink: #1f1f22;
  --ok: #067647; --ok-soft: #ecfdf3; --warn: #b54708; --warn-soft: #fffaeb; --bad: #b42318; --bad-soft: #fef3f2;
  --info: #175cd3; --info-soft: #eff8ff; --purple: #6941c6; --purple-soft: #f4f3ff; --teal: #107569; --teal-soft: #f0fdf9;
  --pink: #c11574; --pink-soft: #fdf2fa; --gray: #475467; --gray-soft: #f2f4f7;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --side-bg: #1f1f22; --side-bg-2: #2a2a2e; --side-text: #aab4c5; --side-text-hi: #ffffff; --side-border: #ffffff12;
  --shadow-sm: 0 1px 2px #1018280d; --shadow: 0 1px 3px #1018281a, 0 1px 2px #1018280f;
  --shadow-lg: 0 12px 32px -4px #10182824, 0 4px 8px -2px #1018280f;
  --radius: 10px; --radius-sm: 7px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111e; --surface: #111a2b; --surface-2: #0e1625; --surface-3: #17223a; --hover: #16213a;
  --border: #1f2b42; --border-strong: #2b3a57;
  --text: #e6ebf3; --text-2: #a3aec2; --muted: #6f7c94;
  --primary: #ffc72c; --primary-hover: #ffd54f; --primary-soft: #33290a; --primary-ring: #ffc72c55;
  --ok: #47cd89; --ok-soft: #0f2a1e; --warn: #f5b041; --warn-soft: #2d2210; --bad: #f97066; --bad-soft: #2f1512;
  --info: #6aaaf5; --info-soft: #11233d; --purple: #a48afb; --purple-soft: #221a3d; --teal: #3fd1b5; --teal-soft: #0d2a26;
  --pink: #f472b6; --pink-soft: #2e1424; --gray: #a3aec2; --gray-soft: #1a2438;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  --side-bg: #141416; --side-bg-2: #1f1f22;
  --shadow: 0 1px 3px #0006; --shadow-lg: 0 16px 40px #0009;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13.5px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); } .small { font-size: 12px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.nowrap { white-space: nowrap; } .b { font-weight: 600; }
[hidden] { display: none !important; }

/* ---------- uygulama iskeleti ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 252px; background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; z-index: 30; transition: width .18s; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #ffd54f, #f5b800); color: #1f1f22; display: grid; place-items: center; font-weight: 800; font-size: 16px; box-shadow: 0 4px 12px #f5b80055; flex-shrink: 0; }
.side-brand b { color: #fff; display: block; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.side-brand small { font-size: 11px; opacity: .6; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.nav-g { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #6b7a93; padding: 14px 10px 5px; }
.nav-a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--side-text); margin-bottom: 1px; position: relative; font-weight: 500; }
.nav-a:hover { background: #ffffff0d; color: #fff; text-decoration: none; }
.nav-a.on { background: #ffc72c1f; color: #ffd54f; }
.nav-a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand, #ffc72c); }
.nav-a .cnt { margin-left: auto; font-size: 11px; background: #ffffff1a; padding: 0 7px; border-radius: 10px; color: #fff; }
.nav-a .cnt.bad { background: #f04438; }
.side-foot { border-top: 1px solid var(--side-border); padding: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.user-chip:hover { background: #ffffff0d; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.user-chip b { color: #fff; font-size: 13px; display: block; line-height: 1.2; }
.user-chip small { font-size: 11px; opacity: .65; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: min(420px, 45vw); padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; text-align: left; }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger span { flex: 1; }
kbd { font: 11px var(--font); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--text-2); background: var(--surface); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; border: 0; background: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .dot { position: absolute; top: 5px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: #f04438; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); }
.only-mobile { display: none; }
.page { padding: 22px 28px 48px; max-width: 1680px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.crumb { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.page-head h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.02em; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- butonlar ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap; box-shadow: var(--shadow-sm); line-height: 1.35; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary { background: var(--brand, #ffc72c); border-color: #e6ac00; color: var(--brand-ink, #1f1f22); }
.btn-primary:hover { background: var(--brand-hover, #f5b800); border-color: #d9a100; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--bad); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(1.08); background: var(--ok); }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-soft-danger { color: var(--bad); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn-sm svg.i { width: 14px; height: 14px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-group .btn.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); z-index: 1; }
.row-act { border: 0; background: none; padding: 5px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.row-act:hover { background: var(--surface-3); color: var(--text); }
.row-act.del:hover { color: var(--bad); background: var(--bad-soft); }
.row-act svg.i { width: 16px; height: 16px; }

/* ---------- kartlar, istatistikler ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.card-h .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.card-b { padding: 14px 18px 18px; }
.card-b.flush { padding: 10px 0 4px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow-sm); display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.stat.link { cursor: pointer; } .stat.link:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.stat-ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.stat-ic svg.i { width: 19px; height: 19px; }
.stat .l { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.trend { font-weight: 600; font-size: 12px; } .trend.up { color: var(--ok); } .trend.down { color: var(--bad); }
.c-blue { background: var(--info-soft); color: var(--info); } .c-green { background: var(--ok-soft); color: var(--ok); }
.c-orange { background: var(--warn-soft); color: var(--warn); } .c-red { background: var(--bad-soft); color: var(--bad); }
.c-purple { background: var(--purple-soft); color: var(--purple); } .c-teal { background: var(--teal-soft); color: var(--teal); }
.c-pink { background: var(--pink-soft); color: var(--pink); } .c-gray { background: var(--gray-soft); color: var(--gray); }

/* ---------- rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 7px; border-radius: 20px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.nodot::before { display: none; }
.pill { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); line-height: 1.7; }

/* ---------- tablo ---------- */
.tbl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; overflow: hidden; }
.card .tbl-card, .drawer .tbl-card { box-shadow: none; }
.tbl-tools { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.search-inp { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; background: var(--surface); min-width: 240px; flex: 0 1 320px; color: var(--muted); }
.search-inp:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.search-inp input { border: 0; outline: 0; padding: 7px 0; background: transparent; flex: 1; min-width: 0; color: var(--text); }
.tbl-count { color: var(--muted); font-size: 12.5px; }
.tbl-tools .sp { flex: 1; }
.tbl-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; user-select: none; }
th.sortable { cursor: pointer; } th.sortable:hover { color: var(--text); }
th .arr { opacity: .6; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr:hover td { background: var(--hover); }
tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; }
td.wrap { white-space: normal; min-width: 200px; }
td .cell-main { font-weight: 600; color: var(--text); }
td .cell-sub { font-size: 12px; color: var(--muted); }
.cell-book { display: flex; align-items: center; gap: 10px; }
.tbl-pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.tbl-pager:empty { display: none; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty svg.i { width: 34px; height: 34px; stroke-width: 1.4; display: block; margin: 0 auto 10px; opacity: .6; }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 2px; }
.simple td, .simple th { padding: 7px 10px; }
table.kv-t th { width: 38%; text-transform: none; font-size: 13px; letter-spacing: 0; background: transparent; color: var(--text-2); font-weight: 500; }
table.kv-t td { white-space: normal; }

/* ---------- araç çubuğu / filtreler ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: 5px 12px; border-radius: 20px; cursor: pointer; font-weight: 550; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .c { font-size: 11px; opacity: .7; }
.sel, .inp { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0; }
.sel:focus, .inp:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 9px 14px; cursor: pointer; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-color: var(--primary); }
.tab .c { font-size: 11px; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 0 6px; }

/* ---------- form ---------- */
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.f { display: flex; flex-direction: column; gap: 5px; grid-column: span 6; min-width: 0; }
.f.w3 { grid-column: span 3; } .f.w4 { grid-column: span 4; } .f.w8 { grid-column: span 8; } .f.w12 { grid-column: 1 / -1; }
.f > span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.f > span i { color: var(--bad); font-style: normal; }
.f input, .f select, .f textarea { padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); width: 100%; min-width: 0; }
.f textarea { resize: vertical; min-height: 64px; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.f input[readonly] { background: var(--surface-2); }
.f .hint { font-size: 11.5px; color: var(--muted); }
.f.check { flex-direction: row; align-items: center; gap: 8px; }
.f.check input { width: auto; }
.f-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.f-sec::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.f-sec:first-child { margin-top: 0; }
.inp-suffix { position: relative; }
.inp-suffix em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 12px; pointer-events: none; }
.inp-suffix input { padding-right: 34px; }
.summary { grid-column: 1 / -1; display: flex; gap: 10px 26px; flex-wrap: wrap; background: var(--primary-soft); border-radius: 9px; padding: 11px 14px; }
.summary div small { display: block; font-size: 11.5px; color: var(--text-2); }
.summary div b { font-size: 15px; }

/* ---------- modal & onay ---------- */
dialog.dlg { border: 0; padding: 0; border-radius: 14px; width: min(720px, 94vw); max-height: 92vh; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.dlg.wide { width: min(1040px, 96vw); }
dialog.dlg.dlg-sm { width: min(440px, 94vw); }
dialog.dlg::backdrop { background: #0b12208c; backdrop-filter: blur(2px); }
dialog.dlg[open] { animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg form { display: flex; flex-direction: column; max-height: 92vh; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.dlg-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.dlg-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.dlg-body { padding: 18px 22px; overflow-y: auto; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 13px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.dlg-foot .left { margin-right: auto; }
.dlg-foot:empty { display: none; }
.confirm { display: flex; gap: 14px; padding: 22px; }
.confirm h3 { margin: 0 0 4px; font-size: 16px; }
.confirm p { margin: 0; color: var(--text-2); white-space: pre-line; }
.confirm-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--info-soft); color: var(--info); }
.confirm-ic.danger { background: var(--bad-soft); color: var(--bad); }

/* ---------- çekmece (detay paneli) ---------- */
#drawerOverlay { position: fixed; inset: 0; background: #0b122066; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
#drawerOverlay.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(900px, 100vw); background: var(--bg); z-index: 41; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.dr-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 22px 0; }
.dr-top { display: flex; gap: 14px; align-items: flex-start; }
.dr-top .t { flex: 1; min-width: 0; }
.dr-top h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; line-height: 1.3; }
.dr-top .alt { color: var(--text-2); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.dr-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0; }
.dr-head .tabs { margin: 0; border: 0; }
.dr-body { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kv > div { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; min-width: 0; }
.kv small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.kv b, .kv span { font-weight: 600; overflow-wrap: anywhere; }
.kv .big { font-size: 18px; font-weight: 700; }

/* ---------- toast, ipucu ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; animation: pop .18s; font-weight: 500; }
.toast.hata { background: var(--bad); color: #fff; }
.toast.ok svg { color: #47cd89; }
#tip { position: fixed; z-index: 120; pointer-events: none; background: var(--text); color: var(--surface); padding: 7px 10px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .08s; white-space: pre-line; max-width: 280px; }
#tip.on { opacity: 1; }

/* ---------- açılır menüler ---------- */
.pop { position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 50; min-width: 220px; padding: 6px; }
.pop-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); width: 100%; border: 0; background: none; text-align: left; }
.pop-item:hover { background: var(--hover); text-decoration: none; }
.pop-item svg.i { color: var(--text-2); width: 16px; height: 16px; }
.pop-sep { height: 1px; background: var(--border); margin: 5px 0; }
.pop-h { padding: 6px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.notif { width: 380px; max-height: 480px; overflow-y: auto; padding: 0; }
.notif-h { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 650; position: sticky; top: 0; background: var(--surface); }
.notif-i { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-i:hover { background: var(--hover); }
.notif-i:last-child { border-bottom: 0; }
.notif-i .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.notif-i .ic svg.i { width: 16px; height: 16px; }
.notif-i b { display: block; font-size: 13px; font-weight: 600; }
.notif-i small { color: var(--muted); font-size: 12px; }

/* ---------- komut paleti ---------- */
dialog.palette { width: min(620px, 94vw); border: 0; border-radius: 14px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); margin-top: 12vh; }
dialog.palette::backdrop { background: #0b12208c; backdrop-filter: blur(2px); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.pal-in input { border: 0; outline: 0; flex: 1; font-size: 15px; background: transparent; color: var(--text); }
.pal-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.pal-i { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pal-i.on, .pal-i:hover { background: var(--primary-soft); }
.pal-i .ic { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.pal-i .ic svg.i { width: 16px; height: 16px; }
.pal-i small { display: block; color: var(--muted); font-size: 12px; }
.pal-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); display: flex; gap: 14px; }

/* ---------- kitap kapağı ---------- */
.cover { border-radius: 4px 7px 7px 4px; overflow: hidden; flex-shrink: 0; position: relative; box-shadow: 0 1px 2px #0002, inset 3px 0 0 #0000001f; display: grid; place-items: center; color: #fff; font-weight: 800; text-align: center; background-size: cover; background-position: center; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 4px; width: 1px; background: #ffffff38; }
.cover.xs { width: 30px; height: 40px; font-size: 10px; }
.cover.sm { width: 42px; height: 58px; font-size: 13px; }
.cover.lg { width: 92px; height: 128px; font-size: 22px; }
.cover.xl { width: 100%; aspect-ratio: 3 / 4; font-size: 30px; }
.cover.up { cursor: pointer; }
.cover.up:hover::before { content: "Kapak yükle"; position: absolute; inset: 0; background: #000a; display: grid; place-items: center; font-size: 11px; font-weight: 600; z-index: 1; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.bcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, transform .15s; box-shadow: var(--shadow-sm); }
.bcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.bcard h4 { margin: 0; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.bcard .meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-2); gap: 6px; }
.bcard .cover-wrap { position: relative; }
.bcard .cover-wrap .badge { position: absolute; top: 8px; left: 8px; box-shadow: var(--shadow); }

/* ---------- ilerleme, süreç ---------- */
.bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: #f79009; } .bar.bad > i { background: #f04438; }
.flow { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; }
.flow a { position: relative; text-align: center; padding: 10px 4px 6px; color: var(--text-2); text-decoration: none; border-radius: 8px; }
.flow a:hover { background: var(--hover); }
.flow a::after { content: ""; position: absolute; top: 25px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--border); }
.flow a:last-child::after { display: none; }
.flow .n { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.flow a.has .n { background: var(--brand, #ffc72c); color: #1f1f22; box-shadow: 0 0 0 4px var(--primary-soft); }
.flow a.done .n { background: var(--ok); color: #fff; }
.flow span { font-size: 11.5px; line-height: 1.25; display: block; }
.stepper { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 6px 10px; }
.stepper > div { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.25; position: relative; padding: 0 2px; }
.stepper > div::after { content: ""; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: var(--border); }
.stepper > div:last-child::after { display: none; }
.stepper > div.done::after { background: var(--ok); }
.stepper i { display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto 5px; border-radius: 50%; background: var(--surface-3); font-style: normal; font-weight: 700; color: var(--muted); position: relative; z-index: 1; }
.stepper .done i { background: var(--ok); color: #fff; }
.stepper .cur i { background: #f79009; color: #fff; box-shadow: 0 0 0 4px var(--warn-soft); }
.stepper .cur span { color: var(--text); font-weight: 700; }
.stepper small { display: block; font-size: 10.5px; margin-top: 1px; }
table.matris th.st { text-align: center; white-space: normal; min-width: 78px; line-height: 1.2; font-size: 10.5px; }
table.matris td.c { text-align: center; cursor: pointer; border-left: 1px solid var(--border); font-size: 12.5px; padding: 6px 4px; }
table.matris td.c:hover { box-shadow: inset 0 0 0 2px var(--primary); }
table.matris td.c small { display: block; font-size: 10.5px; font-weight: 500; opacity: .8; }
table.matris tbody tr:hover td.done { background: var(--ok-soft); }
table.matris td.done { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
table.matris td.cur { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.timeline li.ok::before { border-color: var(--ok); background: var(--ok); }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .what { font-weight: 550; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .avatar { width: 28px; height: 28px; font-size: 11px; }
.feed small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: var(--surface-3); border-radius: 11px; padding: 10px; min-height: 360px; border: 1px solid transparent; }
.col.drop { border-color: var(--primary); background: var(--primary-soft); }
.col-h { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; font-weight: 600; font-size: 13px; }
.col-h .c { font-size: 12px; color: var(--muted); background: var(--surface); padding: 0 8px; border-radius: 10px; }
.kc { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 11px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow-sm); }
.kc:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kc.late { border-left: 3px solid #f04438; }
.kc b { display: block; font-size: 13px; line-height: 1.35; }
.kc .m { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 5px; }

/* ---------- grafikler ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-l { stroke: var(--border); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--text); fill-opacity: .04; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.hbar .bar { grid-column: 1 / -1; height: 7px; }
.hbar .bar > i { background: var(--s1); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* ---------- takvim ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface); border-radius: 10px; overflow: hidden; }
.cal .dh { padding: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal .d { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.cal .d.out { background: var(--surface-2); }
.cal .d.out .dn { opacity: .4; }
.cal .d.today .dn { background: var(--primary); color: #fff; }
.cal .dn { font-size: 12px; font-weight: 600; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 3px; }
.cal .ev { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 550; }
.cal .ev.tamam { opacity: .55; text-decoration: line-through; }

/* ---------- ön maliyet ---------- */
.om { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.om-side { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 16px; }
.big-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.big-kv > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.big-kv small { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.big-kv b { font-size: 22px; color: var(--primary); display: block; letter-spacing: -.02em; }
.big-kv span { font-size: 12px; color: var(--muted); }
.hero { background: linear-gradient(135deg, #1f1f22, #3a3a40); color: #fff; border-left: 5px solid #ffc72c; border-radius: 12px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero small { opacity: .85; display: block; font-size: 12px; }
.hero b { font-size: 26px; letter-spacing: -.02em; color: #ffc72c; }
table.om-t td small { display: block; color: var(--muted); font-size: 11.5px; }
table.om-t tr.sel td { background: var(--warn-soft); }

/* ---------- sipariş kalemleri ---------- */
.lines { width: 100%; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lines td, .lines th { padding: 6px 8px; }
.lines input, .lines select { width: 100%; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); min-width: 0; }
.lines td.num input { text-align: right; }

/* ---------- giriş ekranı ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(circle at 15% 15%, #ffc72c33 0, transparent 40%), radial-gradient(circle at 85% 80%, #ffc72c26 0, transparent 45%), #1f1f22; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h1 { font-size: 34px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 12px; max-width: 460px; }
.auth-art p { opacity: .75; max-width: 440px; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; opacity: .9; }
.auth-art li svg.i { color: #ffc72c; }
.auth-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.auth-form .btn { justify-content: center; padding: 10px; }
.alert { padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-weight: 500; }
.alert.info { background: var(--info-soft); color: var(--info); }

/* ---------- duyarlı ---------- */
@media (max-width: 1200px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .om { grid-template-columns: 1fr; } .om-side { position: static; } }
@media (max-width: 900px) {
  .side { position: fixed; left: -260px; transition: left .2s; }
  .side.open { left: 0; box-shadow: var(--shadow-lg); }
  .only-mobile { display: grid; }
  .page { padding: 16px; }
  .top { padding: 0 12px; }
  .g-2, .g-3, .g-21, .g-12 { grid-template-columns: 1fr; }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f, .f.w3, .f.w4, .f.w8 { grid-column: 1 / -1; }
  .flow, .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
  .flow a::after, .stepper > div::after { display: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { width: auto; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .notif { width: min(380px, 92vw); }
  .search-inp { min-width: 0; flex: 1; }
}
@media print {
  .side, .top, .page-actions, .tbl-tools, .tbl-pager, .toolbar, .tabs, .no-print { display: none !important; }
  body { background: #fff; } .page { padding: 0; } .card, .tbl-card, .stat { box-shadow: none; break-inside: avoid; }
}

/* ---------- logo ---------- */
.brand-logo { background: #fff; border-radius: 9px; padding: 6px 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-logo img { display: block; max-height: 34px; max-width: 170px; object-fit: contain; }
.side-brand.has-logo { flex-direction: column; align-items: stretch; gap: 6px; }
.side-brand.has-logo .brand-logo { padding: 8px 12px; }
.side-brand.has-logo .brand-logo img { max-height: 46px; max-width: 100%; }
.side-brand.has-logo > small { font-size: 11px; opacity: .6; text-align: center; }
.brand-logo.lg img { max-height: 48px; max-width: 220px; }
.logo.lg { width: 44px; height: 44px; font-size: 20px; }
.auth-logo img { max-height: 72px; max-width: 260px; display: block; }
.logo-box { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 18px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--surface-2); }
.logo-box .onizleme { width: 240px; height: 110px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.logo-box .onizleme img { max-width: 220px; max-height: 90px; object-fit: contain; }
.logo-box .onizleme.koyu { background: var(--side-bg); }
/* ---------- yetki matrisi ---------- */
.yetki-t td, .yetki-t th { padding: 7px 10px; }
.yetki-t td.s { text-align: center; }
.seg3 { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg3 label { padding: 5px 11px; cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--text-2); border-left: 1px solid var(--border); user-select: none; }
.seg3 label:first-child { border-left: 0; }
.seg3 input { display: none; }
.seg3 label:has(input:checked) { color: #fff; }
.seg3 label.l0:has(input:checked) { background: var(--gray); }
.seg3 label.l1:has(input:checked) { background: var(--info); }
.seg3 label.l2:has(input:checked) { background: var(--ok); }
.seg3.kilitli { opacity: .55; pointer-events: none; }
.ydot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.ydot.y0 { background: var(--gray-soft); color: var(--muted); } .ydot.y1 { background: var(--info-soft); color: var(--info); } .ydot.y2 { background: var(--ok-soft); color: var(--ok); }

/* ---------- mesajlaşma ---------- */
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sohbet-alan .chat { border: 0; border-radius: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg.ben { align-self: flex-end; flex-direction: row-reverse; }
.msg .b { background: var(--surface); border: 1px solid var(--border); border-radius: 12px 12px 12px 4px; padding: 7px 11px; min-width: 0; box-shadow: var(--shadow-sm); }
.msg.ben .b { background: #fff6d6; border-color: #f5d77a; border-radius: 12px 12px 4px 12px; }
:root[data-theme="dark"] .msg.ben .b { background: #3a300c; border-color: #6b5510; }
.msg .u { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg .u b { color: var(--text); font-size: 12.5px; }
.msg .t { overflow-wrap: anywhere; line-height: 1.45; }
.msg.sistem { align-self: center; max-width: 90%; }
.msg.sistem .b { background: var(--surface-3); border-style: dashed; box-shadow: none; font-size: 12.5px; border-radius: 10px; }
.msg.sistem.ben { flex-direction: row; }
.msg .att { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 550; }
.msg .att small { color: var(--muted); font-weight: 400; }
.chat-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; }
.chat-in textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px; max-height: 140px; background: var(--surface); }
.chat-in textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.mesaj-duzen { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; }
.kanal-liste { display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
#kList { overflow-y: auto; padding: 0 6px 8px; }
.kanal { display: flex; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none !important; }
.kanal:hover { background: var(--hover); }
.kanal.on { background: var(--primary-soft); }
.kanal .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.kanal .bs { display: flex; justify-content: space-between; gap: 6px; }
.kanal .bs b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanal small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanal .cnt { background: #f04438; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; height: 18px; line-height: 18px; }
.sohbet-alan { overflow: hidden; }
/* ---------- işlerim ---------- */
.is-kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.is-kart { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.is-kart:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.is-kart.vurgu { border-color: #f5c542; box-shadow: 0 0 0 3px #ffc72c33; }
.is-kart.gec { border-left: 4px solid #f04438; }
.is-kart .ust { display: flex; gap: 12px; }
.is-kart .m { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-top: 8px; }
@media (max-width: 900px) { .mesaj-duzen { grid-template-columns: 1fr; } .kanal-liste { max-height: 260px; } .msg { max-width: 92%; } }
