/* Öğretmen Asistanı Özel Stilleri */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --accent-color: #3b82f6;
    --bg-light: #f8fafc;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.navbar-brand-custom {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    cursor: default;
    user-select: none;
}

/* Kartlar */
.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-custom:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-card {
    border-radius: 14px;
    border: none;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
}

/* PUAN VERME DÖNÜŞÜMLÜ BUTON (Toggle Button) */
.grade-btn-toggle {
    width: 48px;
    height: 44px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.grade-btn-toggle:active {
    transform: scale(0.92);
}

/* Boş / Nötr Durum */
.grade-btn-toggle.state-empty {
    background-color: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
}
.grade-btn-toggle.state-empty:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #64748b;
}

/* Artı (+) Durumu */
.grade-btn-toggle.state-plus {
    background-color: #10b981;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.35);
}
.grade-btn-toggle.state-plus:hover {
    background-color: #059669;
}

/* Eksi (-) Durumu */
.grade-btn-toggle.state-minus {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.35);
}
.grade-btn-toggle.state-minus:hover {
    background-color: #dc2626;
}

/* Sayısal Puan Kutusu */
.grade-input-numeric {
    width: 80px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    padding: 6px 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.grade-input-numeric:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

.grade-saved-indicator {
    font-size: 0.75rem;
    height: 14px;
    display: block;
    color: #10b981;
    font-weight: 600;
}

/* Sınıf Tablosu */
.grading-table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.grading-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    vertical-align: middle;
}

.grading-table td {
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Haftalık Program Tablosu */
.schedule-day-column {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    min-height: 450px;
}

.schedule-item-card {
    border-left: 4px solid #2563eb;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.schedule-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

/* ===================================================
   WINDOWS PENCERESİ STİLİ YZ SOHBET POPUP
   =================================================== */

.windows-dialog {
    max-width: 860px;
    width: 94%;
    margin: 1.75rem auto;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.windows-window {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
}

/* Windows Başlık Çubuğu (Title Bar) */
.windows-titlebar {
    height: 42px;
    background: #1e2430;
    color: #f8fafc;
    padding: 0 0 0 14px;
    user-select: none;
    cursor: default;
    border-bottom: 1px solid #2d3748;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.windows-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.windows-app-icon {
    width: 26px;
    height: 26px;
    background: #0f172a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.windows-title {
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f5f9;
}

/* Windows Pencere Kontrol Butonları (Sağ Üst) */
.windows-controls {
    display: flex;
    height: 100%;
    align-items: stretch;
}

.windows-control-btn {
    width: 46px;
    height: 42px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    outline: none;
}

.windows-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.windows-control-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Windows Kırmızı Kapat Butonu */
.windows-control-btn.windows-btn-close:hover {
    background-color: #e81123 !important;
    color: #ffffff !important;
}

.windows-control-btn.windows-btn-close:active {
    background-color: #bf101f !important;
}

/* Tam Ekran Modu (Maximize) */
.modal-dialog.window-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 1060 !important;
}

.modal-dialog.window-fullscreen .windows-window {
    border-radius: 0 !important;
    height: 100vh !important;
    border: none !important;
}

.modal-dialog.window-fullscreen .windows-titlebar {
    border-radius: 0 !important;
}

.modal-dialog.window-fullscreen #aiChatBody {
    height: calc(100vh - 124px) !important;
    max-height: none !important;
}

/* İnce Windows Tarzı Kaydırma Çubuğu */
#aiChatBody::-webkit-scrollbar {
    width: 8px;
}
#aiChatBody::-webkit-scrollbar-track {
    background: #f1f5f9;
}
#aiChatBody::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
#aiChatBody::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Görev / Aksiyon Başarı Kartı */
.ai-action-card {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ai-bubble-user {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-radius: 14px 14px 2px 14px;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.ai-bubble-assistant {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 14px 14px 14px 2px;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Ekran Okuyucu Başlık Navigasyonu (H Tuşu Uyumu - 0 Boyut) */
.sr-chat-heading {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* ==========================================================================
   SAĞ ÜST BİLDİRİMLER (TOAST) - KIRMIZI ZEMİN, BEYAZ YAZI, EKRAN OKUYUCU UYUMLU
   ========================================================================== */
#toastNotificationContainer {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 999999;
    max-width: 400px;
    width: calc(100% - 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.custom-app-toast {
    background-color: #dc2626 !important; /* Belirgin kırmızı arkaplan */
    color: #ffffff !important;           /* Beyaz metin */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    padding: 0.85rem 1rem !important;
    box-shadow: 0 10px 25px -3px rgba(220, 38, 38, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: toastSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
    word-break: break-word;
}

.custom-app-toast.toast-closing {
    animation: toastSlideOutRight 0.35s ease forwards !important;
}

.custom-app-toast .toast-icon {
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff !important;
    margin-top: 2px;
}

.custom-app-toast .toast-message {
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    flex-grow: 1;
}

.custom-app-toast .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
    padding: 0.25rem;
    margin-top: 2px;
    transition: opacity 0.15s ease;
}

.custom-app-toast .btn-close:hover {
    opacity: 1;
}

@keyframes toastSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(120%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(130%);
    }
}

/* ==========================================================================
   MOBİL ALT GEZİNME ŞERİDİ (INSTAGRAM / FACEBOOK TARZI)
   ========================================================================== */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 76px !important;
    }
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #64748b;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 2px;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    line-height: 1;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: #2563eb;
}

.mobile-nav-item:active {
    transform: scale(0.92);
}

/* Ortadaki Vurgulu Yapay Zeka (YZ) Butonu */
.mobile-nav-ai {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    user-select: none;
    position: relative;
    top: -12px;
}

.mobile-nav-ai-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e293b;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.mobile-nav-ai-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.5);
    color: #0f172a;
    text-decoration: none;
}

