/* ==================================================================
   Yılmaz Servis — arayüz stilleri
   Tasarım fikri: sahada, telefonda, eldivenle kullanılan bir makine
   kontrol paneli. Durum rengi her yerde görünür, dokunma hedefleri
   büyük, sayaçlar sabit genişlikli rakamlarla.
   ================================================================== */

:root {
  /* Yılmaz kurumsal laciverti; koyu yüzeyler bu tondan türetildi. */
  --ink:      #101B33;
  --panel:    #17243F;
  --panel-2:  #22314F;
  --line-d:   #2E3F60;

  --lacivert: #23417A;
  --paper:    #EDF0F3;
  --card:     #FFFFFF;
  --line:     #DCE2E8;
  --text:     #131A21;
  --muted:    #667381;

  --brand:    #D42027;
  --brand-dk: #A8161C;

  --wait:     #7A8794;
  --run:      #15A06B;
  --hold:     #E08900;
  --done:     #33506E;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --shadow: 0 1px 2px rgba(19,26,33,.08), 0 4px 14px rgba(19,26,33,.06);
  --tap: 48px;

  --sans: Archivo, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  /* Lacivert tonlu, hafif dokulu zemin: sayfa düz beyaz kalmasın. */
  background:
    radial-gradient(900px 480px at 12% -6%, rgba(35,65,122,.14), transparent 62%),
    radial-gradient(760px 420px at 92% 4%, rgba(35,65,122,.10), transparent 58%),
    var(--paper);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body { overscroll-behavior-y: none; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #3B82F6; outline-offset: 2px; border-radius: var(--r-sm); }

.gizli { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ================================================================ */
/* Açılış ekranı                                                     */
/* ================================================================ */

#ekran-giris {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px; padding: 28px;
  background:
    radial-gradient(1100px 520px at 50% -8%, #1E3560 0%, transparent 62%),
    var(--ink);
  color: #EAEEF2;
  overflow-y: auto;
}

/* Kurumsal logo koyu zeminde kaybolmasın diye beyaz bir yüzeyin üstünde durur. */
#ekran-giris .marka {
  width: min(260px, 70vw);
  padding: 18px 26px;
  background: #FFF;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}
#ekran-giris .marka img { width: 100%; height: auto; display: block; }

.karsilama { text-align: center; max-width: 30ch; }
.karsilama h1 { font-size: clamp(28px, 7vw, 40px); }
.karsilama p { margin-top: 10px; color: #9AA7B4; font-size: 15px; }

.giris-kart {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-d);
  border-radius: var(--r-lg);
  padding: 22px;
  display: grid; gap: 14px;
}

/* Alanlar sütun içinde dizilir; etiket kaç satır olursa olsun girdi
   kutusu hep en altta kalır, böylece komşu sütunlarla hizası bozulmaz. */
.alan { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.alan > label {
  font-size: 13.5px; font-weight: 600; color: #9AA7B4;
  min-height: 19px; line-height: 1.35;
}
.alan > .girdi, .alan > .secim-liste { margin-top: auto; }
#ekran-giris .alan > label { color: #9AA7B4; }

#ekran-giris input {
  height: var(--tap);
  padding: 0 14px;
  background: #131920;
  border: 1px solid var(--line-d);
  border-radius: var(--r);
  color: #F2F5F8;
}
#ekran-giris input::placeholder { color: #5A6773; }
#ekran-giris input:focus { border-color: var(--brand); }

.devam-alani {
  width: min(380px, 100%);
  text-align: center;
  display: grid; gap: 16px;
}
.devam-alani .selam { font-size: 19px; font-weight: 600; }
.devam-alani .ipucu { color: #8D9AA7; font-size: 14.5px; }
.devam-alani .baglanti {
  background: none; border: 0; color: #8D9AA7; text-decoration: underline;
  cursor: pointer; padding: 10px; font-size: 14px;
}

.surum { color: #56626E; font-size: 12.5px; }

/* ================================================================ */
/* Düğmeler                                                          */
/* ================================================================ */

.dgm {
  min-height: var(--tap);
  padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--panel-2); color: #EAEEF2;
  font-weight: 600; cursor: pointer;
  transition: filter .12s ease, background .12s ease;
}
.dgm:hover:not(:disabled) { filter: brightness(1.1); }
.dgm:active:not(:disabled) { filter: brightness(.92); }
.dgm:disabled { opacity: .42; cursor: not-allowed; }
.dgm.tam { width: 100%; }

.dgm-birincil { background: var(--brand); color: #fff; }
.dgm-birincil:hover:not(:disabled) { background: var(--brand-dk); filter: none; }

.dgm-basla { background: var(--run); color: #fff; }
.dgm-duraklat { background: var(--hold); color: #231600; }
.dgm-bitir { background: var(--done); color: #fff; }

.dgm-sade {
  background: transparent; color: var(--text); border-color: var(--line);
}
.dgm-sade:hover:not(:disabled) { background: #F5F7F9; filter: none; }

.dgm-kucuk { min-height: 38px; padding: 0 13px; font-size: 14px; border-radius: var(--r-sm); }

.dgm-metin {
  background: none; border: 0; color: var(--muted);
  text-decoration: underline; cursor: pointer; padding: 10px 4px; font-size: 14.5px;
}

/* ================================================================ */
/* Uygulama kabuğu                                                   */
/* ================================================================ */

#ekran-uygulama { display: flex; flex-direction: column; min-height: 100%; }

/* Üst çubuk ve sekmeler tek blok halinde sabit durur. Ayrı ayrı
   sabitlendiğinde sekmeler başlığın altına girip okunmaz oluyordu. */
.ust-blok { position: sticky; top: 0; z-index: 40; }

/* Üst çubuk ve sekmeler sayfa kaydırılınca yerinde kalır; aksi halde
   yazılar içeriğin üstüne binip okunmaz oluyordu. */
.ust-cubuk {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--ink); color: #EAEEF2;
  border-bottom: 1px solid var(--line-d);
  position: sticky; top: 0; z-index: 40;
}
.ust-cubuk .marka-mini {
  width: 104px; flex: none;
  padding: 5px 9px; background: #FFF; border-radius: var(--r-sm);
}
.ust-cubuk .marka-mini img { width: 100%; height: auto; display: block; }
.ust-cubuk .bosluk { flex: 1; }

.kullanici-rozet {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer;
  color: #EAEEF2; padding: 6px; border-radius: var(--r);
}
.kullanici-rozet:hover { background: var(--panel-2); }
.kullanici-rozet .bas-harf {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 14px;
}
.kullanici-rozet .adi { font-size: 14px; font-weight: 600; }
.kullanici-rozet .yetkisi { font-size: 11.5px; color: #8D9AA7; }
@media (max-width: 480px) { .kullanici-rozet .metin { display: none; } }

/* sekmeler */
.sekme-cubugu {
  display: flex; gap: 2px; padding: 0 8px;
  background: var(--panel); border-bottom: 1px solid var(--line-d);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: var(--ust-yukseklik, 62px); z-index: 39;
}
.sekme-cubugu::-webkit-scrollbar { display: none; }
.sekme {
  flex: none; padding: 13px 15px;
  background: none; border: 0; border-bottom: 3px solid transparent;
  color: #8D9AA7; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.sekme[aria-selected="true"] { color: #fff; border-bottom-color: var(--brand); }

main { flex: 1; padding: 16px 14px 40px; }
.kap { max-width: 940px; margin: 0 auto; }

/* ================================================================ */
/* Segment seçici                                                    */
/* ================================================================ */

.segment {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 14px;
  background: #E1E6EB; border-radius: var(--r); overflow-x: auto; scrollbar-width: none;
}
.segment::-webkit-scrollbar { display: none; }
.segment button {
  flex: 1 0 auto; min-height: 40px; padding: 0 14px;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap;
}
.segment button[aria-pressed="true"] {
  background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.segment .sayi {
  display: inline-block; margin-left: 7px; padding: 1px 7px;
  background: #CFD7DE; border-radius: 999px; font-size: 12px;
}
.segment button[aria-pressed="true"] .sayi { background: var(--brand); color: #fff; }

/* ================================================================ */
/* Servis kartları                                                   */
/* ================================================================ */

.liste { display: grid; gap: 10px; }

.servis-kart {
  position: relative;
  display: block; width: 100%; text-align: left;
  padding: 14px 16px 14px 20px;
  background: var(--card); border: 1px solid var(--line); border-left: 0;
  border-radius: var(--r); box-shadow: var(--shadow);
  cursor: pointer;
}
.servis-kart::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  border-radius: var(--r) 0 0 var(--r); background: var(--wait);
}
/* Durum renkleri: tüm kart zeminine yayılır, uzaktan bakışta ayırt edilsin. */
.servis-kart[data-durum="beklemede"]   { background: #F1F8FC; }   /* buz mavisi */
.servis-kart[data-durum="beklemede"]::before   { background: #5FA8D3; }

.servis-kart[data-durum="devam"] {                                  /* lacivert */
  background: #DFE8F7; border-color: #B9CBE8;
}
.servis-kart[data-durum="devam"]::before       { background: #17356E; width: 7px; }
.servis-kart[data-durum="devam"] .musteri      { color: #16294A; }
.servis-kart[data-durum="devam"] .etiket-devam {
  background: #17356E; color: #fff; border-color: #17356E;
}

.servis-kart[data-durum="gecikmis"]    { background: #FFF3EA; }   /* turuncu */
.servis-kart[data-durum="gecikmis"]::before    { background: #E2661F; }
.servis-kart[data-durum="gecikmis"]    { border-color: #F2D2BB; }

.servis-kart[data-durum="tamamlandi"]  { background: #EFF8F2; }   /* yeşil */
.servis-kart[data-durum="tamamlandi"]::before  { background: #1E8A5B; }
.servis-kart[data-durum="tamamlandi"] .musteri { color: #2C4A3B; }

.etiket-kismi { background: #EAF1F9; color: #1B4C7A; border-color: #C5D9EB; }
.servis-kart[data-durum="kismi"] { background: #F3F8FC; border-color: #CFE0EE; }
.servis-kart[data-durum="kismi"]::before { background: #2F8FC4; }
.etiket-gecikmis { background: #FDEADC; color: #97430F; border-color: #F3CDB2; }

.servis-kart .satir-1 {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 3px;
}
.servis-kart .no { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.servis-kart .musteri {
  font-weight: 700; font-size: 16.5px; line-height: 1.3; margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.servis-kart .ariza {
  color: var(--muted); font-size: 14px; margin-bottom: 9px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.servis-kart .meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* etiketler */
.etiket {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: #EDF1F4; color: #48555F; border: 1px solid #DDE4EA;
}
.etiket-acik   { background: #EAF6F1; color: #0C6B48; border-color: #C6E6D9; }
.etiket-devam  { background: #E9F5EF; color: #0C6B48; border-color: #BFE3D2; }
.etiket-mola   { background: #FFF4E0; color: #8A5300; border-color: #F4DFB4; }
.etiket-bitti  { background: #E9EFF6; color: #29435F; border-color: #CCDAE8; }
.etiket-kritik { background: #FCEAEA; color: #97161C; border-color: #F3CCCE; }
.etiket-ucret  { background: #F3EAFB; color: #5B2A86; border-color: #E2D0F2; }

.bos-durum {
  padding: 46px 22px; text-align: center;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.bos-durum h3 { font-size: 17px; margin-bottom: 7px; }
.bos-durum p { color: var(--muted); font-size: 14.5px; max-width: 40ch; margin-inline: auto; }

/* ================================================================ */
/* Servis detay                                                      */
/* ================================================================ */

.geri {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; color: var(--muted);
  font-weight: 600; font-size: 14.5px; cursor: pointer;
  padding: 8px 4px; margin-bottom: 8px;
}
.geri:hover { color: var(--text); }

.kart {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.kart > h2 { font-size: 18px; margin-bottom: 12px; }
.kart > h3 { font-size: 15px; margin-bottom: 10px; }

.baslik-blok { margin-bottom: 14px; }
.baslik-blok .no { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.baslik-blok h1 { font-size: clamp(20px, 5vw, 25px); margin: 2px 0 9px; overflow-wrap: anywhere; }

.ozellikler { display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ozellik dt { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.ozellik dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ozellik a { color: var(--brand-dk); }

.ariza-kutusu {
  padding: 13px 15px; background: #FFF8E8;
  border: 1px solid #F0DFB8; border-left: 4px solid var(--hold);
  border-radius: var(--r);
}
.ariza-kutusu .baslik { font-size: 12.5px; font-weight: 700; color: #8A5300; margin-bottom: 4px; }

/* makine satırı */
.makine-liste { display: grid; gap: 10px; }

/* Makine renkleri: lacivert = beklemede, buz mavisi = çalışıyor,
   turuncu = duraklatıldı, yeşil = tamamlandı. */
.makine {
  border: 1px solid #B9CBE8; border-radius: var(--r);
  padding: 13px 14px;
  border-left: 7px solid #17356E;
  background: #DFE8F7;
}
.makine .adi { color: #16294A; }
.makine .etiket-beklemede {
  background: #17356E; color: #fff; border-color: #17356E;
}

.makine[data-durum="devam"] {
  background: #F1F8FC; border-color: #C9E2F1; border-left-color: #2F8FC4;
}
.makine[data-durum="devam"] .adi { color: #123A52; }
.makine[data-durum="devam"] .etiket-devam {
  background: #2F8FC4; color: #fff; border-color: #2F8FC4;
}

.makine[data-durum="duraklatildi"] {
  background: #FFF3EA; border-color: #F2D2BB; border-left-color: #E2661F;
}
.makine[data-durum="duraklatildi"] .adi { color: #7A3A0E; }

.makine[data-durum="tamamlandi"] {
  background: #EFF8F2; border-color: #CBE7D8; border-left-color: #1E8A5B;
}
.makine[data-durum="tamamlandi"] .adi { color: #2C4A3B; }

/* Durum etiketleri de aynı renklerde, kart zemininde okunur kalsın */
.makine[data-durum="duraklatildi"] .etiket-mola {
  background: #E2661F; color: #fff; border-color: #E2661F;
}
.makine[data-durum="tamamlandi"] .etiket-bitti {
  background: #1E8A5B; color: #fff; border-color: #1E8A5B;
}
/* Nötr etiketler yarı saydam; durum etiketleri (aşağıda) bunu ezmeli. */
.makine .etiket { background: rgba(255,255,255,.72); border-color: rgba(0,0,0,.09); }
.makine .sira { background: rgba(255,255,255,.8); }

.makine .etiket-beklemede { background: #17356E; color: #fff; border-color: #17356E; }
.makine[data-durum="devam"] .etiket-devam { background: #2F8FC4; color: #fff; border-color: #2F8FC4; }
.makine[data-durum="duraklatildi"] .etiket-mola { background: #E2661F; color: #fff; border-color: #E2661F; }
.makine[data-durum="tamamlandi"] .etiket-bitti { background: #1E8A5B; color: #fff; border-color: #1E8A5B; }

.makine .ust { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.makine .adi { font-weight: 700; font-size: 16px; }
.makine .seri { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.makine .sira {
  width: 27px; height: 27px; flex: none;
  display: grid; place-items: center; border-radius: var(--r-sm);
  background: #EDF1F4; color: var(--muted); font-size: 13px; font-weight: 700;
}
.makine .ust .bosluk { flex: 1; }

.sayac {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  letter-spacing: -.5px; line-height: 1.1;
}
.sayac small { display: block; font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sayac.calisiyor { color: #1C6E96; }
.sayac.mola { color: #C2540F; }
.makine[data-durum="tamamlandi"] .sayac { color: #1E8A5B; }

.makine .eylemler { display: flex; gap: 8px; flex-wrap: wrap; }
.makine .eylemler .dgm { flex: 1 1 auto; }

.mola-uyari {
  margin-top: 10px; padding: 11px 13px;
  background: #FDEEEE; border: 1px solid #F3C9CB; border-radius: var(--r);
  color: #8E1219; font-size: 14px; font-weight: 600;
}

.ozet-satir {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.ozet-satir:last-child { border-bottom: 0; }
.ozet-satir dt { color: var(--muted); }
.ozet-satir dd { margin: 0; font-weight: 600; text-align: right; }

/* ================================================================ */
/* Sihirbaz (tam ekran adım akışı)                                   */
/* ================================================================ */

.sihirbaz {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--paper);
}
.sihirbaz .sh-ust {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--ink); color: #EAEEF2;
}
.sihirbaz .sh-ust .kapat {
  background: none; border: 0; color: #9AA7B4; font-size: 26px;
  line-height: 1; cursor: pointer; padding: 4px 8px;
}
.sihirbaz .sh-ust .baslik { flex: 1; min-width: 0; }
.sihirbaz .sh-ust .baslik strong { display: block; font-size: 15.5px; }
.sihirbaz .sh-ust .baslik span { font-size: 12.5px; color: #8D9AA7; }

.ilerleme { display: flex; gap: 4px; padding: 10px 14px; background: var(--panel); }
/* Adım çubuğu: tıklanabilir, düzeltme için istenen adıma atlanır. */
.ilerleme .adim-nokta {
  flex: 1; height: 16px; padding: 6px 0; border: 0; background: none;
  cursor: pointer; position: relative;
}
.ilerleme .adim-nokta::after {
  content: ""; display: block; height: 4px; border-radius: 2px; background: var(--line-d);
}
.ilerleme .adim-nokta.tamam::after { background: var(--brand); }
.ilerleme .adim-nokta.aktif::after { background: #F26A70; height: 5px; }
.ilerleme .adim-nokta:disabled { cursor: not-allowed; }
.ilerleme .adim-nokta:not(:disabled):hover::after { background: #F26A70; }

.sh-govde { flex: 1; overflow-y: auto; padding: 20px 16px 28px; }
.sh-govde .kap { max-width: 620px; }
.sh-adim-basligi { margin-bottom: 4px; font-size: clamp(19px, 5vw, 23px); }
.sh-adim-yardim { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }

/* Adım düğmeleri: ekranın dibinde tam genişlik yerine
   içeriğin hemen altında, sağa yaslı, normal boyutta. */
.sh-alt {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.sh-alt .dgm { flex: 0 0 auto; min-width: 132px; }
.sh-alt .dgm-sade { min-width: 96px; }

@media (max-width: 520px) {
  .sh-alt .dgm { flex: 1 1 0; min-width: 0; }
}

/* form öğeleri (aydınlık zemin) */
.girdi, textarea.girdi, select.girdi {
  width: 100%; min-height: var(--tap); padding: 12px 14px;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r); color: var(--text);
  font-size: 15px; line-height: 1.3;
}
/* Tek satırlık alanlar aynı yükseklikte olsun: select, input ve tarih
   alanları tarayıcıya göre farklı yükseklik alıyor, satırlar kayıyordu. */
input.girdi, select.girdi {
  height: var(--tap); padding-top: 0; padding-bottom: 0;
  -webkit-appearance: none; appearance: none;
}
select.girdi {
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2366737E' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px 7px;
}
input.girdi[type="date"], input.girdi[type="datetime-local"] { padding-right: 10px; }
textarea.girdi { min-height: 132px; resize: vertical; line-height: 1.55; }
.girdi:focus, .girdi:focus-visible {
  border-color: var(--brand); outline: none;
  box-shadow: 0 0 0 3px rgba(212,32,39,.16);
}
.girdi::placeholder { color: #9AA5B0; }

.secim-liste { display: grid; gap: 8px; }
.secim {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: var(--tap); padding: 12px 15px; text-align: left;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r); cursor: pointer; font-size: 15.5px;
}
.secim:hover { border-color: #B9C3CD; }
.secim[aria-pressed="true"] { border-color: var(--brand); background: #FEF5F5; font-weight: 600; }
.secim .tik { margin-left: auto; color: var(--brand); font-weight: 700; }
.secim .alt { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }

.ikili { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ikili .secim { justify-content: center; min-height: 76px; font-size: 17px; font-weight: 600; }

/* Alanlar alt kenardan hizalanır; etiket iki satıra taşsa bile
   girdi kutuları aynı çizgide durur. */
.cift {
  display: grid; gap: 14px; align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.alan > label { min-height: 19px; }

.anahtar {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.anahtar input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.anahtar .yazi { font-weight: 600; }
.anahtar .alt { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }

.sayi-girdi { display: flex; align-items: center; gap: 0; }
.sayi-girdi button {
  width: var(--tap); height: var(--tap); flex: none;
  background: var(--card); border: 1.5px solid var(--line);
  font-size: 22px; font-weight: 600; cursor: pointer;
}
.sayi-girdi button:first-child { border-radius: var(--r) 0 0 var(--r); }
.sayi-girdi button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.sayi-girdi input {
  width: 76px; height: var(--tap); text-align: center;
  border: 1.5px solid var(--line); border-inline: 0;
  background: var(--card); font-family: var(--mono); font-size: 17px; font-weight: 600;
}

.eklenen {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 13px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px;
}
.eklenen .govde { flex: 1; min-width: 0; }
.eklenen .basi { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.eklenen .alt { font-size: 13px; color: var(--muted); margin-top: 2px; }
.eklenen .sil {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px 6px; flex: none;
}
.eklenen .sil:hover { color: var(--brand); }

.uyari-kutu {
  padding: 13px 15px; border-radius: var(--r); font-size: 14.5px;
  background: #FFF4E0; border: 1px solid #F0DFB8; color: #7A4A00;
  margin-bottom: 14px;
}
.hata-kutu {
  padding: 13px 15px; border-radius: var(--r); font-size: 14.5px;
  background: #FDEEEE; border: 1px solid #F3C9CB; color: #8E1219;
  margin-bottom: 14px; font-weight: 600;
}

/* ================================================================ */
/* Raporlar                                                          */
/* ================================================================ */

.kutucuklar { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 14px; }
.kutucuk { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.kutucuk .deger { font-family: var(--mono); font-size: 27px; font-weight: 700; letter-spacing: -1px; }
.kutucuk .ad { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.kutucuk.dikkat .deger { color: var(--brand); }

.tablo-sar { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table.tablo { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.tablo th, table.tablo td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tablo th { background: #F5F7F9; font-size: 12.5px; color: var(--muted); position: sticky; top: 0; }
table.tablo tbody tr:last-child td { border-bottom: 0; }
table.tablo td.sar { white-space: normal; min-width: 200px; }

/* ================================================================ */
/* Bildirim                                                          */
/* ================================================================ */

#bildirimler {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 200; display: grid; gap: 8px; width: min(520px, calc(100vw - 28px));
}
.bildirim {
  padding: 13px 16px; border-radius: var(--r);
  background: var(--panel); color: #EAEEF2;
  box-shadow: 0 8px 26px rgba(0,0,0,.3); font-size: 14.5px; font-weight: 500;
  border-left: 4px solid var(--run);
}
.bildirim.hata { border-left-color: var(--brand); }
.bildirim.uyari { border-left-color: var(--hold); }

.yukleniyor { padding: 40px; text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (min-width: 760px) {
  main { padding: 22px 20px 60px; }
  .makine .eylemler .dgm { flex: 0 1 auto; min-width: 140px; }
}


/* ================================================================ */
/* Sihirbaz içi duraklat düğmesi — her adımda erişilebilir           */
/* ================================================================ */

.sh-mola {
  flex: none; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line-d); border-radius: var(--r);
  background: var(--panel-2); color: #EAEEF2;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.sh-mola:hover:not(:disabled) { filter: brightness(1.15); }
.sh-mola:disabled { opacity: .5; cursor: not-allowed; }
.sh-mola.duruyor { background: var(--hold); color: #231600; border-color: var(--hold); }

/* tamamlanmış makinede düzenleme satırı */
.makine .eylemler { align-items: center; }


/* ================================================================ */
/* Servis üst bilgi şeridi (ayrı kart yerine tek satır)             */
/* ================================================================ */

.servis-serit {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  margin: -4px 0 14px;
  font-size: 13.5px; color: var(--muted);
}
.servis-serit b { color: var(--text); font-weight: 600; }
.servis-serit a { color: var(--brand-dk); }


/* ================================================================ */
/* Çoklu seçim satırları                                             */
/* ================================================================ */

.secim.coklu { padding-left: 46px; position: relative; }
.secim.coklu::before {
  content: ""; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 5px;
  background: var(--card);
}
.secim.coklu[aria-pressed="true"]::before {
  background: var(--brand); border-color: var(--brand);
}
.secim.coklu[aria-pressed="true"]::after {
  content: "✓"; position: absolute; left: 19px; top: 50%; transform: translateY(-52%);
  color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
}
.secim.coklu .tik { display: none; }


/* ================================================================ */
/* Seçim özetleri — ne seçtiğiniz göz önünde kalsın                  */
/* ================================================================ */

.secili-kutu {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: #FEF5F5;
  border: 1.5px solid var(--brand); border-radius: var(--r);
}
.secili-kutu > div:first-child { flex: 1; min-width: 0; }
.secili-kutu .etiketi { font-size: 12px; color: var(--muted); font-weight: 600; }
.secili-kutu .degeri { font-size: 17px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }

.secili-ozet {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 4px;
  background: #FEF5F5; border: 1px solid #F0C9CB; border-radius: var(--r);
}
.secili-ozet .etiketi { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.secili-ozet .cip {
  padding: 3px 10px; background: var(--brand); color: #fff;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
}

/* ================================================================ */
/* Servis geneli duraklama                                           */
/* ================================================================ */

.servis-mola {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 14px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--r);
}
.servis-mola .govde { flex: 1; min-width: 190px; }
.servis-mola .basi { font-weight: 700; font-size: 15.5px; }
.servis-mola .alt { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.servis-mola .alt .deger { color: var(--hold); font-weight: 700; font-size: 15px; }

.servis-mola.duruyor {
  background: #FFF3EA; border: 1px solid #F2D2BB; border-left: 5px solid #E2661F;
}
.servis-mola.duruyor .basi { color: #7A3A0E; }

/* Cihaz testine kısayol */
.test-baglanti {
  background: none; border: 0; color: #8D9AA7; cursor: pointer;
  font-size: 13px; padding: 6px 10px; border-radius: var(--r-sm);
}
.test-baglanti:hover { background: var(--panel-2); color: #EAEEF2; }


/* Adım hatası düğmenin hemen üstünde görünür. Düğme çubuğu ekranın
   dibine yapışır: uzun listede seçim yapınca Devam'ı aramak için
   aşağı kaydırmaya gerek kalmasın. */
.sh-alt-sarmal {
  position: sticky; bottom: 0; z-index: 5; margin-top: 14px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(237,240,243,0), var(--paper) 45%);
}
.sh-alt-sarmal .hata-kutu { margin-bottom: 10px; }
.sh-alt { margin-top: 0; }

/* Son özet */
.ozet-blok { margin-bottom: 16px; }
.ozet-blok > h3 {
  font-size: 12.5px; color: var(--muted); font-weight: 700;
  letter-spacing: .02em; margin-bottom: 6px;
}
.ozet-blok p { font-size: 15px; }
.ozet-liste { display: grid; gap: 7px; }
.ozet-satiri {
  padding: 10px 12px; background: #F7F9FB;
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.ozet-satiri .basi { font-weight: 600; font-size: 14.5px; }
.ozet-satiri .alt { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.ozet-satiri .ucret { color: #5B2A86; font-weight: 600; }

/* ================================================================ */
/* Fotoğraf adımı                                                    */
/* ================================================================ */

.foto-izgara { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.foto-kart {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.foto-kart img {
  display: block; width: 100%; aspect-ratio: 4/3;
  object-fit: contain;            /* yüklenen resmin tamamı görünsün */
  background: #E7ECF1;
}
.foto-kart figcaption { display: flex; align-items: center; gap: 6px; padding: 8px; }
.foto-aciklama { min-height: 36px; padding: 6px 9px; font-size: 13px; flex: 1; }
.foto-kart .sil {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px 6px; flex: none;
}
.foto-kart .sil:hover { color: var(--brand); }

.foto-serit { display: flex; gap: 8px; flex-wrap: wrap; }
.foto-serit img {
  width: 92px; height: 70px; object-fit: contain; background: #E7ECF1;
  border-radius: var(--r-sm); border: 1px solid var(--line);
}

.sayi-rozet {
  display: inline-grid; place-items: center; width: 19px; height: 19px;
  margin-right: 8px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; vertical-align: 1px;
}

/* ================================================================ */
/* Servis formu                                                      */
/* ================================================================ */

.form-katman {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; background: #6B7682;
}
.form-ust {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--ink); color: #EAEEF2; flex: none;
}
.form-ust .kapat {
  background: none; border: 0; color: #9AA7B4; font-size: 26px;
  line-height: 1; cursor: pointer; padding: 4px 8px;
}
.form-ust .baslik { flex: 1; min-width: 0; }
.form-ust .baslik strong { display: block; font-size: 15.5px; }
.form-ust .baslik span { font-size: 12.5px; color: #8D9AA7; }
/* Koyu zeminli her yerde sade düğmenin yazısı kaybolmasın:
   form başlık çubuğu, kamera ve görsel düzenleme pencereleri. */
.form-ust .dgm-sade,
.kamera-arac .dgm-sade,
.duzenle-arac .dgm-sade,
.duzenle-alt .dgm-sade {
  color: #EAEEF2; border-color: var(--line-d); background: rgba(255,255,255,.06);
}
.form-ust .dgm-sade:hover,
.kamera-arac .dgm-sade:hover,
.duzenle-arac .dgm-sade:hover,
.duzenle-alt .dgm-sade:hover { background: var(--panel-2); }

.form-govde { flex: 1; overflow-y: auto; padding: 22px 14px 60px; }

/* Sayfa bir yaprak boyunda esnek kutu; alt bilgi dibe itilir. */
.a4 {
  width: 210mm; min-height: 297mm; margin: 0 auto 22px;
  padding: 12mm 11mm; background: #fff; color: #14181D;
  box-shadow: 0 10px 34px rgba(0,0,0,.3);
  font-size: 9pt; line-height: 1.32;
  display: flex; flex-direction: column;
}
.a4 > .f-alt { margin-top: auto; }
@media (max-width: 230mm) { .a4 { width: 100%; padding: 16px; min-height: 0; } }

.f-ust {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 7px; margin-bottom: 10px; border-bottom: 2px solid var(--brand);
}
.f-ust h1 { font-size: 16pt; letter-spacing: -.3px; }
.f-ust .alt { font-size: 7.5pt; color: #3E5A85; }
.f-ust .seri { margin-left: auto; text-align: right; }
.f-ust .seri span { display: block; font-size: 7pt; color: #6B7682; }
.f-ust .seri strong { font-family: var(--mono); font-size: 12.5pt; }
.f-ust .logo { width: 78px; height: auto; }
.f-ust.ince { border-bottom-width: 1.5px; }
.f-ust.ince h1 { font-size: 15pt; }

/* Künye: çizgiler hücrelerin kendi kenarlığı. Eskiden zemin rengi çizgi
   gibi kullanıldığı için doldurulmamış hücreler gri blok olarak görünüyordu. */
.f-kunye {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid #D9DFE5; margin-bottom: 10px;
}
.f-alan {
  padding: 3px 7px;
  border-right: 1px solid #D9DFE5; border-bottom: 1px solid #D9DFE5;
  min-width: 0;
}
.f-alan-bos { background: #fff; }
.f-alan-ad {
  font-size: 6.5pt; color: #6B7682; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; line-height: 1.25;
}
.f-alan-ad span { color: #3E5A85; font-weight: 500; text-transform: none; margin-left: 4px; font-style: italic; }
.f-alan-deger { font-size: 9pt; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }

.f-blok { margin-bottom: 9px; break-inside: avoid; }
.f-blok h2, .f-makine h3 {
  font-size: 7.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: #23417A; margin-bottom: 2px;
}
.f-blok h2 span, .f-makine h3 span,
.f-tablo th span { font-weight: 500; text-transform: none; font-style: italic; color: #3E5A85; letter-spacing: 0; }
.f-metin { font-size: 9pt; white-space: pre-wrap; overflow-wrap: anywhere; }
.f-bos { color: #8A96A2; font-style: italic; }

.f-makine {
  border: 1px solid #D9DFE5; border-left: 3px solid #23417A; border-radius: 3px;
  padding: 7px 9px; margin-bottom: 8px; break-inside: avoid;
}
.f-makine-ust { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.f-makine-ust .sira {
  width: 18px; height: 18px; display: grid; place-items: center; flex: none;
  background: #23417A; color: #fff; border-radius: 3px; font-size: 8pt; font-weight: 700;
}
.f-makine-ust .kimlik strong { font-size: 10.5pt; }
.f-makine-ust .kimlik span { font-family: var(--mono); font-size: 7.5pt; color: #6B7682; margin-left: 7px; }
.f-makine-ust .zaman { margin-left: auto; text-align: right; font-size: 7.5pt; color: #6B7682; }
.f-makine-ust .zaman b { color: #14181D; }
.f-satir { margin-top: 5px; }
.f-liste { margin: 0; padding-left: 15px; }
.f-liste li { margin-bottom: 1px; overflow-wrap: anywhere; }
.f-ek-not { margin-top: 5px; font-size: 7.5pt; color: #6B7682; font-style: italic; }

.f-tablo { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.f-tablo th, .f-tablo td { border: 1px solid #D9DFE5; padding: 3px 6px; text-align: left; }
.f-tablo th { background: #F2F5F8; font-size: 7pt; text-transform: uppercase; letter-spacing: .02em; }
.f-tablo .dar { width: 1%; white-space: nowrap; }
.f-tablo .ikincil { color: #6B7682; }

.f-ozet { display: flex; background: #fff; border: 1px solid #D9DFE5; margin-bottom: 10px; }
.f-ozet-kutu { flex: 1; padding: 4px 8px; border-right: 1px solid #D9DFE5; }
.f-ozet-kutu:last-child { border-right: 0; }
.f-ozet-kutu span { display: block; font-size: 6.5pt; color: #6B7682; text-transform: uppercase; letter-spacing: .02em; }
.f-ozet-kutu strong { font-size: 9.5pt; }

.f-onay {
  display: grid; gap: 10px; grid-template-columns: 1fr 1fr;
  border-top: 2px solid #23417A; padding-top: 9px; break-inside: avoid;
}
@media (max-width: 700px) { .f-onay { grid-template-columns: 1fr; } }
.f-imza { border: 1px solid #D9DFE5; border-radius: 3px; padding: 7px 9px; }
.f-imza-baslik strong { display: block; font-size: 9pt; }
.f-imza-baslik span { font-size: 7pt; color: #3E5A85; font-style: italic; }

.f-onay-satir { display: flex; align-items: flex-start; gap: 7px; margin: 6px 0; font-size: 8.5pt; }
.f-onay-satir.tiklanir { cursor: pointer; }
.f-onay-satir input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.f-onay-satir .ipucu {
  display: block; font-size: 7.5pt; color: #7C8894; margin-top: 1px;
}
.f-onay-satir.kucuk { font-size: 8.5pt; margin: 4px 0 6px; }
.f-onay-satir.kucuk input { width: 15px; height: 15px; }
.f-onay-satir .kutucuk {
  width: 14px; height: 14px; flex: none; display: grid; place-items: center;
  border: 1.5px solid #14181D; border-radius: 3px;
  font-size: 10px; font-weight: 800; line-height: 1;
}

.f-imza-alan { margin-top: 8px; }
.f-imza-tuval {
  width: 100%; height: 120px; background: #FAFBFC;
  border: 1.5px dashed #C3CCD5; border-radius: 4px; touch-action: none; cursor: crosshair;
}
.f-imza-arac { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.f-imza-arac .ipucu { font-size: 8.5pt; color: #8A96A2; margin-left: auto; }
.f-imza-gorsel { display: block; width: 100%; max-height: 62px; object-fit: contain; margin: 4px 0; }
.f-imza-ad { border-top: 1px solid #14181D; padding-top: 3px; font-size: 9pt; font-weight: 600; }

.f-ek-izgara { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.f-ek-izgara figure { margin: 0; break-inside: avoid; }
.f-ek-izgara img {
  width: 100%; max-height: 105mm; object-fit: contain;
  background: #F2F5F8; border: 1px solid #D9DFE5; border-radius: 4px;
}
.f-ek-izgara figcaption { font-size: 9pt; color: #45525E; margin-top: 4px; }

/* Sayfa altı künye satırı. İmza şeridi ayrı: baski-alt. */
.f-alt { margin-top: 10px; padding-top: 6px; border-top: 1px solid #D9DFE5; }
.f-alt .alt-yazi {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 5px; font-size: 7pt; color: #7C8894;
}

.imza-serit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.imza-hucre {
  text-align: center; padding-left: 8px;
  border-left: 2px solid #8FA8CB;
}
.imza-hucre img,
.imza-hucre .bos-imza {
  display: block; width: 100%; height: 13mm;
  object-fit: contain; object-position: center bottom;
}
.imza-hucre .beyan {
  display: flex; align-items: center; gap: 5px; justify-content: center;
  font-size: 7pt; color: #45525E; margin-bottom: 3px;
}
.imza-hucre .beyan .kutucuk {
  width: 9px; height: 9px; flex: none; display: grid; place-items: center;
  border: 1px solid #14181D; border-radius: 2px;
  font-size: 7px; font-weight: 800; line-height: 1;
}
.imza-hucre .beyan .kutucuk.isaretli { background: #1E8A5B; border-color: #1E8A5B; color: #fff; }
/* İşaretsiz kutucuk gerçekten boş görünsün: şerhli teslim ayırt edilebilmeli. */
.imza-hucre .beyan .kutucuk:not(.isaretli) { background: #fff; border-color: #8A96A2; }
.imza-hucre .ad { margin-bottom: 2px; line-height: 1.2; }
.imza-hucre .cizgi { border-top: 1px solid #14181D; margin-top: 1px; }
.imza-hucre .ad b { display: block; font-size: 8.5pt; }
.imza-hucre .ad span { font-size: 6.5pt; color: #6B7682; text-transform: uppercase; letter-spacing: .02em; }

/* ---------------------------- yazdırma --------------------------- */
@media print {
  @page { size: A4; margin: 10mm; }
  body.form-acik > *:not(#sihirbaz-yuva) { display: none !important; }
  .form-katman { position: static; background: #fff; }
  .form-govde { overflow: visible; padding: 0; }
  [data-yazdirma="gizle"], .form-ust { display: none !important; }
  /* Her .a4 bir yaprak boyunda. min-height kullanılır: içerik kısaysa
     alt bilgi sayfanın dibine iner, uzunsa kesilmek yerine taşar. */
  /* 275mm yerine 250mm: tarayıcının kendi üst/alt bilgisi açıkken
     basılabilir alan daralıyor ve imza bloğu ikiye bölünüyordu. */
  .a4 {
    width: auto; margin: 0; padding: 0;
    min-height: 250mm;
    box-shadow: none; page-break-after: always; break-after: page;
    display: flex; flex-direction: column;
  }
  .a4 > .f-alt {
    margin-top: auto; padding-top: 4mm;
    break-inside: avoid; page-break-inside: avoid;
  }
  .imza-serit, .imza-hucre { break-inside: avoid; page-break-inside: avoid; }
  /* Son sayfadan sonra boş yaprak çıkmasın (son eleman imza şeridi). */
  .a4:last-of-type { page-break-after: auto; }
  /* İmza GİRİŞ alanı basılmaz: dev bir blok olduğu için sayfayı bölüyordu.
     Yerine sayfa dibindeki sabit imza şeridi geçer. */
  .f-onay { display: none !important; }

  .imza-hucre img, .imza-hucre .bos-imza { height: 11mm; }

  .f-makine, .f-blok, .f-ek-izgara figure { break-inside: avoid; }
  .f-kunye, .f-ozet, .f-tablo tr, .f-alt { break-inside: avoid; }

  /* Fotoğraf ek sayfası SABİT yaprak yüksekliğinde. Böylece ızgara
     üst bilgi ve imza şeridinden kalan alanı satır sayısına eşit böler;
     fotoğraf hiçbir koşulda ikinci sayfaya taşmaz.
     Metin sayfaları min-height'te kalır, oradaki içerik kesilmesin. */
  .a4.ek { height: 248mm; min-height: 0; overflow: hidden; }
  .f-ek-izgara {
    flex: 1 1 auto; min-height: 0; align-content: stretch;
    break-inside: avoid; page-break-inside: avoid;
  }
  .f-ek-izgara figure { min-height: 0; break-inside: avoid; }
  /* Satırlar 1fr olduğu için hücre yüksekliği kesin; çerçeve onu doldurur. */
  .f-ek-izgara .cerceve {
    flex: 1 1 auto; height: auto; min-height: 0; max-height: none;
  }
  .f-ek-izgara .cerceve img { width: 100%; height: 100%; object-fit: contain; }
  .f-ek-izgara figcaption { flex: none; }
}

/* Onaylanmış kutucuk ve ek sayfa */
.f-onay-satir .kutucuk.isaretli { background: #1E8A5B; border-color: #1E8A5B; color: #fff; }
.a4.ek { break-before: page; }

/* Uygulama içi kamera */
.kamera-katman {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center; padding: 16px; background: rgba(8,12,16,.9);
}
.kamera-kutu { width: min(760px, 100%); }
.kamera-kutu video {
  width: 100%; max-height: 70vh; background: #000;
  border-radius: var(--r-lg); display: block; object-fit: contain;
}
.kamera-arac { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.kamera-deklansor {
  width: 68px; height: 68px; border-radius: 50%;
  background: #fff; border: 5px solid rgba(255,255,255,.35); cursor: pointer;
}
.kamera-deklansor:active { transform: scale(.94); }


/* Makine notu formda ayırt edilsin */
.f-not { background: #FFFBF0; border-left: 3px solid #E0A200; padding: 4px 8px; border-radius: 3px; }

/* ================================================================ */
/* Masraf sekmesi                                                    */
/* ================================================================ */

.masraf-ipucu {
  margin-top: 12px; padding: 10px 12px; font-size: 13.5px;
  background: #F1F6FB; border: 1px solid #D3E2F0; border-radius: var(--r-sm); color: #2B4A6B;
}
.masraf-satiri { display: flex; align-items: center; gap: 12px; }
.masraf-satiri .tutar { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.masraf-satiri .sil {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 2px 5px; flex: none;
}
.masraf-satiri .sil:hover { color: var(--brand); }

.kod-rozet {
  display: inline-block; margin-right: 8px; padding: 2px 8px;
  background: #23417A; color: #fff; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.kod-kutu {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin: 12px 0; padding: 10px 12px;
  background: #EEF3FA; border: 1px solid #CFDDEC; border-radius: var(--r-sm); font-size: 13.5px;
}

.fis-kucuk { flex: none; }
.fis-kucuk img {
  width: 46px; height: 46px; object-fit: cover;
  border-radius: var(--r-sm); border: 1px solid var(--line);
}
.fis-onizleme { display: flex; align-items: center; gap: 12px; }
.fis-onizleme img {
  width: 110px; height: 110px; object-fit: cover;
  border-radius: var(--r-sm); border: 1px solid var(--line);
}

/* Yedek parça arama sonuçları */
.arama-sonuc {
  margin-top: 8px; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
}
.arama-satiri {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  padding: 10px 13px; text-align: left; background: none;
  border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.arama-satiri:last-child { border-bottom: 0; }
.arama-satiri:hover { background: #F4F7FA; }
.arama-satiri .kod { font-family: var(--mono); font-size: 13px; font-weight: 600; flex: none; }
.arama-satiri .ad { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.etiket-taslak { background: #FFF4E0; color: #8A5300; border-color: #F4DFB4; font-weight: 700; }

/* ================================================================ */
/* Servis formu — bölüm çerçeveleri                                  */
/* Her bölümün solunda lacivert şerit: bloklar bakışta ayrışsın.     */
/* ================================================================ */

.a4 > section {
  border: 1px solid #C9D2DB; border-left: 3px solid #23417A; border-radius: 4px;
  padding: 7px 9px; margin-bottom: 7px; background: #fff;
}
.a4 > section.f-kunye { padding: 0; }
.a4 > section.f-ozet { padding: 0; }
.a4 > section.f-onay { border: 0; padding: 0; border-top: 2px solid #23417A; padding-top: 8px; }

/* Bölüm içindeki alt bloklar: daha ince, açık tonlu şerit */
.f-satir {
  border: 1px solid #E3E9EF; border-left: 2px solid #8FA8CB; border-radius: 3px;
  padding: 4px 7px; margin-top: 5px; background: #FCFDFE;
}
.f-satir.f-not { background: #FFFBF0; border-color: #F0DFB8; border-left: 2px solid #E0A200; }


/* ================================================================ */
/* Fotoğraf ek sayfaları — eşit alanlar, ortalanmış görseller        */
/* ================================================================ */

.f-ek-izgara { display: grid; gap: 7px; }
.f-ek-izgara figure { margin: 0; display: flex; flex-direction: column; min-height: 0; }
/* Çerçeveye KESİN yükseklik verilir. Belirsiz yükseklikte resmin
   max-height:%100 değeri çözülemiyor ve dik resimler kırpılıyordu. */
.f-ek-izgara .cerceve {
  flex: 1 1 auto; height: var(--alan-yuksekligi, 85mm); min-height: 0;
  padding: 4px; background: #F5F7F9;
  border: 1px solid #C9D2DB; border-left: 3px solid #23417A; border-radius: 4px;
  overflow: hidden;
}
/* Resim alanı doldurur, oranı korunur, alanın tam ortasında durur. */
.f-ek-izgara .cerceve img {
  display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center center;
}
.f-ek-izgara figcaption {
  font-size: 7.5pt; color: #45525E; margin-top: 3px; text-align: center;
}

/* ================================================================ */
/* Üç nokta menüsü                                                   */
/* ================================================================ */

.menu-sarmal { flex: none; }
.sekme-menu { font-size: 15px; line-height: 1; padding: 13px 15px; }
/* Sekme çubuğunda overflow olduğu için menü sayfaya sabitlenir. */
.menu-liste {
  position: fixed; z-index: 60; min-width: 190px;
  display: grid; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-d);
  border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.menu-ogesi {
  padding: 11px 14px; text-align: left;
  background: none; border: 0; border-radius: var(--r-sm);
  color: #EAEEF2; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.menu-ogesi:hover { background: var(--panel-2); }

/* ================================================================ */
/* Kütüphane                                                         */
/* ================================================================ */

.sayac-serit { display: flex; gap: 7px; flex-wrap: wrap; }
.sayac-cip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 14px; cursor: pointer;
}
.sayac-cip:hover { border-color: var(--brand); }
.sayac-cip .adet {
  padding: 1px 8px; background: #23417A; color: #fff;
  border-radius: 999px; font-size: 12px; font-weight: 700;
}

.kutuphane-kart {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid #23417A; border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
}
.kutuphane-kart .ust {
  display: block; width: 100%; padding: 13px 44px 13px 15px;
  text-align: left; background: none; border: 0; cursor: pointer; position: relative;
}
.kutuphane-kart .ust.dokunulmaz { cursor: default; padding-right: 15px; }
.kutuphane-kart .ust:hover:not(.dokunulmaz) { background: #F6F8FA; }
.kutuphane-kart .ok {
  position: absolute; right: 15px; top: 13px;
  font-size: 20px; color: var(--muted); line-height: 1;
}
.kutuphane-kart .zincir {
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline;
}
.kutuphane-kart .zincir .kaynak { color: #23417A; }
.kutuphane-kart .zincir .ayrac { color: var(--muted); }
.kutuphane-kart .problem {
  font-size: 15px; margin-bottom: 8px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kutuphane-kart .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.kutuphane-kart .govde { padding: 0 15px 14px; border-top: 1px solid var(--line); }

.kutuphane-blok { margin-top: 12px; }
.kutuphane-blok h4 {
  margin: 0 0 3px; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .03em;
}
.kutuphane-blok p { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

.kutuphane-kart .alt-meta {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* Ayarlar */
.ayar-yardim { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* ================================================================ */
/* Görsel düzenleme (döndür / kırp)                                  */
/* ================================================================ */

.duzenle-katman {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center; padding: 16px; background: rgba(8,12,16,.92);
}
.duzenle-kutu { width: min(820px, 100%); display: grid; gap: 12px; }
.duzenle-baslik { color: #EAEEF2; }
.duzenle-baslik strong { display: block; font-size: 17px; }
.duzenle-baslik span { font-size: 13.5px; color: #8D9AA7; }

.duzenle-sahne {
  position: relative; display: inline-block; max-height: 62vh;
  background: #000; border-radius: var(--r); overflow: hidden;
  justify-self: center; touch-action: none; cursor: crosshair;
}
.duzenle-tuval { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; }

.kirp-cerceve {
  position: absolute; border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(8,12,16,.55);
  pointer-events: none;
}

.duzenle-arac { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.duzenle-alt { display: flex; gap: 10px; justify-content: flex-end; }
.duzenle-alt .dgm { min-width: 130px; }


/* Kilitli ayar kartı */
.kart.kilitli { opacity: .72; }
.kart.kilitli .secim,
.kart.kilitli .girdi { background: #F4F6F8; cursor: not-allowed; }
.kart h2 .kilit {
  margin-left: 9px; padding: 2px 9px; border-radius: 999px;
  background: #EDF1F4; color: var(--muted);
  font-size: 12px; font-weight: 600; vertical-align: 2px;
}

/* Yazdırma ipucu: üst çubuğun altında ince bir şerit, yer kaplamasın. */
.baski-ipucu {
  flex: none; margin: 0; padding: 7px 16px;
  background: #FFF4E0; border-bottom: 1px solid #F0DFB8;
  color: #7A4A00; font-size: 13px; text-align: center;
}

/* İmzalanmış taraf: kompakt durum satırı (imzanın kendisi sayfa altında) */
.f-imza.imzalandi { background: #F3FAF6; border-color: #CBE7D8; }
.f-imza.serhli { background: #FFFBF0; border-color: #F0DFB8; }
.f-imza-durum .kutucuk.serh { background: #E0A200; border-color: #E0A200; }
.f-imza.serhli .f-imza-durum .etiketi { background: #FBEBC8; color: #7A4A00; }
.f-imza-durum {
  display: flex; align-items: center; gap: 9px; margin-top: 7px;
}
.f-imza-durum b {
  font-size: 10pt; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.f-imza-durum .etiketi {
  padding: 1px 8px; border-radius: 999px;
  background: #DDF0E6; color: #1E6B48; font-size: 8pt; font-weight: 700;
}
.f-imza-durum .etiketi { flex: none; }
.f-imza-durum .dgm-metin { margin-left: auto; padding: 4px 0; flex: none; white-space: nowrap; }
.f-imza-durum .kutucuk {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center;
  border-radius: 3px; font-size: 10px; font-weight: 800; line-height: 1;
  background: #1E8A5B; border: 1px solid #1E8A5B; color: #fff;
}

/* Kilit uyarısı: açıklama ve çözüm düğmesi yan yana */
.kilit-uyari {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.kilit-uyari > div { flex: 1; min-width: 240px; }

/* Yeni servis kaydı — makine satırları */
.makine-satiri {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.makine-satiri:first-of-type { border-top: 0; padding-top: 0; }
.makine-satiri .sira {
  width: 26px; height: 26px; flex: none; margin-bottom: 11px;
  display: grid; place-items: center; border-radius: var(--r-sm);
  background: #23417A; color: #fff; font-size: 13px; font-weight: 700;
}
.makine-satiri .alan { flex: 1 1 180px; min-width: 0; }
.makine-satiri .sil {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 22px; line-height: 1; padding: 6px; margin-bottom: 4px; flex: none;
}
.makine-satiri .sil:hover { color: var(--brand); }


/* İmza açıklaması: tarafın beyanına eklediği kendi notu */
.f-aciklama-alan { margin-bottom: 9px; }
.f-imza-aciklama {
  margin-top: 7px; padding: 6px 9px; font-size: 8.5pt;
  background: #FFFBF0; border: 1px solid #F0DFB8; border-left: 2px solid #E0A200;
  border-radius: 3px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.imza-hucre .beyan-aciklama {
  margin: 3px 0 4px; padding: 4px 7px; font-size: 7.5pt; text-align: left;
  background: #FFFBF0; border: 1px solid #F0DFB8; border-left: 2px solid #E0A200;
  border-radius: 2px; color: #3B4650; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Veri dosyası yolu */
.veri-yolu {
  display: block; padding: 10px 12px; background: #131920; color: #C9D4DF;
  border-radius: var(--r-sm); font-family: var(--mono); font-size: 12.5px;
  overflow-wrap: anywhere;
}

/* ================================================================ */
/* Ar-Ge hizmet raporu                                               */
/* ================================================================ */

.arge-makine {
  border: 1px solid var(--line); border-left: 3px solid #23417A;
  border-radius: var(--r); padding: 12px 14px; margin-top: 14px; background: #FAFBFC;
}
.arge-makine .baslik { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.arge-makine .baslik strong { font-size: 16px; }
.arge-makine .baslik span { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.madde-satiri { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 7px; }
.madde-satiri .no {
  width: 24px; flex: none; padding-top: 11px;
  font-weight: 700; color: var(--muted); text-align: right;
}
.madde-satiri textarea { flex: 1; min-height: 44px; }
.madde-satiri .sil {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 8px 5px; flex: none;
}
.madde-satiri .sil:hover { color: var(--brand); }

/* --- rapor sayfası --- */
.arge-sayfa {
  width: 210mm; max-width: 100%; margin: 0 auto;
  padding: 16mm 15mm; background: #fff; color: #14181D;
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 10pt; line-height: 1.45;
}
.ar-ust { display: flex; align-items: flex-start; gap: 16px; }
.ar-ust .logo { width: 86px; height: auto; }
.ar-ust .tarih { margin-left: auto; font-size: 9.5pt; }
.ar-baslik {
  text-align: center; font-size: 15pt; letter-spacing: .5px;
  margin: 10px 0 2px; text-transform: uppercase;
}
.ar-alt-baslik {
  text-align: center; font-size: 9pt; color: #5B6772; margin-bottom: 18px;
}

.ar-bolum { margin-bottom: 16px; break-inside: avoid; }
.ar-bolum h2 {
  font-size: 10.5pt; font-weight: 700; margin-bottom: 5px;
  padding-bottom: 2px; border-bottom: 1px solid #14181D;
  display: inline-block; min-width: 45%;
}
.ar-bolum p { margin-left: 8mm; }
.ar-bolum p.coklu { white-space: pre-wrap; }

.ar-makine-tablo { width: 100%; margin-left: 8mm; border-collapse: collapse; }
.ar-makine-tablo td { padding: 2px 10px 2px 0; vertical-align: top; }
.ar-makine-tablo .ad { font-weight: 600; white-space: nowrap; }
.ar-makine-tablo .seri { font-family: var(--mono); font-size: 9pt; white-space: nowrap; }

.ar-makine-blok { margin: 6px 0 10px 8mm; break-inside: avoid; }
.ar-makine-blok h3 { font-size: 10pt; font-weight: 700; margin-bottom: 3px; }
.ar-liste { margin: 0 0 0 8mm; padding-left: 16px; }
.ar-liste li { margin-bottom: 4px; }
.ar-makine-blok .ar-liste { margin-left: 0; }

.ar-imza { margin-top: 34px; text-align: right; }
.ar-imza .cizgi {
  width: 62mm; margin-left: auto; margin-bottom: 4px;
  border-top: 1px solid #14181D; height: 18mm;
}
.ar-imza b { display: block; font-size: 10pt; }
.ar-imza span { font-size: 8.5pt; color: #5B6772; }

@media print {
  body.arge-yazdir > *:not(#ekran-uygulama) { display: none !important; }
  body.arge-yazdir #ekran-uygulama > *:not(main) { display: none !important; }
  body.arge-yazdir main > .kap > *:not(:last-child) { display: none !important; }
  body.arge-yazdir .kart > div:first-child { display: none !important; }
  body.arge-yazdir main, body.arge-yazdir .kap, body.arge-yazdir .kart {
    padding: 0; margin: 0; max-width: none; border: 0; box-shadow: none; background: #fff;
  }
  body.arge-yazdir .arge-sayfa {
    width: auto; border: 0; border-radius: 0; padding: 0; font-size: 10pt;
  }
}

/* Ar-Ge raporu fotoğrafları: yatayda üçer, eşit alan, ortalanmış */
.ar-foto-izgara {
  display: grid; gap: 6mm; grid-template-columns: repeat(3, 1fr); margin-left: 8mm;
}
.ar-foto-izgara figure { margin: 0; break-inside: avoid; }
.ar-foto-izgara .cerceve {
  height: 38mm; padding: 2px; background: #F5F7F9;
  border: 1px solid #C9D2DB; border-radius: 3px; overflow: hidden;
}
.ar-foto-izgara .cerceve img {
  display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center center;
}
.ar-foto-izgara figcaption {
  font-size: 8pt; color: #45525E; margin-top: 3px; line-height: 1.3;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) { .ar-foto-izgara { grid-template-columns: repeat(2, 1fr); } }

/* Ar-Ge raporu görselleri: yatayda üçer, oran korunur */
.ar-gorsel-izgara {
  display: grid; gap: 8px; margin-left: 8mm;
  grid-template-columns: repeat(3, 1fr);
}
.ar-gorsel-izgara figure { margin: 0; break-inside: avoid; }
.ar-gorsel-izgara .cerceve {
  height: 42mm; padding: 3px; background: #F5F7F9;
  border: 1px solid #C9D2DB; border-radius: 3px; overflow: hidden;
}
.ar-gorsel-izgara .cerceve img {
  display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center center;
}
.ar-gorsel-izgara figcaption {
  font-size: 7.5pt; color: #45525E; margin-top: 3px; text-align: center;
  overflow-wrap: anywhere;
}

/* ================================================================ */
/* Analiz ekranı                                                     */
/* ================================================================ */

.analiz-sutun {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.analiz-sutun > .kart { margin: 0; }

.cubuk-liste { display: grid; gap: 11px; }
.cubuk-satiri .ust {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}
.cubuk-satiri .ad { flex: 1; min-width: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.cubuk-satiri .deger {
  flex: none; font-family: var(--mono); font-size: 13px;
  font-weight: 700; color: var(--muted); white-space: nowrap;
}
.cubuk-satiri .ray {
  height: 7px; background: #E7ECF1; border-radius: 4px; overflow: hidden;
}
.cubuk-satiri .dolu {
  height: 100%; background: linear-gradient(90deg, #23417A, #3A63AE); border-radius: 4px;
}

.aylik-grafik {
  display: flex; align-items: flex-end; gap: 8px;
  height: 170px; padding-top: 18px; overflow-x: auto;
}
.aylik-grafik .sutun {
  flex: 1 0 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; height: 100%;
}
.aylik-grafik .bar {
  width: 100%; background: linear-gradient(180deg, #3A63AE, #23417A);
  border-radius: 4px 4px 0 0; min-height: 6px;
}
.aylik-grafik .deger { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.aylik-grafik .etiketi {
  font-size: 11.5px; color: var(--muted); margin-top: 6px; white-space: nowrap;
}

.etiket-serit { display: flex; gap: 6px; flex-wrap: wrap; }

.f-tespit { color: #5B6772; font-style: italic; }

/* Halka grafik */
.halka-sarmal {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.halka { flex: none; }
.halka-toplam { font-size: 26px; font-weight: 800; fill: var(--text); }
.halka-alt { font-size: 11px; fill: #7C8894; text-transform: uppercase; letter-spacing: .05em; }

.gosterge { flex: 1 1 190px; min-width: 0; display: grid; gap: 7px; }
.gosterge-satiri { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.gosterge-satiri .kare { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.gosterge-satiri .ad { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gosterge-satiri .deger {
  flex: none; font-family: var(--mono); font-size: 12.5px;
  font-weight: 700; color: var(--muted); white-space: nowrap;
}

/* Liste içi arama kutusu */
.liste-arama { margin-bottom: 4px; }

/* Aynı açıklamanın hangi kayıtlara ait olduğunu belirten satır */
.ozet-kapsam { font-size: 12.5px; color: var(--muted); margin-top: 4px; padding-left: 30px; }

/* Parça grupları ve tespit şeridi (servis formu) */
.f-parca-grup + .f-parca-grup { margin-top: 8px; }
.f-parca-grup > h3 {
  font-size: 7.5pt; font-weight: 800; text-transform: uppercase;
  letter-spacing: .03em; color: #23417A; margin-bottom: 3px;
}
.f-parca-grup > h3 span { font-weight: 500; text-transform: none; font-style: italic; color: #3E5A85; }

.f-tespit-serit {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 5px; border-top: 1px dashed #D9DFE5;
  font-size: 8pt; color: #45525E;
}
.f-tespit-oge b { color: #23417A; }

/* Seçim özetinin altındaki kısayol düğmeleri */
.sh-kisayol {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.secili-ozet .ozet-satir-ic { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* Seçimin hemen altındaki Geri / Devam çifti */
.secim-kisayol {
  display: flex; gap: 8px; justify-content: flex-end;
  margin: -2px 0 10px;
}
.secim-kisayol .dgm { min-width: 104px; }

/* Listede olmayan kalemi ekleme kutusu */
.yeni-kalem { margin-top: 14px; }
.yeni-kalem > label {
  display: block; font-size: 13.5px; font-weight: 600; color: #9AA7B4; margin-bottom: 7px;
}
.yeni-kalem .satir { display: flex; gap: 8px; align-items: stretch; }
.yeni-kalem .satir .girdi { flex: 1; min-width: 0; }
.yeni-kalem .satir .dgm { flex: none; min-width: 120px; }

/* Firma içi notlar */
.firma-not .ust {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.firma-not .ust strong { font-size: 16px; flex: 1; min-width: 160px; }
.firma-not .makine-satiri-metin {
  font-size: 13px; color: var(--muted); margin-bottom: 8px;
}
.firma-not .not-metni {
  padding: 11px 13px; background: #FFFBF0;
  border: 1px solid #F0DFB8; border-left: 3px solid #E0A200;
  border-radius: var(--r-sm); font-size: 14.5px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Verilen eğitimler (servis formu) */
.f-satir.f-egitim { background: #F3FAF6; border-color: #CBE7D8; border-left-color: #1E8A5B; }
.f-egitim-serit { display: flex; gap: 5px; flex-wrap: wrap; }
.f-egitim-cip {
  padding: 2px 8px; background: #DDF0E6; color: #14603F;
  border-radius: 999px; font-size: 8pt; font-weight: 600;
}

/* Kütüphane — makine bazlı gruplar */
.kutuphane-grup { margin-bottom: 22px; }
.kutuphane-grup > header {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--lacivert), #2E5296);
  border-radius: var(--r); color: #fff;
}
.kutuphane-grup > header h3 { font-size: 16px; flex: 1; min-width: 0; }
.kutuphane-grup > header .adet {
  padding: 2px 9px; background: rgba(255,255,255,.18);
  border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.kutuphane-grup > header .dgm-metin { color: #C9DCFF; }
.kutuphane-grup .kutuphane-kart { margin-bottom: 8px; }

.kutuphane-kart .cozum-onizleme {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px; padding-left: 10px;
  border-left: 3px solid #1E8A5B; font-size: 14px; color: #3B4650;
}
.kutuphane-kart .cozum-onizleme .etiketi {
  display: inline-block; margin-right: 7px; padding: 1px 7px;
  background: #DDF0E6; color: #14603F;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.etiket-parca { background: #EEF3FA; color: #23417A; border-color: #CFDDEC; }

/* ------------------------------------------------------------------ */
/* Makine zaman şeridi (servis formu)                                  */
/* Başlama / bitiş saati ve duraklamalar düşülmüş net çalışma süresi.  */
/* ------------------------------------------------------------------ */
.f-zaman-serit {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 0; margin: 4px 0 7px;
  border: 0.4pt solid #C8D0D8; border-radius: 2px; overflow: hidden;
}
.f-zaman-kutu {
  padding: 3px 7px; border-right: 0.4pt solid #E2E7EC;
  display: flex; flex-direction: column; gap: 1px;
}
.f-zaman-kutu:last-child { border-right: 0; }
.f-zaman-kutu > span { font-size: 6.5pt; color: #6B7682; letter-spacing: .02em; }
.f-zaman-kutu > b { font-size: 8.5pt; color: #14181D; }

/* Ar-Ge raporu makine tablosunda başlık satırı */
.ar-makine-tablo th {
  padding: 2px 10px 3px 0; text-align: left; vertical-align: bottom;
  font-size: 8pt; font-weight: 700; color: #6B7682;
  border-bottom: 0.5pt solid #C8D0D8;
}

/* Firma içi notlarda servis numarası bağlantısı */
button.kod-rozet-baglanti {
  border: 0; cursor: pointer; font: inherit;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}
button.kod-rozet-baglanti:hover { background: #17305E; }
button.kod-rozet-baglanti:focus-visible { outline: 2px solid #23417A; outline-offset: 2px; }

/* Masraf ekranında görev bilgileri özeti (kapalı hâl) */
.kunye-ozet {
  display: flex; gap: 6px; flex-wrap: wrap; width: 100%;
  margin-top: 6px; padding: 8px 10px; text-align: left;
  background: #F7F9FB; border: 1px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer; font: inherit;
}
.kunye-ozet:hover { border-color: #B9C6D4; background: #EEF3FA; }
