/* Koray Varol Okulları - Eğitim Takip Sistemi
   Tema: logodan lacivert + kırmızı */

:root {
    --lacivert: #1c3f6e;
    --lacivert-koyu: #14315a;
    --lacivert-acik: #2b5490;
    --kirmizi: #b02a33;
    --kirmizi-koyu: #8f1f27;
    --arka: #f4f6f9;
    --kart: #ffffff;
    --metin: #23303f;
    --metin-soluk: #6b7684;
    --cizgi: #e3e8ef;
    --golge: 0 1px 3px rgba(20, 49, 90, 0.08), 0 4px 14px rgba(20, 49, 90, 0.06);
    --golge-hover: 0 6px 22px rgba(20, 49, 90, 0.14);
    --yesil: #2e7d52;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--arka);
    color: var(--metin);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .05s, box-shadow .15s;
    font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-birincil { background: var(--lacivert); color: #fff; }
.btn-birincil:hover { background: var(--lacivert-koyu); }
.btn-ikincil {
    background: #eef2f8; color: var(--lacivert);
    border: 1px solid var(--cizgi);
}
.btn-ikincil:hover { background: #e2e9f4; }
.btn-tam { width: 100%; padding: 12px; font-size: 15px; }
.btn-cikis {
    background: rgba(255,255,255,.14);
    color: #fff; padding: 8px 16px; font-size: 13px;
    border: 1px solid rgba(255,255,255,.25);
}
.btn-cikis:hover { background: rgba(255,255,255,.24); }

/* ---------- Giriş ekranı ---------- */
.giris-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--lacivert) 0%, var(--lacivert-koyu) 55%, #0f2647 100%);
    padding: 24px;
}
.giris-kutu {
    background: var(--kart);
    width: 100%;
    max-width: 400px;
    border-radius: 18px;
    padding: 38px 34px 28px;
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
    text-align: center;
}
.giris-logo { width: 190px; max-width: 80%; height: auto; margin-bottom: 14px; }
.giris-baslik { font-size: 19px; color: var(--lacivert); margin: 0 0 4px; }
.giris-alt { color: var(--metin-soluk); font-size: 14px; margin: 0 0 24px; }
.giris-form { text-align: left; }
.alan-etiket {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--metin); margin: 14px 0 6px;
}
.alan {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--cizgi); border-radius: 9px;
    font-size: 15px; font-family: inherit; background: #fbfcfe;
    transition: border-color .15s, box-shadow .15s;
}
.alan:focus {
    outline: none; border-color: var(--lacivert-acik);
    box-shadow: 0 0 0 3px rgba(43,84,144,.15); background: #fff;
}
.giris-form .btn-tam { margin-top: 22px; }
.giris-dipnot { text-align: center; color: var(--metin-soluk); font-size: 12px; margin: 22px 0 0; }
.uyari {
    background: #fdecee; color: var(--kirmizi-koyu);
    border: 1px solid #f5c6cb; border-radius: 8px;
    padding: 10px 14px; font-size: 14px; margin-bottom: 8px;
}

