@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* === KOYU TEMA — DEEP SPACE === */
    --bg: #080810;
    --surface: #0e0e1a;
    --surface-2: #131320;
    --surface-hover: #1c1c2e;
    --card: #10101c;
    --border: rgba(255, 255, 255, 0.07);
    --border-bright: rgba(255, 255, 255, 0.13);

    /* Aksan — Elektrik Mor/İndigo */
    --accent: #7c6aff;
    --accent-2: #a78bfa;
    --accent-glow: rgba(124, 111, 255, 0.18);
    --accent-glow-strong: rgba(124, 111, 255, 0.32);

    /* İkincil — Kırmızı/Pembe */
    --accent2: #f87171;
    --accent2-glow: rgba(248, 113, 113, 0.15);

    /* Metin */
    --text: #e8e8f0;
    --text-dim: #b0b0c8;
    --muted: #6b6b8a;

    /* Durum renkleri */
    --success: #34d399;
    --gold: #fbbf24;
    --danger: #f87171;

    /* Cam efekti */
    --glass: rgba(14, 14, 26, 0.75);
    --glass-border: rgba(124, 111, 255, 0.15);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(ellipse 80% 60% at 20% -10%, rgba(124, 111, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(167, 139, 250, 0.05) 0%, transparent 60%);
    background-attachment: fixed;
}

h1, h2, h3,
.logo, .chat-baslik, .btn, .btn-yeni, .mod-btn {
    font-family: 'Outfit', sans-serif;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 111, 255, 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 111, 255, 0.5);
}

/* ══════════════════════════════════════════
   SOL PANEL
══════════════════════════════════════════ */
.sol-panel {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.sol-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 255, 0.4), transparent);
}

.sol-header {
    padding: 1.25rem 1rem;
}

.logo {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
    color: var(--text);
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow-strong);
}

.btn-yeni {
    width: 100%;
    padding: 0.7rem;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(124, 111, 255, 0.35);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.2px;
}

.btn-yeni:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 111, 255, 0.5);
    background: var(--accent-2);
}

.sohbet-listesi {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 60px;
}

.sohbet-item {
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 3px;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.sohbet-item:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.sohbet-item.aktif {
    background: rgba(124, 111, 255, 0.1);
    border-color: rgba(124, 111, 255, 0.3);
    box-shadow: 0 2px 12px rgba(124, 111, 255, 0.1);
}

.sohbet-isim {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sohbet-item.aktif .sohbet-isim {
    color: var(--accent-2);
}

.sohbet-tarih {
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 2px;
}

.sohbet-sil-btn {
    opacity: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    transition: 0.2s;
}

.sohbet-item:hover .sohbet-sil-btn {
    opacity: 1;
}

.sohbet-sil-btn:hover {
    color: var(--accent2);
}

/* ETİKET ALANI */
.sol-alt {
    padding: 1rem;
    border-top: 1px solid var(--border);
    max-height: 30vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 0.68rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    filter: grayscale(1);
    transition: 0.2s;
}

.btn-icon:hover {
    filter: grayscale(0);
    transform: scale(1.1);
}

.etiket-listesi {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kat-btn {
    width: 100%;
    padding: 0.48rem 0.7rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    text-align: left;
    transition: 0.2s;
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Outfit', sans-serif;
}

.kat-btn:hover {
    background: var(--surface-hover);
    color: var(--text-dim);
}

.kat-btn.aktif {
    background: var(--accent-glow);
    color: var(--accent-2);
    font-weight: 600;
    border: 1px solid rgba(124, 111, 255, 0.2);
}

.kat-btn .etiket-renk {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════
   ORTA CHAT ALANI
══════════════════════════════════════════ */
.chat-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.chat-header {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
    position: relative;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.chat-baslik {
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1;
    color: var(--text);
}

.mod-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-bright);
    color: var(--muted);
    background: var(--surface-2);
    letter-spacing: 0.3px;
}

.mod-chip.soru {
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--gold);
    background: rgba(251, 191, 36, 0.08);
}

.mod-chip.not {
    border-color: rgba(52, 211, 153, 0.3);
    color: var(--success);
    background: rgba(52, 211, 153, 0.08);
}

.chat-gecmisi {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 10%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

/* BOŞ EKRAN */
.bos-ekran {
    margin: auto;
    text-align: center;
    color: var(--muted);
    max-width: 380px;
}

.bos-icon {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    display: block;
    filter: drop-shadow(0 0 20px rgba(124, 111, 255, 0.4));
}

.bos-yazi {
    font-size: 0.93rem;
    line-height: 1.7;
}

.bos-yazi strong {
    color: var(--text);
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* MESAJ BALONLARI */
.mesaj {
    display: flex;
    gap: 0.85rem;
    max-width: 90%;
    animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.mesaj.kullanici {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-bright);
}

.mesaj.kullanici .avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 111, 255, 0.4);
}

.balon {
    padding: 0.85rem 1.15rem;
    line-height: 1.75;
    font-size: 0.93rem;
    color: var(--text);
}

.mesaj.kullanici .balon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 4px 20px rgba(124, 111, 255, 0.3);
}

.mesaj.sistem .balon {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px 16px 16px 4px;
}

/* Markdown Stilleri */
.balon p {
    margin-bottom: 0.8rem;
}

.balon p:last-child {
    margin-bottom: 0;
}

.balon strong {
    color: #fff;
    font-weight: 600;
}

.balon h1, .balon h2, .balon h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--accent-2);
    margin: 1rem 0 0.5rem 0;
    font-weight: 700;
}

