/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Nötr gri skala — mavi tonu alınmış, kurumsal */
  --bg:           #f6f7f9;
  --surface:      #ffffff;
  --surface2:     #f9fafb;
  --border:       #e5e7eb;
  --border-soft:  #eef0f3;      /* tablo satır ayracı — daha az çizgi gürültüsü */
  --border-strong: #d3d7de;
  --text:         #111827;
  --text-muted:   #667085;
  --text-soft:    #98a2b3;

  --primary:      #4a5bd4;
  --primary-h:    #3d4cba;
  --primary-soft: #eef1fd;

  --success:      #12805c;
  --success-soft: #e7f5ef;
  --warning:      #b25e09;
  --warning-soft: #fdf3e7;
  --danger:       #d02f2f;
  --danger-soft:  #fdeded;
  --info:         #2563eb;
  --info-soft:    #eaf1fe;

  --radius:       10px;
  --radius-sm:    7px;
  /* Yumuşak, tek katmanlı yükselti — kartlar "havada" durmasın */
  --shadow-sm:    0 1px 2px rgba(16,24,40,.04);
  --shadow:       0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg:    0 4px 12px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.04);
  --transition:   .15s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Sayılar tablolarda hizalı dursun */
table, .stat-number, .tutar { font-variant-numeric: tabular-nums; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Yan Menü (Sidebar) ───────────────────────────────────────────────────── */
:root { --yan-menu-genislik: 236px; --yan-menu-dar: 64px; }

body { padding-left: var(--yan-menu-genislik); transition: padding-left .18s ease; }
body.yan-menu-dar { padding-left: var(--yan-menu-dar); }
/* Yan menüsü olmayan sayfalar (giriş, modül seçimi) */
body.yan-menusuz, body.yan-menusuz.yan-menu-dar { padding-left: 0; }

.navbar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  width: var(--yan-menu-genislik);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 1px 0 6px rgba(0,0,0,.06);
  transition: width .18s ease;
}
body.yan-menu-dar .navbar { width: var(--yan-menu-dar); }

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.05rem; font-weight: 700; color: var(--primary);
  white-space: nowrap; padding: 2px 6px; min-height: 32px;
}
.brand-icon { font-size: 1.3rem; flex-shrink: 0; }

/* Aç/Kapa butonu */
.yan-menu-btn {
  position: absolute; top: 14px; right: 8px;
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); color: var(--text-muted);
  cursor: pointer; font-size: .9rem; line-height: 1; padding: 0;
  transition: var(--transition);
}
.yan-menu-btn:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface2); }

.nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1 0 auto; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  font-size: .88rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); white-space: nowrap; overflow: hidden;
}
.nav-link:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; text-decoration: none; }
.nav-ikon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 20px; }
.ikon { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.brand-icon .ikon { width: 20px; height: 20px; }
.modul-btn .ikon { width: 14px; height: 14px; }
.nav-etiket { overflow: hidden; text-overflow: ellipsis; }

.nav-user {
  display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.nav-user .user-badge, .nav-user .user-name { text-align: center; }
.nav-user .user-name { font-size: .85rem; font-weight: 600; }
.nav-user-alt { display: flex; gap: 6px; }
.nav-user-alt .btn { flex: 1; justify-content: center; }

/* ── Daraltılmış hâl: yalnızca ikonlar ── */
body.yan-menu-dar .brand-text,
body.yan-menu-dar .nav-etiket,
body.yan-menu-dar .user-name,
body.yan-menu-dar .user-badge,
body.yan-menu-dar .modul-btn span { display: none; }
body.yan-menu-dar .nav-brand { justify-content: center; padding-left: 0; }
body.yan-menu-dar .yan-menu-btn { position: static; margin: 0 auto; }
body.yan-menu-dar .nav-link { justify-content: center; padding: 9px 4px; gap: 0; }
body.yan-menu-dar .modul-switcher { flex-direction: column; gap: 4px; }
body.yan-menu-dar .nav-user-alt { flex-direction: column; }

/* Menü kapalıyken üstte kalan ince açma düğmesi (mobil) */
.yan-menu-ac {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 101;
  width: 38px; height: 38px; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); cursor: pointer;
  font-size: 1.1rem; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.yan-menu-perde {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,.35);
}

/* ── Modül Switcher ───────────────────────────────────────────────────────── */
.modul-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}
.modul-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 6px;
  text-decoration: none !important;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
  line-height: 1;
}
.modul-btn:hover { background: var(--surface); color: var(--text); }
.modul-btn.modul-aktif { background: var(--primary); color: #fff !important; font-weight: 600; }
.modul-btn.modul-pasif { opacity: .38; pointer-events: none; }
.user-name { font-size: .9rem; font-weight: 600; }
.user-badge { font-size: .72rem; padding: 3px 9px; border-radius: 5px; font-weight: 550; border: 1px solid transparent; }
.badge-yonetici { background: var(--primary-soft); color: var(--primary); border-color: #dde2fa; }
.badge-calisan  { background: var(--success-soft); color: var(--success); border-color: #cbe6da; }

/* ── Main ─────────────────────────────────────────────────────────────────── */
/* Geniş tablolar (panel, karşıt takip, tamamlananlar) yana kaydırma
   gerektirmesin diye içerik alanı geniş tutulur. Form sayfalarında
   kartların kendi max-width'i olduğu için onlar etkilenmez. */
.main-content { flex: 1; max-width: 1760px; width: 100%; margin: 0 auto; padding: 28px 20px; }
.footer { text-align: center; padding: 16px; font-size: .8rem; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--surface); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert { padding: 11px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .875rem; font-weight: 500; border-width: 1px; border-style: solid; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #c3e2d6; }
.alert-danger   { background: var(--danger-soft); color: var(--danger); border-color: #f6cfcf; }
.alert-warning  { background: var(--warning-soft); color: var(--warning); border-color: #f6dfc0; }
.alert-info     { background: var(--info-soft); color: var(--info); border-color: #cbdcfb; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 550; cursor: pointer;
  border: 1px solid transparent; transition: var(--transition);
  text-decoration: none !important; box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(.5px); }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-h); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover  { background: #0e6b4d; color: #fff; }
/* Yıkıcı ve ikincil eylemler: sakin durur, üzerine gelince renk alır */
.btn-danger   { background: var(--danger-soft);  color: var(--danger);  border-color: #f6d7d7; }
.btn-danger:hover   { background: var(--danger);  color: #fff; border-color: var(--danger); }
.btn-warning  { background: var(--warning-soft); color: var(--warning); border-color: #f3e0c6; }
.btn-warning:hover  { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline  { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover  { background: var(--surface2); border-color: var(--text-soft); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: .8rem; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface2); }
.btn-sablon-kaydet { background: #f0fdf4; color: #166534; border: 1.5px solid #86efac; }
.btn-sablon-kaydet:hover { background: #dcfce7; border-color: #4ade80; color: #14532d; }

/* ── Onay / Uyarı Modalları ──────────────────────────────────────────────── */
#uyari-overlay,
#kayit-onay-overlay {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#uyari-overlay.aktif,
#kayit-onay-overlay.aktif { display: flex; }
.uyari-kart {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  text-align: center;
  animation: modalAc .15s ease;
}
.uyari-ikon   { font-size: 2.4rem; margin-bottom: 8px; }
.uyari-baslik { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.uyari-metin  { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; }
.uyari-butonlar { display: flex; flex-direction: column; gap: 10px; }
.uyari-butonlar .btn { justify-content: center; padding: 11px; }

/* ── Şablon Adı Modal ─────────────────────────────────────────────────────── */
.sablon-modal-kart {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: modalAc .15s ease;
}
@keyframes modalAc { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sablon-modal-baslik  { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.sablon-modal-aciklama { font-size: .88rem; color: var(--text-muted); margin-bottom: 16px; }
.sablon-modal-input   { width: 100%; margin-bottom: 18px; }
.sablon-modal-actions { display: flex; gap: 10px; }
.input-hata { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: none; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.card-body { padding: 20px; }

/* ── Stat Cards ───────────────────────────────────────────────────────────── */
/* Renkli üst çizgi yerine sol accent + sayının kendi rengi: daha sakin */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 16px 18px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  text-align: left; position: relative;
}
.stat-number { font-size: 1.75rem; font-weight: 650; line-height: 1.15; letter-spacing: -.02em; }
.stat-label  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.stat-filtre { transition: var(--transition); user-select: none; cursor: pointer; }
.stat-filtre:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.stat-filtre-aktif { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--primary-soft) !important; }
.stat-primary .stat-number { color: var(--primary); }
.stat-warning .stat-number { color: var(--warning); }
.stat-info    .stat-number { color: var(--info); }
.stat-success .stat-number { color: var(--success); }
.stat-danger  .stat-number { color: var(--danger); }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--surface); padding: 11px 16px; text-align: left;
  font-weight: 600; font-size: .71rem; text-transform: uppercase; letter-spacing: .045em;
  color: var(--text-soft); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child td { border-bottom: none; }

/* ── Status & Priority badges ─────────────────────────────────────────────── */
/* Ortak yapı: yumuşak zemin + noktalı kenarlık yerine ince çerçeve.
   Renkler tek bir sıcaklık skalasına oturtuldu (sarı→mavi→mor→yeşil ilerlemesi). */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 6px;
  font-size: .74rem; font-weight: 550; white-space: nowrap;
  border: none; line-height: 1.55;
}
.status-baslanacak      { background: #fbf6e9; color: #8a6413; border-color: #f0e4c4; }
.status-baslandi        { background: #eaf1fe; color: #1d4ed8; border-color: #d3e0fb; }
.status-karsitlara      { background: #eef1fd; color: #4338ca; border-color: #dde2fa; }
.status-karsitlar-bitti { background: #fdf3e7; color: #a35709; border-color: #f8e2c8; }
.status-rapor           { background: #e9f5f7; color: #0e6274; border-color: #cfe6ea; }
.status-eksiklik1       { background: #fdeef3; color: #a01a4c; border-color: #f7d9e4; }
.status-eksiklik2       { background: #f8eefa; color: #7b2b96; border-color: #eedcf3; }
.status-memur           { background: #e9f4ef; color: #10704f; border-color: #cfe7dd; }
.status-mudur-yrd       { background: #e9f4ec; color: #14663c; border-color: #cfe6d7; }
.status-mudur           { background: #e7f2ea; color: #135c36; border-color: #cbe2d3; }
.status-iade-tamamlandi { background: var(--success-soft); color: var(--success); border-color: #cbe6da; }
.oncelik-dusuk  { background: #f0fdf4; color: #166534; }
.oncelik-normal { background: #eff6ff; color: #1d4ed8; }
.oncelik-yuksek { background: #fff7ed; color: #9a3412; }
.oncelik-kritik { background: #fef2f2; color: #7f1d1d; }

.gecikti-badge { background: #fdeded; color: #b42318; font-size: .71rem; padding: 3px 9px; border-radius: 6px; font-weight: 600; }

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.page-title  { font-size: 1.375rem; font-weight: 620; letter-spacing: -.02em; }
.page-subtitle { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
input[type=text], input[type=password], input[type=date], select, textarea {
  padding: 9px 13px; border-radius: 7px; border: 1.5px solid var(--border);
  font-size: .9rem; font-family: inherit; transition: var(--transition);
  background: var(--surface); color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
textarea { resize: vertical; min-height: 100px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ── Login Page ───────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 32px; width: 100%; max-width: 390px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 1.35rem; font-weight: 620; letter-spacing: -.02em; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 9px; }
.login-logo h1 svg { width: 22px; height: 22px; color: var(--primary); }
.login-logo p  { color: var(--text-muted); font-size: .85rem; margin-top: 5px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; padding: 11px; }
.login-hint { background: var(--surface2); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 18px; font-size: .78rem; color: var(--text-muted); border: 1px solid var(--border); line-height: 1.7; }
.login-hint strong { color: var(--text); }

/* ── İş Detay ─────────────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.meta-item { background: var(--surface2); border-radius: 8px; padding: 12px 14px; }
.meta-item .meta-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .04em; }
.meta-item .meta-val   { font-size: .95rem; font-weight: 600; margin-top: 4px; }
.aciklama-box { background: var(--surface2); border-radius: 8px; padding: 16px; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; border: 1px solid var(--border); }

/* ── Durum Değiştir ───────────────────────────────────────────────────────── */
.durum-btn-grid { display: grid; gap: 8px; }
.durum-btn { width: 100%; text-align: left; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: .88rem; font-weight: 600; transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.durum-btn:hover { background: var(--bg); }
.durum-btn.active { border-color: #c9d1f7; background: var(--primary-soft); color: var(--primary); }

/* ── Yorumlar ─────────────────────────────────────────────────────────────── */
.yorum-list { display: flex; flex-direction: column; gap: 12px; }
.yorum-item { background: var(--surface2); border-radius: 8px; padding: 14px 16px; border: 1px solid var(--border); }
.yorum-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.yorum-yazar { font-weight: 700; font-size: .85rem; }
.yorum-tarih { font-size: .78rem; color: var(--text-muted); }
.yorum-icerik { font-size: .9rem; line-height: 1.5; white-space: pre-wrap; }
.yorum-form textarea { border-radius: 8px; margin-bottom: 8px; }

/* ── Çalışan Listesi ──────────────────────────────────────────────────────── */
.calisan-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.aktif-badge   { background: #d1fae5; color: #065f46; font-size: .78rem; padding: 2px 8px; border-radius: 12px; font-weight: 700; }
.pasif-badge   { background: #fee2e2; color: #991b1b; font-size: .78rem; padding: 2px 8px; border-radius: 12px; font-weight: 700; }

/* ── İş Kartları (Çalışan Panel) ──────────────────────────────────────────── */
.is-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.is-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 18px; transition: var(--transition); display: flex; flex-direction: column; gap: 10px; }
.is-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.is-card-title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.is-card-meta  { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.is-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.is-card-date  { font-size: .8rem; color: var(--text-muted); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }

/* ── Filtre Paneli ───────────────────────────────────────────────────────── */
.filtre-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.filtre-baslik {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  /* <button> olarak işaretlendi: masaüstünde düz başlık gibi durur */
  background: none; border: none; padding: 0; font-family: inherit;
  display: flex; align-items: center; gap: 8px; cursor: default; width: 100%;
}
.filtre-sayac {
  background: var(--primary); color: #fff; border-radius: 10px;
  font-size: .68rem; font-weight: 700; padding: 1px 7px; letter-spacing: 0;
}
.filtre-ok { width: 15px; height: 15px; margin-left: auto; display: none;
             transition: transform var(--transition); }
.filtre-alanlar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.filtre-grup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  flex: 1;
}
.filtre-grup label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filtre-select {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  font-size: .88rem;
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}
.filtre-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.filtre-eylemler { display: flex; gap: 8px; align-items: center; padding-bottom: 1px; }

.filtre-aktif-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.filtre-rozet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ede9fe;
  color: var(--primary);
  border: 1px solid #c4b5fd;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Atama Satırı (detay sayfası sağ panel) ──────────────────────────────── */
.atama-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  font-size: .88rem;
  font-weight: 500;
  user-select: none;
}
.atama-satir:hover { background: var(--surface2); border-color: var(--primary); }
.atama-satir.atanmis { background: var(--primary-soft); border-color: #c9d1f7; }
.atama-satir input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.atama-isim { flex: 1; }
.atama-rozet { font-size: .75rem; font-weight: 700; color: var(--primary); }

/* ── Çalışan Çoklu Seçim ─────────────────────────────────────────────────── */
.calisan-checklist { display:flex; flex-direction:column; gap:6px; padding:4px 0; }
.calisan-check-item { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; border:1.5px solid var(--border); cursor:pointer; transition:var(--transition); font-size:.9rem; font-weight:500; user-select:none; }
.calisan-check-item:hover { background:var(--surface2); border-color:var(--primary); }
.calisan-check-item.secili { background:var(--primary-soft); border-color:#c9d1f7; }
.calisan-check-item input[type=checkbox] { accent-color:var(--primary); width:16px; height:16px; cursor:pointer; }

/* ── Readonly field ──────────────────────────────────────────────────────── */
.readonly-field { padding:9px 13px; border-radius:7px; border:1.5px solid var(--border); background:var(--surface2); color:var(--text-muted); font-size:.9rem; min-height:40px; display:flex; align-items:center; }

/* ── Checklist (Alt İşler) ────────────────────────────────────────────────── */
.checklist { list-style:none; margin:0; padding:0; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: default;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: var(--surface2); }
.checklist-item:hover .cl-actions { opacity: 1; }
.checklist-item.cl-done { background: var(--surface2); }

.cl-check-form { flex-shrink: 0; }

.cl-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 2px solid #93c5fd;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
  color: #fff;
  flex-shrink: 0;
}
.cl-checkbox svg { width: 12px; height: 10px; display: none; }
.cl-checkbox:hover { border-color: var(--primary); background: #ede9fe; }
.cl-checkbox.cl-checked { background: var(--primary); border-color: var(--primary); }
.cl-checkbox.cl-checked svg { display: block; }

.cl-body { flex: 1; min-width: 0; }

.cl-title { font-size: .95rem; font-weight: 500; color: var(--text); display: block; }
.cl-strikethrough { text-decoration: line-through; color: var(--text-muted); }

.cl-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.cl-meta-item { font-size: .78rem; color: var(--text-muted); }
.cl-late { color: #dc2626 !important; font-weight: 600; }
.cl-desc { font-style: italic; }

.cl-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.cl-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: .9rem;
  transition: background var(--transition);
  text-decoration: none;
  line-height: 1;
}
.cl-action-btn:hover { background: var(--border); }
.cl-delete-btn:hover { background: #fee2e2; }

/* ── Progress Bar ─────────────────────────────────────────────────────────── */
.progress-bar-wrap { width:100px; height:8px; background:var(--border); border-radius:99px; overflow:hidden; }
.progress-bar-fill { height:100%; background:var(--success); border-radius:99px; transition:width .4s ease; }

/* ── Bölüm Başlığı (form ayırıcı) ───────────────────────────────────────── */
.bolum-baslik {
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

/* ── Autocomplete wrap ───────────────────────────────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-wrap input { width: 100%; }
.autocomplete-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .7rem;
  font-weight: 700;
  color: var(--primary);
  background: #ede9fe;
  padding: 1px 7px;
  border-radius: 10px;
  pointer-events: none;
  opacity: .85;
}
/* Tarayıcı datalist açıldığında hint'i gizle */
.autocomplete-wrap input:focus + .autocomplete-hint { display: none; }

/* ── Input Prefix (₺) ────────────────────────────────────────────────────── */
.input-prefix-wrap { display: flex; align-items: stretch; }
.input-prefix {
  padding: 0 12px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 7px 0 0 7px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.input-prefix-wrap input {
  border-radius: 0 7px 7px 0 !important;
}
.alan-not { font-weight: 400; color: var(--text-muted); font-size: .78rem; }
/* VKN otomatik doldurulunca yeşil flash */
@keyframes vknFlash { 0%,100% { background: var(--surface); } 40% { background: #d1fae5; border-color: var(--success); } }
.alan-otomatik { animation: vknFlash .8s ease; }

/* ── Mükellef Bilgi Satırları ────────────────────────────────────────────── */
.mukellef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.msat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.msat-vurgulu { border-color: #c7d2fe; background: #eef2ff; }
.msat-tam { grid-column: 1 / -1; }
.msat-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.msat-val { font-size: .95rem; font-weight: 600; color: var(--text); }
.msat-tutar { font-size: 1.25rem; font-weight: 800; color: var(--primary); }

/* ── Şablon Seçici Bar ───────────────────────────────────────────────────── */
.sablon-secici-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 16px;
  max-width: 760px;
}
.sablon-secici-label { font-size: .85rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.sablon-secici-listesi { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.sablon-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}
.sablon-chip:hover { border-color: var(--primary); background: #ede9fe; color: var(--primary); }
.sablon-chip.aktif { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ── Şablon Kartları (liste sayfası) ─────────────────────────────────────── */
.sablon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 18px; }
.sablon-kart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.sablon-kart-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; }
.sablon-baslik { font-size: 1rem; font-weight: 700; }
.sablon-aciklama { font-size: .85rem; color: var(--text-muted); line-height: 1.5; padding: 0 18px 12px; }
.sablon-alt-liste { list-style: none; padding: 0 18px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sablon-alt-liste li { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.sablon-alt-nokta { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.sablon-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--border); margin-top: auto; background: var(--surface2); }

/* ── Alt Şablon Satırı (form) ────────────────────────────────────────────── */
.alt-sablon-satir {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--surface);
}
.alt-sablon-sira { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 8px; }
.alt-sablon-icerik { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.alt-sablon-icerik input { width: 100%; }
.alt-sil-btn { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted); padding: 6px; border-radius: 6px; transition: var(--transition); margin-top: 4px; }
.alt-sil-btn:hover { background: #fee2e2; color: var(--danger); }
.alt-sablon-bos { padding: 16px; border: 1.5px dashed var(--border); border-radius: 8px; text-align: center; font-size: .85rem; color: var(--text-muted); }

/* ── Evrak Yükleme ───────────────────────────────────────────────────────── */
.evrak-yukle-alan { border: 2px dashed var(--border); border-radius: var(--radius); transition: var(--transition); }
.evrak-yukle-alan:hover, .evrak-drag-ustu { border-color: var(--primary); background: #f5f3ff; }
.evrak-drop-icerik { padding: 24px; text-align: center; cursor: pointer; }
.evrak-drop-ikon  { font-size: 2rem; display: block; margin-bottom: 8px; }
.evrak-drop-yazi  { font-size: .95rem; font-weight: 700; color: var(--text); }
.evrak-drop-not   { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.evrak-onizleme-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 12px; font-size: .82rem; margin: 3px; }
.evrak-onizleme-chip em { color: var(--text-muted); font-style: normal; }

/* ── Evrak Listesi ───────────────────────────────────────────────────────── */
.evrak-liste  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.evrak-satir  { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.evrak-satir:last-child { border-bottom: none; }
.evrak-ikon   { font-size: 1.5rem; flex-shrink: 0; }
.evrak-bilgi  { flex: 1; min-width: 0; }
.evrak-ad     { font-size: .9rem; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evrak-meta   { font-size: .76rem; color: var(--text-muted); }
.evrak-aksiyonlar { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Aktivite Akışı ─────────────────────────────────────────────────────── */
.aktivite-liste { list-style: none; margin: 0; padding: 0; }
.aktivite-satir {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.aktivite-satir:last-child { border-bottom: none; }
.aktivite-satir:hover { background: var(--surface2); }
.aktivite-ikon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; margin-top: 1px;
}
.aktivite-ikon-olusturuldu { background: #dbeafe; }
.aktivite-ikon-durum       { background: #ede9fe; }
.aktivite-ikon-guncelleme  { background: #fef3c7; }
.aktivite-ikon-yorum       { background: #d1fae5; }
.aktivite-ikon-evrak       { background: #fee2e2; }
.aktivite-ikon-pasif       { background: #e5e7eb; }
.aktivite-icerik { flex: 1; min-width: 0; }
.aktivite-aciklama {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aktivite-aciklama:hover { color: var(--primary); text-decoration: underline; }
.aktivite-meta { font-size: .76rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* ── Oluşturma Dönem Butonları ───────────────────────────────────────────── */
.olusturma-buton-grup { display: flex; gap: 8px; }
.olusturma-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 18px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface2);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); color: var(--text);
}
.olusturma-btn:hover { border-color: var(--primary); background: #ede9fe; color: var(--primary); }
.olusturma-btn-aktif { border-color: var(--primary); background: var(--primary); color: #fff; }
.olusturma-btn-aktif:hover { background: var(--primary-h); }
.olusturma-sayi-rozet {
  background: rgba(255,255,255,.3); color: inherit;
  padding: 1px 7px; border-radius: 10px; font-size: .78rem; font-weight: 700;
}
.olusturma-btn-aktif .olusturma-sayi-rozet { background: rgba(255,255,255,.25); }
.olusturma-btn:not(.olusturma-btn-aktif) .olusturma-sayi-rozet { background: var(--border); }
.olusturma-gizli { display: none; }

/* ── Dönem Kartları ──────────────────────────────────────────────────────── */
.donem-kart {
  flex: 1;
  min-width: 130px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  user-select: none;
}
.donem-kart:hover { border-color: #6366f1; background: #eef2ff; }
.donem-kart.donem-aktif { border-color: #6366f1; background: #eef2ff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.donem-etiket { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 6px; }
.donem-tutar  { font-size: 1.25rem; font-weight: 800; color: #6366f1; line-height: 1.2; }
.donem-sayi   { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.donem-tablo  { display: none; }
.donem-tablo.donem-tablo-aktif { display: block; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.db-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .db-grid-2 { grid-template-columns: 1fr; } }

/* ── Toplu Giriş ─────────────────────────────────────────────────────────── */
.excel-yukle-alan {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.excel-yukle-alan:hover { border-color: var(--primary); background: #f5f3ff; }
.sablon-bilgi { display: flex; flex-direction: column; gap: 8px; }
.sablon-bilgi-satir { font-size: .88rem; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.sablon-bilgi-satir strong { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Dar ekranda yan menü tamamen gizlenir, düğmeyle üstüne açılır */
  body, body.yan-menu-dar { padding-left: 0; }
  .navbar {
    width: var(--yan-menu-genislik);
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.yan-menu-acik .navbar { transform: translateX(0); }
  body.yan-menu-acik .yan-menu-perde { display: block; }
  .yan-menu-ac { display: flex; }
  body.yan-menu-acik .yan-menu-ac { display: none; }
  /* Mobilde daraltma değil, tam gizleme kullanılır */
  body.yan-menu-dar .brand-text,
  body.yan-menu-dar .nav-etiket,
  body.yan-menu-dar .user-name,
  body.yan-menu-dar .user-badge,
  body.yan-menu-dar .modul-btn span { display: revert; }
  body.yan-menu-dar .nav-link { justify-content: flex-start; padding: 8px 10px; gap: 10px; }
  body.yan-menu-dar .nav-brand { justify-content: flex-start; }
  body.yan-menu-dar .yan-menu-btn { position: absolute; }
  .main-content { padding-top: 60px; }
}


/* ── Açılır kart (İş detayı: Durum, Atanan Çalışanlar) ────────────────────── */
/* Kapalıyken seçili değeri gösterir; başlığa tıklanınca seçenekler açılır. */
.acilir { overflow: hidden; }
.acilir-bas {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--text);
  transition: background var(--transition);
}
.acilir-bas:hover { background: var(--surface2); }
.acilir.acik .acilir-bas { border-bottom: 1px solid var(--border); }
.acilir-etiket {
  font-size: .72rem; font-weight: 600; letter-spacing: .045em;
  text-transform: uppercase; color: var(--text-soft); flex-shrink: 0;
}
.acilir-ozet {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 5px;
  justify-content: flex-end; align-items: center;
}
.acilir-bos { font-size: .82rem; color: var(--text-soft); font-style: italic; }
.acilir-ok {
  width: 16px; height: 16px; flex-shrink: 0; color: var(--text-soft);
  transition: transform var(--transition);
}
.acilir.acik .acilir-ok { transform: rotate(180deg); }
.acilir-govde { padding: 14px 16px; }
/* Salt okunur sürüm: aynı satır düzeni, tıklanmaz, ok yok */
.acilir-salt .acilir-bas { pointer-events: none; }
.acilir-salt .acilir-bas:hover { background: none; }

/* Özetteki çalışan cipsi */
.atama-cip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px 3px 4px;
  font-size: .78rem; font-weight: 500; white-space: nowrap;
}
.atama-cip .calisan-avatar {
  width: 20px; height: 20px; font-size: .65rem; font-weight: 600;
}
.atama-uyari {
  font-size: .75rem; color: var(--warning); background: var(--warning-soft);
  border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: 10px;
}
/* Seçili değilken onay işareti görünmesin */
.atama-satir .atama-rozet { visibility: hidden; }
.atama-satir.atanmis .atama-rozet { visibility: visible; }


/* ══ İş detayı: başlık bloğu ══════════════════════════════════════════════ */
.is-hero {
  display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px;
}
.is-hero-ana { flex: 1; min-width: 260px; }
.is-hero-rozet { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.is-hero-baslik {
  font-size: 1.45rem; font-weight: 620; letter-spacing: -.02em;
  line-height: 1.25; margin: 0;
}
.is-hero-alt { font-size: .86rem; color: var(--text-muted); margin-top: 5px; }
/* En kritik sayı: diğer alanlarla aynı ağırlıkta olmasın */
.is-hero-tutar { text-align: right; flex-shrink: 0; }
.is-hero-tutar-etiket {
  font-size: .7rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-soft);
}
.is-hero-tutar-deger {
  font-size: 1.5rem; font-weight: 660; color: var(--primary);
  letter-spacing: -.02em; white-space: nowrap; margin-top: 2px;
}
.is-hero-eylem { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ══ Kontrol şeridi: durum + atama yan yana ═══════════════════════════════ */
.is-kontrol {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  align-items: start; margin-bottom: 20px;
}
@media (max-width: 820px) { .is-kontrol { grid-template-columns: 1fr; } }

/* ══ Özet ızgarası: kutu içinde kutu yok, hizalı tanım listesi ════════════ */
.ozet-izgara {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px 28px; margin: 0;
}
.ozet-alan { min-width: 0; }
.ozet-alan dt {
  font-size: .74rem; font-weight: 500; color: var(--text-soft);
  margin-bottom: 3px;
}
.ozet-alan dd {
  margin: 0; font-size: .92rem; font-weight: 500; color: var(--text);
  word-break: break-word;
}
.ozet-bos { color: var(--text-soft); font-weight: 400; }
.ozet-tutar { font-variant-numeric: tabular-nums; font-weight: 600; }
.ozet-aciklama { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.ozet-aciklama dt {
  font-size: .74rem; font-weight: 500; color: var(--text-soft); margin-bottom: 6px;
}

/* ══ Sekmeler ═════════════════════════════════════════════════════════════ */
.sekme-bar {
  display: flex; gap: 2px; margin-bottom: 20px;
  /* Alt çizgi border yerine inset gölge: yerleşime girmez, taşma yaratmaz */
  box-shadow: inset 0 -1px 0 var(--border);
  /* overflow-x:auto tek başına overflow-y'yi de auto yapıp dikey kaydırma
     açıyordu; dar ekranda yatay kaydırma kalsın, dikey kapalı olsun */
  overflow-x: auto; overflow-y: hidden;
}
.sekme {
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 10px 16px; font-size: .875rem; font-weight: 550;
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
}
.sekme:hover { color: var(--text); }
.sekme.aktif { color: var(--primary); border-bottom-color: var(--primary); }
.sekme-sayi {
  font-size: .7rem; font-weight: 600; min-width: 18px; padding: 1px 6px;
  border-radius: 10px; background: var(--surface2); color: var(--text-soft);
}
.sekme.aktif .sekme-sayi { background: var(--primary-soft); color: var(--primary); }


/* ══ Panel iş tablosu ═════════════════════════════════════════════════════ */
/* Liste kendi içinde dikey kayar; sayfa başlığı ve filtreler sabit kalır.
   (Mobilde kapatılıyor — orada kart listesi sayfayla birlikte kaysın.) */
.is-tablo-sar { max-height: 660px; overflow-y: auto; }
/* Sütun genişlikleri başlık satırında sabit; içerik taşırıp bozamaz.
   Yalnızca "İş" sütunu esner ve artan yeri alır. */
/* min-width: dar ekranda "İş" sütunu ezilmek yerine tablo yatay kaysın */
.is-tablo { table-layout: fixed; width: 100%; min-width: 1120px; }
.is-tablo th, .is-tablo td { overflow: hidden; }
.is-tablo th { cursor: default; user-select: none; white-space: nowrap; }
.is-tablo th[data-col] { cursor: pointer; }
.is-tablo th.sag, .is-tablo td.sag { text-align: right; }

/* Ana hücre: yalnızca iş adı (mükellef/dönem başlıkta zaten var) */
.hucre-is { line-height: 1.4; }
.is-baslik {
  display: block; font-weight: 600; font-size: .875rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hucre-is .gecikti-badge { margin-left: 6px; vertical-align: 1px; }

.hucre-id     { color: var(--text-soft); font-size: .8rem; }
.hucre-ikincil{ font-size: .85rem; }
.hucre-tarih  { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.hucre-tarih.gecikmis { color: var(--danger); font-weight: 600; }
.hucre-tutar  { font-size: .875rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.hucre-sayi   { font-size: .875rem; font-weight: 550; white-space: nowrap; }
.bos          { color: var(--text-soft); font-weight: 400; }

/* Üst üste binen avatar yığını — yan yana dizilmekten daha az yer kaplar */
.avatar-yigin { display: flex; align-items: center; }
.avatar-yigin .calisan-avatar {
  width: 26px; height: 26px; font-size: .72rem; font-weight: 600;
  border: 2px solid var(--surface); margin-left: -7px; flex-shrink: 0;
}
.avatar-yigin .calisan-avatar:first-child { margin-left: 0; }
.avatar-yigin .avatar-artan { background: var(--text-soft); font-size: .66rem; }
/* Vurgulu satırda halka satır rengiyle uyumlu olsun */
tr.kdv-uyari .avatar-yigin .calisan-avatar { border-color: #fdecec; }

/* Sütun gizleme kaldırıldı: boşluğu hep "İş" yuttuğu için genişlik ekrandan
   ekrana zıplıyordu. Dar ekranda min-width devreye girip tablo kayıyor. */


/* ══ Mobil: panel tablosu kart listesine dönüşür ══════════════════════════ */
/* 7 sütunluk tablo 375px'e sığmıyordu; yatay kaydırmak yerine her iş
   kendi kartına alınıyor. Sütun başlıkları data-etiket ile satır içine gelir. */
@media (max-width: 720px) {
  .is-tablo { display: block; min-width: 0; width: 100%; }
  .is-tablo thead { display: none; }
  .is-tablo tbody { display: block; }

  .is-tablo tbody tr {
    display: block; position: relative;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); padding: 12px 14px; margin-bottom: 10px;
  }
  .is-tablo tbody tr:hover { background: var(--surface); }
  .is-tablo tbody tr.kdv-uyari { background: #fdecec; border-color: #f3c9c9; }
  .is-tablo tbody tr.kdv-uyari > td { background: transparent; }
  .is-tablo tbody tr.kdv-uyari > td:first-child { box-shadow: none; }

  .is-tablo tbody td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 6px 0; border: none; text-align: left;
  }
  .is-tablo tbody td.sag { text-align: right; }
  /* Sütun başlığı satırın soluna etiket olarak gelsin */
  .is-tablo tbody td[data-etiket]::before {
    content: attr(data-etiket);
    font-size: .74rem; color: var(--text-soft); font-weight: 500;
    flex-shrink: 0;
  }

  /* Başlık hücresi kartın üst bloğu: etiketsiz, tam genişlik */
  .is-tablo tbody td.hucre-is {
    display: block; padding: 0 0 8px;
    border-bottom: 1px solid var(--border-soft); margin-bottom: 4px;
  }
  .is-tablo .is-baslik { font-size: .95rem; white-space: normal; }

  /* Sıra numarası ve seçim kutusu kartın sağ üstünde */
  .is-tablo tbody td.hucre-id {
    position: absolute; top: 12px; right: 14px; padding: 0;
    display: block; font-size: .74rem;
  }
  .is-tablo tbody td:first-child:has(.is-sec) {
    position: absolute; top: 10px; right: 44px; padding: 0; display: block;
  }
  .is-tablo tbody td.hucre-is { padding-right: 54px; }

  .is-tablo tbody td .avatar-yigin { justify-content: flex-end; }
  #tablo-toplam-footer { border-radius: 0 0 var(--radius) var(--radius); }
}


/* ══ Mobil: filtre paneli katlanır, istatistikler kompakt ═════════════════ */
@media (max-width: 720px) {
  .filtre-baslik { cursor: pointer; margin-bottom: 0; }
  .filtre-ok { display: block; }
  .filtre-panel.acik .filtre-ok { transform: rotate(180deg); }
  .filtre-panel { padding: 12px 14px; }
  /* Kapalıyken alanlar ve aktif filtre şeridi gizli */
  .filtre-panel .filtre-alanlar,
  .filtre-panel .filtre-aktif-bar { display: none; }
  .filtre-panel.acik .filtre-alanlar { display: flex; margin-top: 12px; }
  .filtre-panel.acik .filtre-aktif-bar { display: flex; }
  .filtre-grup { width: 100%; }
  .filtre-eylemler { width: 100%; }
  .filtre-eylemler .btn { flex: 1; justify-content: center; }

  /* 5 kart 3 satır kaplıyordu; küçültülüp tek satıra yaklaştırıldı */
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  .stat-card { padding: 10px 8px; text-align: center; }
  .stat-number { font-size: 1.35rem; }
  .stat-label { font-size: .68rem; }

  /* Kart listesinde ikinci bir kaydırma alanı olmasın */
  .is-tablo-sar { max-height: none !important; overflow: visible !important; }

  /* Sayfa başlığındaki eylemler tam genişlik */
  .page-header { gap: 10px; }
  .page-header > div:last-child { width: 100%; }
  .page-header .btn { flex: 1; justify-content: center; }
}

/* ══ Mobil: iş detayı ═════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .is-hero { padding: 16px; gap: 14px; }
  .is-hero-baslik { font-size: 1.2rem; }
  /* Tutar sağda asılı kalmasın, blok halinde sola gelsin */
  .is-hero-tutar { text-align: left; width: 100%; }
  .is-hero-tutar-deger { font-size: 1.3rem; }
  .is-hero-eylem { width: 100%; }
  .is-hero-eylem .btn, .is-hero-eylem form { flex: 1; }
  .is-hero-eylem .btn { width: 100%; justify-content: center; }

  /* Açılır kart başlığı: etiket + ok üstte, değer alt satırda.
     flex-basis şart — taban kuraldaki flex:1 width'i eziyor. */
  .acilir-bas { flex-wrap: wrap; gap: 4px 10px; }
  .acilir-etiket { order: 1; }
  .acilir-ok { order: 2; margin-left: auto; }
  .acilir-ozet { order: 3; flex: 1 1 100%; justify-content: flex-start; }

  .ozet-izgara { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .sekme { padding: 10px 12px; font-size: .84rem; }
  .card-body { padding: 16px; }
}

/* ══ Mobil: genel ═════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .page-title { font-size: 1.2rem; }
  /* Dokunma hedefleri en az 40px */
  .btn { min-height: 40px; }
  /* iOS'ta 16px altı yazı tipi girişte otomatik yakınlaştırma yapıyor */
  input, select, textarea { font-size: 16px; }
}


/* ══ Son tarihe göre hızlı filtre — üstteki istatistik kartlarıyla aynı dil ══ */
.bitis-serit {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.bitis-kart {
  background: var(--surface); border-radius: var(--radius); padding: 16px 18px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  text-align: left; text-decoration: none; color: var(--text);
  transition: var(--transition); user-select: none; display: block;
}
.bitis-kart:hover {
  border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none;
}
.bitis-kart.aktif {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
/* stat-number ile aynı ölçek, para birimi olduğu için bir tık küçük */
.bitis-tutar {
  font-size: 1.3rem; font-weight: 650; line-height: 1.15;
  letter-spacing: -.02em; color: var(--primary); white-space: nowrap;
}
.bitis-alt { font-size: .78rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

@media (max-width: 720px) {
  .bitis-serit { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  .bitis-kart { padding: 10px 10px; }
  .bitis-tutar { font-size: 1rem; }
  .bitis-alt { font-size: .68rem; }
}
}
