/* ============================================================
   AETHRA · İşletme Takip — tema & bileşenler
   Grafik renkleri dataviz referans paletinden (doğrulanmış).
   ============================================================ */

:root {
  color-scheme: light;

  /* Yüzeyler & mürekkep */
  --plane:        #f9f9f7;
  --surface-1:    #fcfcfb;
  --surface-2:    #f2f1ed;
  --text-primary: #0b0b0b;
  --text-secondary:#52514e;
  --text-muted:   #898781;
  --grid:         #e1e0d9;
  --axis:         #c3c2b7;
  --border:       rgba(11,11,11,0.10);
  --border-strong:rgba(11,11,11,0.18);

  /* Marka (yalnızca arayüz kromu — seri rengi değil) */
  --brand:        #8a6a2f;
  --brand-soft:   #f3ecdd;
  --brand-ink:    #ffffff;

  /* Kategorik seriler (slot 1-8) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;

  /* Durum */
  --good:     #0ca30c;
  --warning:  #fab219;
  --serious:  #ec835a;
  --critical: #d03b3b;
  --good-text:#006300;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11,11,11,.04), 0 8px 24px rgba(11,11,11,.06);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plane:        #0d0d0d;
    --surface-1:    #1a1a19;
    --surface-2:    #232322;
    --text-primary: #ffffff;
    --text-secondary:#c3c2b7;
    --text-muted:   #898781;
    --grid:         #2c2c2a;
    --axis:         #383835;
    --border:       rgba(255,255,255,0.10);
    --border-strong:rgba(255,255,255,0.20);
    --brand:        #d8b978;
    --brand-soft:   #2a2418;
    --brand-ink:    #1a1a19;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --good-text:#0ca30c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --plane:        #0d0d0d;
  --surface-1:    #1a1a19;
  --surface-2:    #232322;
  --text-primary: #ffffff;
  --text-secondary:#c3c2b7;
  --text-muted:   #898781;
  --grid:         #2c2c2a;
  --axis:         #383835;
  --border:       rgba(255,255,255,0.10);
  --border-strong:rgba(255,255,255,0.20);
  --brand:        #d8b978;
  --brand-soft:   #2a2418;
  --brand-ink:    #1a1a19;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --good-text:#0ca30c;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

/* hidden özniteliği her zaman kazansın — aşağıdaki .btn / #app gibi
   sınıf ve id kuralları tarayıcının varsayılan [hidden] kuralını ezerdi */
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--plane);
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Yerleşim ---------- */
#app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { letter-spacing: 2px; font-size: 14px; }
.brand-text span { font-size: 11px; color: var(--text-muted); }

.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.nav-group {
  font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); padding: 14px 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; margin-bottom: 1px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none; font-size: 13.5px;
}
.nav a:hover { background: var(--surface-2); color: var(--text-primary); }
.nav a.active { background: var(--brand-soft); color: var(--text-primary); font-weight: 600; }
.sidebar-foot { padding: 10px 12px; border-top: 1px solid var(--border); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  background: var(--plane); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; }
.spacer { flex: 1; }
.period { display: flex; align-items: center; gap: 7px; }
.period label { font-size: 12px; color: var(--text-muted); }
.view { padding: 20px 22px 60px; }

.sadece-mobil { display: none; }

/* ---------- Tipografi yardımcıları ---------- */
.muted { color: var(--text-muted); }
.sec { color: var(--text-secondary); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--good-text); }
.neg { color: var(--critical); }
h2.section { font-size: 15px; margin: 26px 0 10px; font-weight: 650; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px; word-break: break-all;
}

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 620; }
.card-body { padding: 14px 16px; }
.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* ---------- İstatistik kutusu ---------- */
.stat { padding: 14px 16px; }
.stat .label { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 25px; font-weight: 640; margin-top: 5px; line-height: 1.15; }
.stat .sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Butonlar ---------- */
.btn {
  font: inherit; font-size: 13px; font-weight: 550;
  border: 1px solid var(--border-strong); background: var(--surface-1);
  color: var(--text-primary);
  padding: 7px 13px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text-primary); }