.balon ul, .balon ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.balon li {
    margin-bottom: 0.4rem;
}

.balon code {
    background: rgba(124, 111, 255, 0.1);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83em;
    color: var(--accent-2);
    border: 1px solid rgba(124, 111, 255, 0.2);
}

.balon pre {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 1rem 0;
}

.balon pre code {
    border: none;
    padding: 0;
    background: transparent;
}

/* ── GİRİŞ ALANI ── */
.giris-alani {
    padding: 0 10% 1.75rem 10%;
    background: linear-gradient(transparent, var(--bg) 25%);
}

.giris-ust-araclar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.mod-toggle {
    display: flex;
    gap: 0.5rem;
}

.mod-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.mod-btn.aktif {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border-bright);
}

.komut-yardim {
    display: flex;
    gap: 5px;
}

.komut-yardim button {
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 5px;
    transition: 0.2s;
    letter-spacing: -0.2px;
}

.komut-yardim button:hover {
    color: var(--accent-2);
    background: var(--accent-glow);
}

/* KAPSÜL */
.giris-kapsul {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border-bright);
    border-radius: 22px;
    padding: 0.45rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 0 var(--accent-glow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.giris-kapsul:focus-within {
    border-color: rgba(124, 111, 255, 0.5);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

.btn-arac {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
    flex-shrink: 0;
}

.btn-arac:hover {
    background: var(--surface-hover);
    color: var(--accent-2);
}

.btn-mic.recording {
    color: var(--accent2);
    animation: pulse-mic 1.5s infinite;
}

@keyframes pulse-mic {
    0% {
        background: transparent;
    }
    50% {
        background: rgba(248, 113, 113, 0.2);
    }
    100% {
        background: transparent;
    }
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.93rem;
    resize: none;
    outline: none;
    max-height: 150px;
    min-height: 24px;
    padding: 0.6rem 0.5rem;
    line-height: 1.55;
}

#chat-input::placeholder {
    color: var(--muted);
}

.btn-gonder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(124, 111, 255, 0.4);
}

.btn-gonder:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(124, 111, 255, 0.6);
}

.btn-gonder:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ══════════════════════════════════════════
   SAĞ PANEL (NOTLAR)
══════════════════════════════════════════ */
.not-panel {
    width: 320px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    height: 100%;
}

