/* ========== RAPORSİS v2 — Ana Stiller ========== */
* { box-sizing: border-box; }

:root {
  --mavi: #1e3a8a;
  --mavi-acik: #3b82f6;
  --mavi-soft: #eff6ff;
  --yesil: #059669;
  --yesil-soft: #d1fae5;
  --turuncu: #ea580c;
  --kirmizi: #dc2626;
  --kirmizi-soft: #fee2e2;
  --sari-soft: #fef3c7;
  --mor: #7c3aed;
  --gri-50: #f8fafc;
  --gri-100: #f1f5f9;
  --gri-200: #e2e8f0;
  --gri-300: #cbd5e1;
  --gri-500: #64748b;
  --gri-700: #334155;
  --gri-900: #0f172a;
}

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--gri-50);
  color: var(--gri-900);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ========== BUTONLAR ========== */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--mavi);
  color: white;
  transition: opacity 0.15s;
}
button:hover { opacity: 0.88; }
button.ikincil { background: var(--gri-200); color: var(--gri-900); }
button.yesil { background: var(--yesil); }
button.kirmizi { background: var(--kirmizi); }
button.turuncu { background: var(--turuncu); }
button.mor { background: var(--mor); }
button.kucuk { padding: 3px 9px; font-size: 12px; }
button.buyuk { padding: 10px 20px; font-size: 15px; }

/* ========== FORM ELEMANLARI ========== */
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--gri-300);
  border-radius: 4px;
  background: white;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--mavi);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}
textarea { resize: vertical; min-height: 60px; }

