/* AracTalep — arayüz stili. Dış kaynak yok (WEB-006). Boşluk ölçeği: 4 8 12 16 24 32 48 (WEB-002). */
:root {
  --bg: #f2f4f6;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #5b6672;
  --line: #dde3e8;
  --line-soft: #edf0f3;
  --brand: #1d4e6b;
  --brand-dark: #163c53;
  --brand-soft: #e6eef2;
  --accent: #c0392b;
  --ok: #1a7f4b;      --ok-bg: #e4f3ea;
  --no: #b3261e;      --no-bg: #fbe9e7;
  --wait: #8a5a00;    --wait-bg: #fff3d1;
  --new: #0b5cad;     --new-bg: #e5effa;
  --done: #4b5661;    --done-bg: #e9edf0;
  --radius: 6px;
  --radius-card: 10px;
  --side: 232px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid #7fb2d0; outline-offset: 1px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- yerleşim ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { display: block; font-size: .98rem; line-height: 1.2; }
.brand span { display: block; font-size: .74rem; color: var(--muted); }
.nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius); color: var(--ink); min-height: 40px; }
.nav button { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--line-soft); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nav .sep { margin: 12px 12px 4px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-foot { padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: .76rem; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 24px; display: flex; align-items: center; gap: 16px; min-height: 56px; position: sticky; top: 0; z-index: 5; }
.top h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.menu-btn { display: none; }
.who { text-align: right; line-height: 1.2; }
.who b { display: block; font-size: .9rem; }
.who span { font-size: .76rem; color: var(--muted); }
.content { padding: 24px; max-width: 1640px; width: 100%; }

/* ---------- düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--line-soft); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--no); border-color: #e3b5b1; }
.btn.danger:hover { background: var(--no-bg); }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: .88rem; }
.btn.icon { padding: 8px; min-width: 38px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- kart ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; }
.card + .card { margin-top: 16px; }
.card > h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line-soft); }
.card.narrow { max-width: 440px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { flex: 1; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.cols > * { margin-top: 0 !important; }
.stack > * + * { margin-top: 16px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }

/* ---------- bildirim satırı ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; display: flex; gap: 8px; align-items: flex-start; }
.flash.ok { background: var(--ok-bg); border-color: #b5dcc5; color: #0f5a33; }
.flash.no { background: var(--no-bg); border-color: #eab9b4; color: #7d1a14; }
.flash.info { background: var(--new-bg); border-color: #b9d3ee; color: #0a467f; }
.flash ul { margin: 0; padding-left: 18px; }

/* ---------- etiket ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.no { background: var(--no-bg); color: var(--no); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.new { background: var(--new-bg); color: var(--new); }
.tag.done { background: var(--done-bg); color: var(--done); }
.tag.off { background: #f1f1f1; color: #6b6b6b; }
.tag.plain { background: transparent; color: var(--muted); border-color: var(--line); }
.tag.plain::before { display: none; }

/* ---------- tablo ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: #f7f9fb; }
.table tr:last-child td { border-bottom: 0; }
.table td.strip { padding-left: 16px; }
/* Durum rengi: satırın tamamı değil, solda şerit + etiket */
.table tr.st-ok td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.table tr.st-no td:first-child { box-shadow: inset 4px 0 0 var(--no); }
.table tr.st-wait td:first-child { box-shadow: inset 4px 0 0 #d9a400; }
.table tr.st-new td:first-child { box-shadow: inset 4px 0 0 var(--new); }
.table tr.st-done td:first-child { box-shadow: inset 4px 0 0 #a8b1ba; }
.table tr.st-off td:first-child { box-shadow: inset 4px 0 0 #d0d0d0; }
.table .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: .88rem; color: var(--muted); flex-wrap: wrap; }

/* ---------- form ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: #3a444e; }
.field .req::after { content: " *"; color: var(--no); }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid #c5ced6; border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid #cfe2ec; outline-offset: 0; }
input[readonly], select[disabled] { background: #f3f5f7; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.check input { width: 18px; height: 18px; }
.seg { display: inline-flex; border: 1px solid #c5ced6; border-radius: var(--radius); overflow: hidden; }
.seg label { padding: 8px 16px; cursor: pointer; min-height: 38px; display: flex; align-items: center; background: #fff; border-right: 1px solid #c5ced6; font-weight: 500; }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid #7fb2d0; outline-offset: -3px; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.section-title:first-child { margin-top: 0; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row-line { display: grid; grid-template-columns: 28px 1fr 1fr 1.2fr 38px; gap: 8px; align-items: center; }
.row-line.two { grid-template-columns: 1.4fr 1fr 38px; }
.row-line .order { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filters .wide { grid-column: span 2; }

/* ---------- ayrıntı ---------- */
dl.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
dl.facts.one { grid-template-columns: 1fr; }
dl.facts div { min-width: 0; }
dl.facts dt { font-size: .78rem; color: var(--muted); font-weight: 600; }
dl.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.route { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; margin: 0; padding: 0; }
.route li { background: var(--brand-soft); color: var(--brand-dark); padding: 4px 12px; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.route li + li::before { content: "→"; margin: 0 8px 0 -4px; color: var(--muted); position: relative; left: -12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 12px 20px; border-left: 2px solid var(--line); position: relative; margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.decide details { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-top: 8px; }
.decide summary { cursor: pointer; font-weight: 600; min-height: 28px; display: flex; align-items: center; gap: 8px; }
.decide details[open] summary { margin-bottom: 8px; }
.assigned { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.assigned > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.assigned b { display: block; font-size: 1.05rem; }

/* ---------- pano ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; color: var(--ink); border-top: 4px solid var(--line); }
.stat:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(20, 40, 60, .08); }
.stat .n { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .t { font-size: .88rem; font-weight: 600; margin-top: 4px; }
.stat .d { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.stat.wait { border-top-color: #d9a400; }
.stat.no { border-top-color: var(--no); }
.stat.ok { border-top-color: var(--ok); }
.stat.pri { border-top-color: var(--brand); }
.stat.new { border-top-color: var(--new); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.live.stale::before { background: #d9a400; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; font-size: .88rem; }
.bar progress { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.bar progress::-webkit-progress-bar { background: var(--line-soft); }
.bar progress::-webkit-progress-value { background: var(--brand); }
.bar progress::-moz-progress-bar { background: var(--brand); }

/* ---------- sekmeler ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 16px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; margin-bottom: -1px; color: var(--muted); font-weight: 500; min-height: 40px; display: flex; align-items: center; }
.tabs a:hover { background: var(--line-soft); text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--panel); border-color: var(--line); color: var(--brand-dark); font-weight: 600; box-shadow: inset 0 3px 0 var(--brand); }

/* ---------- tanım listeleri ---------- */
.def-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: #fafbfc; }
.def-head h2 { flex: 1; min-width: 200px; }
.def-list { list-style: none; margin: 0; padding: 0; }
.def-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 8px 16px; border-bottom: 1px solid var(--line-soft); min-height: 44px; }
.def-row:last-child { border-bottom: 0; }
.def-row.off .def-name { color: var(--muted); }
.def-name { flex: 1; min-width: 180px; overflow-wrap: anywhere; }
.def-edit > summary { cursor: pointer; color: var(--brand); font-size: .87rem; list-style: none; min-height: 28px; display: flex; align-items: center; }
.def-edit > summary::-webkit-details-marker { display: none; }
.def-edit > summary:hover { text-decoration: underline; }
.def-edit[open] { flex-basis: 100%; order: 9; padding: 8px 0 4px; }
.def-edit[open] > summary { color: var(--muted); }
.def-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 8px; }
.def-form .field { flex: 1 1 220px; }
.def-form .field.narrow { flex: 0 0 88px; }
.gap-top { margin-top: 16px; }
.table td.clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- pencere: Excel sütun seçimi ---------- */
dialog.export { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); box-shadow: 0 12px 48px rgba(15, 25, 35, .28); }
dialog.export::backdrop { background: rgba(15, 25, 35, .45); }
dialog.export form { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
dialog.export .grow { flex: 1; text-align: right; }
.export-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; max-height: 52vh; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 12px; }
.export-cols .check { min-height: 36px; cursor: pointer; overflow-wrap: anywhere; }
dialog.export .form-foot { margin-top: 0; }

/* ---------- giriş ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; }
.login .brand { border: 0; padding: 0 0 24px; justify-content: center; }
.login .brand svg { width: 48px; height: 48px; }
.login .brand b { font-size: 1.15rem; }
.login .card { padding: 24px; }
.login .field + .field { margin-top: 12px; }
.login .btn { width: 100%; margin-top: 16px; }
.login-foot { text-align: center; margin-top: 16px; font-size: .78rem; color: var(--muted); }

/* ---------- dar ekran (WEB-007) ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; left: 0; top: 0; width: min(82vw, 280px); transform: translateX(-100%); transition: transform .18s; box-shadow: 4px 0 24px rgba(0, 0, 0, .18); }
  body.menu-open .side { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .top { padding: 8px 12px; gap: 8px; }
  .who { display: none; }
  .content { padding: 12px; }
  .stats, .grid2, .grid3, .grid4, .filters, dl.facts, .assigned { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2, .filters .wide { grid-column: auto; }
  .row-line { grid-template-columns: 28px 1fr 38px; }
  .row-line > :nth-child(3), .row-line > :nth-child(4) { grid-column: 2; }
  .row-line.two { grid-template-columns: 1fr 38px; }
  .row-line.two > :nth-child(2) { grid-column: 1; }
  .btn { min-height: 44px; }
  .top .btn .txt { display: none; }
}

/* ---------- telefon (WEB-007): yatay kaydırma yok, listeler kart ---------- */
@media (max-width: 760px) {
  /* 16px altı yazıda iOS alana dokununca sayfayı yakınlaştırır */
  input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], input[type=date], input[type=datetime-local], input[type=search], select, textarea { font-size: 16px; min-height: 44px; }
  h1 { font-size: 1.1rem; }
  .card { padding: 12px; }
  .card + .card, .stack > * + * { margin-top: 12px; }
  .card.flush > h2 { padding: 12px; }
  .cols { gap: 12px; }
  .toolbar { gap: 8px; margin-bottom: 12px; }
  .toolbar .btn-row { width: 100%; }
  .toolbar .btn-row .btn { flex: 1 1 auto; }
  .flash { padding: 8px 12px; }

  /* menü açıkken arkası kararır; dışına dokununca kapanır (app.js) */
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 25, 35, .4); z-index: 15; }
  body.menu-open { overflow: hidden; }
  .nav a, .nav button { min-height: 44px; }

  /* pano */
  .stats { gap: 8px; margin-bottom: 12px; }
  .stat { padding: 12px; }
  .stat .n { font-size: 1.6rem; }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bar { grid-template-columns: 84px 1fr 44px; }

  /* süzgeçler: iki sütun, arama ve düğmeler tam satır */
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filters .wide, .filters .btn-row, .filters .span2, .filters > p { grid-column: 1 / -1; }
  .filters .btn-row .btn { flex: 1 1 auto; }

  /* ayrıntı: kısa bilgiler iki sütun, uzunlar tam satır */
  dl.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  dl.facts.one { grid-template-columns: 1fr; }
  .route li { font-size: .84rem; }

  /* formlar */
  .seg { display: flex; width: 100%; }
  .seg label { flex: 1; justify-content: center; min-height: 44px; }
  .form-foot { margin-top: 12px; padding-top: 12px; }
  .form-foot .btn { flex: 1 1 auto; }
  .section-title { margin: 16px 0 8px; }
  .check { min-height: 44px; }
  .pager { padding: 8px 12px; gap: 8px; }
  .pager .btn-row { width: 100%; }
  .pager .btn-row .btn { flex: 1 1 auto; }
  .link-btn { min-height: 32px; }

  /* ---- liste tabloları → kart ---- */
  .table-wrap { overflow-x: visible; }
  .table.is-cards { display: block; font-size: .9rem; }
  .table.is-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.is-cards tbody { display: block; }
  .table.is-cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 6px 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
  .table.is-cards tr:last-child { border-bottom: 0; }
  .table.is-cards tbody tr:hover { background: none; }
  .table.is-cards td { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .table.is-cards td::before { content: attr(data-label); font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
  .table.is-cards td.c-no, .table.is-cards td.is-empty { display: none; }
  .table.is-cards td.c-main { grid-column: 1 / -1; order: -2; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-size: 1rem; font-weight: 600; }
  .table.is-cards td.c-main::before { display: none; }
  .table.is-cards td.c-main[data-no]::before { display: inline; content: attr(data-no); font-size: .84rem; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
  .table.is-cards td.c-main > div { flex-basis: 100%; font-weight: 400; }
  .table.is-cards td.c-tag { order: -1; flex-direction: row; align-items: center; }
  .table.is-cards td.c-tag::before, .table.is-cards td.c-act::before { display: none; }
  .table.is-cards td.c-full { grid-column: 1 / -1; }
  /* tek etiketli listelerde (araç, şoför, bildirim) etiket başlığın sağında durur: bir satır kazanılır */
  .table.is-cards tr { position: relative; }
  .table.is-cards td.c-tag.c-full { position: absolute; top: 12px; right: 12px; }
  .table.is-cards tr:has(> td.c-tag.c-full) > td.c-main { padding-right: 128px; }
  .table.is-cards td.c-act { order: -1; align-items: flex-end; justify-content: center; }
  .table.is-cards .num { color: var(--ink); }
  /* durum şeridi hücreden satıra taşınır */
  .table.is-cards tr td:first-child { box-shadow: none; }
  .table.is-cards tr.st-ok { box-shadow: inset 4px 0 0 var(--ok); }
  .table.is-cards tr.st-no { box-shadow: inset 4px 0 0 var(--no); }
  .table.is-cards tr.st-wait { box-shadow: inset 4px 0 0 #d9a400; }
  .table.is-cards tr.st-new { box-shadow: inset 4px 0 0 var(--new); }
  .table.is-cards tr.st-done { box-shadow: inset 4px 0 0 #a8b1ba; }
  .table.is-cards tr.st-off { box-shadow: inset 4px 0 0 #d0d0d0; }
}
@media (max-width: 340px) {
  .content { padding: 8px; }
  .top .btn.primary { padding: 8px 12px; }
  dl.facts { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tabs { gap: 4px; margin-bottom: 12px; }
  .tabs a { padding: 8px 12px; min-height: 44px; flex: 1 1 auto; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 4px; background: var(--panel); }
  .tabs a.on { background: var(--brand-soft); border-color: var(--brand); box-shadow: none; }
  .tabs { border-bottom: 0; }
  .def-head, .def-row { padding: 8px 12px; }
  .def-form .field, .def-form .field.narrow { flex: 1 1 100%; }
  .def-form .btn { flex: 1 1 100%; }
  .table.is-cards td.clip { max-width: none; white-space: normal; }
  .gap-top { margin-top: 12px; }
}

@media (max-width: 760px) {
  .export-cols { grid-template-columns: 1fr; max-height: 48vh; }
  .export-cols .check { min-height: 44px; }
  dialog.export form { padding: 12px; }
}