.not-panel-baslik {
    padding: 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.sayac-badge {
    background: var(--surface-hover);
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

.arama-wrap {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
}

.arama-wrap svg {
    color: var(--muted);
    width: 15px;
    height: 15px;
}

.arama-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
}

.not-listesi {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.not-kart {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.not-kart:hover {
    border-color: rgba(124, 111, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 111, 255, 0.12);
    background: var(--surface-2);
}

.not-baslik {
    font-weight: 600;
    font-size: 0.87rem;
    margin-bottom: 0.35rem;
    line-height: 1.4;
    color: var(--text);
}

.not-kisa {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   MODALLAR & OVERLAY
══════════════════════════════════════════ */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1100; /* ◄ Z-index hiyerarşisi tam mobil uyumlu yapıldı */
}

.modal {
    position: fixed;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-height: 90vh;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(124, 111, 255, 0.1);
    overflow-y: auto;
    z-index: 1200; /* ◄ Modal hiyerarşisi */
    padding: 2rem;
    display: none;
}

.modal-kapat {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: 0.2s;
}

.modal-kapat:hover {
    color: var(--text);
    border-color: var(--border-bright);
    transform: scale(1.05);
}

.detay-ozet {
    background: var(--bg);
    padding: 1rem;
    border-left: 2px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* AI INSIGHT BOX */
.ai-insight-box {
    background: var(--accent-glow);
    border: 1px solid rgba(124, 111, 255, 0.25);
    padding: 1rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.ai-insight-box strong {
    color: var(--accent-2);
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ETİKET BADGELERİ */
.etiket-badge, .etiket-badge-sil {
    font-size: 0.68rem;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.etiket-badge-sil {
    cursor: pointer;
    transition: 0.2s;
}

.etiket-badge-sil:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: var(--accent2);
    color: var(--accent2);
}

/* GÖRSEL ÖNİZLEMELER */
#gorsel-onizleme-wrap, #ses-onizleme-wrap {
    display: none;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.85rem;
}

#gorsel-onizleme-wrap.aktif, #ses-onizleme-wrap.aktif {
    display: flex;
}

/* GÖRSEL BÜYÜTME */
#gorsel-zoom-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1400; /* ◄ En üst katman zoom */
    cursor: zoom-out;
    place-items: center;
    animation: fadeIn 0.2s ease;
}

#gorsel-zoom-overlay.aktif {
    display: grid;
}

#gorsel-zoom-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* GÖRSEL MESAJ */
.mesaj-gorsel-icerik {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mesaj-gorsel-icerik img {
    max-width: 220px;
    max-height: 180px;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.15s, box-shadow 0.15s;
    display: block;
}

.mesaj-gorsel-icerik img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.gorsel-aciklama {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.25rem;
}

/* TYPING ANİMASYONU */
.typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    height: 20px;
    padding: 2px 0;
}

.typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing span:nth-child(1) {
    animation-delay: 0s;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* BAŞLIK DÜZENLEME */
.chat-baslik-input {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* BAĞLANTILI NOTLAR */
.linked-notes-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.linked-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.linked-card:hover {
    border-color: rgba(124, 111, 255, 0.4);
    background: var(--accent-glow);
    transform: translateX(2px);
}

.linked-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.linked-card-summary {
    font-size: 0.73rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* NOT KART ETİKETLER */
.not-kart-etiketler {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.gorsel-rozet {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.62rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 6px;
    color: var(--muted);
}

.skor-chip {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    font-size: 0.62rem;
    background: var(--accent-glow);
    border: 1px solid rgba(124, 111, 255, 0.3);
    border-radius: 5px;
    padding: 2px 6px;
    color: var(--accent-2);
    font-weight: 600;
}

.bekliyor {
    opacity: 0.55;
}

.bos-mesaj {
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
    padding: 2rem 1rem;
}

/* MODAL ACTION ROW */
.action-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 111, 255, 0.35);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 111, 255, 0.5);
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.btn-danger:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    background: rgba(248, 113, 113, 0.08);
}

/* ETİKET YÖNETİM */
.etiket-yonetim {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.etiket-ekle-wrap {
    display: flex;
    gap: 0.5rem;
}

.etiket-ekle-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    padding: 0.4rem 0.7rem;
    outline: none;
    transition: border-color 0.2s;
}

.etiket-ekle-input:focus {
    border-color: var(--accent);
}

/* ÖNİZLEME BANDI */
.onizleme-bandi {
    display: none;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.85rem;
}

.onizleme-bandi.aktif {
    display: flex;
}

.onizleme-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
}

.mic-icon {
    font-size: 1.2rem;
}

.dosya-adi {
    font-size: 0.78rem;
    color: var(--text);
    font-weight: 500;
}

.dosya-boyut {
    font-size: 0.7rem;
    color: var(--muted);
}

.btn-onizleme-sil {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
}

.btn-onizleme-sil:hover {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent2);
}

#gorsel-onizleme-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

#ses-onizleme-player {
    height: 32px;
    max-width: 180px;
}