.btn.danger { color: var(--critical); border-color: var(--border-strong); }
.btn.danger:hover { background: color-mix(in srgb, var(--critical) 12%, transparent); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Form elemanları ---------- */
input, select, textarea {
  font: inherit; font-size: 13.5px;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 7px 9px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
textarea { min-height: 66px; resize: vertical; }
label.field { display: block; margin-bottom: 12px; }
label.field > span.lbl { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
label.field > span.hint { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Araç çubuğu ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { max-width: 260px; }
.toolbar .grow { flex: 1; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl a { text-decoration: none; }
table.tbl a:hover { text-decoration: underline; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.actions { text-align: right; white-space: nowrap; }
.empty { padding: 34px 16px; text-align: center; color: var(--text-muted); font-size: 13.5px; }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 550; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.badge.good     { color: var(--good-text);  border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.badge.warning  { color: var(--text-primary); border-color: color-mix(in srgb, var(--warning) 55%, transparent); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.badge.critical { color: var(--critical);   border-color: color-mix(in srgb, var(--critical) 40%, transparent); }
.badge.info     { color: var(--series-1);   border-color: color-mix(in srgb, var(--series-1) 40%, transparent); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.3);
  width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { width: min(1000px, 100%); }
.modal-head { display: flex; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 15.5px; font-weight: 640; flex: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
}
.modal-foot .left { margin-right: auto; }

/* ---------- Satır düzenleyici (reçete / sepet) ---------- */
.line-editor { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; }
.line-editor .le-head, .line-editor .le-row {
  display: grid; gap: 8px; align-items: center; padding: 8px 10px;
}
.line-editor .le-head {
  background: var(--surface-2); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); font-weight: 600;
}
.line-editor .le-row { border-top: 1px solid var(--grid); }
.line-editor .le-foot { padding: 8px 10px; border-top: 1px solid var(--grid); }
.le-3 { grid-template-columns: 1fr 110px 100px 34px; }
.le-4 { grid-template-columns: 1fr 90px 120px 100px 34px; }

/* ---------- Maliyet özeti ---------- */
.cost-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.cost-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.cost-row.total { border-top: 1px solid var(--border-strong); margin-top: 6px; padding-top: 8px; font-weight: 640; font-size: 14.5px; }
.cost-row span:last-child { font-variant-numeric: tabular-nums; }

/* ---------- Grafik ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart text.tick { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart text.dlabel { fill: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 16px 12px; }
.legend .item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%);
}
.chart-tip .t { font-weight: 620; margin-bottom: 4px; }
.chart-tip .r { display: flex; gap: 10px; justify-content: space-between; }
.chart-tip .r b { font-variant-numeric: tabular-nums; font-weight: 550; }
.chart-tip .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }

/* ---------- İçerik takvimi ---------- */
.takvim { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.tk-baslik {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); padding: 4px 6px; font-weight: 600;
}
.tk-hucre {
  min-height: 86px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 5px 6px; background: var(--surface-1);
}
.tk-hucre.bos { background: transparent; border-color: transparent; }
.tk-hucre.bugun { border-color: var(--brand); background: var(--brand-soft); }
.tk-gun { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tk-etiket {
  font-size: 11px; line-height: 1.35; padding: 3px 5px; border-radius: 5px;
  margin-bottom: 3px; cursor: pointer;
  background: var(--surface-2); color: var(--text-secondary);
  border-left: 3px solid var(--axis);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-etiket:hover { color: var(--text-primary); }
.tk-etiket.cekim { border-left-color: var(--series-4); }
.tk-etiket.plan  { border-left-color: var(--series-1); }
.tk-etiket.yayin { border-left-color: var(--series-3); }
@media (max-width: 700px) {
  .takvim { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2px; }
  .tk-hucre { min-height: 58px; padding: 3px; }
  .tk-etiket { font-size: 9px; padding: 2px 3px; }
}

/* ---------- Bildirim ---------- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 10px 14px; font-size: 13px; min-width: 200px;
}
.toast.err { border-left-color: var(--critical); }
.toast.ok  { border-left-color: var(--good); }

/* ============================================================
   Giriş ekranı
   ============================================================ */
.giris-ekran {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 24px;
  background: var(--plane);
}
.giris-ekran[hidden] { display: none; }
.giris-kutu {
  width: min(400px, 100%);
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 26px 24px;
}
.giris-marka { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.giris-marka strong { display: block; letter-spacing: 2px; font-size: 15px; }
.giris-marka span { display: block; font-size: 12px; color: var(--text-muted); }
.btn.blok { width: 100%; justify-content: center; margin-top: 4px; }
.giris-hata {
  color: var(--critical); font-size: 13px; line-height: 1.5;
  margin: 10px 0 0; padding: 9px 11px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--critical) 10%, transparent);
}
.giris-hata[hidden] { display: none; }
.giris-not { font-size: 12px; line-height: 1.55; margin: 18px 0 0; text-align: center; }

/* ============================================================
   Senkron göstergesi & hesap
   ============================================================ */
.senkron { font-size: 12px; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.senkron .nokta { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.senkron.cevrimdisi .nokta { background: var(--warning); }
.senkron.yerel .nokta { background: var(--text-muted); }
.hesap { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; word-break: break-all; line-height: 1.4; }
.sidebar-butonlar { display: flex; gap: 6px; }
.yan-kapat { display: none; margin-left: auto; }
.yan-perde { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
.yan-perde[hidden] { display: none; }

/* ============================================================
   Mobil alt gezinme
   ============================================================ */
.alt-nav { display: none; }

/* ============================================================
   Duyarlı yerleşim
   ============================================================ */
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed; z-index: 60; width: 280px; max-width: 84vw; height: 100dvh;
    transform: translateX(-100%); transition: transform .2s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .yan-kapat { display: inline-flex; }

  .sadece-mobil { display: inline-flex; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  .topbar { padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); gap: 8px; }
  .topbar h1 { font-size: 16px; }
  .period label { display: none; }
  .senkron .metin { display: none; }
  .view { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }

  /* Alt gezinme çubuğu */
  .alt-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--surface-1); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .alt-nav a, .alt-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 8px 2px 7px; min-height: 56px;
    font: inherit; font-size: 10.5px; font-weight: 550;
    color: var(--text-muted); text-decoration: none;
    background: none; border: 0; cursor: pointer;
  }
  .alt-nav .ikon { font-size: 18px; line-height: 1.1; }
  .alt-nav a.active { color: var(--brand); }

  /* Dokunma hedefleri */
  .btn { padding: 9px 14px; min-height: 40px; }
  .btn.sm { padding: 7px 10px; min-height: 36px; }
  input, select, textarea { font-size: 16px; padding: 10px 11px; }  /* iOS yakınlaştırmasını önler */
  .toolbar { gap: 8px; }
  .toolbar .search { max-width: none; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 auto; min-width: 120px; }

  /* Modal tam ekran */
  .modal-backdrop { padding: 0; align-items: end; }
  .modal, .modal.wide {
    width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh;
    border-radius: 0; border: 0;
  }
  .modal-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .modal-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    position: sticky; bottom: 0; background: var(--surface-1);
  }
  .modal-foot .btn { flex: 1; justify-content: center; }

  /* Satır düzenleyiciler dikey */
  .le-3, .le-4 { grid-template-columns: 1fr 1fr 34px; }
  .line-editor .le-row > select { grid-column: 1 / -1; }
  .line-editor .le-head { display: none; }
  .line-editor .le-row { padding: 10px; gap: 8px; }
  .line-editor .le-row [data-tutar] { text-align: left !important; font-weight: 600; }

  .stat .value { font-size: 22px; }
  .takvim { gap: 3px; }
}

/* Tabloları kart görünümüne çevir */
@media (max-width: 760px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }

  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl thead { display: none; }
  .table-wrap { overflow-x: visible; }

  table.tbl tr {
    border-bottom: 1px solid var(--grid);
    padding: 10px 14px 12px;
  }
  table.tbl tr:last-child { border-bottom: 0; }
  table.tbl tbody tr:hover { background: transparent; }

  table.tbl td {
    border: 0; padding: 3px 0;
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  }
  table.tbl td::before {
    content: attr(data-label);
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); font-weight: 600;
    text-align: left; flex: 0 0 auto; white-space: nowrap;
  }
  table.tbl td > .hi { text-align: right; min-width: 0; }
  table.tbl td > .hi br { display: none; }              /* alt satırlar yan yana aksın */
  table.tbl td > .hi br + span { margin-left: 6px; }

  /* İlk sütun kartın başlığı gibi davranır */
  table.tbl td:first-child {
    display: block; font-size: 15px; padding-bottom: 6px;
  }
  table.tbl td:first-child::before { display: none; }
  table.tbl td:first-child > .hi { text-align: left; }
  table.tbl td:first-child > .hi br { display: block; }

  /* Boş etiketli işlem sütunu */
  table.tbl td.actions { justify-content: flex-end; padding-top: 8px; }
  table.tbl td.actions::before { display: none; }
  table.tbl td.actions > .hi { display: flex; gap: 8px; }
  table.tbl td.actions .btn { min-width: 46px; justify-content: center; }
}

@media (max-width: 480px) {
  /* Özet kutuları iki sütun kalsın — tek sütun sayfayı gereksiz uzatıyor */
  .cols-4, .cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid { gap: 10px; }
  .stat { padding: 11px 12px; }
  .stat .value { font-size: 19px; }
  .stat .label { font-size: 11px; }
  .stat .sub { font-size: 11px; }
  .tk-hucre { min-height: 46px; }
  .tk-gun { font-size: 10px; margin-bottom: 2px; }
  .tk-etiket { font-size: 0; padding: 0; height: 5px; margin-bottom: 2px; border-left-width: 0; border-radius: 2px; }
  .tk-etiket.cekim { background: var(--series-4); }
  .tk-etiket.plan  { background: var(--series-1); }
  .tk-etiket.yayin { background: var(--series-3); }
}

@media print {
  .sidebar, .topbar, .toolbar, .actions, .btn, .alt-nav, .yan-perde { display: none !important; }
  #app { grid-template-columns: 1fr; }
  .card { box-shadow: none; }
}
