/* program.css - Midnight Gold Karargah (Tam Mühür) */

:root {
    --bg-main: #0B1120;
    --bg-card: #172133;
    --text-pure: #FFFFFF;
    --text-muted: #94A3B8;
    --primary: #818CF8;
    --accent: #FBBF24; /* Altın Sarısı */
    --border-soft: rgba(251, 191, 36, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none !important; }
body { background-color: var(--bg-main); font-family: 'Inter', sans-serif; color: var(--text-pure); text-align: center; }

.estetik-cerceve { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* BÜYÜTÜLMÜŞ & FERAH KONTROL PANELİ */
.kontrol-paneli {
    background: var(--bg-card); padding: 35px 50px; border-radius: 35px;
    border: 1px solid var(--border-soft); display: flex; flex-direction: column; 
    gap: 25px; margin: 20px auto 60px; max-width: 1150px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.info-notu {
    background: rgba(129, 140, 248, 0.05); border: 1px dashed var(--primary); padding: 12px;
    border-radius: 15px; font-size: 0.75rem; color: var(--text-muted); text-align: center;
}

.ayar-satiri { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; align-items: center; }
input, select { background: var(--bg-main) !important; border: 1px solid var(--border-soft) !important; color: #fff !important; padding: 12px 18px; border-radius: 12px; font-size: 0.9rem; }

/* BUTON ANİMASYONLARI */
.buton-mühür, .buton-tatil { transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; border: none; padding: 12px 25px; border-radius: 15px; font-weight: 700; }
.buton-mühür { background: var(--primary); color: #fff; }
.buton-mühür:hover { background: var(--accent); color: var(--bg-main); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(251, 191, 36, 0.2); }
.buton-tatil { background: var(--accent) !important; color: var(--bg-main) !important; }
.buton-tatil:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3); }

.buton-pdf { 
    margin-top: 15px; background: transparent; border: 2px solid var(--accent); color: var(--accent); 
    padding: 16px 45px; border-radius: 20px; font-weight: 800; cursor: pointer; align-self: center; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.buton-pdf:hover { background: var(--accent); color: var(--bg-main); transform: scale(1.05); box-shadow: 0 10px 25px rgba(251, 191, 36, 0.2); }

/* PLAN TABLOSU & HAFTALIK İZGARA */
.orman-temasi { background: var(--bg-card) !important; width: 100%; max-width: 1100px; padding: 35px !important; border-radius: 25px; border: 1px solid var(--border-soft); display: flex; flex-direction: column; margin: 0 auto 60px; padding-bottom: 80px !important;}
.pdf-header { border-bottom: 3px solid var(--accent); padding-bottom: 15px; margin-bottom: 25px; }
.pdf-isim { font-family: 'Caveat', cursive; font-size: 2.2rem; color: #fff; text-align: left; background: transparent !important; }

.haftalik-izgara { display: flex !important; gap: 8px; flex-grow: 1; height: 520px; }
.gun-sutunu { flex: 1; border-radius: 12px; background: rgba(11, 17, 32, 0.4); border: 1px solid var(--border-soft); overflow: hidden; display: flex; flex-direction: column; }

/* GÜN BAŞLIKLARI (LACİVERT & ALTIN AYRIMI) */
.gun-basligi { background: #1e293b !important; color: #fff !important; padding: 12px 5px; font-weight: 800; font-size: 0.7rem; text-transform: uppercase; border-bottom: 1px solid var(--border-soft); }
.gun-basligi.haftasonu { background: var(--accent) !important; color: var(--bg-main) !important; }

/* MODERNLEŞTİRİLMİŞ PREMIUM DERS KARTLARI (8 ADET SIĞACAK) */
.ders-listesi { 
    padding: 8px; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    
    /* İŞTE KRİTİK AYARLAR */
    flex-grow: 1;          /* Sütunun kalan tüm boşluğunu kapla der */
    min-height: 300px;     /* Gün boş olsa bile geniş bir tutma alanı bırakır */
    
    overflow-y: auto; 
}
.ders-karti { 
    background: linear-gradient(145deg, #25334a, #172133); border-radius: 10px; padding: 6px 4px; 
    border-left: 5px solid var(--primary); text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); cursor: grab;
}
.ders-karti:hover { border-left-color: var(--accent); transform: scale(1.02); }
.ders-adi-buyuk { font-size: 0.8rem; font-weight: 800; color: #fff; margin-bottom: 3px; }
.konu-adi-kucuk { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 5px; }
.sure-vurgu { font-size: 0.6rem; font-weight: 800; color: #fff; background: rgba(251, 191, 36, 0.15); padding: 3px 10px; border-radius: 20px; display: inline-block; }


/* ==========================================
   PDF MODU (TEK SAYFA & NET TASARIM)
   ========================================== */
.pdf-modu { 
    background-color: #ffffff !important;
    background-image: linear-gradient(rgba(0,0,0,0.08) 1.5px, transparent 1.5px), 
                      linear-gradient(90deg, rgba(0,0,0,0.08) 1.5px, transparent 1.5px) !important;
    background-size: 20px 20px !important; color: #000 !important;
    padding: 10mm !important; margin: 0 !important; width: 297mm !important; 
    min-height: 206mm; max-height: 206mm; overflow: hidden !important; position: relative !important;
}
.pdf-modu .pdf-header h2, .pdf-modu .pdf-isim { color: #000 !important; }
.pdf-modu .gun-sutunu { background: rgba(255,255,255,0.9) !important; border: 1px solid #cbd5e1 !important; }

/* ==========================================
   PDF MODU (BEYAZ PREMIUM KARELİ - TEK SAYFA)
   ========================================== */
.pdf-modu { 
    background-color: #ffffff !important;
    background-image: linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px) !important;
    background-size: 20px 20px !important; color: #000 !important;
    padding: 10mm !important; margin: 0 !important; width: 297mm !important; 
    min-height: 206mm; max-height: 206mm; overflow: hidden !important; position: relative !important;
}
/* PDF BAŞLIK OKUNURLUĞU FİXED */
.pdf-modu .pdf-header h2 { color: #000 !important; }
.pdf-modu .pdf-isim { color: #000 !important; text-shadow: none !important; }

.pdf-modu .gun-sutunu { background: rgba(255,255,255,0.9) !important; border: 1px solid #cbd5e1 !important; }

/* PDF'te Kartların Görünürlük Mührü */
.pdf-modu .ders-karti { 
    background: #f8fafc !important; /* Kareli zeminde net gözükmesi için hafif gri */
    color: #000 !important; 
    border: 1px solid #cbd5e1 !important; 
    border-left: 5px solid #818CF8 !important; 
    box-shadow: none !important; 
}
.pdf-modu .ders-adi-buyuk { color: #000 !important; }
.pdf-modu .sure-vurgu { color: #000 !important; background: #e2e8f0 !important; }
.pdf-modu .ders-listesi { overflow: hidden !important; }

/* Sürüklenen kartın arkasındaki hayalet yer */
.sortable-ghost {
    opacity: 0.4;
    background: var(--primary) !important;
    border: 2px dashed var(--accent) !important;
}

/* MODAL TASARIMI */
.modal-arkaplan {
    display: none; /* Başlangıçta gizli */
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(8px); /* Arkayı bulanıklaştırır */
    justify-content: center;
    align-items: center;
}

.modal-icerik {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 25px;
    border: 1px solid var(--accent);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: modalAcilis 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAcilis {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-ikon { font-size: 3rem; margin-bottom: 15px; }
#modalMesaj { font-size: 1.1rem; color: #fff; margin-bottom: 25px; font-weight: 600; }
.modal-butonlar { display: flex; gap: 15px; justify-content: center; }
#headerTarih {
    font-size: 0.95rem !important; /* 1.2'den 0.95'e düşürdük, daha dengeli durur */
    padding: 6px 18px !important;  /* Kutuyu da yazıya göre biraz daralttık */
    font-weight: 800 !important;   /* Yine kalın kalsın ki sarı üstünde kaybolmasın */
    letter-spacing: 0.3px;
}

/* --- YENİ EKLENEN KISIMLAR (EN ALTA YAPIŞTIR) --- */

/* Kartın içindeki Tik ve Çarpı için yer açıyoruz */
.ders-karti {
    padding-left: 35px !important;
    padding-right: 25px !important;
    position: relative;
    transition: all 0.2s;
}

/* Sol taraftaki Tik Butonu */
.check-btn {
    position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
    font-size: 1.3rem; color: #475569; cursor: pointer; z-index: 10;
}
.check-btn:hover { color: #10B981; }

/* Sağ üstteki Silme Butonu (Gizli) */
.sil-btn {
    position: absolute; right: 5px; top: 5px; font-size: 0.9rem; 
    color: #ef4444; cursor: pointer; opacity: 0; transition: 0.2s;
}
.ders-karti:hover .sil-btn { opacity: 1; }

/* Tamamlanan Kartın Görünümü */
.ders-karti.tamamlandi {
    background: #064e3b !important;
    border-left-color: #10B981 !important;
    opacity: 0.8;
}
.ders-karti.tamamlandi .ders-adi-buyuk { text-decoration: line-through; color: #a7f3d0; }
.ders-karti.tamamlandi .check-btn { color: #10B981; }

/* ==========================================
   PDF MODU (ORİJİNAL TASARIMI KORUYAN VERSİYON)
   ========================================== */

/* 1. Sadece Tik ve Silme Butonlarını Gizle */
.pdf-modu .check-btn, 
.pdf-modu .sil-btn {
    display: none !important;
}

/* 2. Kartların Solundaki Boşluğu (Tik yeri) Sıfırla */
.pdf-modu .ders-karti {
    padding-left: 8px !important; /* Ekranda 35px idi, PDF'te normale dönsün */
    padding-right: 8px !important;
}

/* 3. Tamamlanan Derslerin Üzeri Çizili Kalsın Ama Rengi Solmasın */
.pdf-modu .ders-karti.tamamlandi {
    opacity: 1 !important; /* Silik görünmesin */
}

/* 4. PDF Kapsayıcı Ayarı (Tasarımı bozmadan kağıda oturtur) */
.pdf-modu {
    width: 297mm !important; /* A4 Yatay Genişliği */
    max-width: none !important;
    margin: 0 !important;
    padding: 10px !important;
    box-shadow: none !important;
    /* Arka plan rengini veya resmini SAKIN değiştirme, orijinal kalsın */
}
/* --- BUTONLARI YAN YANA DİZME --- */
.aksiyon-kutusu {
    display: flex;
    justify-content: center;
    gap: 15px; /* Aralarındaki boşluk */
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* Mobilde sığmazsa alt alta geçsin */
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.aksiyon-kutusu button {
    margin: 0 !important; /* Eski marginleri sıfırla */
    flex: 1; /* Eşit genişlikte yayılsınlar */
    max-width: 250px; /* Çok da uzamasınlar */
    min-width: 200px;
}

/* --- BUTONLARI EŞİTLEME OPERASYONU --- */

/* Butonları saran kutu */
.aksiyon-kutusu {
    display: flex;
    justify-content: center;
    gap: 20px; /* Aralarındaki boşluk */
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Kutu içindeki butonlar */
.aksiyon-kutusu button {
    flex: 1; /* Mevcut alanı eşit paylaşın */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* İkon ile yazı arası */
    padding: 18px 20px; /* Biraz daha dolgun olsunlar */
    height: 60px; /* Yükseklikleri fix olsun, biri kısa kalmasın */
    font-size: 1rem;
    white-space: nowrap; /* Yazı alt satıra kaymasın */
    margin: 0 !important; /* Eski marginleri sıfırla */
    width: auto !important; /* Genişliği kapsayıcı belirlesin */
}

/* Mobilde alt alta geçsinler (Telefonda sıkışmasın) */
@media (max-width: 768px) {
    .aksiyon-kutusu {
        flex-direction: column;
    }
    .aksiyon-kutusu button {
        width: 100% !important;
    }
}
/* Sürükle Bırak İçin Kritik Ayar */
.ders-listesi {
    min-height: 150px !important; /* İçi boş olsa bile yer kaplasın */
    padding-bottom: 50px !important; /* Alta doğru bırakma alanı */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Sürüklerken kartın arkada bıraktığı iz */
.sortable-ghost {
    opacity: 0.4;
    background: #fef3c7 !important; /* Açık sarı */
    border: 2px dashed #f59e0b !important;
}

/* --- PROGRAM SEÇİM SATIRI İÇİN MİNİK AYAR --- */
#programListesi {
    background-image: none !important; /* Varsa ekstra ikonları kaldır */
    height: 46px; /* Butonlarla aynı yükseklik */
}

/* Mobilde buton aşağı kaymasın, yan yana sığsınlar */
@media (max-width: 768px) {
    .ayar-satiri {
        flex-direction: column;
        align-items: stretch;
    }
    #programListesi {
        width: 100% !important;
    }
    .buton-mühür {
        width: 100%;
    }
}
/* --- PREMIUM MODAL TASARIMI --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px);
    z-index: 10000; display: flex; justify-content: center; align-items: center;
    animation: fadeIn 0.3s ease;
}

/* --- PREMIUM MODAL TASARIMI Kısmındaki .modal-box --- */

.modal-box {
    background: #1e293b;
    border: 1px solid var(--accent);
    padding: 25px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header h3 { color: var(--accent); font-size: 1.2rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.modal-icon { font-size: 2.5rem; margin-bottom: 15px; }
.modal-body p { color: #cbd5e1; font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }

.modal-input {
    width: 100%; padding: 12px; background: #0f172a; border: 1px solid #475569;
    color: #fff; border-radius: 10px; margin-top: 10px; outline: none;
}
.modal-input:focus { border-color: var(--primary); }

.modal-footer { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

.modal-btn {
    padding: 10px 25px; border-radius: 10px; cursor: pointer; border: none; font-weight: 600; font-size: 0.9rem; transition: 0.2s;
}
.modal-btn.primary { background: var(--primary); color: #fff; }
.modal-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4); }
.modal-btn.danger { background: #ef4444; color: #fff; } /* Silme için */
.modal-btn.ghost { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.modal-btn.ghost:hover { background: #334155; color: #fff; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.8); } to { transform: scale(1); } }

/* --- PROGRAM YÖNETİM SATIRI (60px & DOLGUN) --- */

/* 1. Satırın Kendisi */
.program-yonetim {
    display: flex;
    align-items: stretch; /* Herkes eşit boyda */
    gap: 15px;
    height: 70px !important; /* YÜKSEKLİK BURADAN AYARLANIYOR */
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
}

/* 2. Select Kapsayıcısı */
.select-kapsayici {
    flex-grow: 1; /* Kalan boşluğu kapla */
    position: relative;
}

/* 3. Select Kutusunun Kendisi */
#programListesi {
    width: 100%;
    height: 100%;
    background: #0B1120;
    border: 2px solid rgba(251, 191, 36, 0.15); /* Hafif sarı çerçeve */
    color: #fff;
    border-radius: 15px;
    padding: 0 20px;
    appearance: none; /* Oku gizle */
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#programListesi:hover { border-color: var(--primary); }
#programListesi:focus { border-color: var(--accent); outline: none; }

/* 4. Sağdaki Ok İkonu */
.select-ok {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94A3B8;
    font-size: 1.5rem;
}

/* 5. Silme Butonu (KARE 60x60) */
#btn-sil {
    width: 60px !important;
    min-width: 60px !important;
    height: 100%;
    background: #ef4444;
    border: none;
    border-radius: 15px;
    color: white;
    display: none; /* JS ile açılır (flex olur) */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: transform 0.2s;
}

#btn-sil:hover { transform: scale(1.05); background: #dc2626; }
#btn-sil i { font-size: 1.8rem; line-height: 1; }

/* 6. Yeni Oluştur Butonu */
.btn-yeni {
    height: 100%;
    background: #6366f1;
    border: none;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 30px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-yeni i { font-size: 1.4rem; }
.btn-yeni span { font-size: 1rem; font-weight: 700; }

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .program-yonetim {
        flex-direction: column;
        height: auto !important; /* Mobilde boy serbest olsun */
    }
    .select-kapsayici, #programListesi, #btn-sil, .btn-yeni {
        height: 55px !important; /* Mobilde biraz daha kısa olabilir */
        width: 100% !important;
    }
}
/* --- YENİ KAYDET BUTONU (İÇİ BOŞ, HOVER'DA DOLAN) --- */
.buton-kaydet-outline {
    /* Başlangıç Hali (İçi Boş) */
    background: transparent;
    border: 2px solid #10B981; /* Yeşil Çerçeve */
    color: #10B981;            /* Yeşil Yazı */
    
    /* Boyut ve Şekil */
    padding: 16px 45px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* İçerik Hizalama */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px; /* Hizalamayı düzeltir */
}

/* Üzerine Gelince (Hover Efekti) */
.buton-kaydet-outline:hover {
    background: #10B981;     /* İçi Yeşil Dolsun */
    color: #fff;             /* Yazı Beyaz Olsun */
    transform: translateY(-3px); /* Hafif Yukarı Kalksın */
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); /* Yeşil Gölge Saçsın */
}

/* Mobilde Buton Genişliği */
@media (max-width: 768px) {
    .buton-kaydet-outline {
        width: 100%;
        margin-top: 10px;
    }
}

/* --- BUTONLARI KALINLAŞTIRMA (DAHA TOK GÖRÜNÜM) --- */

/* 1. PDF İndir Butonu (Sarı) */
.buton-pdf {
    border-width: 3px !important; /* Çerçeveyi kalınlaştırdık (2px -> 3px) */
    font-weight: 800 !important;  /* Yazı zaten kalındı, koruyoruz */
    letter-spacing: 0.5px;        /* Harfleri hafif açtık, daha okunaklı olsun */
}

/* 2. Programı Kaydet Butonu (Yeşil - Takım Bozulmasın) */
.buton-kaydet-outline {
    border-width: 3px !important; /* Bunu da 3px yaptık */
    font-weight: 800 !important;
    letter-spacing: 0.5px;
}

/* Hover durumunda zıplama yapmaması için */
.buton-pdf:hover, 
.buton-kaydet-outline:hover {
    border-width: 3px !important; 
    transform: translateY(-2px); /* Hafif yukarı kalksın */
}

/* --- 🔥 EKRAN GEÇİŞİ SİHRİ --- */

.mobil-panel {
    background: #0f172a;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 20px;
}
.mobil-ikili { display: flex; gap: 10px; }
.mobil-ikili > * { flex: 1; width: 50%; }
.mobil-panel input, .mobil-panel select {
    width: 100%; padding: 12px;
    background: #1e293b; border: 1px solid #334155;
    color: white; border-radius: 8px; outline: none; font-size: 1rem;
}
.btn-ekle-mobil {
    background: var(--primary); color: white; border: none;
    padding: 14px; border-radius: 10px; font-weight: 800;
    cursor: pointer; width: 100%; margin-top: 5px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Varsayılan: MASAÜSTÜ AÇIK, MOBİL KAPALI */
.ayar-satiri { display: flex !important; }
.mobil-panel { display: none !important; }

/* Ekran 768px'den küçükse (Telefon): MASAÜSTÜ KAPAT, MOBİL AÇ */
@media (max-width: 768px) {
    .ayar-satiri { display: none !important; }
    .mobil-panel { display: flex !important; }
}

/* --- MOBİL PANEL İÇİNDEKİ BUTONLARI KÜÇÜLT --- */
/* Sadece .mobil-panel'in içindeki butonları hedefler */
@media (max-width: 768px) {
    .mobil-panel .buton-kaydet-outline,
    .mobil-panel .buton-pdf,
    .mobil-panel .btn-ekle-mobil {
        padding: 12px 15px !important; /* Boşlukları azalttık */
        font-size: 0.95rem !important; /* Yazıyı bir tık küçülttük */
        height: auto !important; /* Yüksekliği içeriğe göre ayarla */
        min-height: 45px; /* Çok da küçülmesin */
    }
    
    /* Butonların ikonlarını da ayarlayalım */
    .mobil-panel button i {
        font-size: 1.2rem !important;
    }
}

/* --- MOBİLDE YANA KAYDIRMA (PC GİBİ PDF ALMAK İÇİN) --- */

@media (max-width: 768px) {
    /* 1. Yazdırılacak Alanı Kaydırılabilir Yap */
    #yazdirilacak-alan {
        overflow-x: auto !important; /* Taşan kısmı gizleme, kaydır */
        display: block !important;
        width: 100% !important;
        padding-bottom: 20px; /* Kaydırma çubuğu için boşluk */
    }

    /* 2. Çizelgeyi Zorla Geniş Tut (PC Boyutunda Kalsın) */
    .program-cizelgesi {
        min-width: 1200px !important; /* Tabloyu asla sıkıştırma, geniş bırak */
        display: flex !important;
        flex-direction: row !important; /* Yan yana kalmaya zorla */
    }

    /* 3. Gün Sütunlarını Rahatlat */
    .gun-sutunu {
        min-width: 160px !important; /* Her gün için minimum genişlik */
        flex-shrink: 0 !important;   /* Asla büzüşmesinler */
    }

    /* Mobilde kaydırma olduğunu belli eden minik bir ipucu (Opsiyonel) */
    #yazdirilacak-alan::-webkit-scrollbar {
        height: 6px;
    }
    #yazdirilacak-alan::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }
}

/* --- MOBİLDE SİLME BUTONLARINI HER ZAMAN GÖSTER --- */

@media (max-width: 768px) {
    /* Ders kartındaki silme butonu (X) */
    .ders-karti .sil-btn {
        opacity: 1 !important;    /* Her zaman görünür olsun */
        visibility: visible !important;
        
        /* Mobilde parmakla basmak kolay olsun diye biraz büyütelim */
        padding: 8px !important; 
        font-size: 1.2rem !important;
        background: rgba(239, 68, 68, 0.1); /* Hafif kırmızı zemin */
        border-radius: 50%; /* Yuvarlak olsun */
    }

    /* Eğer mola kutusunda da gizli bir şey varsa onu da açalım */
    .mola-alani .sil-btn {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* --- PDF MODU İÇİN GENİŞLİK AYARI (Pazar Gününü Kurtaran Kod) --- */

/* PDF Modu aktifleştiğinde (İndir butonuna basınca) */
#yazdirilacak-alan.pdf-modu {
    /* 1. Genişliği Zorla: Telefondan da gilsen 1400px gibi davran */
    width: 1100px !important;
    min-width: 1100px !important;
    max-width: none !important;
    
    /* 2. Taşmaları Göster: Pazar günü sağda kalsa bile kesme */
    overflow: visible !important;
    
    /* 3. Arka Plan: Genişleyince sağ taraf boş kalmasın, rengini koru */
    background-color: #0f172a; /* Senin koyu tema rengin */
    
    /* 4. Kenar Boşluklarını Sıfırla (Kayma olmasın) */
    margin: 0 !important;
    padding: 20px !important;
}