.btn-duzenle {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
    display: none;
}

.btn-duzenle:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.modal-gorsel {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
    cursor: zoom-in;
    transition: transform 0.15s;
    display: block;
}

.modal-gorsel:hover {
    transform: scale(1.01);
}

/* STREAM CURSOR */
.stream-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.not-ok {
    color: var(--success);
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#detay-modal::-webkit-scrollbar {
    width: 4px;
}

#detay-modal::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 4px;
}

/* Hamburger & alt nav her zaman gizli; sadece mobilde gösterilir */
.btn-hamburger {
    display: none;
}

.mobil-alt-nav {
    display: none;
}

/* ── TABLET (≤ 900px) ── */
@media (max-width: 900px) {
    .not-panel {
        display: none;
    }

    .sol-panel {
        width: 220px;
    }

    .chat-gecmisi {
        padding: 1.5rem 5%;
    }

    .giris-alani {
        padding: 0 5% 1.5rem 5%;
    }
}

/* ── MOBİL (≤ 600px) ── */
@media (max-width: 600px) {
    html, body {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }

    body {
        flex-direction: column;
        overflow: hidden;
        position: fixed;
        inset: 0;
        height: -webkit-fill-available;
    }

    /* ── SOL PANEL: Drawer ── */
    .sol-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 82vw;
        max-width: 310px;
        height: 100dvh;
        z-index: 1000; /* ◄ Drawer z-index uyumu */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.7);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-right: 1px solid var(--border);
    }

    .sol-panel.mobil-acik {
        transform: translateX(0);
    }

    .sol-header {
        padding: 1rem 0.85rem;
    }

    .logo {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    /* ── BACKDROP ── */
    .mobil-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 990; /* ◄ Backdrop z-index */
        animation: fadeIn 0.2s ease;
    }

    .mobil-backdrop.aktif {
        display: block;
    }

    /* ── CHAT ALANI ── */
    .chat-wrap {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-bottom: 0;
    }

    .chat-header {
        padding: 0.65rem 0.85rem;
        gap: 0.55rem;
        min-height: 52px;
        flex-shrink: 0;
    }

    .btn-hamburger {
        display: flex !important;
        background: transparent;
        border: none;
        color: var(--muted);
        cursor: pointer;
        padding: 7px;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-hamburger:active {
        background: var(--surface-hover);
        color: var(--text);
    }

    .chat-baslik {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 140px);
    }

    .mod-chip {
        display: none;
    }

    /* ── CHAT GEÇMİŞİ ── */
    .chat-gecmisi {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.85rem 0.85rem 0.5rem;
        gap: 0.85rem;
        scroll-padding-bottom: 8px;
    }

    .mesaj {
        max-width: 96%;
    }

    .balon {
        font-size: 0.875rem;
        padding: 0.65rem 0.95rem;
        line-height: 1.65;
    }

    .avatar {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .mesaj-gorsel-icerik img {
        max-width: 160px;
        max-height: 130px;
    }

    .bos-ekran {
        padding: 2rem 1.25rem;
    }

    .bos-icon {
        font-size: 2.2rem;
    }

    .bos-yazi {
        font-size: 0.84rem;
    }

    /* ── GİRİŞ ALANI ── */
    .giris-alani {
        padding: 0.45rem 0.65rem;
        padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--border);
        flex-shrink: 0;
        position: relative;
        z-index: 5;
    }

    .giris-ust-araclar {
        margin-bottom: 0.4rem;
        padding: 0;
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .komut-yardim button {
        font-size: 0.67rem;
        padding: 3px 6px;
        border-radius: 4px;
        min-height: 28px;
    }

    .giris-kapsul {
        padding: 0.35rem;
        border-radius: 16px;
        gap: 0.25rem;
        min-height: 44px;
    }

    .btn-arac {
        width: 36px;
        height: 36px;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-gonder {
        width: 36px;
        height: 36px;
        -webkit-tap-highlight-color: transparent;
    }

    #chat-input {
        font-size: 16px;
        padding: 0.45rem 0.35rem;
        min-height: 22px;
        max-height: 120px;
    }

    #gorsel-onizleme-wrap.aktif,
    #ses-onizleme-wrap.aktif {
        padding: 0.4rem 0.65rem;
        margin-bottom: 0.5rem;
        gap: 0.65rem;
    }

    #ses-onizleme-player {
        max-width: 120px;
        height: 28px;
    }

    /* ── MOBİL ALT NAV BAR ── */
    .mobil-alt-nav {
        display: flex !important;
        flex-shrink: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 0.3rem 0.5rem;
        padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
        z-index: 100;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .mobil-alt-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: transparent;
        border: none;
        color: var(--muted);
        cursor: pointer;
        padding: 0.45rem 0.25rem;
        font-size: 0.6rem;
        font-weight: 500;
        font-family: 'Outfit', sans-serif;
        transition: color 0.2s;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
        letter-spacing: 0.2px;
    }

    .mobil-alt-nav-btn.aktif {
        color: var(--accent-2);
    }

    .mobil-alt-nav-btn svg {
        width: 21px;
        height: 21px;
    }

    .mobil-alt-nav-btn:active {
        opacity: 0.7;
    }

    /* ── BOTTOM SHEET MODALLAR ── */
    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 85dvh !important; /* ◄ Bottom sheet yüksekliği ideal düzeye getirildi */
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 20px 0 0 !important;
        padding: 1.5rem 1rem;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: none;
    }

    /* Animasyonlu Kayarak Açılma */
    .modal.mobil-acik {
        display: block !important;
        transform: translateY(0);
    }

    /* Bottom-sheet drag kolu efekti */
    .modal::before {
        content: '';
        display: block;
        width: 40px;
        height: 5px;
        background: var(--border-bright);
        border-radius: 3px;
        margin: -0.5rem auto 1rem auto;
    }

    #manuel-sentez-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 1.5rem 1rem !important;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
        max-height: 85dvh !important;
        overflow-y: auto;
    }

    #manuel-sentez-modal.mobil-acik {
        display: block !important;
        transform: translateY(0) !important;
    }

    #ag-modal {
        width: 100vw !important;
        height: 100dvh !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
        max-width: 100vw !important;
    }

    .quiz-genis-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .quiz-g-ekran {
        padding: 1.5rem 1rem;
    }

    .quiz-g-header {
        margin-bottom: 1rem;
    }

    #quiz-g-soru-metin {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    #quiz-g-cevap-input {
        font-size: 16px;
        padding: 0.75rem;
    }

    .karne-answers-yeni {
        grid-template-columns: 1fr;
    }

    /* ── SAĞ PANEL (DRAWER) ── */
    .not-panel {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 88vw;
        max-width: 340px;
        height: 100dvh;
        z-index: 1000; /* ◄ Sağ panel z-index */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.7);
        border-left: 1px solid var(--border);
        overflow: hidden;
    }

    .not-panel.mobil-acik {
        transform: translateX(0);
    }

    .sag-tab {
        font-size: 0.65rem;
        padding: 0.55rem 0.3rem;
        gap: 0.2rem;
    }

    .action-row {
        gap: 0.35rem;
        flex-wrap: wrap;
    }

    .btn {
        padding: 0.48rem 0.75rem;
        font-size: 0.77rem;
    }

    .modal-kapat {
        width: 36px;
        height: 36px;
        top: 1.1rem;
        right: 1.1rem;
    }

    .not-kart:hover {
        transform: none;
    }

    .oneriler-kapsayici {
        max-height: 28vh;
        overflow-y: auto;
    }

    .sol-alt {
        max-height: 25vh;
        overflow-y: auto;
    }

    .modal-gorsel {
        border-radius: 8px;
    }

    .quiz-panel-wrap {
        padding: 1rem;
    }

    .sohbet-sil-btn {
        opacity: 0.5;
    }
}

