﻿/* ============================================================
   OKUL BİLGİSİ + KURUM BİLGİSİ — ortak sayfa stilleri (okulsis-ds v2 üzerine)
   Kullanan ekranlar: _GNL/OkulBilgisi_mn.aspx (.okulsis.okb.okb-okul)
                      _GNL/KurumBilgisi_mn.aspx (.okulsis.okb.okb-kurum)
                      _GNL/DersYili_mn.aspx (.okulsis.okb.okb-dersyili — kendi stilleri okulsis-dyb-dersyili.css)
   Her kural .okulsis.okb kökü altındadır; tema klasöründeki CSS'ler her sayfaya
   bağlandığı için başka ekranları etkilemez. Token tanımlanmaz, DS token'ları kullanılır.
   ============================================================ */

.okulsis.okb .wrap { padding: 14px 22px 18px; }
.okulsis.okb .topbar { margin-bottom: 12px; }

/* ===== Kart ızgarası: aynı satırdaki kartlar aynı hizada başlar ve biter ===== */
.okulsis.okb .okb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.okulsis.okb .okb-span2 { grid-column: span 2; }
.okulsis.okb .okb-span3 { grid-column: 1 / -1; }
.okulsis.okb .okb-grid > .spanel { display: flex; flex-direction: column; min-width: 0; }
.okulsis.okb .okb-grid > .spanel > .spanel-b { flex: 1 1 auto; padding: 16px 18px; }
.okulsis.okb .spanel-h { padding: 10px 18px; font-size: 13.5px; }
/* Kartın kendi kaydetme düğmeleri: kart dibine yaslanır, zemin kartla aynı beyaz. */
.okulsis.okb .okb-grid > .spanel > .form-footer { background: #fff; padding: 12px 18px; }
/* Açılır liste kartın dışına taşabilmeli: DS .spanel taşanı kırpar. */
.okulsis.okb .okb-tasabilir { overflow: visible; }
.okulsis.okb .okb-tasabilir > .spanel-h { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
/* Sunucuda gizlenebilen alan grupları (dershane) ızgarayı bozmasın: kutusu yok,
   içindeki alanlar doğrudan üstteki form ızgarasına yerleşir. */
.okulsis.okb .okb-icerik { display: contents; }
.okulsis.okb .okb-gizli { display: none; }

/* ===== Giriş kutuları: BEYAZ zemin (Etüt / Ödev ekranlarıyla aynı bütünlük) =====
   okb-in sınıfı, legacy temadaki .EntryInput / .EntryDropDownList !important
   kurallarına takılmamak için kullanılır; görünüm DS .fv kuralından gelir. */
.okulsis.okb .fv input[type=text],
.okulsis.okb .fv input[type=password],
.okulsis.okb .fv input[type=date],
.okulsis.okb .fv select,
.okulsis.okb .fv textarea { background: #fff; background-image: none; }
.okulsis.okb .fv input[disabled],
.okulsis.okb .fv select[disabled] { background: #eef2f7; color: var(--slate); cursor: not-allowed; }
.okulsis.okb .fv textarea { min-height: 84px; line-height: 1.45; }
.okulsis.okb input:-webkit-autofill,
.okulsis.okb input:-webkit-autofill:hover,
.okulsis.okb input:-webkit-autofill:focus,
.okulsis.okb select:-webkit-autofill,
.okulsis.okb textarea:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: var(--ink); }
.okulsis.okb .fv .hint { font-size: 11.5px; }
/* Etiketi iki satıra taşan alan, girdisini aynı satırdaki komşularından aşağı itmesin. */
.okulsis.okb .form-grid .fv { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.okulsis.okb .okb-hata { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--red); }
.okulsis.okb .check-row { min-height: 36px; cursor: pointer; background: #fff; margin: 0; }
.okulsis.okb .check-row span { display: inline-flex; align-items: center; }
.okulsis.okb .okb-alta-yasla { align-self: end; }
.okulsis.okb .okb-not { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.okulsis.okb .okb-uyari { margin: 8px 0 0; padding: 8px 11px; border-radius: 8px; background: var(--amber-soft); color: #92400e; font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ===== Anahtar (switch) satırları: sunucu onay kutusu DS anahtar görünümünde ===== */
.okulsis.okb .switch-row { padding: 12px 2px; cursor: pointer; }
/* Satır <label> olduğundan başlık / açıklama <span>; DS bunları <div> varsayar. */
.okulsis.okb .switch-row .sr-title,
.okulsis.okb .switch-row .sr-desc { display: block; }
.okulsis.okb .switch-row input[type=checkbox] {
    -webkit-appearance: none; appearance: none; width: 42px; height: 24px; margin: 0; border: none; border-radius: 20px;
    background: #cbd5e1; position: relative; cursor: pointer; flex: 0 0 auto; transition: background .18s; }
.okulsis.okb .switch-row input[type=checkbox]::before {
    content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(15,27,45,.25); transition: transform .18s; }
.okulsis.okb .switch-row input[type=checkbox]:checked { background: var(--primary); }
.okulsis.okb .switch-row input[type=checkbox]:checked::before { transform: translateX(18px); }
.okulsis.okb .switch-row input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Alan / Dal çok seçimli liste (CheckBoxList → açılır panel) ===== */
.okulsis.okb .alandal-secim { position: relative; width: 100%; }
.okulsis.okb .alandal-ozet {
    min-height: 36px; padding: 7px 32px 7px 11px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink); font-size: 14px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.okulsis.okb .alandal-ozet:hover { border-color: #c7d2e0; }
.okulsis.okb .alandal-ozet:after {
    content: ''; position: absolute; right: 13px; top: 16px;
    border: 5px solid transparent; border-top-color: var(--muted); }
.okulsis.okb .alandal-liste {
    display: none; position: absolute; z-index: 30; left: 0; top: calc(100% + 4px);
    min-width: 100%; width: max-content; max-width: 520px; max-height: 280px; overflow-y: auto;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); }
.okulsis.okb .alandal-liste.acik { display: block; }
.okulsis.okb .alandal-tumu {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
    border-bottom: 1px solid var(--line); background: #f8fafc; font-weight: 700; font-size: 13px; white-space: nowrap; }
.okulsis.okb .alandal-liste table { width: 100%; border-collapse: collapse; }
.okulsis.okb .alandal-liste td { padding: 6px 12px; white-space: nowrap; font-size: 13px; }
.okulsis.okb .alandal-liste td:hover { background: #f0f7ff; }
/* Liste içindeki etiketler DS ".fv label" (büyük harf, blok) biçimini almasın. */
.okulsis.okb .alandal-liste label { display: inline; cursor: pointer; margin: 0 0 0 6px; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.okulsis.okb .fv .alandal-tumu { display: flex; margin: 0; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
.okulsis.okb .fv .alandal-liste input[type=checkbox] {
    width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; vertical-align: middle; accent-color: var(--primary); }

/* ===== Adres ===== */
.okulsis.okb .okb-adres-metin { display: flex; flex-direction: column; }
.okulsis.okb .okb-adres-metin textarea { flex: 1 1 auto; resize: vertical; }
/* Okul Bilgisi: adres metni solda üç satır boyunca durur; sağında İl/İlçe, Semt/Posta Kodu, Kasaba/Köy. */
.okulsis.okb .okb-satir3 { grid-row: span 3; }

/* ===== Logo ===== */
.okulsis.okb .okb-logo-onizleme {
    height: 128px; border: 1px dashed #c7d2e0; border-radius: 10px; background: #f8fafc;
    display: grid; place-items: center; overflow: hidden; padding: 10px; }
.okulsis.okb .okb-logo-onizleme img { display: block; max-width: 100%; max-height: 106px; object-fit: contain; }
.okulsis.okb .okb-logo-bos { text-align: center; color: var(--muted); font-size: 12.5px; }
.okulsis.okb .okb-logo-bos .ico { display: block; font-size: 30px; opacity: .45; margin-bottom: 2px; }
.okulsis.okb .okb-logo-bilgi { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 10px; font-size: 12px; color: var(--muted); }
.okulsis.okb label.dropzone { cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.okulsis.okb label.dropzone:hover { border-color: var(--primary); background: #f0f6ff; }
.okulsis.okb .okb-dosya { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.okulsis.okb .attach .x { cursor: pointer; color: var(--muted); padding: 0 4px; }

/* ===== Kart içi liste tablosu (telefonlar, kampüsler) ===== */
.okulsis.okb .okb-tablo { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.okulsis.okb .okb-tablo table.data thead th { position: static; }
.okulsis.okb .okb-tablo table.data tbody tr:last-child td { border-bottom: 0; }
.okulsis.okb .okb-tablo table.data tbody td { padding: 8px 12px; }
.okulsis.okb .okb-tablo tr.sel td { background: var(--primary-soft); }
.okulsis.okb .okb-tablo tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
/* Boş liste: kesik çerçeveli kutu. mesaj.css'teki "div.msg" (13px ikon kutusu) DS .empty-state .msg metnini eziyor. */
.okulsis.okb .okb-bos { padding: 22px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.okulsis.okb .empty-state .msg { display: block; width: auto; height: auto; background: none; }
/* Liste altındaki ekleme / düzenleme kutusu */
.okulsis.okb .okb-kutu { padding: 12px; border: 1px solid #bcd2f5; border-radius: 10px; background: #f8fbff; }
.okulsis.okb .okb-kutu-baslik { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--title); }
.okulsis.okb .okb-aksiyon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.okulsis.okb .okb-aksiyon .check-row { flex: 1 1 auto; }

/* ===== Telefonlar ===== */
.okulsis.okb .okb-tel-no { display: flex; align-items: center; gap: 10px; min-width: 0; }
.okulsis.okb .okb-tel-no .stu-main { white-space: nowrap; }
.okulsis.okb .okb-tel-no .stu-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.okulsis.okb .okb-tel-no .badge { padding: 1px 8px; font-size: 11px; }
.okulsis.okb .okb-tel-ico { flex: 0 0 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-d); font-size: 15px; }
.okulsis.okb .okb-tel-ico.faks { background: #f1f5f9; color: var(--slate); }
.okulsis.okb .okb-tel-form { margin-top: 12px; }
.okulsis.okb .okb-tel-grid { grid-template-columns: 112px 92px minmax(0, 1fr); gap: 10px 10px; }
.okulsis.okb .okb-tel-alt { display: flex; gap: 8px; margin-top: 12px; }

/* ===== Kampüsler: solda liste, sağda ekleme / düzenleme kutusu ===== */
.okulsis.okb .okb-kampus { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.okulsis.okb .okb-kampus .stu-main { white-space: nowrap; }
.okulsis.okb .okb-kampus td.okb-aciklama { color: var(--slate); white-space: pre-line; }

/* ===== Bölüm başlığı (kart içindeki alt gruplar) ===== */
.okulsis.okb .okb-bolum { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--title); }
.okulsis.okb .okb-bolum-ayrac { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ===== Belge başlığı ===== */
.okulsis.okb .okb-baslik-metin textarea { min-height: 96px; font-weight: 600; }
.okulsis.okb .okb-baslik-alt { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.okulsis.okb .okb-baslik-alt .muted { font-size: 12px; line-height: 1.4; }

/* ===== Mesaj şeritleri ve alt bar ===== */
.okulsis.okb .savemsg .okb-msg-ico { font-size: 16px; }
.okulsis.okb .spanel .savemsg { margin: 0 0 12px; padding: 9px 12px; font-size: 13px; }
.okulsis.okb .okb-alt { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.okulsis.okb .okb-alt .form-net { font-weight: 600; color: var(--slate); }
.okulsis.okb .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Üç sütun, kart içi listeler (numara / ad + iki buton) rahat sığdığı genişlikten itibaren. */
@media (max-width: 1280px) {
    .okulsis.okb .okb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
}
@media (max-width: 1100px) {
    /* DS fg-4 burada iki sütuna iner; adres metni tam satır olur, üç satır yüksekliğe gerek kalmaz. */
    .okulsis.okb .okb-satir3 { grid-row: auto; }
}
@media (max-width: 900px) {
    .okulsis.okb .okb-kampus { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .okulsis.okb .okb-grid { grid-template-columns: minmax(0, 1fr); }
    .okulsis.okb .okb-span2 { grid-column: auto; }
    .okulsis.okb .wrap { padding: 12px; }
}