.mobile-nav-ai-btn:active,
.mobile-nav-ai-btn.active {
    transform: scale(0.95);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4);
    color: #0f172a;
    text-decoration: none;
}

.mobile-nav-ai-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #d97706;
    margin-top: 2px;
    text-decoration: none;
}

/* ==========================================================================
   KOYU TEMA (DARK MODE) DESTEĞİ
   ========================================================================== */
[data-bs-theme="dark"] {
    --bg-light: #0f172a;
    background-color: #0f172a;
    color: #f1f5f9;
}

[data-bs-theme="dark"] body {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .card-custom,
[data-bs-theme="dark"] .card {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .table {
    color: #f1f5f9;
    border-color: #334155;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

[data-bs-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid #334155;
}

[data-bs-theme="dark"] .mobile-nav-item {
    color: #94a3b8;
}

[data-bs-theme="dark"] .mobile-nav-item.active,
[data-bs-theme="dark"] .mobile-nav-item:hover {
    color: #38bdf8;
}

[data-bs-theme="dark"] .mobile-nav-ai-btn {
    border-color: #0f172a;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #1e293b;
    border-color: #38bdf8;
    color: #f8fafc;
}

[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .windows-window {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] #aiChatBody {
    background-color: #0f172a !important;
}

[data-bs-theme="dark"] .ai-bubble-assistant {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .modal-footer {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-body-secondary,
[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

/* ==========================================================================
   ANA EKRAN DERS KAYDIRICISI (LESSON SLIDER & CAROUSEL)
   ========================================================================== */
.lesson-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.lesson-slider-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

.lesson-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

.lesson-card {
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .lesson-card {
    background: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 🟢 Şu Anki Ders Stili */
.lesson-card.state-current {
    border-color: #10b981 !important;
    background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.18) !important;
}

[data-bs-theme="dark"] .lesson-card.state-current {
    background: linear-gradient(145deg, #1e293b 0%, #064e3b 100%);
    border-color: #10b981 !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25) !important;
}

/* 🔵 Sıradaki Ders Stili */
.lesson-card.state-upcoming {
    border-color: #3b82f6 !important;
    background: linear-gradient(145deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12) !important;
}

[data-bs-theme="dark"] .lesson-card.state-upcoming {
    background: linear-gradient(145deg, #1e293b 0%, #1e3a8a 100%);
    border-color: #38bdf8 !important;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2) !important;
}

/* ⚪ Tamamlanan / Geçmiş Ders Stili */
.lesson-card.state-completed {
    border-color: #cbd5e1 !important;
    background: #f8fafc;
    opacity: 0.88;
}

[data-bs-theme="dark"] .lesson-card.state-completed {
    border-color: #475569 !important;
    background: #161e2e;
    opacity: 0.85;
}

/* Slider Navigasyon Kontrolleri */
.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
    cursor: pointer;
}

[data-bs-theme="dark"] .slider-nav-btn {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

.slider-nav-btn:hover:not(:disabled) {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.slider-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Slider Nokta Göstergeleri (Dots) */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 40px;
    background: #cbd5e1;
    transition: all 0.25s ease;
    cursor: pointer;
}

[data-bs-theme="dark"] .slider-dot {
    background: #475569;
}

.slider-dot.active {
    width: 24px;
    background: #2563eb;
}
[data-bs-theme="dark"] .slider-dot.active {
    background: #38bdf8;
}

/* ==========================================
   AYARLAR & PROFİL MODÜLER GEZİNME (DRILL-DOWN & MASTER-DETAIL)
   ========================================== */
.settings-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 1rem 0 0.4rem 0.5rem;
}

.settings-card-group {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .settings-card-group {
    background: #1e293b;
    border-color: #334155;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: #1e293b;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

[data-bs-theme="dark"] .settings-nav-item {
    color: #f8fafc;
    border-bottom-color: #334155;
}

.settings-nav-item:last-child {
    border-bottom: none;
}

.settings-nav-item:hover {
    background: #f8fafc;
    color: #2563eb;
}

[data-bs-theme="dark"] .settings-nav-item:hover {
    background: #0f172a;
    color: #38bdf8;
}

.settings-nav-item.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

[data-bs-theme="dark"] .settings-nav-item.active {
    background: #1e3a8a;
    color: #93c5fd;
}

.settings-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.settings-detail-pane {
    display: none;
}

.settings-detail-pane.active {
    display: block;
    animation: fadeInPane 0.2s ease-out;
}

@keyframes fadeInPane {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   YÖNETİCİ KONTROL MERKEZİ (ADMIN HUB) KARTLARI
   ========================================== */
.admin-hub-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .admin-hub-card {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.admin-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
    color: inherit;
}

[data-bs-theme="dark"] .admin-hub-card:hover {
    border-color: #475569;
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

.admin-hub-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.admin-category-topbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .admin-category-topbar {
    background: #1e293b;
    border-color: #334155;
}

.admin-category-pane {
    display: none;
}

.admin-category-pane.active {
    display: block;
    animation: fadeInPane 0.2s ease-out;
}

/* ==========================================
   YAZI BOYUTU (FONT SIZE SCALING)
   ========================================== */
html[data-font-size="small"] {
    font-size: 14px;
}

html[data-font-size="normal"],
html:not([data-font-size]) {
    font-size: 16px;
}

html[data-font-size="large"] {
    font-size: 18px;
}

html[data-font-size="xlarge"] {
    font-size: 20px;
}

.font-size-option-card {
    cursor: pointer;
    border: 2px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    transition: all 0.2s ease-in-out;
    background-color: var(--bs-body-bg);
    user-select: none;
}

.font-size-option-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.font-size-option-card.active {
    border-color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.06) !important;
    box-shadow: 0 0 0 1px #2563eb;
}

[data-bs-theme="dark"] .font-size-option-card.active {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* ==========================================================================
   SABİT ÜST ŞERİT (NAVBAR) VE ZÜMREM LOGO BUTONU
   ========================================================================== */
.navbar.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-zumrem-btn {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 2px solid transparent;
    padding: 0;
    flex-shrink: 0;
}

.navbar-zumrem-btn:hover {
    transform: scale(1.08);
}

.navbar-zumrem-btn.active {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}

.navbar-zumrem-btn img {
    border-radius: 50%;
    object-fit: cover;
}

/* ===================================================
   AKIŞ EKRANI TARİH KUTUSU VE CANLI SAAT
   =================================================== */
.dashboard-date-box {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    user-select: none;
}

.dashboard-date-box:hover {
    background-color: rgba(59, 130, 246, 0.06);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.dashboard-date-main {
    font-weight: 700;
    font-size: 0.96rem;
    line-height: 1.2;
    color: var(--bs-body-color, #1e293b);
}

.dashboard-date-day {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.1;
    color: #64748b;
}

.live-clock-display {
    font-weight: 700;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    color: var(--bs-body-color, #1e293b);
    letter-spacing: 0.5px;
    user-select: none;
}

[data-bs-theme="dark"] .dashboard-date-box {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .dashboard-date-box:hover {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #60a5fa;
}

[data-bs-theme="dark"] .dashboard-date-main,
[data-bs-theme="dark"] .live-clock-display {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .dashboard-date-day {
    color: #94a3b8;
}

/* ===================================================
   DERS PROGRAMI RENK KODLAMASI (SINIF / OKUL İÇİ / OKUL DIŞI)
   =================================================== */
/* Sınıf: Siyah/Beyaz Tema */
.schedule-card-regular {
    background-color: var(--bs-body-bg, #ffffff) !important;
    border-color: var(--bs-border-color, #e2e8f0) !important;
    color: var(--bs-body-color, #1e293b) !important;
}

/* Okul İçi Bireysel: Kırmızı Tonu */
.schedule-card-internal {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}

[data-bs-theme="dark"] .schedule-card-internal {
    background-color: #450a0a !important;
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

/* Okul Dışı Bireysel: Mavi Tonu */
.schedule-card-external {
    background-color: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
}

[data-bs-theme="dark"] .schedule-card-external {
    background-color: #172554 !important;
    border-color: #1e3a8a !important;
    color: #93c5fd !important;
}

/* ===================================================
   HAFTALIK DERS PROGRAMI 7 GÜNLÜK SEKME GRIDI (YAN YANA SIĞAN)
   =================================================== */
.schedule-tabs-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px;
    width: 100%;
}

.schedule-tab-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px !important;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--bs-border-color, #dee2e6) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    color: var(--bs-body-color, #212529) !important;
    transition: all 0.15s ease;
    min-width: 0;
    line-height: 1.2;
}

.schedule-tab-btn:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
    border-color: #3b82f6 !important;
}

.schedule-tab-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.schedule-tab-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.schedule-tab-qty {
    font-size: 0.75rem;
    opacity: 0.85;
    white-space: nowrap;
    display: block;
}

@media (min-width: 768px) {
    .schedule-tabs-grid {
        gap: 6px;
    }
    .schedule-tab-btn {
        flex-direction: row;
        gap: 4px;
        padding: 8px 4px !important;
    }
    .schedule-tab-name {
        font-size: 0.88rem;
    }
    .schedule-tab-qty {
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .schedule-tabs-grid {
        gap: 2px;
    }
    .schedule-tab-btn {
        padding: 5px 1px !important;
        border-radius: 6px;
    }
    .schedule-tab-name {
        font-size: 0.67rem;
        letter-spacing: -0.3px;
    }
    .schedule-tab-qty {
        font-size: 0.65rem;
    }
}

/* ===================================================
   TANIMLAMALAR 6 SEKME GRIDI (YAN YANA SIĞAN)
   =================================================== */
.manage-tabs-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 4px;
    width: 100%;
}

.manage-tab-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px !important;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--bs-border-color, #dee2e6) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    color: var(--bs-body-color, #212529) !important;
    transition: all 0.15s ease;
    min-width: 0;
    line-height: 1.2;
}

.manage-tab-btn:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
    border-color: #3b82f6 !important;
}

.manage-tab-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.manage-tab-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.manage-tab-qty {
    font-size: 0.75rem;
    opacity: 0.85;
    white-space: nowrap;
    display: block;
}

@media (min-width: 768px) {
    .manage-tabs-grid {
        gap: 6px;
    }
    .manage-tab-btn {
        flex-direction: row;
        gap: 4px;
        padding: 8px 4px !important;
    }
    .manage-tab-name {
        font-size: 0.88rem;
    }
    .manage-tab-qty {
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .manage-tabs-grid {
        gap: 2px;
    }
    .manage-tab-btn {
        padding: 5px 1px !important;
        border-radius: 6px;
    }
    .manage-tab-name {
        font-size: 0.67rem;
        letter-spacing: -0.3px;
    }
    .manage-tab-qty {
        font-size: 0.65rem;
    }
}

/* ==========================================================================
   YAPAY ZEKA CHAT YENİ NESİL ARAYÜZ (GÖNDER/DURDUR, EKLE, MİKROFON, CANLI SESLİ SOHBET)
   ========================================================================== */

.ai-circle-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-circle-btn:hover {
    transform: scale(1.05);
}

.ai-circle-btn:active {
    transform: scale(0.95);
}

/* Durdurma Butonu Etrafındaki Dönen Animasyon Çerçevesi */
.ai-action-btn-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-stop-spinner-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 3px solid rgba(220, 53, 69, 0.2);
    border-top-color: #dc3545;
    border-right-color: #dc3545;
    border-radius: 50%;
    animation: ai-stop-spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    pointer-events: none;
}

@keyframes ai-stop-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mikrofon Dinleme Nabız Efekti */
.ai-mic-pulse {
    background-color: #dc2626 !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    animation: ai-mic-pulse-anim 1.5s infinite;
}

@keyframes ai-mic-pulse-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Canlı Sesli Sohbet Butonu Efekti */
.ai-live-trigger-btn {
    border-color: #8b5cf6 !important;
    color: #7c3aed !important;
    background-color: rgba(139, 92, 246, 0.08);
}
.ai-live-trigger-btn:hover {
    background-color: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.ai-live-trigger-btn:hover i {
    color: #ffffff !important;
}

/* Ek Dosya Önizleme Çubuğu */
#aiAttachmentPreview {
    transition: all 0.25s ease;
}

[data-bs-theme="dark"] #aiAttachmentPreview {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] #aiAttachmentPreview #aiAttachName {
    color: #f8fafc !important;
}

/* Canlı Sesli Sohbet Çubuğu (Minimalist Bar) */
#aiLiveVoiceBar {
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] #aiLiveVoiceBar {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.ai-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 4px;
}

.ai-live-dot {
    display: inline-block;
    width: 3.5px;
    height: 8px;
    background-color: #0d6efd;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ai-live-indicator.state-listening .ai-live-dot {
    background-color: #0d6efd;
    animation: ai-live-wave 1.2s ease-in-out infinite;
}
.ai-live-indicator.state-listening .dot-1 { animation-delay: 0.0s; }
.ai-live-indicator.state-listening .dot-2 { animation-delay: 0.2s; }
.ai-live-indicator.state-listening .dot-3 { animation-delay: 0.4s; }
.ai-live-indicator.state-listening .dot-4 { animation-delay: 0.6s; }

.ai-live-indicator.state-thinking .ai-live-dot {
    background-color: #f59e0b;
    animation: ai-live-wave 0.8s ease-in-out infinite;
}

.ai-live-indicator.state-speaking .ai-live-dot {
    background-color: #10b981;
    animation: ai-live-wave 0.6s ease-in-out infinite;
}

.ai-live-indicator.state-paused .ai-live-dot {
    background-color: #6c757d;
    height: 4px;
    animation: none;
}

@keyframes ai-live-wave {
    0%, 100% { height: 4px; }
    50% { height: 18px; }
}

.ai-live-streaming-bubble {
    border: 2px dashed rgba(255, 255, 255, 0.5) !important;
    animation: ai-streaming-pulse 1.8s infinite alternate;
}

@keyframes ai-streaming-pulse {
    0% { opacity: 0.88; }
    100% { opacity: 1; }
}

@media (max-width: 575.98px) {
    .ai-circle-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}