/* ── iOS SAFARI EK KORUMALARI ── */
@media (max-width: 600px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea {
        font-size: 16px !important;
    }

    .arama-wrap input {
        font-size: 15px !important;
    }

    .quiz-konu-modal input {
        font-size: 16px !important;
    }

    #manuel-sentez-reason,
    #manuel-sentez-arama,
    #secici-arama {
        font-size: 16px !important;
    }

    /* Z-Index Uyumlulukları */
    .overlay {
        z-index: 498;
    }

    #manuel-sentez-overlay {
        z-index: 9989 !important;
    }

    #ag-overlay {
        z-index: 9997 !important;
    }

    #quiz-genis-overlay {
        z-index: 498 !important;
    }

    #quiz-genis-modal {
        z-index: 600 !important;
    }

    .repetition-card, [class*="tekrar"] {
        min-height: 44px;
    }

    .sag-panel-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sag-panel-tabs::-webkit-scrollbar {
        display: none;
    }

    .sag-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.not-kart.taslak {
    background: var(--surface);
    border: 1px dashed rgba(124, 111, 255, 0.3);
    padding: 10px;
    border-radius: 8px;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        border-color: rgba(124, 111, 255, 0.2);
    }
    50% {
        border-color: rgba(124, 111, 255, 0.5);
    }
    100% {
        border-color: rgba(124, 111, 255, 0.2);
    }
}

