/* ================= CodebilTestLab KURUMSAL (tm.css üzerine) ================= */
.tk-top { background: linear-gradient(90deg, #16181D, #2A2B31 55%, #3A1418); }
.tk-codebil { background: #FFF4E5; color: #7A4A00; border-bottom: 1px solid #F5D78E; padding: 9px 22px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-codebil a { margin-left: auto; font-weight: 700; color: #7A4A00; }

/* sınav başlığı ve sekmeler */
.tk-sbas { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.tk-sbas h1 { margin-top: 4px; }
.tk-geri { font-size: 13px; text-decoration: none; color: var(--mut); font-weight: 600; }
.tk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tk-tabs a { display: flex; gap: 7px; align-items: center; padding: 11px 14px; text-decoration: none; color: var(--mut); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tk-tabs a:hover { color: var(--ink); }
.tk-tabs a.on { color: var(--blue); border-bottom-color: var(--blue); }

/* rozetler */
.tk-chip { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #EEF0F4; color: #475467; white-space: nowrap; }
.tk-chip.ok { background: #E3F4EA; color: #0B5C37; } .tk-chip.warn { background: #FFF1D6; color: #8A5300; } .tk-chip.err { background: #FDE6E8; color: #9E0F1A; }
.tk-chip.info { background: #E8EEFC; color: #26449C; } .tk-chip.mut { background: #F0F1F3; color: #667085; }
.tk-iz { font-size: 11.5px; color: var(--mut); line-height: 1.5; }
.tk-iz i { font-size: 11px; }

/* kilit / açık bildirimi */
.tk-kilit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1px solid #F2C4C8; background: #FFF7F7; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.tk-kilit > i { font-size: 24px; color: #B4141F; }
.tk-kilit > div { flex: 1; min-width: 240px; } .tk-kilit p { margin: 2px 0 4px; color: #5B2328; } .tk-kilit small { color: var(--mut); }
.tk-acik { display: flex; gap: 10px; align-items: center; border: 1px solid #BFE3CF; background: #F1FAF5; color: #0B5C37; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }

/* panel kartları */
.tk-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tk-kpi .tm-card { margin: 0; }
.tk-adim { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tk-adim a { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit; }
.tk-adim a:hover { border-color: #F2C4C8; background: #FFF9F9; }
.tk-adim b { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 14px; }
.tk-adim span { font-size: 13px; color: var(--mut); } .tk-adim strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }

/* form ızgarası */
.tk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 14px; }
.tk-form .tm-field.genis { grid-column: 1 / -1; }
.tk-form input[type=date], .tk-form input[type=datetime-local], .tm-field input[type=date], .tm-field input[type=datetime-local] { width: 100%; padding: 9px 11px; border: 1px solid #CDD5E1; border-radius: 9px; font: inherit; background: #fff; }
.tk-satir-dugme { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* dosya bırakma alanı */
.tk-drop { display: flex; gap: 14px; align-items: center; border: 2px dashed #D5DBE5; border-radius: 14px; padding: 18px; cursor: pointer; background: #FAFBFD; }
.tk-drop:hover, .tk-drop.on { border-color: var(--blue); background: #FFF6F7; }
.tk-drop i { font-size: 30px; color: var(--blue); } .tk-drop small { color: var(--mut); }

/* cevap anahtarı ızgarası */
.tk-anahtar { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tk-anahtar th, .tk-anahtar td { border-bottom: 1px solid var(--line); padding: 6px 6px; vertical-align: middle; }
.tk-anahtar th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--mut); background: #F7F9FC; text-align: left; position: sticky; top: 0; z-index: 1; }
.tk-anahtar td.no { font-weight: 800; width: 36px; text-align: center; }
.tk-anahtar input[type=text], .tk-anahtar select { width: 100%; padding: 6px 8px; border: 1px solid #D5DBE5; border-radius: 7px; font: inherit; font-size: 13px; background: #fff; }
.tk-anahtar input.harf { width: 44px; text-align: center; text-transform: uppercase; font-weight: 800; }
.tk-anahtar input.sira { width: 54px; text-align: center; }
.tk-anahtar tr.iptal td { background: #FFF6E5; }
.tk-sik { display: inline-flex; gap: 3px; }
.tk-sik label { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #CDD5E1; border-radius: 50%; font-weight: 700; font-size: 12.5px; cursor: pointer; user-select: none; }
.tk-sik input { display: none; }
.tk-sik input:checked + span { color: #fff; }
.tk-sik label:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.tk-kaz-sec { min-width: 260px; }
.tk-elle { margin-top: 4px; display: grid; grid-template-columns: 110px 1fr; gap: 4px; } .tk-elle[hidden] { display: none; }
.tk-kilitli input, .tk-kilitli select, .tk-kilitli textarea { background: #F4F5F7 !important; color: #667085; pointer-events: none; }

/* optik şablon şeridi */
.tk-serit { font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 12.5px; overflow-x: auto; background: #111318; color: #E6E8EC; border-radius: 12px; padding: 12px 14px; white-space: pre; line-height: 1.7; }
.tk-serit .cetvel { color: #6B7280; }
.tk-serit span[data-t] { border-radius: 3px; }
.tk-serit span[data-t=no] { background: #1D4ED8; } .tk-serit span[data-t=ad] { background: #7C3AED; } .tk-serit span[data-t=cevap] { background: #0F766E; }
.tk-serit span[data-t=kitapcik] { background: #B45309; } .tk-serit span[data-t=sinifsube], .tk-serit span[data-t=sinif], .tk-serit span[data-t=sube] { background: #BE185D; }
.tk-serit span[data-t=tc] { background: #4B5563; } .tk-serit span[data-t=kurum] { background: #374151; }
.tk-lejant { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; margin: 8px 0 0; }
.tk-lejant span { display: inline-flex; gap: 5px; align-items: center; } .tk-lejant i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tk-alanlar input[type=number] { width: 80px; } .tk-alanlar select, .tk-alanlar input { padding: 6px 8px; border: 1px solid #D5DBE5; border-radius: 7px; font: inherit; font-size: 13px; }

/* sonuç tablosu */
.tk-t td.sayi, .tk-t th.sayi { text-align: right; font-variant-numeric: tabular-nums; }
.tk-t tr:hover td { background: #FAFBFD; }
.tk-bar { position: relative; height: 8px; background: #EEF0F4; border-radius: 4px; min-width: 80px; }
.tk-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); }
.tk-isi { display: inline-block; min-width: 46px; text-align: center; border-radius: 6px; padding: 3px 6px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* filtre çubuğu */
.tk-filtre { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.tk-filtre .tm-field { margin: 0; min-width: 150px; }

/* zaman çizelgesi (işlem geçmişi) */
.tk-log { list-style: none; margin: 0; padding: 0; }
.tk-log li { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tk-log time { font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.tk-log b { font-size: 14px; } .tk-log p { margin: 2px 0 0; font-size: 13px; color: #475467; }
@media (max-width: 760px) { .tk-log li { grid-template-columns: 1fr; gap: 2px; } }

/* onay penceresi (TM.master ile aynı) */
.kko-perde { position: fixed; inset: 0; z-index: 2000; background: rgba(17,18,22,.55); display: grid; place-items: center; padding: 16px; }
.kko-perde[hidden] { display: none; }
.kko-kutu { box-sizing: border-box; width: min(460px, 100%); background: #fff; border-radius: 18px; padding: 22px 20px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.kko-ikon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #FDECEE; color: #C0141F; font-size: 24px; margin-bottom: 10px; }
.kko-kutu h3 { margin: 0 0 8px; font-size: 1.15rem; color: #111827; }
.kko-metin { white-space: pre-line; line-height: 1.55; color: #374151; font-size: .97rem; max-height: 55vh; overflow: auto; }
.kko-dugme { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.kko-dugme button { padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid #D1D5DB; background: #fff; color: #111827; }
.kko-dugme .kko-evet { background: #C0141F; border-color: #C0141F; color: #fff; }

/* giriş */
.tk-giris-sekme { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #F1F2F4; padding: 5px; border-radius: 12px; margin-bottom: 18px; }
.tk-giris-sekme a { text-align: center; padding: 9px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--mut); }
.tk-giris-sekme a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ================= Görünüm iyileştirmeleri (yalnızca ekranda; baskı, karne ve rapor çıktıları etkilenmez) ================= */
@media screen {
  .tm-main > h1:first-child, .tm-head h1 { letter-spacing: -.015em; }
  .tm-card { border-radius: 16px; border-color: #E8EAEE; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.04); }
  .tm-card > h2:first-child { display: flex; align-items: center; gap: 8px; }
  .tm-card > h2:first-child > i:first-child { color: var(--blue); }
  .tm-stat { transition: border-color .15s, box-shadow .15s, transform .15s; }
  a.tm-stat:hover { border-color: #F2B8BD; box-shadow: 0 8px 22px rgba(192,20,31,.10); transform: translateY(-1px); }
  .tm-stat > i { border-radius: 12px; }
  .tm-t th { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #6B7280; background: #F8F9FB; }
  .tm-t tr:hover td { background: #FCFCFD; }
  .tk-tabs { gap: 6px; border-bottom-color: #E8EAEE; }
  .tk-tabs a { border-radius: 10px 10px 0 0; }
  .tk-tabs a:hover { background: #F8F9FB; }
  .tk-tabs a.on { background: #FFF5F6; }
  .tm-field input:focus, .tm-field select:focus, .tm-field textarea:focus, .tm-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(192,20,31,.12); outline: none; }
  .tm-btn { transition: background .15s, border-color .15s, box-shadow .15s; }
  .tm-btn:not(.tm-btn-primary):not(.tm-btn-danger):hover { border-color: #F2B8BD; }
  .tm-btn-primary:hover { box-shadow: 0 6px 16px rgba(192,20,31,.25); }
  .tk-chip { letter-spacing: .01em; }
  .tk-drop { border-radius: 16px; }
  .tk-adim a { transition: border-color .15s, background .15s; }
}

/* TESTLAB KURUMSAL - IKI SATIRLI DAR MASAUSTU UST MENU
   Yalnizca TK.master (body.tk) icin, rapor yazdirma gorunumunden bagimsiz. */
@media screen and (min-width: 850px) and (max-width: 1540px) {
  body.tk .tm-top.tk-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 16px;
    padding: 10px clamp(14px, 2vw, 32px) 8px;
  }
  body.tk .tk-top .tm-brand { grid-column: 1; grid-row: 1; min-width: 0; width: fit-content; max-width: 100%; }
  body.tk .tk-top .tm-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.tk .tk-top .tm-brand small { display: block; }
  body.tk .tk-top .tm-user { grid-column: 2; grid-row: 1; order: initial; margin-left: 0; min-width: 0; }
  body.tk .tk-top .tm-user-name { display: flex; }
  body.tk .tk-top .tm-menu { display: none; }
  body.tk .tk-top .tm-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
    display: flex;
    flex: initial;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 0 0;
    min-width: 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  body.tk .tk-top .tm-nav > a,
  body.tk .tk-top .tm-nav > .tk-dd { flex: 0 0 auto; }
  body.tk .tk-top .tm-nav a,
  body.tk .tk-top .tk-dd-b { padding: 8px 11px; font-size: 13px; white-space: nowrap; }
  body.tk .tk-top .tk-dd { display: block; position: relative; }
  body.tk .tk-top .tk-dd-b { display: flex; }
  body.tk .tk-top .tk-dd-m { display: none !important; }
  body.tk .tk-top .tk-dd.acik .tk-dd-m { display: grid !important; }
  body.tk .tk-top .tk-dd-m a { white-space: normal; }
}
/* Acilir menuler kaydirilan bir nav icinde kesilmesin: ilgili breakpointte menuyu
   once konumlandir, alt sayfalar icin klavye/tik davranisini koru. */
@media screen and (min-width: 850px) and (max-width: 1540px) {
  body.tk .tk-top { overflow: visible; }
  body.tk .tk-top .tm-nav { overflow: visible; flex-wrap: wrap; }
}
@media screen and (max-width: 849px) {
  body.tk .tk-top .tm-nav { max-height: min(65vh, 560px); overflow-y: auto; }
  body.tk .tk-top .tm-brand strong { font-size: 14px; }
}
@media print {
  body.tk .tm-top.tk-top { display: none !important; }
}

/* TESTLAB - ORTAK SINAVLAR KATEGORISI VE RESPONSIVE ALT MENULER */
/* Sadece TestLab Kurumsal ortak TK.master menusu, raporlarin icerigi degismez. */
@media screen and (min-width: 850px) {
  body.tk .tk-top .tk-dd { position: relative; }
  body.tk .tk-top .tk-dd .tk-dd-m { position: absolute; top: 100%; left: 0; }
  body.tk .tk-top .tk-dd .tk-dd-b { white-space: nowrap; }
  body.tk .tk-top .tk-dd .tk-dd-m a.on { background: rgba(255,255,255,.16); }
}
@media screen and (max-width: 849px) {
  /* Eski TK.master kurali mobilde tum alt linkleri duz listeliyordu.
     Artik kategoriler tum sayfalarda tiklanarak acilir. */
  body.tk .tk-top .tm-nav > .tk-dd { display: block; position: relative; min-width: 0; }
  body.tk .tk-top .tk-dd .tk-dd-b { display: flex; width: 100%; justify-content: flex-start; padding: 12px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
  body.tk .tk-top .tk-dd .tk-dd-b .tk-dd-ok { margin-left: auto; }
  body.tk .tk-top .tk-dd .tk-dd-m { display: none !important; position: static; min-width: 0; width: 100%; margin: 3px 0 5px; box-shadow: none; background: rgba(0,0,0,.16); border-radius: 9px; padding: 4px; }
  body.tk .tk-top .tk-dd.acik .tk-dd-m { display: grid !important; gap: 3px; }
  body.tk .tk-top .tk-dd .tk-dd-m a { white-space: normal; padding-left: 26px; }
  body.tk .tk-top .tk-dd .tk-dd-m::before { display: none; }
  body.tk .tk-top .tm-nav { align-items: start; }
}
@media screen and (min-width: 850px) and (max-width: 1180px) {
  body.tk .tk-top .tk-dd { display: block; }
  body.tk .tk-top .tk-dd .tk-dd-b { display: flex; }
}
@media print {
  body.tk .tk-top .tk-dd-m { display: none !important; }
}


/* ---- Sınav hazırlık durumu ve cevap anahtarı ilerlemesi (yükleme kolaylığı) ---- */
.tk-hz-bar{height:6px;border-radius:9px;background:#EEF0F3;margin:10px 0 4px;overflow:hidden}.tk-hz-bar i{display:block;height:100%;background:#13804D;border-radius:9px}
.tk-hz-l{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
.tk-hz-l li{display:flex;align-items:center;gap:12px;padding:9px 12px;border:1px solid #E6E8EC;border-radius:10px;background:#fff}
.tk-hz-l li>div{flex:1;min-width:0}.tk-hz-l li small{display:block;color:#6B7280;font-size:12.5px;margin-top:2px}
.tk-hz-l li>i{font-size:20px}.tk-hz-l li.ok>i{color:#13804D}.tk-hz-l li.warn>i{color:#B54708}.tk-hz-l li.err>i,.tk-hz-l li.bekle>i{color:#98A2B3}
.tk-hz-l li.sira{border-color:#C0141F;box-shadow:0 0 0 3px rgba(192,20,31,.08)}.tk-hz-l li em{font-style:normal;font-size:11px;font-weight:700;color:#C0141F;background:#FDECEE;border-radius:20px;padding:2px 8px;margin-left:6px}
@media(max-width:640px){.tk-hz-l li{flex-wrap:wrap}.tk-hz-l li .tm-btn{width:100%;justify-content:center}}
.tk-ilr { margin-top: 12px; padding: 10px 12px; border: 1px solid #E6E8EC; border-radius: 10px; background: #FAFBFC; position: sticky; top: 0; z-index: 2; }
.tk-ilr-s { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; align-items: center; }
.tk-ilr-bos { color: #B42318; }
.tk-ilr-ok { color: #13804D; font-weight: 600; }
.tk-ilr-kirli { color: #B54708; font-weight: 600; margin-left: auto; }
.tk-ilr .tk-hz-bar { margin: 8px 0 0; }
.tk-anahtar input.harf.bos { background: #FFF4F4; border-color: #F2B8BD; }
.tk-anahtar td.tk-kaz-sec { position: relative; padding-right: 30px; }
.tk-kopya { position: absolute; right: 2px; top: 8px; width: 24px; height: 24px; border: 1px solid #D5DBE5; border-radius: 6px; background: #fff; cursor: pointer; color: #475467; padding: 0; line-height: 1; }
.tk-kopya:hover { border-color: #C0141F; color: #C0141F; }
.tk-ton td { vertical-align: top; }

/* Menü: en sık kullanılan "Sınav yükle" vurgulu düğme */
body.tk .tm-nav a.tk-vurgu { background: #C0141F; color: #fff; font-weight: 700; box-shadow: 0 6px 16px -8px rgba(192, 20, 31, .9); }
body.tk .tm-nav a.tk-vurgu:hover { background: #A8111B; color: #fff; }
body.tk .tm-nav a.tk-vurgu.on { background: #C0141F; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); }
body.tk .tk-dd-m a .bi { width: 18px; text-align: center; }
