/* ============================================================
   Okul Evrak Hazırlama Sistemi — Arayüz Stilleri
   Ultra modern, ferah, kart tabanlı, %100 responsive (mobil öncelikli)
   ============================================================ */

:root {
    --primary: #2E75B6;
    --primary-dark: #245d92;
    --primary-light: #e8f1fa;
    --accent: #22A699;
    --accent-2: #0EA5E9;
    --surface: #FFFFFF;
    --bg: #F4F7FB;
    --text: #1E293B;
    --text-2: #64748B;
    --border: #E2E8F0;
    --danger: #E11D48;
    --danger-light: #fde8ec;
    --success: #16A34A;
    --success-light: #e7f6ec;
    --warning: #D97706;
    --warning-light: #fdf2e2;
    --radius: 16px;
    --radius-sm: 12px;
    --wrap: 1100px;   /* üst menü + tüm sayfa içeriği için TEK ortak genişlik */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .07);
    --shadow: 0 6px 16px -8px rgba(15, 23, 42, .14), 0 2px 6px -3px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .26);
    --ring: 0 0 0 4px rgba(46, 117, 182, .16);
    --grad: linear-gradient(120deg, var(--primary), var(--accent-2));
    --grad-soft: linear-gradient(135deg, var(--primary), var(--accent));
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    font-family: 'Inter', 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(900px 520px at 100% -5%, rgba(46, 117, 182, .07), transparent 60%),
        radial-gradient(820px 540px at -10% 108%, rgba(34, 166, 153, .07), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Sayfa içeriği için zarif giriş animasyonu — yalnızca opaklık.
   (transform KULLANILMAZ: aksi halde içindeki position:fixed action-bar için kapsayıcı blok
   oluşur ve sabit çubuk animasyon bitince viewport'a zıplar → "İleri butonu geç çıkıyor".) */
main.container, main.container-narrow { animation: appUp .3s ease both; }
@keyframes appUp { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { main.container, main.container-narrow { animation: none; } }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--text); line-height: 1.25; }

/* ============================================================
   Üst başlık — ULTRA MODERN, iki katlı: ÜSTTE logo + kullanıcı, ALTTA menü
   ============================================================ */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .80));
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 14px 38px -22px rgba(15, 23, 42, .5);
}
/* En üstte ince degrade aksan şeridi */
.topbar::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
}