/* SPINNER */
.spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(124, 111, 255, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* SES PENDING KART */
.ses-pending-kart {
    background: linear-gradient(135deg, rgba(124, 111, 255, 0.08) 0%, rgba(124, 111, 255, 0.03) 100%);
    border: 1px solid rgba(124, 111, 255, 0.2);
    border-radius: 14px;
    padding: .85rem 1rem;
    min-width: 220px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.ses-pending-ust {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ses-pending-ikon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(124, 111, 255, 0.15);
    border: 1px solid rgba(124, 111, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-2);
    flex-shrink: 0;
    animation: ses-ikon-nabiz 2s ease-in-out infinite;
}

@keyframes ses-ikon-nabiz {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(124, 111, 255, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(124, 111, 255, 0);
    }
}

.ses-pending-etiket {
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent-2);
    letter-spacing: .3px;
    flex: 1;
}

.ses-pending-durum {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .63rem;
    color: var(--muted);
    white-space: nowrap;
}

.ses-pending-nokta {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    animation: ses-nokta-blink 1.2s ease-in-out infinite;
}

@keyframes ses-nokta-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

.ses-pending-dalga {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 28px;
    padding: 0 2px;
}

.ses-pending-dalga span {
    display: inline-block;
    width: 3px;
    border-radius: 3px;
    background: var(--accent);
    animation: ses-dalga 1.1s ease-in-out infinite;
    transform-origin: bottom;
}

.ses-pending-dalga span:nth-child(1) {
    height: 8px;
    animation-delay: 0.00s;
}

.ses-pending-dalga span:nth-child(2) {
    height: 14px;
    animation-delay: 0.09s;
}

.ses-pending-dalga span:nth-child(3) {
    height: 20px;
    animation-delay: 0.18s;
}

.ses-pending-dalga span:nth-child(4) {
    height: 26px;
    animation-delay: 0.27s;
}

.ses-pending-dalga span:nth-child(5) {
    height: 18px;
    animation-delay: 0.36s;
}

.ses-pending-dalga span:nth-child(6) {
    height: 24px;
    animation-delay: 0.45s;
}

.ses-pending-dalga span:nth-child(7) {
    height: 14px;
    animation-delay: 0.54s;
}

.ses-pending-dalga span:nth-child(8) {
    height: 22px;
    animation-delay: 0.63s;
}

.ses-pending-dalga span:nth-child(9) {
    height: 10px;
    animation-delay: 0.72s;
}

.ses-pending-dalga span:nth-child(10) {
    height: 18px;
    animation-delay: 0.81s;
}

.ses-pending-dalga span:nth-child(11) {
    height: 28px;
    animation-delay: 0.90s;
}

.ses-pending-dalga span:nth-child(12) {
    height: 12px;
    animation-delay: 0.99s;
}

@keyframes ses-dalga {
    0%, 100% {
        transform: scaleY(0.3);
        opacity: 0.4;
    }
    50% {
        transform: scaleY(1.0);
        opacity: 1;
    }
}

.ses-pending-alt {
    border-top: 1px solid rgba(124, 111, 255, 0.12);
    padding-top: .4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ses-pending-whisper {
    font-size: .62rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    opacity: .7;
}

/* AKILLI ÖNERİLER */
.oneriler-kapsayici {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    background: rgba(251, 191, 36, 0.04);
    flex-shrink: 0;
    max-height: 35vh;
    overflow-y: auto;
}

.oneriler-baslik {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Outfit', sans-serif;
    flex-shrink: 0;
}

.oneri-kart {
    background: var(--surface-2);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 0.45rem;
    transition: all 0.2s ease;
}

.oneri-kart:hover {
    border-color: rgba(251, 191, 36, 0.5);
}

.oneri-sebep {
    font-size: 0.81rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text);
    line-height: 1.4;
    font-family: 'Outfit', sans-serif;
}

.oneri-detay {
    font-size: 0.71rem;
    color: var(--muted);
    margin-bottom: 0.55rem;
    line-height: 1.4;
}

.oneri-butonlar {
    display: flex;
    gap: 0.4rem;
}

.oneri-butonlar button {
    flex: 1;
    padding: 0.35rem;
    font-size: 0.68rem;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-oneri-kabul {
    background: var(--gold);
    color: #000;
}

.btn-oneri-kabul:hover {
    background: #eab308;
}

.btn-oneri-red {
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
}

.btn-oneri-red:hover {
    background: rgba(255, 255, 255, 0.13);
    color: var(--text);
}

/* ÖNERİ NOT LİSTESİ */
.oneri-not-listesi {
    margin: 0.4rem 0 0.8rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.oneri-not-item {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    border-left: 2px solid var(--gold);
    background: rgba(251, 191, 36, 0.05);
    transition: all 0.15s;
}

.oneri-not-item input[type="checkbox"] {
    accent-color: var(--gold);
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.oneri-not-item:has(input[type="checkbox"]:not(:checked)) {
    opacity: 0.4;
    border-left-color: var(--muted);
    background: transparent;
}

.btn-oneri-detay {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: 0.2s;
}

.btn-oneri-detay:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.oneri-not-item:hover {
    background: rgba(251, 191, 36, 0.12);
}

.oneri-not-id {
    color: var(--muted);
    font-size: 0.66rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.oneri-not-baslik {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
}

/* QUİZ PANELİ */
.quiz-panel-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg);
}

/* SAĞ PANEL SEKME */
#sekme-notlar {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sag-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.sag-tab {
    flex: 1;
    padding: .62rem .5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    transition: color .18s, border-color .18s;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.2px;
}

.sag-tab.aktif {
    color: var(--accent-2);
    border-bottom-color: var(--accent);
}

.sag-tab:hover:not(.aktif) {
    color: var(--text-dim);
}

.btn-yeni-quiz {
    width: 100%;
    padding: .62rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: opacity .18s;
    margin-bottom: .5rem;
    box-shadow: 0 4px 16px rgba(124, 111, 255, 0.3);
}

.btn-yeni-quiz:hover {
    opacity: .85;
}

/* GEÇMİŞ QUİZ KARTLARI */
.quiz-gecmis-kart {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .62rem .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: .4rem;
}

.quiz-gecmis-kart .konu {
    font-size: .78rem;
    font-weight: 600;
}

.quiz-gecmis-kart .meta {
    font-size: .67rem;
    color: var(--muted);
    margin-top: .15rem;
}

.quiz-gecmis-kart .skor {
    font-size: 1.1rem;
    font-weight: 800;
}

#sag-cevap-input:focus {
    border-color: var(--accent) !important;
}

/* KONU MODAL */
.quiz-konu-modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.quiz-konu-modal {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    width: min(380px, 90vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.quiz-konu-modal h3 {
    margin: 0 0 .7rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.quiz-konu-modal p {
    font-size: .8rem;
    color: var(--muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.quiz-konu-modal input {
    width: 100%;
    padding: .7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: .88rem;
    box-sizing: border-box;
    outline: none;
    margin-bottom: .75rem;
    transition: border-color .2s;
}

.quiz-konu-modal input:focus {
    border-color: var(--accent);
}

.quiz-konu-modal .modal-butonlar {
    display: flex;
    gap: .5rem;
}

.quiz-konu-modal .modal-butonlar button {
    flex: 1;
    padding: .7rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: .83rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    border: none;
}

.quiz-konu-modal .btn-iptal {
    background: var(--surface-hover);
    color: var(--muted);
    border: 1px solid var(--border) !important;
}

.quiz-konu-modal .btn-basla {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.quiz-konu-modal .btn-basla:hover {
    opacity: .88;
}

/* BÜYÜK QUİZ MODALI */
.quiz-genis-modal {
    width: 800px;
    max-width: 95vw;
    height: auto;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.quiz-g-ekran {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    overflow-y: auto;
}

.quiz-g-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.q-badge {
    background: var(--accent-glow);
    color: var(--accent-2);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.83rem;
}

#quiz-g-cevap-input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: 0.2s;
}

#quiz-g-cevap-input:focus {
    border-color: var(--accent);
}

/* KARNE KARTLARI */
.karne-kart {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.karne-soru {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text);
}

.karne-cevaplar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    font-size: 0.88rem;
}

.karne-senin-cevabin {
    color: var(--muted);
}

.karne-senin-cevabin span {
    color: var(--text);
}

.karne-ai-aciklama {
    font-size: 0.88rem;
    line-height: 1.5;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}

.karne-puan-rozeti {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.83rem;
}

/* YENİ QUİZ DASHBOARD */
.quiz-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s, transform 0.1s;
}

.quiz-card:hover {
    border-color: rgba(124, 111, 255, 0.4);
    transform: translateY(-1px);
}

.quiz-card.pending {
    border-left: 3px solid var(--accent);
}

.quiz-card.evaluating {
    border-left: 3px solid var(--gold);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.q-badge {
    font-size: 0.63rem;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}

.badge-green {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

.badge-amber {
    background: rgba(251, 191, 36, 0.12);
    color: var(--gold);
}

.badge-red {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
}

.badge-purple {
    background: var(--accent-glow);
    color: var(--accent-2);
}

.badge-gray {
    background: var(--surface-hover);
    color: var(--muted);
}

.card-meta {
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-pill {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.63rem;
    font-weight: 600;
    color: var(--text-dim);
}

.score-bar-wrap {
    margin-top: 8px;
}

.score-bar-bg {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.score-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.63rem;
    color: var(--muted);
}

.btn-see {
    margin-top: 8px;
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
    font-size: 0.73rem;
    color: var(--text);
    transition: background 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-see:hover {
    background: var(--surface-hover);
}

.btn-start {
    margin-top: 8px;
    width: 100%;
    padding: 6px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    font-size: 0.73rem;
    color: white;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.btn-eval {
    margin-top: 8px;
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.73rem;
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
}

/* Yeni Karne */
.karne-listesi-yeni {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.karne-item-yeni {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.karne-q-yeni {
    font-size: 0.83rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text);
}

.karne-answers-yeni {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.ans-box {
    font-size: 0.73rem;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.ans-user {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.ans-user.dogru {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: var(--success);
}

.ans-correct {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: var(--success);
}

.karne-ai-yeni {
    font-size: 0.73rem;
    color: var(--muted);
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    margin-top: 4px;
    line-height: 1.5;
}


/* ==========================================================================
   SOL PANEL - PROFİL VE ÇIKIŞ KARTI STİLLERİ
   ========================================================================== */
.sol-profil-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    z-index: 11;
}

.profil-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #7c6aff), #473dc4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 111, 255, 0.25);
    user-select: none;
}

.profil-info {
    flex: 1;
    min-width: 0;
}

.profil-email {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
}

.profil-cikis-btn {
    background: none;
    border: none;
    color: var(--muted, #8e8e93);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.profil-cikis-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}


/* SESLİ NOT MARKDOWN (AKILLI ÇIKARIM) STİLLERİ */
.audio-transcript-markdown p {
    margin-bottom: 0.6rem;
}
.audio-transcript-markdown p:last-child {
    margin-bottom: 0;
}
.audio-transcript-markdown hr {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    margin: 1rem 0;
}
.audio-transcript-markdown ul {
    margin-left: 1.2rem;
    margin-top: 0.5rem;
}
.audio-transcript-markdown li {
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.9);
}
.audio-transcript-markdown strong {
    color: #fff;
    font-weight: 700;
}