/* ========== ÜST MENÜ ========== */
.ustmenu {
  background: var(--mavi);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ustmenu h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.ustmenu nav {
  display: flex;
  gap: 4px;
  flex: 1;
  margin-left: 20px;
}
.ustmenu nav a {
  color: white;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}
.ustmenu nav a:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.ustmenu nav a.aktif { background: rgba(255,255,255,0.2); opacity: 1; }
.ustmenu .kullanici { font-size: 12px; opacity: 0.85; }

/* ========== İÇERİK ========== */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}
.sayfa-baslik {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.sayfa-baslik h2 {
  margin: 0;
  color: var(--mavi);
  font-size: 1.4rem;
}
.sayfa-baslik .sag-tarafta { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== KART ========== */
.kart {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.kart h3 {
  margin: 0 0 14px 0;
  color: var(--mavi);
  font-size: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gri-200);
}

/* ========== TABLO ========== */
table.liste {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
table.liste th {
  background: var(--mavi);
  color: white;
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
}
table.liste td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gri-200);
  font-size: 13px;
}
table.liste tr:hover td { background: #f8fafc; }
table.liste tr:last-child td { border-bottom: none; }

/* ========== İSTATİSTİK KARTLARI ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-kart {
  background: white;
  text-align: center;
  padding: 20px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.12s;
}
.stat-kart:hover { transform: translateY(-2px); }
.stat-kart .sayi {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mavi);
}
.stat-kart .etiket {
  color: var(--gri-500);
  font-size: 13px;
  margin-top: 4px;
}

/* ========== RAPOR TİP KARTLARI ========== */
.rapor-tipleri {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.tip-kart {
  background: white;
  border-radius: 8px;
  padding: 16px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  text-align: center;
  border-top: 4px solid var(--mavi);
}
.tip-kart:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.tip-kart.secili { outline: 3px solid var(--mavi); }
.tip-kart .kod {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--mavi);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.tip-kart .ad {
  font-weight: 600;
  font-size: 12px;
  color: var(--gri-900);
  line-height: 1.3;
}
.tip-kart .doc-kod {
  font-size: 10px;
  color: var(--gri-500);
  margin-top: 4px;
}

/* ========== FORM SATIR ========== */
.form-satir {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  align-items: start;
}
.form-satir label {
  font-weight: 600;
  color: var(--gri-700);
  font-size: 13px;
  padding-top: 6px;
}
.form-satir label .zorunlu { color: var(--kirmizi); margin-left: 2px; }
.form-girdi {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-girdi .alan {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-girdi .birim {
  color: var(--gri-500);
  font-size: 12px;
  white-space: nowrap;
}

/* ========== MOD ROZETLERİ (Otomatik/Manuel) ========== */
.mod-rozet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  user-select: none;
}
.mod-rozet.otomatik {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
.mod-rozet.manuel {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.mod-rozet:hover { opacity: 0.8; }
.alan-otomatik input, .alan-otomatik select, .alan-otomatik textarea {
  background: #f0f9ff;
  border-color: #bae6fd;
}

/* ========== RADIO / CHECKBOX GRUP ========== */
.radio-grup, .checkbox-grup {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.radio-grup label, .checkbox-grup label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--gri-100);
  border: 1px solid transparent;
  transition: background 0.12s;
}
.radio-grup label:hover, .checkbox-grup label:hover {
  background: var(--gri-200);
}
.radio-grup label.secili, .checkbox-grup label.secili {
  background: var(--mavi);
  color: white;
}
.radio-grup input, .checkbox-grup input {
  width: auto;
  margin: 0;
}

/* ========== MUAYENE LİSTESİ ========== */
.muayene-liste {
  border: 1px solid var(--gri-200);
  border-radius: 6px;
  overflow: hidden;
}
.muayene-satir {
  display: grid;
  grid-template-columns: 40px 1fr 220px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--gri-200);
  font-size: 13px;
  gap: 10px;
}
.muayene-satir:last-child { border-bottom: none; }
.muayene-satir:nth-child(even) { background: #fafbfc; }
.muayene-satir .no {
  font-weight: 700;
  color: var(--gri-500);
  font-size: 12px;
  text-align: center;
}

/* ========== EVAL BUTON GRUBU ========== */
.eval-btn-grup { display: flex; gap: 4px; }
.eval-btn-grup button {
  flex: 1;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gri-200);
  color: var(--gri-700);
  border-radius: 4px;
}
.eval-btn-grup button.secili.uygun { background: var(--yesil); color: white; }
.eval-btn-grup button.secili.uygun-degil { background: var(--kirmizi); color: white; }
.eval-btn-grup button.secili.uygulanmaz { background: var(--gri-500); color: white; }

/* ========== PANO BLOKLARI ========== */
.pano-blok {
  border: 1px solid var(--gri-200);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafbfc;
}
.pano-baslik {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pano-baslik strong { color: var(--mavi); }
.pano-baslik input { max-width: 240px; font-weight: 600; }
.pano-kriterler {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 12px;
}
.pano-kriter {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 6px;
  padding: 3px 6px;
  align-items: center;
}
.pano-kriter:nth-child(even) { background: rgba(0,0,0,0.02); }
.pano-kriter-grup {
  grid-column: 1 / -1;
  background: #e0e7ff;
  color: var(--mavi);
  padding: 4px 8px;
  font-weight: 700;
  font-size: 11px;
  border-radius: 3px;
  margin-top: 6px;
}

/* ========== ÖLÇÜM TABLOSU (dinamik kolonlu) ========== */
.tablo-wrap {
  overflow-x: auto;
  border: 1px solid var(--gri-200);
  border-radius: 6px;
  background: white;
}
table.olcum {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1200px;
}
table.olcum th {
  background: var(--mavi);
  color: white;
  padding: 6px 4px;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 5;
}
table.olcum td {
  border: 1px solid var(--gri-200);
  padding: 2px;
}
table.olcum td input, table.olcum td select {
  border: none;
  background: transparent;
  padding: 3px 4px;
  font-size: 12px;
  text-align: center;
  width: 100%;
}
table.olcum td input:focus, table.olcum td select:focus {
  background: #fff7c2;
  outline: 1px solid var(--mavi);
}
table.olcum tr:nth-child(even) td { background: #fafbfc; }
table.olcum td.no-col {
  background: var(--gri-100);
  text-align: center;
  width: 35px;
  font-weight: 600;
  color: var(--gri-500);
}

/* Sonuç renkleri (U/UD/N-A) */
.sonuc-U { background: #d1fae5 !important; color: #065f46; font-weight: 700; text-align: center; }
.sonuc-UD { background: #fee2e2 !important; color: #991b1b; font-weight: 700; text-align: center; }
.sonuc-NA { background: var(--gri-200) !important; color: var(--gri-700); font-weight: 700; text-align: center; }

/* ========== ETIKETLER (chip/badge) ========== */
.etiket {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.etiket.mavi { background: var(--mavi-soft); color: var(--mavi); }
.etiket.yesil { background: var(--yesil-soft); color: #065f46; }
.etiket.kirmizi { background: var(--kirmizi-soft); color: #991b1b; }
.etiket.sari { background: var(--sari-soft); color: #92400e; }

/* ========== PDF ÖNİZLEME (A4) ========== */
.onizleme-wrap {
  background: #e5e7eb;
  padding: 20px;
  min-height: 400px;
}
.a4 {
  background: white;
  width: 210mm;
  max-width: 100%;
  margin: 0 auto 20px auto;
  padding: 10mm 10mm 15mm 10mm;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 10pt;
  color: #000;
  position: relative;
}

/* ========== YENİ RAPOR ÜST BİLGİ ========== */
.rapor-ust {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.rapor-ust-sol {
  display: flex;
  align-items: center;
  justify-content: center;
}
.rapor-ust-sol .logo-kare {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 6px;
}
.rapor-ust-orta {
  text-align: center;
}
.rapor-ust-orta .firma-ad {
  font-weight: 800;
  font-size: 11.5pt;
  margin-bottom: 1px;
  letter-spacing: 0.2px;
  line-height: 1.15;
}
.rapor-ust-orta .yetkili-ad {
  font-size: 8.5pt;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
}
.rapor-ust-orta .firma-iletisim {
  font-size: 7.5pt;
  line-height: 1.25;
}
.rapor-ust-orta .firma-kayit {
  font-size: 7pt;
  margin-top: 1px;
  line-height: 1.2;
}
.rapor-ust-sag {
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-yer-tutucu {
  width: 70px;
  height: 70px;
  border: 1.2px solid #666;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  position: relative;
}
.qr-yer-tutucu .qr-ic {
  width: 52px;
  height: 52px;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 6px, #999 6px, #999 8px),
    repeating-linear-gradient(90deg, transparent, transparent 6px, #999 6px, #999 8px);
}
.qr-yer-tutucu::after {
  content: "QR";
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 6pt;
  color: #999;
  background: white;
  padding: 0 2px;
}

/* ========== RAPOR BAŞLIĞI (kompakt) ========== */
.rapor-baslik {
  text-align: center;
  margin: 2px 0 6px 0;
  padding: 2px 0;
}
.rapor-baslik h1 {
  font-size: 11.5pt;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.4px;
  line-height: 1.2;
}
.rapor-baslik .rapor-no-cizgi {
  display: none; /* Gereksiz - rapor tablolarında zaten var */
}

.a4 table.rapor {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-size: 8.5pt;
}
.a4 table.rapor td {
  border: 1px solid #555;
  padding: 2px 5px;
  vertical-align: top;
  line-height: 1.2;
}
.a4 table.rapor td.etiket-td {
  background: #e5e7eb;
  font-weight: 600;
  width: 30%;
}

/* 4 sütunlu yerleşim tablosu - resmi PDF stili */
.a4 table.rapor-yerlesim {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}
.a4 table.rapor-yerlesim colgroup col.etiket { width: 22%; }
.a4 table.rapor-yerlesim colgroup col.deger  { width: 28%; }

.a4 table.rapor-yerlesim td.etiket-td {
  font-size: 8pt;
  vertical-align: middle;
  line-height: 1.15;
  padding: 2px 5px;
}
.a4 table.rapor-yerlesim td {
  font-size: 8.5pt;
  padding: 2px 5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: middle;
  line-height: 1.15;
}
.a4 table.rapor-yerlesim td.tam-satir-deger {
  padding: 3px 6px;
  line-height: 1.25;
}

/* Ana başlık (1. 2. 3.) vs Alt başlık (2.1 2.2) hiyerarşisi */
.a4 h3.ana-baslik {
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 8px 0 2px 0;
  padding: 3px 8px;
  text-transform: uppercase;
  line-height: 1.2;
}
.a4 h3.alt-baslik {
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 4px 0 2px 0;
  padding: 2px 8px;
  text-transform: uppercase;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-left: 3px solid #64748b;
  line-height: 1.2;
}
.a4.tema-resmi h3.alt-baslik {
  background: #e5e5e5 !important;
  color: #000 !important;
  border-left: 3px solid #000;
}
.a4.tema-modern h3.alt-baslik {
  background: #eff6ff !important;
  color: var(--mavi) !important;
  border-left: 3px solid var(--mavi);
}

/* Otomatik üretilmiş ana başlık (içinde tablo yok, sadece ayraç) */
.a4 .ana-baslik-ayraci {
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 8px 0 0 0;
  padding: 3px 8px;
  text-transform: uppercase;
  line-height: 1.2;
}
.a4.tema-modern .ana-baslik-ayraci {
  background: linear-gradient(135deg, var(--mavi), var(--mavi-acik));
  color: white;
  border-left: 4px solid #1e3a8a;
}
.a4.tema-resmi .ana-baslik-ayraci {
  background: #333;
  color: white;
}
.a4 h3 {
  padding: 3px 8px;
  margin: 6px 0 3px 0;
  font-size: 9pt;
  font-weight: 700;
  line-height: 1.2;
}

/* ========== MUAYENE LİSTESİ 2 SÜTUNLU ========== */
.a4 table.muayene-2s {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-size: 8pt;
  table-layout: fixed;
}
.a4 table.muayene-2s td {
  border: 1px solid #555;
  padding: 2px 5px;
  vertical-align: top;
  line-height: 1.2;
}
.a4 table.muayene-2s td.madde-no {
  width: 26px;
  text-align: center;
  background: #f8fafc;
  font-weight: 600;
}
.a4 table.muayene-2s td.madde-etiket {
  width: 34%;
}
.a4 table.muayene-2s td.madde-deger {
  width: 15%;
  text-align: center;
  font-weight: 700;
}
.a4 table.muayene-2s td.madde-deger.uygun { background: #d1fae5; color: #065f46; }
.a4 table.muayene-2s td.madde-deger.uygun-degil { background: #fee2e2; color: #991b1b; }
.a4 table.muayene-2s td.madde-deger.uygulanmaz { background: #e5e7eb; color: #475569; }

/* ========== RAPOR ALT — İMZA ========== */
.rapor-imza-bolum {
  margin-top: 30px;
  page-break-inside: avoid;
}
.imza-kutu {
  border: 1.5px solid #444;
  padding: 10px;
}
.imza-baslik {
  font-weight: 700;
  font-size: 10pt;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #666;
}
.imza-tablo {
  margin-bottom: 0 !important;
}

/* ========== TEMA: RESMİ (siyah-beyaz, minimal) ========== */
.a4.tema-resmi {
  font-family: "Times New Roman", Georgia, serif;
  color: #000;
}
.a4.tema-resmi .rapor-ust {
  border-bottom: 2px solid #000;
}
.a4.tema-resmi .rapor-ust-orta .firma-ad {
  color: #000;
}
.a4.tema-resmi .rapor-ust-sol .logo-kare {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}
.a4.tema-resmi h3 {
  background: #333;
  color: white;
  font-family: "Times New Roman", Georgia, serif;
}
.a4.tema-resmi table.rapor td {
  border: 1px solid #000;
}
.a4.tema-resmi table.rapor td.etiket-td {
  background: #d4d4d4;
}
.a4.tema-resmi table.muayene-2s td {
  border: 1px solid #000;
}

/* ========== TEMA: MODERN (mavi, renkli) ========== */
.a4.tema-modern .rapor-ust {
  border-bottom: 3px solid var(--mavi);
}
.a4.tema-modern .rapor-ust-orta .firma-ad {
  color: var(--mavi);
}
.a4.tema-modern .rapor-ust-sol .logo-kare {
  background: var(--mavi);
  color: white;
}
.a4.tema-modern h3 {
  background: linear-gradient(135deg, var(--mavi), var(--mavi-acik));
  color: white;
  border-left: 4px solid #1e3a8a;
}
.a4.tema-modern .rapor-baslik h1 {
  color: var(--mavi);
}

/* ========== SAYFA ALT BİLGİSİ (Sadece ekran önizlemede, print'te @page kullanılır) ========== */
.rapor-alt-bilgi {
  margin-top: 20px;
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
  font-size: 7pt;
  color: #888;
  border-top: 0.5px dashed #ccc;
  font-style: italic;
}
.rapor-alt-bilgi .rapor-no-alt {
  font-weight: 600;
  font-style: normal;
}
.rapor-alt-bilgi::before {
  content: "💡 Yazdırırken her sayfada otomatik çıkar:";
  color: #aaa;
  font-size: 6.5pt;
  position: absolute;
  margin-top: -14px;
}

/* ========== YAZDIR ========== */
@media print {
  body { background: white; }
  .ustmenu, .sayfa-baslik button, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  .onizleme-wrap { background: white; padding: 0; }
  .a4 { box-shadow: none; margin: 0; padding: 0; max-width: none; width: auto; }
  .a4 table.rapor th, .a4 h3,
  .rapor-ust-sol .logo-kare,
  table.muayene-2s td.madde-deger.uygun,
  table.muayene-2s td.madde-deger.uygun-degil,
  table.muayene-2s td.madde-deger.uygulanmaz {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rapor-imza-bolum { page-break-inside: avoid; }
  .a4 h3 { page-break-after: avoid; }
  .a4 table.rapor, .a4 table.muayene-2s { page-break-inside: auto; }
  .a4 table.rapor tr, .a4 table.muayene-2s tr { page-break-inside: avoid; page-break-after: auto; }

  /* Ekrandaki alt bilgiyi print'te gizle - @page counter kullanılacak */
  .rapor-alt-bilgi { display: none !important; }

  /* Sayfa kenar boşlukları ve otomatik footer (her sayfada) */
  @page {
    size: A4;
    margin: 12mm 10mm 15mm 10mm;

    @bottom-left {
      content: var(--rapor-no-str, "");
      font-size: 7pt;
      color: #666;
      font-family: -apple-system, "Segoe UI", Arial, sans-serif;
    }
    @bottom-right {
      content: "Sayfa " counter(page) " / " counter(pages);
      font-size: 7pt;
      color: #666;
      font-family: -apple-system, "Segoe UI", Arial, sans-serif;
    }
  }
}

/* ========== MODAL ========== */
.modal-arka {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: white;
  border-radius: 8px;
  padding: 24px;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 { margin-top: 0; color: var(--mavi); }

/* ========== BOŞ DURUM ========== */
.bos {
  text-align: center;
  padding: 40px 20px;
  color: var(--gri-500);
  background: white;
  border-radius: 8px;
  border: 2px dashed var(--gri-300);
}
.bos .ikon { font-size: 2.5rem; margin-bottom: 10px; }

/* ========== ARAMA KUTUSU ========== */
.arama {
  position: relative;
  max-width: 400px;
  margin-bottom: 14px;
}
.arama input { padding-left: 36px; }
.arama::before {
  content: "🔍";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

/* ========== ROZETLİ SATIRLAR (sözleşme, iş vb.) ========== */
.ozet-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gri-200);
  cursor: pointer;
  transition: background 0.12s;
}
.ozet-satir:hover { background: var(--gri-50); }
.ozet-satir:last-child { border-bottom: none; }
.ozet-satir .ana { flex: 1; }
.ozet-satir .ana strong { display: block; color: var(--gri-900); }
.ozet-satir .ana .alt { color: var(--gri-500); font-size: 12px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .form-satir { grid-template-columns: 1fr; gap: 4px; }
  .form-satir label { padding-top: 0; }
  .muayene-satir { grid-template-columns: 30px 1fr; }
  .muayene-satir .eval-btn-grup { grid-column: 1 / -1; }
  .pano-kriterler { grid-template-columns: 1fr; }
  .pano-kriter { grid-template-columns: 1fr 120px; }
}

/* ========== RAPOR DOLDURMA ========== */

/* Muayene Listesi */
.muayene-liste { display: flex; flex-direction: column; }
.muayene-satir {
  display: grid;
  grid-template-columns: 35px 1fr 260px;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gri-200);
  align-items: center;
}
.muayene-satir:hover { background: var(--gri-50); }
.muayene-satir .no { color: var(--gri-500); font-size: 12px; font-weight: 600; }
.muayene-satir .etiket { font-size: 14px; color: var(--gri-700); }
.eval-btn-grup { display: flex; gap: 4px; justify-content: flex-end; }
.eval-btn-grup button {
  padding: 4px 10px;
  font-size: 12px;
  background: white;
  color: var(--gri-700);
  border: 1px solid var(--gri-300);
  border-radius: 4px;
  cursor: pointer;
  min-width: 70px;
}
.eval-btn-grup button:hover { background: var(--gri-100); }
.eval-btn-grup button.secili { font-weight: 700; color: white; }
.eval-btn-grup button.secili.uygun { background: var(--yesil); border-color: var(--yesil); }
.eval-btn-grup button.secili.uygun-degil { background: var(--kirmizi); border-color: var(--kirmizi); }
.eval-btn-grup button.secili.uygulanmaz { background: var(--gri-500); border-color: var(--gri-500); }

/* Pano Listesi */
.pano-blok {
  border: 1px solid var(--gri-300);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}
.pano-baslik {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gri-200);
}
.pano-baslik strong { color: var(--mavi); }
.pano-baslik input { flex: 1; max-width: 300px; }
.pano-kriterler { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pano-kriter-grup {
  grid-column: 1 / -1;
  padding: 6px 10px;
  background: var(--mavi-soft);
  color: var(--mavi);
  font-weight: 600;
  font-size: 12px;
  border-radius: 4px;
  margin-top: 8px;
}
.pano-kriter {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 8px;
  padding: 4px 10px;
  align-items: center;
  font-size: 13px;
}
.pano-kriter select { font-size: 12px; padding: 4px 6px; }

/* Tablo */
.tablo-wrap {
  overflow-x: auto;
  border: 1px solid var(--gri-200);
  border-radius: 4px;
  margin-bottom: 8px;
}
table.olcum {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.olcum th, table.olcum td {
  padding: 4px 6px;
  border: 1px solid var(--gri-200);
  vertical-align: middle;
}
table.olcum thead th {
  background: var(--gri-100);
  font-weight: 600;
  color: var(--gri-700);
  white-space: nowrap;
}
table.olcum tbody td.no-col {
  background: var(--gri-50);
  color: var(--gri-500);
  text-align: center;
  font-weight: 600;
  width: 35px;
}
table.olcum input, table.olcum select {
  width: 100%;
  padding: 3px 5px;
  border: none;
  background: transparent;
  font-size: 12px;
}
table.olcum input:focus, table.olcum select:focus {
  background: var(--mavi-soft);
  outline: 1px solid var(--mavi);
}
td.sonuc-U { background: #ecfdf5; }
td.sonuc-U select { color: var(--yesil); font-weight: 700; }
td.sonuc-UD { background: #fef2f2; }
td.sonuc-UD select { color: var(--kirmizi); font-weight: 700; }
td.sonuc-NA { background: #f1f5f9; }
td.sonuc-NA select { color: var(--gri-500); }

/* Radio/Checkbox grubu */
.radio-grup, .checkbox-grup {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.radio-grup label, .checkbox-grup label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--gri-300);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  background: white;
  transition: all 0.15s;
}
.radio-grup label:hover, .checkbox-grup label:hover {
  background: var(--gri-50);
  border-color: var(--mavi);
}
.radio-grup label.secili, .checkbox-grup label.secili {
  background: var(--mavi);
  color: white;
  border-color: var(--mavi);
  font-weight: 600;
}
.radio-grup label input, .checkbox-grup label input {
  margin: 0;
  accent-color: var(--mavi);
}

.form-girdi .alan { display: flex; align-items: center; gap: 6px; }
.form-girdi .birim {
  color: var(--gri-500);
  font-size: 12px;
  white-space: nowrap;
}

/* Print */
@media print {
  .ustmenu, .sayfa-baslik, .no-print, button { display: none !important; }
  .kart { box-shadow: none; border: 1px solid #999; page-break-inside: avoid; }
  body { background: white; }
  .muayene-satir, .pano-kriter { page-break-inside: avoid; }
}