/* ----- ÜST SATIR: logo (sol) + kullanıcı (sağ) ----- */
.topbar-top {
    max-width: var(--wrap); margin: 0 auto;
    padding: 16px 22px 13px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; white-space: nowrap; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--accent-2) 55%, var(--accent));
    color: #fff; display: grid; place-items: center; flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 10px 22px -6px rgba(46, 117, 182, .6);
    transition: transform .24s cubic-bezier(.2, .7, .3, 1);
}
.brand:hover .brand-mark { transform: translateY(-2px) rotate(-5deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text .full { font-weight: 800; font-size: 19px; letter-spacing: -.4px; color: var(--text); }
.brand-alt {
    font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--primary);
}

/* Sağ blok: profil + çıkış */
.topbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.user-chip {
    display: flex; align-items: center; gap: 11px;
    padding: 6px 16px 6px 6px;
    background: rgba(255, 255, 255, .7); border: 1px solid var(--border); border-radius: 999px;
    white-space: nowrap; flex: 0 0 auto;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.user-chip:hover { transform: translateY(-1px); background: #fff; box-shadow: var(--shadow-sm); }
.user-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.user-ad { font-size: 13.5px; font-weight: 700; color: var(--text); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: grid; place-items: center; font-size: 14.5px; font-weight: 800; flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 5px 12px -3px rgba(46, 117, 182, .55);
}
.role-badge {
    font-size: 10px; padding: 1.5px 8px; border-radius: 999px;
    background: var(--accent); color: #fff; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; align-self: flex-start;
}
.role-badge.ogretmen { background: var(--text-2); }
.role-badge.yonetici { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.role-badge.superadmin { background: linear-gradient(135deg, #7C3AED, #a855f7); }
.cikis-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 13px;
    color: var(--text-2); flex: 0 0 auto; border: 1px solid transparent;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.cikis-btn svg { width: 19px; height: 19px; }
.cikis-btn:hover { background: var(--danger-light); color: var(--danger); border-color: #fecdd3; text-decoration: none; transform: translateY(-1px); }

/* ----- ALT SATIR: pill menü ----- */
.topbar-nav { border-top: 1px solid rgba(226, 232, 240, .65); }
.nav {
    max-width: var(--wrap); margin: 0 auto; min-width: 0;
    padding: 9px 22px 11px;
    display: flex; align-items: center; gap: 6px;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }
.nav-oge {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 13px;
    color: var(--text-2); font-weight: 600; font-size: 14px;
    white-space: nowrap; flex: 0 0 auto;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease,
                transform .18s cubic-bezier(.2, .7, .3, 1);
}
.nav-oge:hover {
    background: var(--surface); color: var(--text); text-decoration: none;
    box-shadow: var(--shadow-sm); transform: translateY(-1px);
}
.nav-oge.active {
    color: #fff; background: var(--grad);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 10px 20px -7px rgba(46, 117, 182, .65);
}
.nav-oge.active:hover { transform: translateY(-1px); }
.nav-ico { display: inline-flex; }
.nav-ico svg { width: 18px; height: 18px; display: block; opacity: .85; transition: opacity .18s ease; }
.nav-oge:hover .nav-ico svg, .nav-oge.active .nav-ico svg { opacity: 1; }
.nav-rozet {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 19px; height: 19px; padding: 0 6px; margin-left: 2px;
    background: linear-gradient(135deg, #fb7185, var(--danger)); color: #fff; border-radius: 999px;
    font-size: 11px; font-weight: 800; line-height: 1;
    box-shadow: 0 3px 8px -2px rgba(225, 29, 72, .5);
}
.nav-oge.active .nav-rozet { background: #fff; color: var(--danger); box-shadow: none; }
.nav-rozet { position: relative; isolation: isolate; }
.nav-oge:not(.active) .nav-rozet::after {                     /* nabız halkası: yalnız transform + opacity (yeniden boyama yok) */
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; z-index: -1;
    background: rgba(225, 29, 72, .5); animation: rozetPulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes rozetPulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.75); opacity: 0; } }

/* ---------- Süperadmin istatistik kartları ---------- */
.sa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.sa-stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; transform-origin: 50% 0; }
.sa-stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .16s ease; }
.sa-stat:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-lg); text-decoration: none; }
.sa-stat:hover::before { opacity: 1; }
.sa-stat .n { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--primary); }
.sa-stat .l { font-size: 13px; color: var(--text-2); font-weight: 600; }
.sa-stat.vurgu { border-color: #fcd34d; background: #fffbeb; }
.sa-stat.vurgu .n { background: none; -webkit-text-fill-color: #b45309; color: #b45309; }

/* Kart sürükle-bırak sıralama (süperadmin paneli) */
.reorder-ipucu { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); margin: 2px 0 10px; }
.reorder-ipucu svg { color: var(--primary); opacity: .75; flex: 0 0 auto; }
[data-reorder] [data-kart] { cursor: grab; }
[data-reorder] [data-kart]:active { cursor: grabbing; }
[data-kart].suru { opacity: .5; transform: scale(.97) rotate(-1.2deg); box-shadow: var(--shadow-lg); }
/* Panel düzeni kartı (sürükleme tutamaçlı) */
.pd-kart { position: relative; }
.pd-tut { position: absolute; top: 12px; right: 12px; color: #cbd5e1; transition: color .15s ease; }
.pd-kart:hover .pd-tut { color: var(--primary); }

/* ---------- KVKK metni ---------- */
.kvkk-metin h2 { font-size: 15px; margin: 18px 0 6px; color: var(--text); }
.kvkk-metin p, .kvkk-metin li { color: var(--text); line-height: 1.6; font-size: 14px; }
.kvkk-metin ul { margin: 6px 0 6px 18px; }

/* ---------- Düzen ---------- */
.container { max-width: var(--wrap); margin: 0 auto; padding: 28px 22px 96px; }
.container-narrow { max-width: var(--wrap); margin: 0 auto; padding: 28px 22px 110px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.page-head p { margin: 0; color: var(--text-2); }

/* ---------- Kartlar ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card + .card { margin-top: 18px; }

/* Belge türü seçim kartları (dashboard) */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.doc-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    color: var(--text);
    transform-origin: 50% 0;   /* hover'da üstten büyür: alt kenar imlecin altından çekilmez (hover titremesi olmaz) */
}
.doc-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.doc-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    text-decoration: none;
}
.doc-card:hover::before { opacity: 1; }
.doc-ico {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    color: #fff; box-shadow: 0 8px 16px -7px rgba(15, 23, 42, .35);
    transition: transform .18s ease;
}
.doc-card:hover .doc-ico { transform: scale(1.06) rotate(-3deg); }
.doc-card h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.doc-card p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.doc-card .go {
    margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary); font-weight: 700; font-size: 14px;
}
.doc-card .go svg { transition: transform .18s ease; }
.doc-card:hover .go svg { transform: translateX(4px); }

/* Kompakt kartlar: 901px ve üstünde 1 sırada 4 kart (721px altı mobil.css'in kendi düzeni geçerli; tablet 721–900px otomatik sütun) */
@media (min-width: 721px) {
    .doc-grid { gap: 14px; }
    .doc-card { gap: 8px; padding: 16px 16px 14px; }
    .doc-ico { width: 42px; height: 42px; border-radius: 12px; }
    .doc-ico svg { width: 22px; height: 22px; }
    .doc-card h3 { font-size: 15px; }
    .doc-card p { font-size: 12.5px; line-height: 1.45; }
    .doc-card .go { font-size: 13px; }
    .doc-card .kart-yeni { top: 10px; right: 10px; }
}
@media (min-width: 901px) {
    .doc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== "Yeni" etiketi (ULTRA MODERN) ===== */
.kart-yeni {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 11px; border-radius: 999px;
    background: linear-gradient(135deg, #fb7185, #f59e0b);
    color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
    box-shadow: 0 6px 16px -4px rgba(244, 63, 94, .6);
    overflow: hidden;
}
.kart-yeni::before { content: "✦"; font-size: 9px; line-height: 1; }
.kart-yeni::after {
    content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
    transform: translateX(-160%) skewX(-20deg); animation: yeniShine 2.8s ease-in-out infinite;
}
@keyframes yeniShine { 0%, 55% { transform: translateX(-160%) skewX(-20deg); } 100% { transform: translateX(310%) skewX(-20deg); } }
@media (prefers-reduced-motion: reduce) { .kart-yeni::after { animation: none; } }

/* Panel Düzeni: "Yeni" toggle + canlı önizleme (:has destekliyse anlık) */
.pd-kart .kart-yeni { display: none; }
.pd-kart:has(.pd-yeni input:checked) .kart-yeni { display: inline-flex; }
.pd-yeni {
    margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 7px 11px; border: 1px dashed var(--border); border-radius: 10px;
    font-size: 12.5px; font-weight: 600; color: var(--text-2); user-select: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pd-kart:has(.pd-yeni input:checked) .pd-yeni {
    border-style: solid; border-color: var(--accent); color: var(--accent); background: rgba(34, 166, 153, .08);
}
.pd-yeni input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ===== Kart imza animasyonu (fare ile gelince / dokununca) — ULTRA MODERN imza atma ===== */
/* Sürücü: assets/js/app.js. Kartta .imza-aktif sınıfı varken: imza çizgisi çekilir, imza ve kalem JS ile (rAF) çizilir,
   sonunda onay mührü yaylanır. Tarayıcı uyumu için offset-path / pathLength / SVG içi filter / inset KULLANILMAZ:
   kalem konumu path.getPointAtLength() ile, çizim uzunluğu getTotalLength() ile hesaplanır (Chrome, Firefox, Safari, eski WebView). */
.imza-katman {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none;
    display: flex; justify-content: flex-end; align-items: flex-end; padding: 6px 10px; opacity: 0; transition: opacity .25s ease;
}
.doc-card.imza-aktif .imza-katman { opacity: 1; }
/* 170x58 koordinat alanı korunur (kalem yola hizalı kalsın); görsel olarak küçültülür (ölçeği JS kart genişliğine göre ayarlar) */
.imza-box { position: relative; flex: 0 0 auto; width: 170px; height: 58px; transform: scale(.66); transform-origin: 100% 100%; }
/* "imza çizgisi" (sign-here taban çizgisi) */
.imza-line {
    position: absolute; left: 2px; right: 2px; bottom: 9px; height: 0;
    border-bottom: 2px dotted #c2ccda; transform: scaleX(0); -webkit-transform: scaleX(0); transform-origin: left center;
}
.doc-card.imza-aktif .imza-line { animation: imzaLine .4s ease forwards; }
@keyframes imzaLine { to { transform: scaleX(1); } }
/* imza (kendini çizen el yazısı) — gölge SVG kökünde (Safari SVG alt öğelerinde CSS filter'ı desteklemez) */
.imza-svg { position: absolute; top: 0; left: 0; width: 170px; height: 58px; overflow: visible; filter: drop-shadow(0 1px 1px rgba(15,23,42,.18)); }
.imza-svg path { fill: none; stroke: #1e293b; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
/* kalem — konumunu/açısını JS her karede yolun üstünde ayarlar; ucu yola yapışık */
.imza-kalem {
    position: absolute; top: 0; left: 0; width: 30px; height: 30px; color: #0f172a; opacity: 0;
    transform-origin: 0 0; filter: drop-shadow(0 6px 8px rgba(15,23,42,.32));
}
.imza-kalem svg { width: 100%; height: 100%; display: block; }
/* onay mührü — imza biter bitmez yaylanarak gelir + parıltı halkası */
.imza-muhur {
    position: absolute; top: 2px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--success); color: #fff; display: grid; place-items: center;
    opacity: 0; transform: scale(.2); box-shadow: 0 8px 16px -5px rgba(22,163,74,.6);
}
.imza-muhur svg { width: 15px; height: 15px; }
.imza-muhur::after { content: ""; position: absolute; top: -7px; right: -7px; bottom: -7px; left: -7px; border-radius: 50%; border: 2px solid var(--success); opacity: 0; }
.doc-card.imza-aktif .imza-muhur { animation: imzaMuhur .55s cubic-bezier(.34,1.56,.64,1) 1.2s forwards; }
.doc-card.imza-aktif .imza-muhur::after { animation: imzaHalka .6s ease 1.35s forwards; }
@keyframes imzaMuhur { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes imzaHalka { 0% { opacity: .6; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.6); } }
/* Hareketi azalt: imza ve onay mührü hareketsiz, doğrudan tamamlanmış görünür */
@media (prefers-reduced-motion: reduce) {
    .doc-card.imza-aktif .imza-line { animation: none; transform: scaleX(1); }
    .doc-card.imza-aktif .imza-muhur { animation: none; opacity: 1; transform: none; }
    .doc-card.imza-aktif .imza-muhur::after { animation: none; opacity: 0; }
}

/* ---------- Butonlar ---------- */
.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: background .18s ease, box-shadow .2s ease, transform .12s ease, border-color .15s, filter .15s;
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }
/* Dolgu butonlarda kayan parıltı */
.btn-primary::after, .btn-accent::after, .btn-danger::after {
    content: ""; position: absolute; top: 0; left: -125%; width: 55%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.32), transparent);
    transform: skewX(-18deg); transition: left .6s ease; pointer-events: none;
}
.btn-primary:hover::after, .btn-accent:hover::after, .btn-danger:hover::after { left: 145%; }
.btn-primary { background: var(--grad); background-size: 160% 100%; color: #fff; box-shadow: 0 9px 22px -10px rgba(46,117,182,.6); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 13px 28px -10px rgba(46,117,182,.7); transform: translateY(-1px); text-decoration: none; color:#fff; }
.btn-accent { background: linear-gradient(120deg, var(--accent), #15b8a6); color: #fff; box-shadow: 0 9px 22px -10px rgba(34,166,153,.55); }
.btn-accent:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 13px 28px -10px rgba(34,166,153,.65); color: #fff; text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: #cbd5e1; text-decoration: none; color: var(--text); }
.btn-danger { background: linear-gradient(120deg, #f43f5e, var(--danger)); color: #fff; box-shadow: 0 9px 22px -10px rgba(225,29,72,.5); }
.btn-danger:hover { transform: translateY(-1px); filter: brightness(1.03); color: #fff; text-decoration: none; }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-block { width: 100%; }
/* Pasif (kaydedilmeden yazdır/pdf): soluk + tıklanamaz görünüm; hover'da uyarı tooltip'i çıkar. */
.btn-pasif { opacity: .5; filter: grayscale(.4); cursor: not-allowed; box-shadow: none !important; }
.btn-pasif:hover { transform: none !important; filter: grayscale(.4); background-position: 0 0 !important; }
.btn-pasif::after { display: none !important; }

/* ---------- "Talepte Bulun" — dikkat çekici, animasyonlu (boyut btn-sm) ---------- */
.btn-talep {
    color: #fff !important; border: 0;
    background: linear-gradient(120deg, #2E75B6, #0EA5E9 55%, #22A699);
    box-shadow: 0 7px 18px -6px rgba(46, 117, 182, .65);
}
.btn-talep:hover { color: #fff; text-decoration: none; transform: translateY(-1px); filter: brightness(1.04); }
.btn-talep .bt-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 6px; background: rgba(255, 255, 255, .22);
    margin-right: 7px; animation: btTalepIco 2.4s ease-in-out infinite;
}
.btn-talep .bt-yazi { position: relative; z-index: 1; }
/* içinden geçen parıltı — YALNIZCA transform (kompozitörde çalışır; left/background-position/box-shadow animasyonu her karede
   sayfayı yeniden boyar ve kasmaya yol açar) */
.btn-talep .bt-spark {
    position: absolute; top: 0; left: 0; width: 55%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: translateX(-250%) skewX(-18deg); pointer-events: none; animation: btTalepShine 3.4s ease-in-out infinite;
}
@keyframes btTalepIco { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.12); } }
@keyframes btTalepShine { 0%, 55% { transform: translateX(-250%) skewX(-18deg); } 78%, 100% { transform: translateX(300%) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) {
    .btn-talep, .btn-talep .bt-ico, .btn-talep .bt-spark { animation: none; }
    .btn-talep .bt-spark { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn-primary::after, .btn-accent::after, .btn-danger::after { display: none; } }

/* ---------- Formlar ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.col-2 { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13.5px; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-2); }
.field .req { color: var(--danger); }

input[type=text], input[type=password], input[type=email], input[type=date],
input[type=number], input[type=tel], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
/* Kutu içi ipuçları (placeholder) daha soluk */
input::placeholder, textarea::placeholder { color: #b4bfcc; opacity: 1; }
input.locked, input[readonly], textarea[readonly] {
    background: #f1f5f9;
    color: var(--text-2);
    cursor: default;
}
input.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
.err-msg { color: var(--danger); font-size: 12px; }

/* ---------- Ekle/Sil tekrarlı alanlar (repeater) ---------- */
.repeater { display: flex; flex-direction: column; gap: 8px; }
.repeater-items { display: flex; flex-direction: column; gap: 8px; }
.repeater-row { display: flex; gap: 8px; align-items: flex-start; }
.repeater-row .ix {
    flex: 0 0 auto; width: 26px; height: 44px;
    display: grid; place-items: center;
    color: var(--text-2); font-weight: 700; font-size: 13px;
}
.repeater-row > input, .repeater-row > textarea { flex: 1; }
.repeater-del {
    flex: 0 0 auto; width: 40px; min-height: 44px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--danger); border-radius: var(--radius-sm);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.repeater-del:hover { background: var(--danger-light); border-color: var(--danger); }
.repeater-add { align-self: flex-start; }
/* Eşli (ad + ünvan) üye repeater */
.repeater-row > input.repeater-pair { flex: 0 0 150px; }
/* Sıralama (yukarı/aşağı) butonları */
.repeater-move {
    flex: 0 0 auto; width: 32px; min-height: 44px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); border-radius: var(--radius-sm);
    font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.repeater-move:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
@media (max-width: 480px) { .repeater-move { width: 28px; } }
.repeater-uye-head { display: flex; gap: 8px; padding: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.repeater-uye-head span:nth-child(1) { flex: 0 0 26px; }
.repeater-uye-head span:nth-child(2) { flex: 1; }
.repeater-uye-head span:nth-child(3) { flex: 0 0 150px; }
.repeater-uye-head span:nth-child(4) { flex: 0 0 40px; }
/* Üç alanlı repeater (ad + görev + sınıf) başlık satırı — sütunlar satırlarla hizalı */
.repeater-head { display: flex; gap: 8px; padding: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.repeater-head span:nth-child(1) { flex: 0 0 26px; }
.repeater-head span:nth-child(2) { flex: 1; }
.repeater-head span:nth-child(3),
.repeater-head span:nth-child(4) { flex: 0 0 150px; }
.repeater-head span:nth-child(5) { flex: 0 0 40px; }
@media (max-width: 480px) {
    .repeater-row > input.repeater-pair, .repeater-uye-head span:nth-child(3) { flex-basis: 108px; }
    .repeater-head span:nth-child(3), .repeater-head span:nth-child(4) { flex-basis: 108px; }
}

/* ---------- Zengin metin editörü + görüşme blokları ---------- */
.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.rte-toolbar button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 30px; border: 1px solid transparent; background: transparent;
    border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text); line-height: 1;
}
.rte-toolbar button:hover { background: var(--primary-light); color: var(--primary); }
.rte-toolbar button svg { display: block; }
.rte-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.rte-editor { min-height: 92px; padding: 10px 12px; outline: none; line-height: 1.55; }
.rte-editor:focus { box-shadow: inset 0 0 0 2px var(--primary-light); }
.rte-editor ul, .rte-editor ol { margin: 4px 0; padding-left: 22px; }
.rte-editor p, .rte-editor div { margin: 0 0 6px; }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--text-2); }
.gorusme-block { margin-bottom: 16px; }
.gorusme-baslik { font-weight: 600; margin-bottom: 6px; color: var(--primary-dark); }

/* Faaliyet ek dosya yönetimi (fotoğraf / materyal / word) */
.dosya-yonetim { display: flex; flex-direction: column; gap: 4px; }
.dosya-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.dosya-liste:empty { display: none; }
.dosya-item { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 32px 6px 8px; background: var(--surface); font-size: 13px; max-width: 100%; }
.dosya-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.dosya-item .ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.dosya-sil { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(225,29,72,.9); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.dosya-sil:hover { background: #be123c; }
.dosya-yonetim [data-dosya-ekle] { align-self: flex-start; margin-top: 4px; }

/* Servis çizelgesi grup kartları */
.grup-items { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.grup-kart { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fafcff; }
.grup-kart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.grup-kart-head .gno { font-weight: 700; color: var(--text-2); font-size: 13px; }
.grup-sil { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; color: var(--danger); border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.grup-sil:hover { background: var(--danger-light); border-color: var(--danger); }
.grup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grup-grid .field label { font-size: 12px; }

/* Günlük plan: etkinlik kartları (repeater) */
.etk-items { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.etk-kart { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fafcff; }
.etk-kart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.etk-kart-head .eno { font-weight: 700; color: var(--primary); font-size: 13.5px; }
.etk-sil { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; color: var(--danger); border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.etk-sil:hover { background: var(--danger-light); border-color: var(--danger); }
.etk-kart .form-grid { gap: 12px; }
.etk-kart .field label { font-size: 12.5px; }

/* Proje takvimi satırları */
.takvim-head, .takvim-row { display: grid; grid-template-columns: 70px 150px 1.1fr 1.9fr 40px; gap: 8px; align-items: start; }
.takvim-head { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.takvim-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.takvim-row .hafta { padding-top: 11px; font-weight: 700; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.takvim-row .repeater-del { height: 44px; }

/* İmza sirküsü satırları (Veli + Çocuk + İmza) */
.imza-head, .imza-row { display: grid; grid-template-columns: 34px 1fr 1fr 44px; gap: 8px; align-items: center; }
.imza-head { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.imza-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.imza-row .sn { text-align: center; color: var(--text-2); font-weight: 700; font-size: 13px; }

.section-title {
    grid-column: 1 / -1;
    margin: 8px 0 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 15px; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 9px;
}
.section-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 3px;
    background: var(--grad); flex: 0 0 auto;
}

/* ---------- Sihirbaz (wizard) adımları ---------- */
.wizard-steps {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.wizard-steps .step {
    flex: 1 1 0; min-width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
}
.wizard-steps .step .num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--border); color: var(--text-2);
    display: grid; place-items: center; font-size: 12px;
    flex: 0 0 auto;
}
.wizard-steps .step.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.wizard-steps .step.active .num { background: var(--primary); color: #fff; }
.wizard-steps .step.done .num { background: var(--accent); color: #fff; }
.wizard-page { display: none; }
.wizard-page.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Yapışkan alt eylem çubuğu ---------- */
.action-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 12px 22px;
    display: flex; gap: 10px; align-items: center;
}
.action-bar .inner { max-width: var(--wrap); margin: 0 auto; width: 100%; display: flex; gap: 10px; align-items: center; }
.action-bar .spacer { flex: 1; }

/* Saklama türü seçici (Kaydet'in yanında): Kalıcı / Geçici */
.saklama-sec { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.saklama-sec select {
    height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px;
    background-color: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.saklama-sec select:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.save-state { font-size: 12.5px; color: var(--text-2); }

/* ---------- Tablolar (Belgelerim, kullanıcılar) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: #f8fafc; font-weight: 600; color: var(--text-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fafcff; }
.tag {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap;
}
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* Belgelerim: Son Düzenleyen + düzenleyen notu */
.son-duz { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13.5px; }
.son-duz.farkli { color: var(--primary); }
.son-duz-tarih { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; white-space: nowrap; }
.not-ikon { display: inline-flex; color: var(--warning); cursor: help; }
.not-ikon svg { display: block; }
/* Düzenleyenin "evrak sahibine not" kartı (form altında, enjekte) */
.sahip-not-kart { margin-top: 4px; border-color: #fcd9b0; background: var(--warning-light); }
.sahip-not-kart .snk-label { display: block; font-weight: 700; color: #92400e; margin-bottom: 8px; }
.sahip-not-kart textarea { width: 100%; }

/* ---------- Flash / uyarılar ---------- */
.flash { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.flash.success { background: var(--success-light); color: #14532d; border-color: #bbf7d0; }
.flash.error { background: var(--danger-light); color: #9f1239; border-color: #fecdd3; }
.flash.info { background: var(--primary-light); color: var(--primary-dark); border-color: #bfdbfe; }
.flash.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ---------- Taslaklar kartı ---------- */
.taslak-kart { border-color: #fde68a; background: #fffdf6; }
.taslak-baslik { display: flex; align-items: center; gap: 9px; color: #b45309; margin-bottom: 12px; }
.taslak-baslik h2 { font-size: 17px; margin: 0; color: inherit; }
.taslak-sayi {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
    padding: 0 7px; margin-left: 4px; border-radius: 999px; background: #f59e0b; color: #3b1d02;
    font-size: 12px; font-weight: 700; vertical-align: middle;
}
.taslak-uyari { margin-bottom: 14px; }

/* ---------- Giriş ekranı ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
    radial-gradient(1000px 500px at 100% 0%, rgba(46,117,182,.10), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(34,166,153,.10), transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px 28px; }
.auth-card .brand { justify-content: center; margin-bottom: 6px; font-size: 18px; }
.auth-card h1 { font-size: 21px; text-align: center; margin: 8px 0 4px; }
.auth-card .sub { text-align: center; color: var(--text-2); margin: 0 0 22px; font-size: 14px; }
.demo-box { margin-top: 18px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-2); }
.demo-box code { background: #fff; border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text); }

.empty {
    text-align: center; padding: 48px 20px; color: var(--text-2);
}
.empty svg { color: var(--border); margin-bottom: 10px; }

.logo-prev { display:flex; align-items:center; gap:14px; margin-top:6px; }
.logo-prev img { height: 64px; width:auto; border:1px solid var(--border); border-radius:8px; background:#fff; padding:4px; }

/* ---------- Evrak Sevk / İnceleme ---------- */
.sayac {
    display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary-dark);
    font-size: 12px; font-weight: 600; vertical-align: middle;
}
.sevk-rozet {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: #fff;
}

.sevk-belge { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sevk-belge strong { font-size: 15px; }

.sevk-akis { display: flex; flex-direction: column; gap: 12px; }
.sevk-kart {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.sevk-kart.bekliyor { border-left: 3px solid var(--primary); }
.sevk-kart-ust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sevk-kart-ust .sevk-baslik { font-size: 15px; }
.sevk-tarih { margin-left: auto; color: var(--text-2); font-size: 12.5px; }
.sevk-kim { color: var(--text-2); font-size: 13.5px; }
.sevk-not, .sevk-serh { margin-top: 8px; font-size: 13.5px; background: var(--bg); border-radius: 8px; padding: 8px 11px; }
.sevk-serh { background: var(--warning-light); }
.sevk-not .etk, .sevk-serh .etk { font-weight: 600; color: var(--text-2); }
.sevk-aksiyon { margin-top: 10px; }

.sevk-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sevk-form textarea { width: 100%; }
.sevk-secim { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
    font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface);
    transition: all .12s ease;
}
.radio-pill input { accent-color: var(--primary); margin: 0; }
.radio-pill.onay:has(input:checked)   { border-color: var(--success); background: var(--success-light); color: #14532d; }
.radio-pill.duzelt:has(input:checked) { border-color: var(--warning); background: var(--warning-light); color: #92400e; }

/* Silinme tarihi (saklama politikası) */
.silinme { display: inline-flex; flex-direction: column; line-height: 1.25; font-size: 13px; }
.silinme em { font-style: normal; font-size: 11px; color: var(--text-2); }
.silinme.yakin { color: var(--danger); }
.silinme.yakin em { color: var(--danger); font-weight: 600; }

/* ---------- Kompakt belge tablosu + ikon aksiyonlar ---------- */
table.data th, table.data td { padding: 9px 12px; vertical-align: middle; }
table.data th.t-c, table.data td.t-c { text-align: center; }
.row-actions { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: center; align-items: center; }
.row-actions form { display: inline-flex; margin: 0; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text-2); cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); text-decoration: none; }
.icon-btn.danger:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger-light); }
.icon-btn.ok { color: #15803d; }
.icon-btn.ok:hover { background: var(--success-light); color: #15803d; border-color: var(--success-light); }

/* ---------- Öğretmen belge izinleri (ayarlar) ---------- */
.izin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.izin-kutu {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); font-weight: 500; font-size: 14px;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.izin-kutu:hover { border-color: var(--primary); }
.izin-kutu input { width: 17px; height: 17px; accent-color: var(--primary); flex: 0 0 auto; margin: 0; }
.izin-kutu:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }

/* ---------- Profil ---------- */
a.user-chip { color: inherit; text-decoration: none; transition: border-color .12s ease, box-shadow .12s ease; }
a.user-chip:hover { border-color: var(--primary); text-decoration: none; }
a.user-chip.active { border-color: var(--primary); box-shadow: var(--ring); }
.profil-ust { display: flex; align-items: center; gap: 14px; }
.profil-ust strong { font-size: 16px; margin-right: 8px; }
.profil-avatar {
    width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 640px; max-height: 86vh; display: flex; flex-direction: column;
    animation: modalIn .16s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 15.5px; }
.modal-kapat {
    border: none; background: var(--bg); color: var(--text-2); cursor: pointer;
    width: 28px; height: 28px; border-radius: 8px; font-size: 20px; line-height: 1;
}
.modal-kapat:hover { background: var(--danger-light); color: var(--danger); }
.modal-govde { padding: 12px 16px; overflow-y: auto; }

/* ---------- Evrak geçmişi listesi ---------- */
.gecmis-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gecmis-liste li {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.gecmis-liste li.silindi { background: var(--bg); opacity: .8; }
.gecmis-liste li.silindi .gecmis-ad { text-decoration: line-through; color: var(--text-2); }
.gecmis-ad { font-weight: 600; font-size: 14px; flex: 1 1 160px; }
.gecmis-zaman { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.gecmis-silindi { color: var(--danger); }

/* ---------- Sınıf Listesi ---------- */
.sinif-ai-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sinif-ai-durum.calisiyor { color: var(--primary); font-weight: 600; }
.sinif-ai-durum.ok { color: var(--success); font-weight: 600; }
.sinif-ai-durum.hata { color: var(--danger); font-weight: 600; }
.sinif-rows { list-style: none; counter-reset: ogr; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sinif-row { counter-increment: ogr; display: flex; align-items: center; gap: 10px; }
.sinif-row::before { content: counter(ogr) "."; flex: 0 0 26px; text-align: right; color: var(--text-2); font-weight: 600; font-size: 13px; }
.sinif-row input { flex: 1 1 auto; }
.sinif-sil { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; }
.sinif-sil:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger-light); }
.sinif-sayac { margin-left: 10px; }
#sinifListem:target { animation: hedefVurgu 1.6s ease; }
@keyframes hedefVurgu {
    0%, 35% { box-shadow: 0 0 0 3px rgba(46, 117, 182, .45); }
    100%    { box-shadow: var(--shadow-sm); }
}

/* ---------- Kazanım/Gösterge Seçici ---------- */
.modal-box.modal-lg { max-width: 900px; }
.kz-arac { padding: 9px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.kz-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.kz-tab {
    padding: 5px 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
    border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.kz-tab:hover { border-color: var(--primary); color: var(--primary); }
.kz-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.kz-ara { width: 100%; }
.kz-govde { background: var(--bg); flex: 1 1 auto; min-height: 0; }
.kz-kazanim { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; margin-bottom: 6px; }
.kz-kazanim-head { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; font-weight: 700; color: var(--text); line-height: 1.25; font-size: 13px; }
.kz-kazanim-head input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.kz-no { color: var(--primary); white-space: nowrap; }
.kz-gostergeler { margin: 5px 0 0; padding-left: 21px; display: flex; flex-direction: column; gap: 3px; }
.kz-gosterge { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; font-size: 12.5px; color: var(--text); font-weight: 400; line-height: 1.25; }
.kz-gosterge input { width: 14px; height: 14px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.kz-gosterge:hover { color: var(--primary); }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.kz-sayac { margin: 0; }

/* ---------- Kavram Seçici ---------- */
.kv-ekle-bar { display: flex; gap: 6px; }
.kv-ekle-input { flex: 1 1 auto; }
.kv-govde { background: var(--bg); }
.kv-kategori { margin-bottom: 10px; }
.kv-kategori-baslik { font-weight: 700; color: var(--primary-dark); font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 5px; padding-bottom: 3px; border-bottom: 1px solid var(--border); }
.kv-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.kv-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12.5px; cursor: pointer; }
.kv-item input { width: 14px; height: 14px; accent-color: var(--primary); margin: 0; flex: 0 0 auto; }
.kv-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.kv-ozel { border-style: dashed; }
.kv-ozel-sil { border: none; background: transparent; color: var(--text-2); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 2px; }
.kv-ozel-sil:hover { color: var(--danger); }

/* ---------- Değer Seçici ---------- */
.dg-govde { background: var(--bg); }
.dg-liste { display: flex; flex-direction: column; gap: 7px; }
.dg-eklenen-bolum { margin-bottom: 12px; }
.dg-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.dg-item input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.dg-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.dg-metin { display: flex; flex-direction: column; gap: 1px; }
.dg-ad { font-weight: 700; font-size: 13.5px; color: var(--text); }
.dg-aciklama { font-size: 12px; color: var(--text-2); line-height: 1.3; }
.dg-ozel { align-items: center; border-style: dashed; }
.dg-ozel .kv-ozel-sil { margin-left: auto; }

/* Etkinlik kartı: Değer Seç butonu — Sözcükler input kutusuyla aynı boyut */
.deger-sec-btn {
    width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
    padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--primary);
    transition: border-color .15s, box-shadow .15s;
}
.deger-sec-btn:hover { border-color: var(--primary); box-shadow: var(--ring); }
.etk-deger-onizleme { margin: 0; }

/* Kazanım seçici — kart genişliğinde büyük buton + özet */
.btn-kazanim-sec {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 16px 18px; border: none; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; cursor: pointer; box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease;
}
.btn-kazanim-sec:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-kazanim-sec svg { flex: 0 0 auto; }
.btn-kazanim-sec .bks-metin { display: flex; flex-direction: column; gap: 2px; }
.btn-kazanim-sec .bks-ust { font-size: 16px; font-weight: 700; }
.btn-kazanim-sec .bks-alt { font-size: 12.5px; opacity: .92; font-weight: 500; }
.btn-kazanim-sec.sm { padding: 11px 14px; gap: 10px; box-shadow: var(--shadow-sm); }
.btn-kazanim-sec.sm .bks-ust { font-size: 14px; }
.btn-kazanim-sec.sm .bks-alt { font-size: 11.5px; }
.etk-kazanim { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 2px; }
.kazanim-onizleme { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.kazanim-onizleme .ko-satir {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 13px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); flex-wrap: wrap;
}
.kazanim-onizleme .ko-alan { font-weight: 600; font-size: 13.5px; color: var(--text); }
.kazanim-onizleme .ko-say { font-size: 12.5px; color: var(--primary); font-weight: 600; }

/* ---------- Modern tooltip (floating, body'e eklenir, kırpılmaz) ---------- */
.tip-pop {
    position: fixed; z-index: 200; max-width: 300px;
    background: #0f172a; color: #fff; font-size: 12.5px; line-height: 1.45; font-weight: 500;
    padding: 9px 13px; border-radius: 11px; border-left: 3px solid #94a3b8;
    box-shadow: 0 14px 32px -10px rgba(15, 23, 42, .55);
    pointer-events: none; opacity: 0; transform: translateY(5px) scale(.97);
    transition: opacity .16s ease, transform .16s ease;
}
.tip-pop.show { opacity: 1; transform: translateY(0) scale(1); }
.tip-pop.duzeltme { border-left-color: var(--warning); }
.tip-pop.uygun, .tip-pop.onaylandi { border-left-color: var(--success); }
.tip-pop.bekliyor, .tip-pop.inceleme { border-left-color: var(--accent-2); }
.tip-pop.reddedildi { border-left-color: var(--danger); }
.tip-pop::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #0f172a; }
.tip-pop.alt::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0f172a; }
[data-tip] { cursor: help; }

/* ---------- Düzeltme talebi modalı (ultra modern) ---------- */
.dz-modal { max-width: 480px; overflow: hidden; padding: 0; }
.dz-modal-bar { height: 4px; background: linear-gradient(90deg, #f59e0b, var(--warning)); }
.dz-modal-ust { display: flex; align-items: flex-start; gap: 13px; padding: 18px 18px 8px; }
.dz-ikon { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
    background: var(--warning-light); color: var(--warning); }
.dz-modal-ust h2 { margin: 0; font-size: 18px; }
.dz-alt { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.dz-modal-ust .modal-kapat { margin-left: auto; }
.dz-form { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 7px; }
.dz-form label { font-weight: 700; font-size: 13.5px; }
.dz-not { margin: 0; font-size: 12.5px; color: var(--text-2); }
.dz-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Anasayfa arka planı: silik, süzülen evrak animasyonları ---------- */
.dash-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.dash-bg .doc {
    position: absolute; display: block; opacity: .055;
    animation-name: dashFloatA; animation-timing-function: ease-in-out;
    animation-iteration-count: infinite; will-change: transform;
}
.dash-bg .doc svg { display: block; width: 100%; height: 100%; }
.dash-bg .doc.b { animation-name: dashFloatB; }
.dash-bg .doc.c { animation-name: dashFloatC; }
.dash-bg .doc.faint { opacity: .04; }
@keyframes dashFloatA {
    0%   { transform: translateY(0) rotate(-8deg); }
    50%  { transform: translateY(-34px) rotate(5deg); }
    100% { transform: translateY(0) rotate(-8deg); }
}
@keyframes dashFloatB {
    0%   { transform: translateY(0) rotate(7deg); }
    50%  { transform: translateY(30px) rotate(-7deg); }
    100% { transform: translateY(0) rotate(7deg); }
}
@keyframes dashFloatC {
    0%   { transform: translate(0,0) rotate(0deg); }
    50%  { transform: translate(22px,-26px) rotate(12deg); }
    100% { transform: translate(0,0) rotate(0deg); }
}
/* İçerik dekoratif katmanın üstünde kalsın */
.container, .container-narrow { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .dash-bg .doc { animation: none; } }
@media (prefers-reduced-motion: reduce) {
    .nav-oge:not(.active) .nav-rozet::after { animation: none; display: none; }
    .nav-oge, .nav-oge:hover, .user-chip:hover, .brand:hover .brand-mark, .cikis-btn:hover { transform: none; }
}

/* ---------- Orta ekran: menü kendi satırında olduğundan etiketler kalır, gerekirse yatay kaydırılır ---------- */
@media (max-width: 1000px) {
    .topbar-top, .nav, .container, .container-narrow { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Evrak Talepleri: genişleyebilir liste ---------- */
.talep-liste { display: flex; flex-direction: column; gap: 10px; }
.talep-sat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.talep-sat.bekliyor { border-left: 3px solid var(--primary); }
.talep-sat[open] { box-shadow: var(--shadow); }
.talep-ozet {
    display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
    list-style: none; user-select: none;
}
.talep-ozet::-webkit-details-marker { display: none; }
.talep-ozet:hover { background: var(--bg); }
.talep-nokta { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.talep-bilgi { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.talep-ad { font-size: 14.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talep-meta { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talep-rozetler { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.talep-ek { display: inline-flex; color: var(--text-2); }
.talep-ok { display: inline-flex; color: var(--text-2); flex: 0 0 auto; transition: transform .2s ease; }
.talep-sat[open] .talep-ok { transform: rotate(180deg); }
.talep-govde { padding: 4px 16px 16px; border-top: 1px dashed var(--border); }
.talep-aciklama { margin: 12px 0; font-size: 13.5px; background: var(--bg); border-radius: 8px; padding: 9px 12px; }
.talep-aciklama .etk { font-weight: 600; color: var(--text-2); }
.talep-form { margin-top: 8px; }
.talep-sil-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.talep-sil-not { font-size: 12px; color: var(--text-2); }
@media (max-width: 560px) {
    .talep-meta { white-space: normal; }
    .talep-rozetler .tag { display: none; }
    .talep-rozetler .tag:last-child { display: inline-block; }
}

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .container, .container-narrow { padding: 18px 16px 110px; }
    .topbar-top { padding: 12px 16px 10px; }
    .nav { padding: 8px 16px 10px; gap: 5px; }
    .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
    .brand-text .full { font-size: 16.5px; }
    .brand-alt { display: none; }
    .user-chip .user-meta { display: none; }   /* dar ekranda yalnız avatar */
    .user-chip { padding: 4px; gap: 0; }
    .topbar-actions { gap: 6px; }
    .wizard-steps .step { min-width: calc(50% - 4px); }
    .action-bar .inner { flex-wrap: wrap; }
    .action-bar .btn { flex: 1 1 auto; }
    .page-head h1 { font-size: 22px; }
    /* iOS: input'a dokununca otomatik yakınlaştırmayı önle (>=16px) */
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: 16px; }
    /* Marka adı asla taşmasın; gerekirse zarifçe kısalsın */
    .brand { min-width: 0; }
    .brand-text { min-width: 0; }
    .brand-text .full { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
    /* Sistem Yöneticisi istatistik kartları: telefonda 2 sütun */
    .sa-stats { grid-template-columns: 1fr 1fr; }
    /* Başlık + aksiyon butonu sığmazsa buton alta tam genişlik */
    .page-head .btn-sm { flex: 1 0 auto; }
}

/* ---------- Stajyer devam ızgarası (form) ---------- */
.devam-kaydir { overflow-x: auto; }
.devam-tablo { border-collapse: collapse; font-size: 13px; }
.devam-tablo th, .devam-tablo td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; }
.devam-tablo th.hafta { background: var(--primary-light, #eef4fb); font-weight: 600; white-space: nowrap; }
.devam-tablo th.gun { font-weight: 500; color: var(--text-2); font-size: 12px; }
.devam-tablo .ad { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.devam-tablo select { min-width: 54px; padding: 2px 4px; font-size: 13px; }
/* Resmî tatil sütunu/hücresi */
.devam-tablo th.tatil { background: #fde8e8; color: #9b1c1c; }
.devam-tablo td.tatil { background: #fdf2f2; }