/* ---------- Üst bar ---------- */
.ust-bar {
    background: var(--lacivert);
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px;
    box-shadow: 0 2px 10px rgba(20,49,90,.25);
    position: sticky; top: 0; z-index: 20;
}
.ust-sol { display: flex; align-items: center; gap: 12px; }
.ust-logo { width: 42px; height: 42px; background: #fff; border-radius: 8px; padding: 3px; }
.ust-baslik { font-weight: 700; font-size: 15px; line-height: 1.2; }
.ust-alt { font-size: 12px; opacity: .8; }
.ust-sag { display: flex; align-items: center; gap: 16px; }
.kullanici-bilgi { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.kullanici-ad { font-size: 14px; font-weight: 600; }
.rozet {
    font-size: 11px; background: rgba(255,255,255,.18);
    padding: 2px 9px; border-radius: 20px; font-weight: 600;
}
.rozet-koord { background: var(--kirmizi); }

/* ---------- İçerik ---------- */
.icerik { max-width: 1160px; margin: 0 auto; padding: 24px; }

/* Sınıf sekmeleri (koordinatör) */
.sinif-sekmeler {
    display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap;
}
.sekme {
    display: flex; flex-direction: column;
    background: var(--kart); border: 1.5px solid var(--cizgi);
    border-radius: 10px; padding: 10px 18px; min-width: 120px;
    transition: border-color .15s, box-shadow .15s, transform .05s;
}
.sekme:hover { border-color: var(--lacivert-acik); box-shadow: var(--golge); }
.sekme-aktif {
    border-color: var(--lacivert); background: var(--lacivert); color: #fff;
    box-shadow: var(--golge);
}
.sekme span.sekme-ogretmen { font-size: 12px; opacity: .75; margin-top: 2px; font-weight: 400; }
.sekme { font-weight: 700; font-size: 15px; }

/* Bölüm başlığı */
.bolum-baslik {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.bolum-baslik h2 { margin: 0; font-size: 20px; color: var(--lacivert); }
.bolum-alt { margin: 3px 0 0; color: var(--metin-soluk); font-size: 13px; }
.bolum-aksiyon { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Sürükle-bırak ---------- */
.drop-alan {
    border: 2px dashed #c3cfe0;
    border-radius: var(--radius);
    background: #fbfcfe;
    padding: 26px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin-bottom: 24px;
}
.drop-alan.hover {
    border-color: var(--lacivert); background: #eef3fb;
}
.drop-ikon {
    font-size: 30px; color: var(--lacivert-acik);
    line-height: 1; margin-bottom: 8px;
}
.drop-metin { margin: 0 0 4px; font-size: 15px; }
.drop-alt { margin: 0; font-size: 13px; color: var(--metin-soluk); }
.yukleme-liste { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.yukleme-satir {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--cizgi);
    border-radius: 8px; padding: 8px 12px; font-size: 13px; text-align: left;
}
.yukleme-bar { flex: 1; height: 6px; background: #e6ebf3; border-radius: 4px; overflow: hidden; }
.yukleme-dolu { height: 100%; width: 0; background: var(--lacivert-acik); transition: width .2s; }
.yukleme-durum { font-size: 12px; color: var(--metin-soluk); white-space: nowrap; }
.yukleme-tamam .yukleme-dolu { background: var(--yesil); }
.yukleme-hata .yukleme-dolu { background: var(--kirmizi); }

/* ---------- Dosya galerisi ---------- */
.galeri {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}
.galeri-oge {
    background: var(--kart);
    border: 1px solid var(--cizgi);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--golge);
    display: flex; flex-direction: column;
    transition: box-shadow .15s, transform .08s;
}
.galeri-oge:hover { box-shadow: var(--golge-hover); transform: translateY(-3px); }

/* Önizleme (thumbnail) alanı */
.galeri-onizleme {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3;
    background: #eef2f8;
    overflow: hidden;
    text-decoration: none;
}
.galeri-onizleme img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.galeri-uzanti {
    font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff;
    padding: 14px 20px; border-radius: 12px;
    background: var(--lacivert-acik);
    box-shadow: 0 6px 16px rgba(20,49,90,.25);
}
/* Tür renkleri (büyük rozet) */
.onizleme-tablo   .galeri-uzanti { background: #1d7a4d; }
.onizleme-tablo   { background: #e8f5ee; }
.onizleme-dokuman .galeri-uzanti { background: #2b5490; }
.onizleme-dokuman { background: #eaf0f8; }
.onizleme-pdf     .galeri-uzanti { background: #b02a33; }
.onizleme-pdf     { background: #fbeaec; }
.onizleme-sunum   .galeri-uzanti { background: #cc7a29; }
.onizleme-sunum   { background: #fdf1e3; }
.onizleme-resim   { background: #efeaf6; }
.onizleme-diger   .galeri-uzanti { background: #6b7684; }
.onizleme-diger   { background: #eef0f3; }

.galeri-rozet {
    position: absolute; top: 8px; left: 8px;
    background: rgba(28,63,110,.92); color: #fff;
    font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}

.galeri-alt { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.galeri-bilgi { flex: 1; }
.galeri-ad {
    font-weight: 600; font-size: 13.5px; line-height: 1.35; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.galeri-meta { font-size: 12px; color: var(--metin-soluk); margin-top: 4px; }
.galeri-aksiyon { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-btn {
    font-size: 12.5px; font-weight: 600;
    padding: 6px 12px; border-radius: 7px;
    border: 1px solid var(--cizgi); background: #f5f7fb; color: var(--metin);
    cursor: pointer; font-family: inherit; transition: background .15s;
}
.mini-btn:hover { background: #e9eef6; }
.mini-birincil { background: var(--lacivert); color: #fff; border-color: var(--lacivert); }
.mini-birincil:hover { background: var(--lacivert-koyu); }
.mini-tehlike { color: var(--kirmizi); }
.mini-tehlike:hover { background: #fdecee; }

.bos-durum {
    grid-column: 1 / -1;
    text-align: center; color: var(--metin-soluk);
    padding: 50px 20px; background: var(--kart);
    border: 1px dashed var(--cizgi); border-radius: var(--radius);
}

/* ---------- Bildirim ---------- */
.bildirim {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--metin); color: #fff;
    padding: 12px 22px; border-radius: 10px; font-size: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
}
.bildirim.goster { opacity: 1; transform: translateX(-50%) translateY(0); }
.bildirim.basari { background: var(--yesil); }
.bildirim.hata { background: var(--kirmizi); }

/* ---------- Editör ---------- */
.editor-ust {
    background: var(--lacivert); color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; gap: 16px; flex-wrap: wrap;
    position: sticky; top: 0; z-index: 20;
}
.editor-baslik { display: flex; align-items: center; gap: 12px; min-width: 0; }
.editor-baslik .geri { color: #fff; font-size: 20px; opacity: .9; }
.editor-dosya-ad {
    font-weight: 600; font-size: 15px;
    max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-arac { display: flex; gap: 8px; align-items: center; }
.editor-govde { padding: 0; }
#x-tablo { width: 100%; }
#doc-editor-wrap { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.ql-container { min-height: 60vh; font-size: 16px; background: #fff; }
.ql-toolbar, .ql-container { border-color: var(--cizgi) !important; }
.kaydet-durum { font-size: 13px; opacity: .85; }

/* Responsive */
@media (max-width: 640px) {
    .icerik { padding: 16px; }
    .ust-bar { padding: 10px 14px; }
    .ust-baslik { font-size: 13px; }
    .kullanici-ad { font-size: 13px; }
    .editor-dosya-ad { max-width: 40vw; }
}
