/* N-F-K.com CMS Admin Dark Mode High-Contrast Styles */
:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: #0b1120;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --primary-navy: #0f172a;
    --accent-emerald: #10b981;
    --emerald-hover: #059669;
    --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
    --table-stripe: #f8fafc;
}

body.dark-mode {
    --bg-body: #090d16;
    --bg-card: #151d2a;
    --bg-header: #030712;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border-color: #273549;
    --input-bg: #0f172a;
    --input-border: #334155;
    --primary-navy: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --table-stripe: #1e293b;
}

body.dark-mode {
    background-color: var(--bg-body) !important;
    color: #f8fafc !important;
}

body.dark-mode header {
    background: var(--bg-header) !important;
    border-bottom-color: #10b981 !important;
}

/* Tüm Kartlar, Paneller, Modallar & Kapsayıcılar */
body.dark-mode .card,
body.dark-mode .modal-card,
body.dark-mode .stat-card,
body.dark-mode .slider-item,
body.dark-mode .nav-item,
body.dark-mode .category-source-item,
body.dark-mode .nav-list-wrapper,
body.dark-mode .post-card,
body.dark-mode .media-card,
body.dark-mode .bulk-bar,
body.dark-mode .batch-toolbar,
body.dark-mode table,
body.dark-mode tr,
body.dark-mode th,
body.dark-mode td,
body.dark-mode .item-content {
    background-color: var(--bg-card) !important;
    color: #f8fafc !important;
    border-color: var(--border-color) !important;
}

/* Medya Sayfası (media.php) Koyu Mod Özel Kuralları */
body.dark-mode .media-card {
    background-color: #151d2a !important;
    border-color: #273549 !important;
}

body.dark-mode .media-thumb {
    background-color: #0b1120 !important;
}

body.dark-mode .media-title {
    color: #ffffff !important;
}

body.dark-mode .media-meta {
    color: #cbd5e1 !important;
}

body.dark-mode .batch-toolbar {
    background-color: #151d2a !important;
    border-color: #273549 !important;
}

body.dark-mode .batch-select-all,
body.dark-mode .batch-select-all span,
body.dark-mode .batch-select-all strong,
body.dark-mode .batch-toolbar span,
body.dark-mode .batch-toolbar label,
body.dark-mode .batch-toolbar div {
    color: #ffffff !important;
}

body.dark-mode .btn-del-file {
    background-color: #451a1a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

body.dark-mode .btn-del-file:hover {
    background-color: #7f1d1d !important;
    color: #ffffff !important;
}

body.dark-mode .btn-copy {
    background-color: #065f46 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-copy:hover {
    background-color: #047857 !important;
}

/* Başlıklar & İçerik Başlıkları (Yüksek Kontrastlı Beyaz) */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6,
body.dark-mode .card h2,
body.dark-mode .item-title,
body.dark-mode label,
body.dark-mode .item-title-text,
body.dark-mode .post-title-link,
body.dark-mode .media-title,
body.dark-mode .stat-lbl,
body.dark-mode th,
body.dark-mode strong,
body.dark-mode b,
body.dark-mode .modal-head h3 {
    color: #ffffff !important;
}

body.dark-mode .post-title-link:hover,
body.dark-mode a:hover {
    color: #34d399 !important;
}

/* Alt Metinler & İçerik Özeti (High-Contrast Açık Gri) */
body.dark-mode p,
body.dark-mode span,
body.dark-mode div,
body.dark-mode .media-meta,
body.dark-mode .meta,
body.dark-mode .item-meta,
body.dark-mode small,
body.dark-mode li {
    color: #e2e8f0 !important;
}

/* Inline Hardcoded Koyu Renk Stillerini Ezme */
body.dark-mode [style*="color: #222"],
body.dark-mode [style*="color:#222"],
body.dark-mode [style*="color: #0f172a"],
body.dark-mode [style*="color:#0f172a"],
body.dark-mode [style*="color: #333"],
body.dark-mode [style*="color:#333"],
body.dark-mode [style*="color: #64748b"],
body.dark-mode [style*="color:#64748b"],
body.dark-mode [style*="color: #777"],
body.dark-mode [style*="color:#777"] {
    color: #e2e8f0 !important;
}

/* Form Elemanları (Input, Select, Textarea, File) */
body.dark-mode input[type="text"],
body.dark-mode input[type="password"],
body.dark-mode input[type="email"],
body.dark-mode input[type="number"],
body.dark-mode input[type="file"],
body.dark-mode select,
body.dark-mode textarea {
    background-color: var(--input-bg) !important;
    color: #ffffff !important;
    border-color: var(--input-border) !important;
}

body.dark-mode select option,
body.dark-mode select optgroup {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Rozetler, Tablar & Butonlar */
body.dark-mode .cat-tag,
body.dark-mode .cat-badge,
body.dark-mode .article-category,
body.dark-mode a.article-category,
body.dark-mode a.cat-tag {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

body.dark-mode .item-slug-text,
body.dark-mode .inline-edit-box,
body.dark-mode .btn-tab,
body.dark-mode .btn-move {
    background-color: #1e293b !important;
    color: #6ee7b7 !important;
    border-color: #334155 !important;
}

body.dark-mode .btn-tab.active {
    background-color: var(--accent-emerald) !important;
    color: #ffffff !important;
}

/* Özel Arka Planlar & Kutu İçi Alanlar */
body.dark-mode div[style*="background: #f8fafc"],
body.dark-mode div[style*="background:#f8fafc"],
body.dark-mode div[style*="background: #f1f5f9"],
body.dark-mode div[style*="background:#f1f5f9"],
body.dark-mode div[style*="background: #fff"],
body.dark-mode div[style*="background:#fff"],
body.dark-mode div[style*="background: #ffffff"],
body.dark-mode div[style*="background:#ffffff"] {
    background-color: #151d2a !important;
    border-color: #273549 !important;
    color: #f8fafc !important;
}

/* Quill Editor Dark Mode */
body.dark-mode .ql-toolbar {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .ql-toolbar .ql-stroke {
    stroke: #e2e8f0 !important;
}
body.dark-mode .ql-toolbar .ql-fill {
    fill: #e2e8f0 !important;
}
body.dark-mode .ql-toolbar .ql-picker {
    color: #e2e8f0 !important;
}
body.dark-mode #editor-container,
body.dark-mode .ql-container {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

/* Medya Seçici Modal Dark Mode */
body.dark-mode .media-modal-content {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}
body.dark-mode .media-modal-header {
    border-bottom-color: #334155 !important;
}
body.dark-mode .media-modal-header h3 {
    color: #ffffff !important;
}
body.dark-mode .media-select-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .media-select-card .media-title-label {
    color: #f1f5f9 !important;
}

/* Gece Modu Butonu Stili */
.dark-mode-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1rem;
}

.dark-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

/* Scroll to Top Floating Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    border: none;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: #059669;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}
