/* NESA İşyerim — tasarım dili (koyu lacivert menü, mavi ana işlemler, açık gri zemin, beyaz kartlar).
 * Derleme gerektirmez. Kesme noktaları: mobil < 768 px, tablet 768–1279 px, masaüstü ≥ 1280 px. */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #172033;
  --muted: #5b6578;
  --line: #e2e7ef;
  --navy: #0f1f3d;
  --navy-2: #172b52;
  --navy-ink: #c9d3e6;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-bg: #e8f0fe;
  --red: #c81e1e;
  --red-bg: #fdecec;
  --amber: #a15c00;
  --amber-bg: #fff3d6;
  --amber-icon: #f59e0b;
  --green: #137a3e;
  --green-bg: #e6f6ec;
  --purple: #6b2fb3;
  --purple-bg: #f2e9ff;
  --gray-bg: #eef1f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 31, 61, .06), 0 2px 8px rgba(15, 31, 61, .04);
  --tap: 44px;
  --side-w: 288px;
  --rail-w: 72px;
  --top-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "DejaVu Sans", sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--primary); }
h1 { font-size: 1.45rem; line-height: 1.25; margin: .1rem 0 .6rem; }
h2 { font-size: 1.08rem; margin: 0 0 .6rem; }
h3 { font-size: .98rem; margin: 1rem 0 .4rem; }
.small { font-size: .85rem; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round;
  stroke-linejoin: round; flex: none; vertical-align: -4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sidebar :focus-visible { outline-color: #93c5fd; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; color: var(--ink);
  padding: .6rem 1rem; border-radius: 8px; box-shadow: var(--shadow); font-weight: 700; }
.skip:focus { top: 8px; }

/* --- Bağlantı uyarısı --- */
.offline { position: sticky; top: 0; z-index: 60; display: flex; gap: .5rem; align-items: center; justify-content: center;
  background: var(--red); color: #fff; padding: .6rem 1rem; font-weight: 700; }
.offline[hidden] { display: none; }

/* --- Sol menü --- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40; display: flex; flex-direction: column;
  background: var(--navy); color: var(--navy-ink); transition: width .18s ease, transform .2s ease; }
.side-head { display: flex; align-items: center; gap: .4rem; padding: 1rem .9rem .6rem; min-height: var(--top-h); }
.brand { text-decoration: none; font-weight: 800; letter-spacing: .02em; white-space: nowrap; font-size: 1.15rem; }
.sidebar .brand { color: #fff; flex: 1; }
.brand-nesa { color: inherit; }
.brand-isyerim { color: #3b82f6; }
.sidebar .brand-isyerim { color: #60a5fa; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap);
  border: 0; background: transparent; color: inherit; border-radius: 10px; cursor: pointer; text-decoration: none; position: relative; }
.icon-btn:hover { background: rgba(127, 140, 160, .14); }
.side-close { display: none; }
.side-nav { flex: 1; overflow-y: auto; padding: .4rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav .planned { display: flex; align-items: center; gap: .7rem; min-height: var(--tap); padding: .5rem .7rem;
  border-radius: 10px; color: var(--navy-ink); text-decoration: none; font-size: .95rem; }
.side-nav a:hover { background: var(--navy-2); color: #fff; }
.side-nav a.on { background: var(--primary); color: #fff; font-weight: 600; }
/* Modül adı kesilmez: sığmazsa alt satıra geçer; etiket (Önizleme/Planlanan) ve sayaç bölünmez. */
.side-nav a > span, .side-nav .planned > span { flex: 1 1 auto; min-width: 0; line-height: 1.25; overflow-wrap: break-word; }
.side-nav .tag, .side-nav .pill-count, .side-nav .i, .side-link .i { flex: none; }
.side-nav .planned { opacity: .62; cursor: default; }
.side-section { margin: .9rem .7rem .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #8392ad; }
.tag { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px;
  background: var(--gray-bg); color: #4b5565; white-space: nowrap; }
h1 .tag, h2 .tag, p .tag, .help .tag { margin-left: .3rem; vertical-align: middle; }
.sidebar .tag { background: rgba(255, 255, 255, .12); color: #d5ddeb; }
.tag-preview { background: var(--amber-bg); color: var(--amber); }
.sidebar .tag-preview { background: rgba(245, 158, 11, .2); color: #fcd34d; }
.pill-count { margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: .75rem; text-align: center; line-height: 22px; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: .6rem; }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text strong { color: #fff; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { color: #8fa0bd; font-size: .75rem; }
.side-link { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: var(--tap); padding: .45rem .7rem;
  border: 0; background: none; color: var(--navy-ink); font: inherit; font-size: .9rem; border-radius: 10px; cursor: pointer; text-decoration: none; }
.side-link:hover { background: var(--navy-2); color: #fff; }
.side-logout { margin: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: #475569; color: #fff; font-weight: 700; font-size: .85rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; background: var(--primary); }

/* Daraltılmış menü (ikon şeridi) — masaüstünde kullanıcı seçimi */
@media (min-width: 768px) {
html[data-nav="collapsed"] .sidebar { width: var(--rail-w); }
html[data-nav="collapsed"] .app { margin-left: var(--rail-w); }
html[data-nav="collapsed"] .sidebar .brand,
html[data-nav="collapsed"] .side-nav span, html[data-nav="collapsed"] .side-nav .tag,
html[data-nav="collapsed"] .side-section span, html[data-nav="collapsed"] .side-user-text,
html[data-nav="collapsed"] .side-link span, html[data-nav="collapsed"] .side-nav .pill-count { display: none; }
html[data-nav="collapsed"] .side-head { justify-content: center; padding-inline: .4rem; }
html[data-nav="collapsed"] .side-nav a, html[data-nav="collapsed"] .side-nav .planned,
html[data-nav="collapsed"] .side-link, html[data-nav="collapsed"] .side-user { justify-content: center; padding-inline: 0; }
html[data-nav="collapsed"] .side-section { border-top: 1px solid rgba(255, 255, 255, .1); margin: .6rem .4rem; }
}

/* --- Uygulama alanı ve üst çubuk --- */
.app { margin-left: var(--side-w); min-height: 100vh; transition: margin-left .18s ease; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; min-height: var(--top-h);
  padding: .5rem 1.25rem; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.topbar .brand-top { display: none; color: var(--navy); }
.top-menu, .search-mobile { display: none; }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: .5rem; padding: 0 .8rem; min-height: 42px; margin: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.search input[type=search] { flex: 1; border: 0; background: transparent; min-height: 40px; font: inherit; color: var(--ink);
  outline: none; padding: 0; box-shadow: none; }
.top-spacer { flex: 1; }
.bell { color: var(--ink); }
.bell .count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: .72rem; font-weight: 700; line-height: 19px; text-align: center; }
.count.zero, .dot-count.zero { display: none; }
.who { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.who-name { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.logout { margin: 0; }
.btn-logout { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.page { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; outline: none; }
.page-narrow { max-width: 560px; }
.topbar-simple { padding-inline: 1rem; }
.topbar-simple .brand-top { display: inline; }

/* --- Alt menü (yalnız mobil) --- */
.bottomnav { display: none; }

/* --- Kartlar, başlıklar, boş durumlar --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: .15rem; font-size: .9rem; font-weight: 600; text-decoration: none; }
.link-more .i { width: 16px; height: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.eyebrow { margin: 0; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); font-size: .9rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grid2 { display: grid; gap: 1rem; }
.empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.2rem .5rem; color: var(--muted); text-align: center; list-style: none; }
.empty .i { width: 28px; height: 28px; color: #94a3b8; }
.empty p { margin: 0; }

/* --- KPI kartları --- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: .6rem; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: center; padding: 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
a.kpi:hover { border-color: #bfd0f5; }
.kpi-icon { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; }
.kpi-icon .i { width: 24px; height: 24px; }
.kpi-body { display: flex; flex-direction: column; }
.kpi-label { color: var(--muted); font-size: .9rem; }
.kpi-value { font-size: 1.85rem; font-weight: 800; line-height: 1.1; }
.kpi-def { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: .3rem; }
.kpi-blue .kpi-icon { background: var(--primary-bg); color: var(--primary); }
.kpi-red .kpi-icon { background: var(--red-bg); color: var(--red); }
.kpi-red .kpi-value { color: var(--red); }
.kpi-amber .kpi-icon { background: var(--amber-bg); color: var(--amber-icon); }
.kpi-green .kpi-icon { background: var(--green-bg); color: var(--green); }
.kpi-plain { grid-template-columns: 1fr; }
.defs-panel { margin-bottom: 1rem; }
.defs-panel ul { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .9rem; }

/* --- Genel bakış ızgarası --- */
.dash-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.seg a { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .35rem .8rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; }
.seg a b { background: var(--gray-bg); border-radius: 999px; padding: 0 .45rem; font-size: .8rem; }
.seg a.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-2); font-weight: 600; }
.mini-alert { color: var(--red); font-size: .75rem; font-weight: 700; }
.flow-table { display: flex; flex-direction: column; }
.ft-row { display: grid; grid-template-columns: 2.2fr 1.6fr 1.15fr 1fr .8fr; gap: .6rem; align-items: center; padding: .65rem .3rem;
  border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.ft-row:hover { background: #f8fafc; }
.ft-head { border-top: 0; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ft-title, .ft-person span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ft-person { display: flex; align-items: center; gap: .5rem; }
.ft-due { display: flex; gap: .3rem; align-items: center; font-size: .9rem; }
.ft-due .i { width: 16px; height: 16px; color: var(--muted); }
.prio-list, .expect-list, .plain-list { list-style: none; padding: 0; margin: 0; }
.prio { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: .6rem; background: #fff; }
.prio-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-bg); color: var(--primary); }
.prio-late .prio-icon { background: var(--red-bg); color: var(--red); }
.prio-wait .prio-icon { background: var(--amber-bg); color: var(--amber-icon); }
.prio-top { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.prio-body .i { width: 15px; height: 15px; }
.expect { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .7rem; margin-bottom: .45rem;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.expect:hover { border-color: #bfd0f5; }
.expect > span:nth-child(2) { display: flex; flex-direction: column; }
.expect.is-zero { opacity: .7; }
.expect-icon { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; align-items: center; justify-content: center;
  background: var(--primary-bg); color: var(--primary); }
.ex-geciken { background: var(--red-bg); color: var(--red); }
.ex-kontrol { background: var(--amber-bg); color: var(--amber-icon); }
.ex-onay { background: var(--green-bg); color: var(--green); }
.plain-list li { padding: .45rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 .5rem; }
.stat-grid div { background: var(--bg); border-radius: 10px; padding: .55rem .7rem; }
.stat-grid dt { color: var(--muted); font-size: .8rem; }
.stat-grid dd { margin: 0; font-size: 1.3rem; font-weight: 800; }
.card-planned { border-style: dashed; }

/* --- Durum çipleri (renk + metin; renk tek başına anlam taşımaz) --- */
.status-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem;
  font-weight: 700; white-space: nowrap; background: var(--gray-bg); color: #374151; }
.st-OPEN, .st-islemde { background: var(--primary-bg); color: var(--primary-2); }
.st-IN_PROGRESS { background: #e0e7ff; color: #3730a3; }
.st-WAITING, .st-musteri { background: var(--amber-bg); color: var(--amber); }
.st-DONE, .st-cozuldu { background: var(--green-bg); color: var(--green); }
.st-CANCELLED, .st-DRAFT { background: var(--gray-bg); color: #4b5565; }
.st-REQUESTED { background: var(--purple-bg); color: var(--purple); }
.st-OVERDUE, .st-cevapsiz { background: var(--red-bg); color: var(--red); }
.st-HANDOVER { background: #dbeafe; color: #1e40af; }

/* --- İletiler --- */
.msg { border-radius: 10px; padding: .7rem .9rem; margin-bottom: .7rem; border: 1px solid transparent; }
.msg-success { background: var(--green-bg); color: var(--green); border-color: #bfe3cc; }
.msg-error { background: var(--red-bg); color: var(--red); border-color: #f3c4c0; }
.msg-info, .msg-warning { background: var(--amber-bg); color: var(--amber); border-color: #f1dca8; }

/* --- Düğmeler ve formlar --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); padding: .5rem 1rem;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #b8c4d6; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .92rem; margin: .6rem 0 .25rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search],
input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: .5rem .7rem; border: 1px solid #c7cfdb; border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); outline: none; }
input[disabled], select[disabled], textarea[disabled] { background: #f3f4f6; color: #6b7280; }
textarea { min-height: 4.5rem; }
input[type=checkbox] { width: 22px; height: 22px; vertical-align: middle; }
.check label { display: inline; font-weight: 500; }
.help { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.errorlist { color: var(--red); list-style: none; padding: 0; margin: .2rem 0; font-size: .88rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.quick { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.quick .btn, .quick button { min-height: 38px; padding: .2rem .7rem; font-size: .86rem; }
.inline-form-error { color: var(--red); font-weight: 700; margin-top: .5rem; }
.search-page .row input { flex: 1; min-width: 0; width: auto; }

/* --- Sekmeler ve çipler --- */
.tabs, .chip-row { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: .7rem; scrollbar-width: thin; padding-bottom: 2px; }
.tabs a, .chip { white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .4rem .8rem;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.tabs a.on, .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs .n { font-weight: 700; margin-left: .15rem; }
.chip-off { opacity: .55; }
.ch-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.ch-whatsapp .ch-dot { background: #22a35a; }
.ch-instagram .ch-dot { background: #d6336c; }
.ch-facebook .ch-dot { background: #1877f2; }

/* --- İş kartı --- */
.tasklist { list-style: none; padding: 0; margin: 0; }
.task { display: block; background: #fff; border: 1px solid var(--line); border-left: 5px solid #cbd5e1; border-radius: var(--radius);
  padding: .75rem .9rem; margin-bottom: .6rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.task:hover { border-color: #bfd0f5; }
.task.overdue { border-left-color: var(--red); }
.task.today { border-left-color: var(--amber-icon); }
.task .t-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.t-badges { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.task .t-title { font-weight: 700; margin: .2rem 0; }
.task .t-meta { font-size: .85rem; color: var(--muted); }
.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--gray-bg); color: var(--ink); white-space: nowrap; }
.badge-test { background: #ffcf33; color: #1d2433; }
.badge-sample { background: var(--amber-bg); color: var(--amber); }
.badge-overdue { background: var(--red); color: #fff; }
.badge-today { background: var(--amber-bg); color: var(--amber); }
.badge-URGENT { background: var(--red-bg); color: var(--red); }
.badge-HIGH { background: var(--amber-bg); color: var(--amber); }
.badge-status { background: var(--primary-bg); color: var(--primary-2); }
.badge-pending { background: var(--purple-bg); color: var(--purple); }
.overdue-banner { display: flex; align-items: center; gap: .5rem; background: var(--red-bg); color: var(--red); border-radius: 10px;
  padding: .6rem .8rem; font-weight: 700; margin-bottom: .7rem; }

/* --- İş ayrıntısı --- */
.five { display: grid; gap: .55rem; margin: 0; }
.five div { display: grid; grid-template-columns: 10rem 1fr; gap: .5rem; align-items: baseline; }
.five dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.five dd { margin: 0; font-weight: 600; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
details.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; box-shadow: var(--shadow); }
details.panel > summary { cursor: pointer; padding: .75rem .9rem; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; gap: .4rem; }
details.panel > div { padding: 0 .9rem .9rem; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.timeline li { border-left: 3px solid var(--line); padding: .25rem 0 .5rem .7rem; }
.timeline .when { color: var(--muted); font-size: .8rem; }
.changes { margin: .2rem 0 0; padding-left: 1rem; color: var(--muted); }
.attachment { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.attachment img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pdf-icon { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center;
  background: var(--red-bg); color: var(--red); font-weight: 800; border-radius: 10px; flex: none; }
.upload-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: .7rem 0 .3rem; }
.upload-row label.btn { font-weight: 600; margin: 0; }
.upload-row label.btn:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }

/* --- Tablolar, filtreler --- */
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1rem; }
.filters { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.pager { display: flex; gap: .5rem; align-items: center; margin-top: .7rem; }
.notif { display: flex; gap: .7rem; justify-content: space-between; align-items: flex-start; }
.notif.unread { border-left: 5px solid var(--primary); }
.login-card { max-width: 440px; margin: 2rem auto; }
.login-card h1 .brand-isyerim { color: var(--primary); }
.secret { font: 700 1.25rem/1.4 ui-monospace, "DejaVu Sans Mono", monospace; background: #fff8dc; padding: .6rem; border-radius: 8px; user-select: all; }
.definitions ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
table.report .num, table.data .num { text-align: right; white-space: nowrap; }
table.report tfoot th { border-top: 2px solid var(--line); }
.term { font-weight: 700; }
dl.kv { display: grid; gap: .3rem; margin: 0 0 .5rem; }
dl.kv div { display: grid; grid-template-columns: 8rem 1fr; gap: .4rem; }
dl.kv dt { color: var(--muted); font-size: .85rem; }
dl.kv dd { margin: 0; font-weight: 600; }

/* --- İletişim merkezi önizlemesi --- */
.preview-banner { display: flex; gap: .6rem; align-items: flex-start; background: var(--amber-bg); color: #6b3d00; border: 1px solid #f1dca8;
  border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; }
.comms { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.comms .card { margin-bottom: 0; }
.comms > * { min-width: 0; }
.conv-list { list-style: none; margin: 0; padding: 0; }
.conv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; padding: .7rem .4rem; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink); border-radius: 8px; }
.conv.on { background: var(--primary-bg); }
.conv-main { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.conv-main strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.conv-main > * { max-width: 100%; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.thread-head { display: flex; gap: .7rem; align-items: center; justify-content: space-between; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.back-to-list { display: none; }
.messages-list { list-style: none; padding: .8rem 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.msgb { max-width: 78%; padding: .55rem .8rem; border-radius: 14px; background: var(--gray-bg); align-self: flex-start; }
.msgb p { margin: 0; }
.msgb time { display: block; font-size: .72rem; color: var(--muted); text-align: right; }
.msgb-out { align-self: flex-end; background: #dbeafe; }
.msgb-note { align-self: stretch; max-width: 100%; background: #fffbea; border: 1px dashed #e0b100; }
.msgb-auto { align-self: center; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.msgb-tag { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .1rem; }
.msgb-tag .i { width: 14px; height: 14px; }
.msgb-unverified { color: var(--amber); font-weight: 600; }
.composer { border-top: 1px solid var(--line); padding-top: .7rem; }
.composer-row { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; margin-top: .5rem; }
.comms-side h2 { font-size: .95rem; margin-top: .8rem; }
.comms-side dl.kv div { grid-template-columns: 1fr; gap: 0; }
dl.kv dd, dl.kv dt { min-width: 0; overflow-wrap: anywhere; }
.comms-side h2:first-child { margin-top: 0; }
.match { font-size: .85rem; font-weight: 600; padding: .3rem .5rem; border-radius: 8px; background: var(--gray-bg); }
.match-dogrulanmis { background: var(--green-bg); color: var(--green); }
.match-oneri { background: var(--amber-bg); color: var(--amber); }

/* ===== Tablet: 768–1279 px — menü ikon şeridi (genişletilebilir), uygun yerde iki sütun ===== */
@media (min-width: 768px) and (max-width: 1279px) {
  html[data-nav="auto"] .sidebar { width: var(--rail-w); }
  html[data-nav="auto"] .app { margin-left: var(--rail-w); }
  html[data-nav="auto"] .sidebar .brand, html[data-nav="auto"] .side-nav span, html[data-nav="auto"] .side-nav .tag,
  html[data-nav="auto"] .side-section span, html[data-nav="auto"] .side-user-text, html[data-nav="auto"] .side-link span,
  html[data-nav="auto"] .side-nav .pill-count { display: none; }
  html[data-nav="auto"] .side-head { justify-content: center; padding-inline: .4rem; }
  html[data-nav="auto"] .side-nav a, html[data-nav="auto"] .side-nav .planned, html[data-nav="auto"] .side-link,
  html[data-nav="auto"] .side-user { justify-content: center; padding-inline: 0; }
  html[data-nav="auto"] .side-section { border-top: 1px solid rgba(255, 255, 255, .1); margin: .6rem .4rem; }
}
@media (max-width: 1279px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comms { grid-template-columns: 300px minmax(0, 1fr); }
  .comms-side { grid-column: 2; }
  .ft-row { grid-template-columns: 2fr 1.5fr 1.1fr 1fr; }
  .ft-since, .ft-head span:last-child { display: none; }
}
@media (max-width: 1099px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
  .dash-side .card { margin-bottom: 0; }
}
@media (max-width: 1023px) {
  /* Ad görsel olarak gizlenir (baş harfler + TEST rozeti kalır); ekran okuyucuya açık. */
  .who-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .search { min-width: 160px; }
  .ft-due { font-size: .85rem; }
}

/* ===== Mobil: < 768 px — çekmece menü + alt menü ===== */
@media (max-width: 767px) {
  .sidebar, html[data-nav] .sidebar { transform: translateX(-105%); width: min(300px, 86vw); box-shadow: 4px 0 24px rgba(0, 0, 0, .25); z-index: 70; }
  body.nav-open .sidebar { transform: none; visibility: visible; }
  body:not(.nav-open) .sidebar { visibility: hidden; }
  .side-toggle { display: none; }
  .side-close { display: inline-flex; }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(15, 23, 42, .45); }
  .drawer-backdrop[hidden] { display: none; }
  .app, html[data-nav] .app { margin-left: 0; }
  .topbar { padding: .4rem .6rem; gap: .35rem; min-height: 56px; }
  .topbar .brand-top { display: inline; font-size: 1.05rem; }
  .search, .bell, .new-task { display: none; }
  .search-mobile { display: inline-flex; color: var(--ink); }
  .who .avatar { width: 30px; height: 30px; font-size: .75rem; }
  .btn-logout { min-height: 40px; padding: .3rem .55rem; }
  .page { padding: .9rem .8rem calc(96px + env(safe-area-inset-bottom)); }
  .page-narrow { padding-bottom: 2rem; }
  /* Odaklanan/kaydırılan öğe üst çubuğun ve alt menünün altında kalmaz. */
  html { scroll-padding-top: 72px; scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* Yazı alanı odaktayken (sanal klavye açık) alt menü gizlenir; alanı ve işlem düğmesini örtmez. */
  html.kb-open .bottomnav { display: none; }
  h1 { font-size: 1.3rem; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--line); padding: .25rem .3rem calc(.25rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(15, 31, 61, .06); }
  .bottomnav a, .bottomnav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .74rem; text-decoration: none; cursor: pointer; border-radius: 10px; }
  .bottomnav .i { width: 24px; height: 24px; }
  .bottomnav .on { color: var(--primary); font-weight: 700; }
  .bottomnav .fab { color: var(--primary); }
  .bottomnav .fab .i { width: 28px; height: 28px; padding: 6px; box-sizing: content-box; border-radius: 50%; background: var(--primary); color: #fff;
    margin-top: -22px; box-shadow: 0 6px 14px rgba(37, 99, 235, .35); }
  .dot-count { position: absolute; top: 4px; left: 54%; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ef4444;
    color: #fff; font-size: .7rem; line-height: 18px; text-align: center; font-weight: 700; }
  .kpi-grid, .kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kpi { padding: .75rem; gap: .1rem .6rem; }
  .kpi-icon { width: 40px; height: 40px; }
  .kpi-value { font-size: 1.55rem; }
  .kpi-def { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .ft-head { display: none; }
  .ft-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t s" "p d"; padding: .7rem .2rem; }
  .ft-title { grid-area: t; } .ft-person { grid-area: p; } .ft-due { grid-area: d; justify-self: end; }
  .ft-row > span:nth-child(4) { grid-area: s; justify-self: end; }
  .prio { grid-template-columns: auto minmax(0, 1fr); }
  .prio-open { grid-column: 1 / -1; width: 100%; }
  .five div { grid-template-columns: 1fr; gap: 0; }
  .comms { grid-template-columns: minmax(0, 1fr); }
  .comms-side { grid-column: auto; }
  .comms.show-thread .comms-list { display: none; }
  .comms:not(.show-thread) .comms-thread, .comms:not(.show-thread) .comms-side { display: none; }
  .back-to-list { display: inline-flex; order: -1; flex-basis: 100%; justify-content: flex-start; padding-left: 0; }
  .thread-head { flex-wrap: wrap; }
  .thread-head > div { flex: 1; min-width: 0; }
  .msgb { max-width: 90%; }
  dl.kv div { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .logout-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== Katalog merkezi ===== */
.btn-link { border: 0; background: none; padding: .2rem .3rem; color: var(--primary); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; }
.btn-small { min-height: 36px; padding: .3rem .7rem; font-size: .88rem; }
.grid3 { display: grid; gap: 0 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-note { background: var(--amber-bg); color: #6b3d00; border: 1px solid #f1dca8; border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; margin: .4rem 0; }
.status-pill.st-ok { background: var(--green-bg); color: var(--green); }
.status-pill.st-warn { background: var(--amber-bg); color: var(--amber); }
.status-pill.st-bad { background: var(--red-bg); color: var(--red); }
.status-pill.st-info { background: var(--primary-bg); color: var(--primary-2); }
.status-pill.st-muted { background: var(--gray-bg); color: #4b5565; }
.count-chip { display: inline-block; min-width: 24px; padding: 0 .45rem; border-radius: 999px; background: var(--gray-bg); color: #374151; font-size: .78rem; font-weight: 700; text-align: center; line-height: 22px; }
.tag-fav { background: #fef3c7; color: #92400e; }
.tag-fav .i { width: 12px; height: 12px; }
.choices { border: 0; padding: 0; margin: 0 0 .8rem; min-width: 0; }
.choices legend { font-weight: 700; margin-bottom: .3rem; }
.choice-list { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.choice-list .check { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; }
.thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.label-carry { display: flex; gap: .8rem; align-items: center; }
.warn-text { color: var(--amber); font-weight: 700; }

.cat-top { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.crumbs { color: var(--muted); font-size: .92rem; }
.crumbs a { color: inherit; }
.cat-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-search { margin-bottom: .8rem; }
.cat-search .seg label { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.cat-search .seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-2); font-weight: 600; }
.cat-search .seg small { color: var(--muted); font-weight: 400; }
.search-cat { max-width: none; background: #fff; padding-right: .3rem; }
.search-cat .btn { min-height: 36px; padding: .3rem .9rem; }

.catws { display: grid; grid-template-columns: 230px 340px minmax(0, 1fr); gap: 1rem; align-items: start; }
.catws > * { min-width: 0; }
html[data-catpanels="off"] .catws { grid-template-columns: minmax(0, 1fr); }
html[data-catpanels="off"] .catws:has(.cat-viewer .reader) .cat-left,
html[data-catpanels="off"] .catws:has(.cat-viewer .reader) .cat-mid { display: none; }
.cat-left, .cat-mid { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; box-shadow: var(--shadow); }
.cat-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .6rem 0 .3rem; font-weight: 700; }
.cat-left .cat-h:first-child { margin-top: 0; }
.cat-nav { list-style: none; margin: 0; padding: 0; }
.cat-nav a { display: flex; align-items: center; gap: .55rem; min-height: 40px; padding: .3rem .5rem; border-radius: 9px; color: var(--ink); text-decoration: none; }
.cat-nav a:hover { background: var(--gray-bg); }
.cat-nav a.on { background: var(--primary-bg); color: var(--primary-2); font-weight: 600; }
.cat-nav a > span:not(.brand-logo) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cat-nav .count-chip, .cat-nav a b.count-chip { flex: none; }
.cat-sub { list-style: none; margin: 0 0 .3rem 1.6rem; padding: 0; }
.cat-sub a { min-height: 36px; font-size: .92rem; }
.brand-logo { width: 28px; height: 28px; flex: none; border-radius: 7px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.brand-logo-default { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .72rem; border: 0; letter-spacing: .02em; }
.brand-cell { display: flex; align-items: center; gap: .5rem; }
.logo-preview { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.logo-preview .brand-logo { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 12px; }
.cat-kinds fieldset { border: 0; padding: 0; margin: 0; }
.cat-kinds .check { display: flex; align-items: center; gap: .45rem; min-height: 36px; }
html.js .js-hide-js { display: none; }

.cat-mid-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .4rem; }
.cat-list-title { font-size: 1.15rem; margin: 0; }
.seg-small { margin: 0; }
.seg-small a { min-height: 36px; padding: .25rem .6rem; font-size: .85rem; }
.group-h { font-size: .85rem; font-weight: 700; margin: .7rem 0 .3rem; color: var(--ink); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cat-list.covers { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.cat-card { display: flex; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cat-card.on { border-color: var(--primary); background: var(--primary-bg); }
.covers .cat-card { flex-direction: column; }
.cat-cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); background: var(--gray-bg); }
.pdf-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 46px; border-radius: 6px; background: #dc2626; color: #fff; font-size: .7rem; font-weight: 800; }
.cat-card-body { min-width: 0; flex: 1; }
.cat-title { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.cat-title:hover { text-decoration: underline; }
.cat-meta { color: var(--muted); font-size: .84rem; margin: .1rem 0 .3rem; }
.cat-pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.reasons, .hits { list-style: none; padding: 0; margin: .35rem 0 0; font-size: .84rem; }
.reason { padding-left: 1.1rem; position: relative; }
.reason::before { content: "•"; position: absolute; left: .3rem; }
.reason-exact, .reason-alias { color: var(--green); font-weight: 600; }
.reason-exact::before, .reason-alias::before { content: "✓"; }
.reason-separator, .reason-contains, .reason-ambiguous { color: var(--amber); }
.reason-separator::before, .reason-contains::before, .reason-ambiguous::before { content: "≈"; }
.hits li { margin: .15rem 0; }
.not-found { margin-top: .8rem; }
.cat-info { margin-top: .8rem; }
.cat-info dd.model-list { font-weight: 400; font-size: .86rem; color: var(--ink); }
.brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.brand-tile { display: flex; align-items: center; gap: .5rem; min-height: 52px; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.brand-tile > span:not(.brand-logo) { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.mobile-only, .tablet-only { display: none !important; }

.cat-viewer { position: sticky; top: calc(var(--top-h) + .5rem); }
.viewer-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); min-height: 320px; justify-content: center; }
.reader { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  height: calc(100vh - var(--top-h) - 1.5rem); min-height: 420px; overflow: hidden; }
.reader-full { height: calc(100vh - var(--top-h) - 2.5rem); }
.reader:fullscreen { height: 100vh; border-radius: 0; }
.reader-head { display: flex; align-items: center; gap: .4rem; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.reader-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reader-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-title small { font-size: .78rem; }
.icon-btn.is-fav { color: #d97706; }
.icon-btn.is-fav .i { fill: currentColor; }
.reader-bar { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; justify-content: space-between; padding: .35rem .6rem; border-bottom: 1px solid var(--line); background: #fafbfd; }
.reader-find { display: flex; align-items: center; gap: .2rem; flex: 1 1 260px; min-width: 0; margin: 0; }
.reader-find input { flex: 1; min-width: 0; min-height: 38px; }
.find-count { font-size: .82rem; color: var(--muted); white-space: nowrap; min-width: 3.2em; text-align: center; }
.pager-ctl, .zoom-ctl { display: flex; align-items: center; gap: .15rem; }
.goto { display: flex; align-items: center; gap: .3rem; margin: 0; }
.goto input { width: 4.6em; min-height: 38px; text-align: center; }
.zoom-val { min-width: 3.4em; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.reader-stage { flex: 1; overflow: auto; background: #e9edf3; padding: .8rem; outline-offset: -3px; }
.page-wrap { position: relative; margin: 0 auto; width: 100%; max-width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.page-img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.page-img.loading { opacity: .55; }
.hl-layer { position: absolute; inset: 0; pointer-events: none; }
.hl-layer span { position: absolute; background: rgba(250, 204, 21, .42); outline: 2px solid rgba(202, 138, 4, .8); border-radius: 2px; }
.reader-foot { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between; padding: .4rem .7rem; border-top: 1px solid var(--line); font-size: .88rem; }
.reader-foot details { position: relative; }
.reader-foot .marks[open] { flex-basis: 100%; }
.mark-form input { min-height: 38px; }
.reader-note { margin: 0; padding: .2rem .7rem .5rem; font-size: .76rem; }
.label-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.label-photo img { width: 100%; height: auto; border-radius: 8px; }
.label-photo { margin: 0; }
table.suggest code, .code-form input[type=text], .cat-card code, td code {
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; font-variant-numeric: slashed-zero; }
table.suggest code { font-size: .95rem; }
.amb { display: block; color: var(--amber); font-size: .8rem; font-weight: 600; }
.preview table .pv-duplicate td, .preview table .pv-invalid td { color: var(--amber); }
.preview table .pv-linked td { color: var(--muted); }
.model-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.row.tight { gap: .3rem; flex-wrap: nowrap; }
.row.tight input { min-height: 34px; min-width: 0; }
@media print {
  .reader .page-wrap, .cat-cover { display: none !important; }
  .reader::after { content: "Katalog sayfaları yazdırılamaz."; padding: 1rem; }
}

/* Tablet: marka/filtre paneli üstte açılır, liste + okuyucu iki sütun */
@media (max-width: 1279px) {
  .catws { grid-template-columns: 300px minmax(0, 1fr); }
  .cat-left { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; align-items: start; }
  .cat-left > * { min-width: 0; }
  .cat-left .cat-group .cat-h { margin-top: 0; }
  .cat-left .brands { max-height: 260px; overflow-y: auto; }
  .catws[data-state="reader"] .cat-left { display: none; }
  .tablet-only { display: inline-flex !important; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .cat-left { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-left .cat-kinds { grid-column: 1 / -1; }
  .cat-left .cat-kinds fieldset { display: flex; flex-wrap: wrap; gap: 0 1rem; }
  .cat-left .cat-kinds legend { width: 100%; }
  .label-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Mobil: marka seçimi → katalog listesi → tam ekran okuyucu */
@media (max-width: 767px) {
  .mobile-only { display: inline-flex !important; }
  .tablet-only { display: none !important; }
  .brand-grid.mobile-only { display: grid !important; }
  .catws { grid-template-columns: minmax(0, 1fr); }
  .cat-left { display: none; }
  .catws[data-state="brands"] .cat-viewer, .catws[data-state="list"] .cat-viewer { display: none; }
  .catws[data-state="reader"] .cat-mid, .catws[data-state="reader"] .cat-left { display: none; }
  .catws[data-state="reader"] { margin: 0 -.8rem; }
  .catws[data-state="brands"] .cat-mid .cat-mid-head .seg-small { display: none; }
  .cat-viewer { position: static; }
  .reader, .reader-full { height: calc(100vh - 56px - 72px - env(safe-area-inset-bottom)); border-radius: 0; border-left: 0; border-right: 0; min-height: 360px; }
  .reader-bar { gap: .3rem; }
  .reader-find { flex-basis: 100%; }
  .zoom-ctl .js-fit { display: none; }
  .cat-top .cat-actions .btn span { font-size: .9rem; }
  .cat-search .seg label { flex: 1 1 100%; }
  .reader-note { display: none; }
  .cat-actions { width: 100%; }
  .cat-actions .btn { flex: 1 1 100%; justify-content: flex-start; }
  .label-carry { flex-direction: column; align-items: flex-start; }
  .hide-mobile { display: none !important; }
  .js-panels { display: none !important; }
  .catws[data-state="reader"] { margin-top: -.9rem; }
  .reader-head { flex-wrap: wrap; gap: .2rem .3rem; padding: .3rem .4rem; }
  .reader-back { min-height: 40px; padding: .3rem .5rem; }
  .reader-title { order: 3; flex-basis: 100%; padding: 0 .3rem .2rem; }
  .reader-title strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .reader-head form.inline { margin-left: auto; }
}
